/* ============================================================
   Phygital-Recon  —  Shared Design System
   style.css
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  /* Default Theme (Dark Mode) */
  --bg-primary:      #080b16;
  --bg-secondary:    rgba(10, 14, 28, 0.62);
  --bg-card:         rgba(18, 24, 45, 0.42);
  --bg-card-hover:   rgba(30, 38, 68, 0.56);
  --border:          rgba(255, 255, 255, 0.14);
  --border-glow:     rgba(116, 207, 255, 0.36);
  --border-color:    var(--border);
  --accent:          #61dafb;
  --accent-blue:     var(--accent);
  --accent-green:    #64f4a2;
  --accent-orange:   #ffb85c;
  --accent-purple:   #9b8cff;
  --accent-cyan:     #61dafb;
  --text-primary:    #f7faff;
  --text-secondary:  #b7c2d8;
  --text-muted:      #7f8aa3;
  --glass-bg:        linear-gradient(145deg, rgba(255,255,255,0.13), rgba(255,255,255,0.045));
  --glass-bg-strong: linear-gradient(145deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
  --glass-shadow:    0 24px 70px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255,255,255,0.18);
  --glass-blur:      blur(22px) saturate(140%);
  --sidebar-w:       260px;
  --radius-md:       10px;
  --radius-lg:       14px;
  --radius-xl:       18px;
  --transition:      180ms cubic-bezier(.16,1,.3,1);
}

[data-theme="light"] {
  /* Light Mode */
  --bg-primary:      #eef4ff;
  --bg-secondary:    rgba(255, 255, 255, 0.56);
  --bg-card:         rgba(255, 255, 255, 0.44);
  --bg-card-hover:   rgba(255, 255, 255, 0.64);
  --border:          rgba(255, 255, 255, 0.68);
  --border-glow:     rgba(72, 134, 255, 0.28);
  --border-color:    var(--border);
  --accent:          #2563eb;
  --accent-blue:     var(--accent);
  --accent-green:    #159947;
  --accent-orange:   #d97706;
  --accent-purple:   #6d5dfc;
  --accent-cyan:     #0891b2;
  --text-primary:    #152033;
  --text-secondary:  #516078;
  --text-muted:      #8390a4;
  --glass-bg:        linear-gradient(145deg, rgba(255,255,255,0.72), rgba(255,255,255,0.38));
  --glass-bg-strong: linear-gradient(145deg, rgba(255,255,255,0.88), rgba(255,255,255,0.48));
  --glass-shadow:    0 24px 70px rgba(81, 105, 145, 0.18), inset 0 1px 0 rgba(255,255,255,0.86);
  --glass-blur:      blur(24px) saturate(150%);
}

/* ── Reset ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin:     0;
  padding:    0;
}

/* ── Base Body ──────────────────────────────────────────────── */
body {
  background:
    radial-gradient(circle at 18% 12%, rgba(99,102,241,0.24), transparent 34%),
    radial-gradient(circle at 84% 8%, rgba(20,184,166,0.20), transparent 28%),
    radial-gradient(circle at 72% 78%, rgba(249,115,22,0.12), transparent 28%),
    linear-gradient(135deg, #070914 0%, #0d1324 44%, #071411 100%);
  color:            var(--text-primary);
  font-family:      'Inter', system-ui, -apple-system, sans-serif;
  display:          flex;
  min-height:       100vh;
  line-height:      1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.78), transparent 88%);
  z-index: -1;
}

[data-theme="light"] body,
body[data-theme="light"] {
  background:
    radial-gradient(circle at 16% 14%, rgba(37,99,235,0.18), transparent 32%),
    radial-gradient(circle at 86% 10%, rgba(8,145,178,0.16), transparent 28%),
    linear-gradient(135deg, #eef4ff 0%, #f8fbff 48%, #eefaf7 100%);
}

body, .sidebar, .top-header, .main-content, .kpi-card, .chart-card, .table-card, .map-card, .student-table, input, select, button, .panel, .glass-card {
  transition: background var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition);
}

a {
  text-decoration: none;
  color:           inherit;
}

button {
  font-family: inherit;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  position:       fixed;
  left:           0;
  top:            0;
  width:          var(--sidebar-w);
  height:         100vh;
  background:     linear-gradient(180deg, rgba(12,16,31,0.76), rgba(7,12,24,0.56));
  border-right:   1px solid var(--border);
  display:        flex;
  flex-direction: column;
  z-index:        100;
  transition:     transform 0.3s cubic-bezier(0.4,0,0.2,1);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 14px 0 48px rgba(0,0,0,0.24), inset -1px 0 0 rgba(255,255,255,0.08);
}

[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(235,243,255,0.58));
  border-right: 1px solid rgba(255,255,255,0.72);
  box-shadow: 14px 0 48px rgba(82, 105, 148, 0.14), inset -1px 0 0 rgba(255,255,255,0.75);
}

/* ── Sidebar Logo ───────────────────────────────────────────── */
.sidebar-logo {
  display:       flex;
  align-items:   center;
  gap:           12px;
  padding:       20px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  flex-shrink:   0;
}

.logo-mark {
  width:            42px;
  height:           42px;
  background:       linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius:    12px;
  display:          flex;
  align-items:      center;
  justify-content:  center;
  flex-shrink:      0;
  box-shadow:       0 0 20px rgba(99,102,241,0.4);
}

.logo-mark svg {
  width:  22px;
  height: 22px;
}

.logo-text-wrap {
  display:        flex;
  flex-direction: column;
  gap:            3px;
}

.logo-text {
  font-family:    'Space Grotesk', sans-serif;
  font-size:      18px;
  font-weight:    700;
  letter-spacing: -0.3px;
  color:          var(--text-primary);
  line-height:    1.1;
}

.logo-sub {
  font-size:        10px;
  font-weight:      600;
  letter-spacing:   0.5px;
  color:            #fff;
  background:       linear-gradient(135deg, #4f52d4, #6366f1);
  border-radius:    20px;
  padding:          2px 8px;
  display:          inline-block;
  width:            fit-content;
}

/* ── Sidebar Nav ────────────────────────────────────────────── */
.sidebar-nav {
  flex:           1;
  padding:        16px 10px;
  display:        flex;
  flex-direction: column;
  gap:            2px;
  overflow-y:     auto;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background:    rgba(99,102,241,0.3);
  border-radius: 2px;
}

.nav-section-label {
  font-size:      10px;
  text-transform: uppercase;
  font-weight:    600;
  letter-spacing: 1px;
  color:          var(--text-muted);
  padding:        14px 10px 6px;
}

.nav-item {
  display:        flex;
  align-items:    center;
  gap:            10px;
  padding:        10px 12px;
  border-radius:  12px;
  color:          var(--text-secondary);
  font-size:      14px;
  font-weight:    500;
  text-decoration: none;
  transition:     var(--transition);
  cursor:         pointer;
  border:         1px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color:      var(--text-primary);
  border-color: rgba(255,255,255,0.12);
}

.nav-item.active {
  background:  linear-gradient(135deg, rgba(99,102,241,0.30), rgba(97,218,251,0.12));
  color:       var(--accent);
  border-color: rgba(97,218,251,0.34);
  box-shadow: 0 12px 28px rgba(99,102,241,0.16), inset 0 1px 0 rgba(255,255,255,0.12);
}

.nav-item svg {
  flex-shrink: 0;
  opacity:     0.75;
}

.nav-item.active svg,
.nav-item:hover svg {
  opacity: 1;
}

.nav-badge {
  margin-left:   auto;
  background:    rgba(99,102,241,0.2);
  color:         var(--accent);
  font-size:     10px;
  font-weight:   700;
  border-radius: 20px;
  padding:       2px 7px;
}

/* ── Sidebar Footer ─────────────────────────────────────────── */
.sidebar-footer {
  padding:       16px;
  border-top:    1px solid var(--border);
  display:       flex;
  align-items:   center;
  gap:           10px;
  flex-shrink:   0;
}

.avatar {
  width:            38px;
  height:           38px;
  border-radius:    50%;
  background:       linear-gradient(135deg, #6366f1, #8b5cf6);
  display:          flex;
  align-items:      center;
  justify-content:  center;
  font-size:        14px;
  font-weight:      700;
  color:            #fff;
  flex-shrink:      0;
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-size:   13px;
  font-weight: 600;
  color:       var(--text-primary);
  white-space: nowrap;
  overflow:    hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color:     var(--text-muted);
}

/* ── Main Content ───────────────────────────────────────────── */
.main-content {
  margin-left:    var(--sidebar-w);
  flex:           1;
  display:        flex;
  flex-direction: column;
  min-height:     100vh;
}

/* ── Top Header ─────────────────────────────────────────────── */
.top-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         0 28px;
  height:          68px;
  background:      rgba(9, 13, 28, 0.48);
  border-bottom:   1px solid rgba(255,255,255,0.12);
  position:        sticky;
  top:             0;
  z-index:         50;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  flex-shrink:     0;
  box-shadow:      0 14px 40px rgba(0,0,0,0.20);
}

[data-theme="light"] .top-header {
  background: rgba(246, 250, 255, 0.62);
  border-bottom: 1px solid rgba(255,255,255,0.70);
  box-shadow: 0 14px 36px rgba(82, 105, 148, 0.12);
}

.header-left {
  display:     flex;
  align-items: center;
  gap:         16px;
}

.header-title h1 {
  font-family:    'Space Grotesk', sans-serif;
  font-size:      18px;
  font-weight:    700;
  letter-spacing: -0.3px;
  color:          var(--text-primary);
  line-height:    1.2;
}

.header-subtitle {
  font-size: 12px;
  color:     var(--text-muted);
  margin-top: 1px;
}

.header-right {
  display:     flex;
  align-items: center;
  gap:         10px;
}

/* ── Search Box ─────────────────────────────────────────────── */
.search-box {
  display:       flex;
  align-items:   center;
  gap:           8px;
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-md);
  padding:       8px 14px;
  transition:    var(--transition);
}

.search-box input {
  background:  transparent;
  border:      none;
  outline:     none;
  font-size:   13px;
  color:       var(--text-primary);
  width:       200px;
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box:focus-within {
  border:     1px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.search-icon {
  color:      var(--text-muted);
  flex-shrink: 0;
}

/* ── Notification Bell ──────────────────────────────────────── */
.notif-btn {
  position:        relative;
  width:           38px;
  height:          38px;
  background:      var(--bg-card);
  border:          1px solid var(--border);
  border-radius:   var(--radius-md);
  display:         flex;
  align-items:     center;
  justify-content: center;
  color:           var(--text-secondary);
  cursor:          pointer;
  transition:      var(--transition);
  flex-shrink:     0;
}

.notif-btn:hover {
  background:  var(--bg-card-hover);
  color:       var(--text-primary);
  border-color: var(--border-glow);
}

.notif-dot {
  position:      absolute;
  top:           6px;
  right:         6px;
  width:         7px;
  height:        7px;
  background:    var(--accent-orange);
  border-radius: 50%;
  border:        2px solid var(--bg-secondary);
  animation:     pulse 2s ease-in-out infinite;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  background:    linear-gradient(135deg, #6366f1, #8b5cf6);
  color:         #fff;
  border:        none;
  border-radius: var(--radius-md);
  padding:       9px 18px;
  font-size:     13px;
  font-weight:   500;
  cursor:        pointer;
  transition:    var(--transition);
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  line-height:   1;
}

.btn-primary:hover {
  transform:  translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-md);
  color:         var(--text-secondary);
  font-size:     13px;
  font-weight:   500;
  padding:       8px 16px;
  cursor:        pointer;
  transition:    var(--transition);
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  line-height:   1;
}

.btn-secondary:hover {
  background:   var(--bg-card-hover);
  color:        var(--text-primary);
  border-color: var(--border-glow);
}

/* ── Chip / Filter Pills ────────────────────────────────────── */
.chip {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: 9999px;
  padding:       5px 12px;
  font-size:     11.5px;
  font-weight:   500;
  color:         var(--text-muted);
  cursor:        pointer;
  transition:    var(--transition);
  user-select:   none;
}

.chip.active,
.chip:hover {
  background:   rgba(99,102,241,0.15);
  border-color: var(--accent);
  color:        var(--accent);
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display:        inline-flex;
  align-items:    center;
  gap:            4px;
  padding:        3px 10px;
  border-radius:  9999px;
  font-size:      11.5px;
  font-weight:    600;
}

.badge-tech {
  background: rgba(99,102,241,0.15);
  color:      var(--accent);
}

.badge-nontech {
  background: rgba(249,115,22,0.12);
  color:      var(--accent-orange);
}

.badge-general {
  background: rgba(100,100,130,0.15);
  color:      var(--text-muted);
}

.badge-paid {
  background: rgba(34,197,94,0.15);
  color:      var(--accent-green);
}

.badge-unpaid {
  background: rgba(239,68,68,0.12);
  color:      #f43f5e;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar {
  width:  6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background:    rgba(99,102,241,0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { transform: scale(1);   opacity: 1;   }
  50%       { transform: scale(1.3); opacity: 0.8; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes countUp {
  /* Controlled via JavaScript */
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes gradientShift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

@keyframes float {
  0%,100% { transform: translateY(0px)   rotate(0deg);   }
  33%      { transform: translateY(-20px) rotate(5deg);   }
  66%      { transform: translateY(10px)  rotate(-3deg);  }
}

@keyframes shake {
  0%,100% { transform: translateX(0);    }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px);  }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(5px);  }
}

/* ── Responsive ─────────────────────────────────────────────── */
.menu-toggle {
  display:         none;
  width:           38px;
  height:          38px;
  background:      var(--bg-card);
  border:          1px solid var(--border);
  border-radius:   var(--radius-md);
  align-items:     center;
  justify-content: center;
  color:           var(--text-secondary);
  cursor:          pointer;
  transition:      var(--transition);
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: none;
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .search-box {
    display: none;
  }
}

/* â”€â”€ Theme Toggle Button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition);
  color: var(--text-secondary);
}
.theme-toggle-btn:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* ── SVG Icon Styling (UI/UX Pro Max) ─────────────────────── */
.nav-icon-svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform var(--transition);
}

.sidebar-nav-item:hover .nav-icon-svg,
.sidebar-nav-item.active .nav-icon-svg {
  transform: scale(1.1);
}

.admin-tab-icon-svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  vertical-align: middle;
  margin-right: 6px;
  transition: transform var(--transition);
}

.admin-tab-btn:hover .admin-tab-icon-svg,
.admin-tab-btn.active .admin-tab-icon-svg {
  transform: translateY(-1px);
}

/* Accessibility Focus Outlines */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-item:focus-visible,
.admin-tab-btn:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px !important;
}

/* Glassmorphism polish */
.header-search-wrapper,
.header-date-display,
.theme-toggle-btn,
.notif-btn,
.header-action-btn,
.search-box,
input,
select,
button {
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.header-search-wrapper,
.header-date-display,
.theme-toggle-btn,
.notif-btn,
.header-action-btn {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 10px 26px rgba(0,0,0,0.18);
}

.header-search,
.header-search-wrapper input {
  background: transparent !important;
  color: var(--text-primary) !important;
  border: 0 !important;
  outline: 0 !important;
}

.header-search::placeholder {
  color: var(--text-muted);
}

.header-search-wrapper:focus-within,
.header-action-btn:hover,
.theme-toggle-btn:hover,
.notif-btn:hover {
  border-color: var(--border-glow) !important;
  background: rgba(255,255,255,0.13) !important;
  box-shadow: 0 0 0 3px rgba(97,218,251,0.10), 0 16px 34px rgba(0,0,0,0.22);
}

.sidebar-footer {
  background: rgba(255,255,255,0.035);
}

.header-left {
  min-width: 280px;
}

.header-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  color: var(--text-primary);
  white-space: nowrap;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 180px;
}

.header-search-wrapper {
  width: min(260px, 100%);
}

.header-right {
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.header-action-btn {
  min-height: 42px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .header-title {
    font-size: 24px;
  }

  .header-left {
    min-width: 230px;
  }

  .header-search-wrapper {
    width: 210px;
  }

  .header-action-btn {
    padding-inline: 12px;
  }
}

/* Header cleanup after glass refresh */
.top-header {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(280px, 420px) minmax(430px, auto);
  gap: 18px;
  height: 74px;
  padding: 0 26px;
}

.hamburger {
  display: none;
}

.header-left {
  min-width: 0;
  gap: 0;
}

.header-title {
  font-size: 27px;
  line-height: 1.05;
}

.header-subtitle {
  margin-top: 3px;
}

.header-center {
  min-width: 0;
  justify-content: stretch;
}

.header-search-wrapper {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px !important;
  padding: 0 12px;
  position: relative;
}

.header-search-wrapper .search-icon {
  flex: 0 0 auto;
}

.header-search {
  width: 100% !important;
  min-width: 0;
  font-size: 13px;
}

.search-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 120;
  display: none;
  max-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(18,24,45,0.94), rgba(9,15,31,0.90));
  box-shadow: 0 24px 70px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,255,255,0.14);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

.search-popover.show {
  display: block;
}

.search-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
}

.search-popover-count {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.search-popover-list {
  max-height: 276px;
  overflow-y: auto;
  padding: 6px;
}

.search-result-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  text-align: left;
}

.search-result-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: var(--text-primary);
}

.search-result-title {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-meta {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 2px;
}

.search-result-students {
  align-self: center;
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.search-popover-empty {
  padding: 18px 14px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

[data-theme="light"] .search-popover {
  background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(238,247,255,0.90));
  border-color: rgba(255,255,255,0.78);
  box-shadow: 0 24px 60px rgba(82,105,148,0.18), inset 0 1px 0 rgba(255,255,255,0.92);
}

.header-right {
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.header-date-display {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px !important;
  padding: 0 12px;
}

.theme-toggle-btn,
.notif-btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
}

.header-action-btn {
  min-height: 40px;
  border-radius: 12px !important;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .top-header {
    grid-template-columns: minmax(260px, 1fr) minmax(200px, 300px) auto;
    gap: 12px;
  }

  .header-title {
    font-size: 22px;
  }

  .header-date-display {
    display: none;
  }
}

@media (max-width: 768px) {
  .top-header {
    grid-template-columns: auto 1fr;
    height: auto;
    min-height: 72px;
    padding: 12px 16px;
  }

  .hamburger {
    display: inline-flex;
  }

  .header-center {
    grid-column: 1 / -1;
    order: 3;
  }

  .header-right {
    justify-self: end;
  }
}

