/* ============================================
   CORE — Base styles, tokens, layout, header, footer
   Includes: Design tokens, reset, glass panel,
   header, loader, main layout, toast, footer,
   empty state, animations, responsive layout,
   auth UI, pagination controls
   ============================================ */

/* ============================================
   DANH SÁCH TALENT GẠO NÂU
   Dark Luxury · Liquid Glass · 3-Pane Dashboard
   ============================================ */

/* Google Fonts removed — using Arial system font */

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../vendor/fonts/material-symbols-outlined-400.woff2') format('woff2');
}

/* ─── Design Tokens ─── */
:root {
  --bg-page: #1d1a15;
  --bg-surface: #231F20;
  --bg-surface-alpha: rgba(35, 31, 32, 0.7);
  --bg-dark: #15120e;
  --bg-card: var(--bg-surface);
  --surface-card: var(--bg-surface);

  --text-light: #F9F7F1;
  --text-muted: #b1ada5;
  --text-dim: #7a756e;

  --primary: #BA9E69;
  --primary-hover: #c9ae7c;
  --primary-lighter: #d4bd86;
  --accent: var(--primary);
  --primary-alpha-20: rgba(186, 158, 105, 0.2);
  --primary-alpha-15: rgba(186, 158, 105, 0.15);
  --primary-alpha-08: rgba(186, 158, 105, 0.08);
  --primary-alpha-30: rgba(186, 158, 105, 0.3);
  --primary-glow: 0 0 15px rgba(186, 158, 105, 0.3);

  --secondary: #555E34;
  --secondary-text: #a3b16c;
  --secondary-alpha: rgba(85, 94, 52, 0.2);

  --white-05: rgba(255, 255, 255, 0.05);
  --white-08: rgba(255, 255, 255, 0.08);
  --white-10: rgba(255, 255, 255, 0.1);
  --white-12: rgba(255, 255, 255, 0.12);
  --white-15: rgba(255, 255, 255, 0.15);

  --kol-color: #BA9E69;
  --model-color: #a78bfa;
  --koc-color: #2dd4bf;
  --vote-color: #e74c6f;

  --glass-bg: rgba(35, 31, 32, 0.7);
  --glass-border: rgba(186, 158, 105, 0.2);
  --glass-blur: blur(12px);
  --glass-radius: 22px;
  --glass-radius-sm: 14px;
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);

  --font-display: Arial, Helvetica, sans-serif;
  --font-body: Arial, Helvetica, sans-serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  --max-width: 1440px;
  --content-max: 1280px;
}

html[data-gn-color-demo] {
  --bg-page: #f2eee6;
  --bg-surface: #fbf8f0;
  --bg-surface-alpha: #fbf8f0;
  --bg-dark: #ebe3d7;
  --bg-card: #fffdf7;
  --surface-card: #fffdf7;

  --text-light: #29251f;
  --text-muted: #4b4339;
  --text-dim: #5c5146;

  --primary: #bd9b58;
  --primary-hover: #a98744;
  --primary-lighter: #5d4314;
  --accent: #bd9b58;
  --primary-alpha-20: rgba(189, 155, 88, 0.2);
  --primary-alpha-15: rgba(189, 155, 88, 0.15);
  --primary-alpha-08: rgba(189, 155, 88, 0.08);
  --primary-alpha-30: rgba(189, 155, 88, 0.3);
  --primary-glow: 0 0 15px rgba(189, 155, 88, 0.25);

  --secondary: #cce4d2;
  --secondary-text: #3dbb56;
  --secondary-alpha: rgba(204, 228, 210, 0.55);

  --white-05: rgba(45, 43, 40, 0.05);
  --white-08: rgba(45, 43, 40, 0.08);
  --white-10: rgba(45, 43, 40, 0.1);
  --white-12: rgba(45, 43, 40, 0.12);
  --white-15: rgba(45, 43, 40, 0.15);

  --kol-color: #bd9b58;
  --model-color: #d7adbb;
  --koc-color: #3dbb56;
  --vote-color: #ff4938;

  --glass-bg: #fbf8f0;
  --glass-border: rgba(186, 158, 105, 0.64);
  --glass-blur: none;
  --glass-shadow: 0 14px 34px rgba(79, 64, 35, 0.08);
  --glass-highlight: none;
  --glass-hover: #f2eadf;
  --focus-ring: 0 0 0 3px rgba(189, 155, 88, 0.2);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(186, 158, 105, 0.2);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(186, 158, 105, 0.4);
}

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

/* ─── Utility: Glass Panel ─── */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  overflow: hidden;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  vertical-align: middle;
}

/* ============================================ HEADER ============================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  will-change: transform;
  border-bottom: 1px solid rgba(52, 49, 45, 0.8);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-logo-icon {
  font-size: 1.75rem;
  color: var(--primary);
}

.header-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--text-light);
  white-space: nowrap;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(52, 49, 45, 0.5);
  border: 1px solid var(--white-10);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  width: 240px;
  transition: var(--transition-fast);
}

.header-search:focus-within {
  border-color: rgba(186, 158, 105, 0.4);
}

.header-search .material-symbols-outlined {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.header-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 0.85rem;
  width: 100%;
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition-fast);
  text-transform: uppercase;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link.active {
  color: var(--primary);
  border-bottom: 1px solid var(--primary);
  padding-bottom: 2px;
}

.btn-primary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--primary);
  color: var(--bg-page);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-body);
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--primary-glow);
  white-space: nowrap;
}

.btn-primary-pill:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary-pill .material-symbols-outlined {
  font-size: 1.1rem;
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-alpha-20);
  border: 1px solid var(--white-10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
}

/* ============================================ LOADER ============================================ */
.loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  gap: 1.25rem;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--primary-alpha-20);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loader-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================ MAIN LAYOUT ============================================ */
.main-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* ============================================ TOAST ============================================ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary);
  color: var(--bg-page);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
  white-space: nowrap;
  box-shadow: var(--primary-glow);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================ FOOTER ============================================ */
.app-footer {
  border-top: 1px solid rgba(52, 49, 45, 0.8);
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.footer-version {
  color: var(--text-dim);
}

/* ============================================ EMPTY STATE ============================================ */
.empty-state {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-dim);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.3;
}

.empty-state-text {
  font-size: 0.9rem;
}

/* ============================================ ANIMATIONS ============================================ */
.talent-table tbody tr {
  animation: fadeRow var(--transition-normal) both;
}

@keyframes fadeRow {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================ RESPONSIVE ============================================ */
@media (max-width: 1100px) {
  .preview-panel {
    display: none;
  }

  .three-pane {
    gap: 1rem;
  }
}

@media (max-width: 860px) {
  .sidebar {
    display: none;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-mobile-menu-btn {
    display: flex;
  }

  .header-nav {
    display: none;
  }

  /* Dropdown menu when hamburger is toggled — placed AFTER display:none to override */
  .header-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0.5rem;
    min-width: 200px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    gap: 0.25rem;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  .header-nav.mobile-open .nav-link {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 8px;
  }

  .header-nav.mobile-open .nav-link.active {
    border-bottom: none;
    background: var(--primary-alpha-15);
    padding-bottom: 0.85rem;
  }

  .header-nav.mobile-open .nav-link:hover {
    background: var(--white-05);
  }

  .header-search {
    width: 180px;
  }

  .three-pane {
    padding: 1rem;
  }

  .hero-section {
    margin: 1rem;
    padding: 1.5rem;
  }
}

@media (max-width: 600px) {
  .app-header {
    padding: 0 0.75rem;
    height: 56px;
  }

  .header-title {
    font-size: 0.85rem;
  }

  .header-search {
    display: none;
  }

  .hero-section {
    min-height: 200px;
    margin: 0.5rem;
    padding: 1rem;
  }

  .hero-title {
    font-size: 1.3rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .three-pane {
    padding: 0.5rem;
  }

  .btn-primary-pill span:last-child {
    display: none;
  }

  .modal-overlay {
    padding: 0.5rem;
  }

  .compare-container {
    padding: 0.75rem;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }
}
/* ============================================
   AUTH UI — Login / Signup
   ============================================ */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 2rem;
  border-radius: 1.25rem;
  border: 1px solid var(--white-05);
  background: var(--bg-surface-alpha);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.5rem;
  color: var(--text-light);
  margin: 0.75rem 0 0.25rem;
  letter-spacing: 0.1em;
}

.auth-subtitle {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.75rem;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--white-05);
}

.auth-tab {
  flex: 1;
  padding: 0.65rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.25s;
}

.auth-tab.active {
  background: var(--primary-alpha-20);
  color: var(--primary);
}

.auth-tab:hover:not(.active) {
  background: var(--white-05);
}

.auth-form .form-group {
  margin-bottom: 1.25rem;
}

.auth-form .form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-form .form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--white-05);
  border-radius: 0.5rem;
  color: var(--text-light);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.auth-form .form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-alpha-15);
}

.auth-form .form-input::placeholder {
  color: var(--text-dim);
}

.auth-error {
  padding: 0.65rem 0.85rem;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 0.5rem;
  color: #f87171;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.auth-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), #c9ae7c);
  color: #1a1714;
  border: none;
  border-radius: 0.5rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--primary-glow);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

/* Header logout button */
.header-logout-btn {
  background: none;
  border: 1px solid var(--white-05);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s;
}

.header-logout-btn:hover {
  border-color: #f87171;
  color: #f87171;
}

.header-logout-btn .material-symbols-outlined {
  font-size: 0.9rem;
}

/* Header mobile menu (hamburger) — hidden on desktop, shown ≤860px */
.header-mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--white-05);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.header-mobile-menu-btn:hover {
  background: var(--primary-alpha-15);
  border-color: var(--primary-alpha-30);
}

.header-mobile-menu-btn .material-symbols-outlined {
  font-size: 1.4rem;
}

/* ============================================
   PAGINATION CONTROLS
   ============================================ */

.grid-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
  margin-top: 0.5rem;
}

.grid-page-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.grid-page-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.grid-page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.06));
  border-radius: 8px;
  background: var(--white-05, rgba(255, 255, 255, 0.03));
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.grid-page-btn .material-symbols-outlined {
  font-size: 1rem;
}

.grid-page-btn:hover:not(:disabled):not(.active) {
  background: var(--white-08, rgba(255, 255, 255, 0.06));
  color: var(--text-light);
  border-color: var(--primary);
}

.grid-page-btn.active {
  background: var(--primary, #BA9E69);
  color: #1d1a15;
  border-color: var(--primary, #BA9E69);
  font-weight: 700;
}

.grid-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.grid-page-ellipsis {
  color: var(--text-dim);
  font-size: 0.75rem;
  padding: 0 4px;
}

.grid-page-prev,
.grid-page-next {
  padding: 0 6px;
}

/* KOL Tracker pagination */
.kol-pagination {
  padding: 1rem 1.5rem;
}

@media (max-width: 768px) {
  .grid-pagination {
    flex-direction: column;
    gap: 0.5rem;
  }

  .grid-page-btn {
    min-width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }
}

/* ============================================
   UX REDESIGN SHELL — persistent nav + mobile safe layout
   ============================================ */
:root {
  --bg-page: #171410;
  --bg-surface: #201c18;
  --bg-surface-alpha: rgba(32, 28, 24, 0.82);
  --bg-dark: #120f0c;
  --text-light: #fbf4e7;
  --text-muted: #c8bda9;
  --text-dim: #9d927f;
  --primary: #c8a96a;
  --primary-hover: #e1c98c;
  --primary-lighter: #ead7a4;
  --glass-bg: rgba(32, 28, 24, 0.78);
  --glass-border: rgba(200, 169, 106, 0.18);
  --glass-radius: 16px;
  --glass-radius-sm: 12px;
  --glass-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

html,
body,
.main-layout {
  max-width: 100%;
  overflow-x: hidden;
}

.app-header {
  max-width: none;
  height: 72px;
  padding: 0 22px;
  background: rgba(23, 20, 16, 0.94);
  border-bottom: 1px solid rgba(200, 169, 106, 0.14);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  z-index: 300;
}

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

.header-logo-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(200, 169, 106, 0.14);
  border: 1px solid rgba(200, 169, 106, 0.22);
  font-size: 1.35rem;
}

.header-title {
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
  letter-spacing: 0;
}

.header-right {
  gap: 0.75rem;
  min-width: 0;
}

.header-nav,
.header-nav.mobile-open {
  display: none !important;
}

.header-mobile-menu-btn {
  display: none !important;
}

.btn-primary-pill,
.header-logout-btn,
.header-avatar {
  min-height: 44px;
}

.btn-primary-pill {
  padding: 0 16px;
  border-radius: 12px;
  background: var(--primary);
  box-shadow: none;
}

.header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #29231d;
  border-color: rgba(200, 169, 106, 0.18);
}

.header-logout-btn {
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.main-layout {
  display: block;
  max-width: none;
  width: calc(100% - 260px);
  margin: 0 0 0 260px;
  min-height: calc(100vh - 72px);
}

.app-side-nav {
  position: fixed;
  top: 72px;
  left: 0;
  bottom: 0;
  z-index: 120;
  width: 260px;
  padding: 18px 14px;
  background: #171410;
  border-right: 1px solid rgba(200, 169, 106, 0.14);
  overflow-y: auto;
}

.side-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(200, 169, 106, 0.16);
  border-radius: 14px;
  background: #201c18;
}

.side-nav-brand .material-symbols-outlined {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(200, 169, 106, 0.14);
  color: var(--primary);
}

.side-nav-brand strong,
.side-nav-brand small {
  display: block;
  letter-spacing: 0;
}

.side-nav-brand strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.side-nav-brand small {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.side-nav-section {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(200, 169, 106, 0.1);
}

.side-nav-section:last-child {
  border-bottom: none;
}

.side-nav-label {
  padding: 0 10px 4px;
  color: var(--text-dim);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-side-nav .nav-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.app-side-nav .nav-link .material-symbols-outlined {
  width: 22px;
  font-size: 1.18rem;
  color: var(--text-dim);
}

.app-side-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-light);
}

.app-side-nav .nav-link.active {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(200, 169, 106, 0.28);
  border-color: rgba(200, 169, 106, 0.28);
  background: rgba(200, 169, 106, 0.13);
  color: var(--text-light);
}

.app-side-nav .nav-link.active .material-symbols-outlined {
  color: var(--primary);
}

.app-bottom-nav {
  display: none;
}

.app-footer {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 1180px) {
  .main-layout {
    width: calc(100% - 224px);
    margin-left: 224px;
  }

  .app-side-nav {
    width: 224px;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 82px;
  }

  .app-header {
    height: 60px;
    padding: 0 12px;
  }

  .header-title {
    max-width: 44vw;
    font-size: 0.86rem;
  }

  .header-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .header-right {
    gap: 0.5rem;
  }

  .btn-primary-pill {
    min-width: 44px;
    padding: 0;
    justify-content: center;
  }

  .btn-primary-pill span:last-child,
  .header-logout-btn #logoutBtnLabel {
    display: none;
  }

  .header-logout-btn {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .header-avatar {
    display: none;
  }

  .main-layout {
    width: 100%;
    margin-left: 0;
    min-height: calc(100vh - 60px);
  }

  .app-side-nav {
    display: none;
  }

  .app-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 350;
    display: flex;
    gap: 6px;
    min-height: 66px;
    padding: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    background: rgba(23, 20, 16, 0.96);
    border: 1px solid rgba(200, 169, 106, 0.18);
    border-radius: 16px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.45);
  }

  .app-bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .app-bottom-nav .nav-link {
    min-width: 68px;
    min-height: 50px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text-dim);
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
  }

  .app-bottom-nav .nav-link .material-symbols-outlined {
    font-size: 1.24rem;
  }

  .app-bottom-nav .nav-link.active {
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(200, 169, 106, 0.32);
    border-color: rgba(200, 169, 106, 0.32);
    background: rgba(200, 169, 106, 0.14);
    color: var(--text-light);
  }

  .app-footer {
    padding: 1rem 1rem 6rem;
  }

  .toast {
    bottom: 5.75rem;
    max-width: calc(100vw - 24px);
    white-space: normal;
    text-align: center;
  }
}

/* ============================================
   LIQUID GLASS LEVEL 2 — global polish
   ============================================ */
:root {
  --bg-page: #120f0c;
  --bg-surface: #1b1713;
  --bg-surface-alpha: rgba(27, 23, 19, 0.76);
  --bg-dark: #0d0b09;
  --bg-card: rgba(29, 25, 21, 0.72);
  --surface-card: rgba(29, 25, 21, 0.78);

  --text-light: #fff8ec;
  --text-muted: #d4c8b3;
  --text-dim: #a99c86;

  --primary: #d7b875;
  --primary-hover: #ead39d;
  --primary-lighter: #f1deb2;
  --accent: var(--primary);
  --primary-alpha-20: rgba(215, 184, 117, 0.2);
  --primary-alpha-15: rgba(215, 184, 117, 0.15);
  --primary-alpha-08: rgba(215, 184, 117, 0.08);
  --primary-alpha-30: rgba(215, 184, 117, 0.3);
  --primary-glow: 0 14px 34px rgba(215, 184, 117, 0.22);

  --secondary: #61745c;
  --secondary-text: #b8d2a8;
  --secondary-alpha: rgba(111, 145, 103, 0.18);

  --white-05: rgba(255, 248, 236, 0.05);
  --white-08: rgba(255, 248, 236, 0.08);
  --white-10: rgba(255, 248, 236, 0.1);
  --white-12: rgba(255, 248, 236, 0.12);
  --white-15: rgba(255, 248, 236, 0.15);

  --glass-bg: linear-gradient(145deg, rgba(34, 30, 25, 0.72), rgba(18, 15, 12, 0.58));
  --glass-border: rgba(232, 205, 145, 0.26);
  --glass-blur: blur(12px) saturate(1.26);
  --glass-radius: 18px;
  --glass-radius-sm: 14px;
  --glass-shadow: 0 22px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 248, 236, 0.08);
  --glass-shadow-soft: 0 14px 38px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 248, 236, 0.07);
  --glass-highlight: linear-gradient(180deg, rgba(255, 248, 236, 0.08), rgba(255, 248, 236, 0.02));
  --glass-hover: linear-gradient(145deg, rgba(47, 41, 34, 0.8), rgba(24, 20, 16, 0.66));
  --cool-glass: rgba(107, 160, 149, 0.09);
  --focus-ring: 0 0 0 3px rgba(215, 184, 117, 0.18);
}

html,
body {
  background-color: #120f0c;
}

body {
  background:
    linear-gradient(135deg, rgba(107, 160, 149, 0.08) 0%, transparent 28%),
    linear-gradient(225deg, rgba(122, 103, 158, 0.07) 0%, transparent 32%),
    linear-gradient(180deg, #17120e 0%, #100d0a 46%, #15100c 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100dvh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 248, 236, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 248, 236, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 82%);
}

.glass-panel,
.auth-card,
.modal-container,
.talent-table-wrap,
.filters-bar,
.preview-panel,
.sidebar,
.finance-card,
.fin-tabs,
.booking-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-panel,
.auth-card,
.modal-container,
.booking-card,
.finance-card {
  position: relative;
}

.glass-panel::before,
.auth-card::before,
.modal-container::before,
.booking-card::before,
.finance-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: var(--glass-highlight);
}

.app-header {
  background: linear-gradient(180deg, rgba(21, 17, 13, 0.9), rgba(14, 11, 8, 0.78));
  backdrop-filter: blur(12px) saturate(1.28);
  -webkit-backdrop-filter: blur(12px) saturate(1.28);
  border-bottom: 1px solid rgba(232, 205, 145, 0.2);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34), inset 0 -1px 0 rgba(255, 248, 236, 0.05);
}

.app-side-nav,
.app-bottom-nav {
  background: linear-gradient(180deg, rgba(22, 18, 14, 0.88), rgba(14, 11, 8, 0.84));
  backdrop-filter: blur(12px) saturate(1.24);
  -webkit-backdrop-filter: blur(12px) saturate(1.24);
  border-color: rgba(232, 205, 145, 0.18);
  box-shadow: 14px 0 54px rgba(0, 0, 0, 0.22), inset -1px 0 0 rgba(255, 248, 236, 0.04);
}

.side-nav-brand,
.app-side-nav .nav-link,
.header-logo-icon,
.header-avatar,
.header-logout-btn,
.header-mobile-menu-btn,
.grid-page-btn,
.auth-tabs,
.auth-form .form-input {
  background: linear-gradient(145deg, rgba(255, 248, 236, 0.08), rgba(255, 248, 236, 0.025));
  border-color: rgba(232, 205, 145, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 248, 236, 0.07);
}

.btn-primary-pill,
.auth-submit-btn,
.grid-page-btn.active,
.toast {
  background: linear-gradient(135deg, #e4c783, #b9964d);
  color: #17110c;
  box-shadow: 0 14px 34px rgba(215, 184, 117, 0.24), inset 0 1px 0 rgba(255, 248, 236, 0.38);
}

.btn-primary-pill:hover,
.auth-submit-btn:hover,
.app-side-nav .nav-link:hover,
.grid-page-btn:hover:not(:disabled):not(.active),
.header-mobile-menu-btn:hover {
  transform: translateY(-1px);
}

.app-side-nav .nav-link:hover,
.app-side-nav .nav-link.active,
.app-bottom-nav .nav-link.active,
.header-nav.mobile-open .nav-link:hover,
.header-nav.mobile-open .nav-link.active {
  background: linear-gradient(145deg, rgba(215, 184, 117, 0.18), rgba(107, 160, 149, 0.08));
  border-color: rgba(232, 205, 145, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 248, 236, 0.08);
}

button,
input,
select,
textarea,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.auth-form .form-input:focus,
.header-search:focus-within,
.filters-search:focus-within,
.sort-select:focus {
  border-color: rgba(232, 205, 145, 0.5);
  box-shadow: var(--focus-ring), inset 0 1px 0 rgba(255, 248, 236, 0.06);
}

.header-nav.mobile-open,
.booking-autocomplete-dropdown,
.talent-suggest-dropdown {
  background: linear-gradient(145deg, rgba(29, 24, 19, 0.96), rgba(15, 12, 9, 0.92));
  backdrop-filter: blur(12px) saturate(1.22);
  -webkit-backdrop-filter: blur(12px) saturate(1.22);
  border-color: rgba(232, 205, 145, 0.28);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 248, 236, 0.08);
}

@media (max-width: 760px) {
  .app-bottom-nav {
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 248, 236, 0.08);
  }
}

/* GẠO NÂU DATA — color-only shell preview */
html[data-gn-color-demo],
html[data-gn-color-demo] body {
  background-color: #fbfaf4;
}

html[data-gn-color-demo] body {
  background: linear-gradient(180deg, #fbfaf4 0%, #fffdf7 54%, #f8f5ee 100%);
  color: #2d2b28;
}

html[data-gn-color-demo] body::before {
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(223, 207, 175, 0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(223, 207, 175, 0.24) 1px, transparent 1px);
}

html[data-gn-color-demo] .app-header {
  background: rgba(248, 245, 238, 0.96);
  border-bottom-color: #dfcfaf;
  box-shadow: 0 12px 32px rgba(79, 64, 35, 0.08);
}

html[data-gn-color-demo] .app-side-nav,
html[data-gn-color-demo] .app-bottom-nav {
  background: rgba(248, 245, 238, 0.94);
  border-color: #dfcfaf;
  box-shadow: 12px 0 36px rgba(79, 64, 35, 0.06);
}

html[data-gn-color-demo] .side-nav-brand,
html[data-gn-color-demo] .app-side-nav .nav-link,
html[data-gn-color-demo] .app-bottom-nav .nav-link,
html[data-gn-color-demo] .header-logo-icon,
html[data-gn-color-demo] .header-avatar,
html[data-gn-color-demo] .header-logout-btn,
html[data-gn-color-demo] .header-mobile-menu-btn,
html[data-gn-color-demo] .grid-page-btn,
html[data-gn-color-demo] .auth-tabs,
html[data-gn-color-demo] .auth-form .form-input {
  background: rgba(255, 253, 247, 0.88);
  border-color: rgba(223, 207, 175, 0.78);
  box-shadow: none;
}

html[data-gn-color-demo] .side-nav-brand small,
html[data-gn-color-demo] .side-nav-label,
html[data-gn-color-demo] .app-side-nav .nav-link,
html[data-gn-color-demo] .app-bottom-nav .nav-link,
html[data-gn-color-demo] .header-logout-btn {
  color: #746f68;
}

html[data-gn-color-demo] .side-nav-brand strong,
html[data-gn-color-demo] .header-title,
html[data-gn-color-demo] .app-side-nav .nav-link:hover,
html[data-gn-color-demo] .app-side-nav .nav-link.active,
html[data-gn-color-demo] .app-bottom-nav .nav-link.active {
  color: #2d2b28;
}

html[data-gn-color-demo] .app-side-nav .nav-link .material-symbols-outlined,
html[data-gn-color-demo] .app-bottom-nav .nav-link .material-symbols-outlined {
  color: #5f5a53;
}

html[data-gn-color-demo] .header-logo-icon,
html[data-gn-color-demo] .side-nav-brand .material-symbols-outlined,
html[data-gn-color-demo] .app-side-nav .nav-link.active .material-symbols-outlined,
html[data-gn-color-demo] .app-bottom-nav .nav-link.active .material-symbols-outlined {
  color: #5d4314;
}

html[data-gn-color-demo] .app-side-nav .nav-link:hover,
html[data-gn-color-demo] .app-side-nav .nav-link.active,
html[data-gn-color-demo] .app-bottom-nav .nav-link.active,
html[data-gn-color-demo] .header-nav.mobile-open .nav-link:hover,
html[data-gn-color-demo] .header-nav.mobile-open .nav-link.active {
  background: rgba(230, 223, 200, 0.72);
  border-color: rgba(189, 155, 88, 0.5);
  box-shadow: none;
}

html[data-gn-color-demo] .btn-primary-pill,
html[data-gn-color-demo] .auth-submit-btn,
html[data-gn-color-demo] .grid-page-btn.active,
html[data-gn-color-demo] .toast {
  background: #bd9b58;
  color: #2d2b28;
  box-shadow: 0 10px 24px rgba(189, 155, 88, 0.2);
}

html[data-gn-color-demo] .btn-primary-pill:hover,
html[data-gn-color-demo] .auth-submit-btn:hover {
  background: #a98744;
}

html[data-gn-color-demo] .app-footer,
html[data-gn-color-demo] .side-nav-section {
  border-color: rgba(223, 207, 175, 0.78);
}

@media (max-width: 760px) {
  html[data-gn-color-demo] .app-bottom-nav {
    box-shadow: 0 16px 36px rgba(79, 64, 35, 0.12);
  }
}

/* ─── Glossary: help marker "!" + explanation popover ─── */
.gn-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin: 0 0 0 5px;
  padding: 0;
  border: 1px solid var(--primary-alpha-30);
  border-radius: 50%;
  background: var(--primary-alpha-08);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  flex: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.gn-help:hover,
.gn-help[aria-expanded="true"] {
  background: var(--primary-alpha-20);
  border-color: var(--primary);
  color: var(--primary-lighter);
}

.gn-help:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.gn-popover {
  position: fixed;
  z-index: 9999;
  width: max-content;
  max-width: min(300px, 90vw);
  padding: 13px 15px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius-sm);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  pointer-events: none;
}

.gn-popover.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.gn-popover:focus {
  outline: none;
}

.gn-pop-term {
  margin-bottom: 5px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.gn-pop-detail {
  color: var(--text-light);
}

.gn-pop-example {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--white-08);
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

/* ============================================
   BRAND THEMING — accent đổi theo brand đang xem (brand-context.js đặt data-brand
   trên <html>). data-brand="ALL" → giữ tông vàng Gạo Nâu mặc định (:root).
   Màu lấy đúng bộ BRAND_COLORS đã dùng ở bookings/calendar. Layout không đổi.
   ============================================ */
:root[data-brand="GNCA"] {
  --primary: #d4b96a; --primary-hover: #dcc485; --primary-lighter: #e3d09b; --accent: #d4b96a;
  --primary-alpha-20: rgba(212,185,106,0.2); --primary-alpha-15: rgba(212,185,106,0.15);
  --primary-alpha-08: rgba(212,185,106,0.08); --primary-alpha-30: rgba(212,185,106,0.3);
  --primary-glow: 0 0 15px rgba(212,185,106,0.3);
}
:root[data-brand="GNPF"] {
  --primary: #c4b5fd; --primary-hover: #d0c4fe; --primary-lighter: #ddd5fe; --accent: #c4b5fd;
  --primary-alpha-20: rgba(196,181,253,0.2); --primary-alpha-15: rgba(196,181,253,0.15);
  --primary-alpha-08: rgba(196,181,253,0.08); --primary-alpha-30: rgba(196,181,253,0.3);
  --primary-glow: 0 0 15px rgba(196,181,253,0.35);
}
:root[data-brand="GNPM"] {
  --primary: #fca5a5; --primary-hover: #fdb8b8; --primary-lighter: #fecccc; --accent: #fca5a5;
  --primary-alpha-20: rgba(252,165,165,0.2); --primary-alpha-15: rgba(252,165,165,0.15);
  --primary-alpha-08: rgba(252,165,165,0.08); --primary-alpha-30: rgba(252,165,165,0.3);
  --primary-glow: 0 0 15px rgba(252,165,165,0.35);
}
:root[data-brand="GNT"] {
  --primary: #5eead4; --primary-hover: #7ceede; --primary-lighter: #9cf3e8; --accent: #5eead4;
  --primary-alpha-20: rgba(94,234,212,0.2); --primary-alpha-15: rgba(94,234,212,0.15);
  --primary-alpha-08: rgba(94,234,212,0.08); --primary-alpha-30: rgba(94,234,212,0.3);
  --primary-glow: 0 0 15px rgba(94,234,212,0.35);
}

/* Header brand switch control */
.brand-switch { position: relative; }
.brand-switch-btn {
  display: flex; align-items: center; gap: 6px; cursor: pointer; font-family: inherit;
  background: var(--primary-alpha-08); border: 1px solid var(--primary); color: var(--primary);
  border-radius: 999px; padding: 6px 12px; font-size: 0.82rem; font-weight: 600; white-space: nowrap;
}
.brand-switch-btn:hover { background: var(--primary-alpha-15); }
.brand-switch-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; z-index: 60;
  background: #1a1611; border: 1px solid var(--glass-border); border-radius: 10px; padding: 5px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.brand-switch-menu[hidden] { display: none; }
.brand-switch-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; color: var(--text-light); padding: 8px 10px; border-radius: 7px;
  font-size: 0.82rem; font-family: inherit;
}
.brand-switch-opt:hover { background: var(--primary-alpha-08); }

/* "Chưa gắn brand" badge — mục chưa phân loại khi đang xem 1 brand */
.unassigned-brand-badge {
  display: inline-block; font-size: 0.6rem; color: var(--text-dim);
  border: 1px dashed var(--glass-border); border-radius: 4px; padding: 0 5px; margin-left: 6px;
  vertical-align: middle; text-transform: uppercase; letter-spacing: 0.03em;
}
