:root {
  /* Bảng màu: trắng sáng + xanh navy (chủ đạo) + vàng gold (hành động, điểm nhấn) + đỏ (cảnh báo/thông báo) */
  --navy: #1B3A6B;
  --navy-deep: #122A4F;
  --navy-soft: #2C5490;
  --navy-tint: #EEF3FA;
  --red: #D7263D;
  --bg-warm: #F5F7FB;
  --bg-warm-alt: #EDF1F7;
  --surface: #FFFFFF;
  --charcoal: #1B3A6B;
  --charcoal-soft: #2C5490;
  --text-primary: #1E2A3B;
  --text-secondary: #4A5568;
  --text-muted: #6B7685;
  --gold: #E9A21B;
  --gold-bright: #F5B32B;
  --gold-light: #FFF6E0;
  --gold-border: #F4CF7A;
  --gold-text-dark: #8A5300;
  --border-warm: #E3E8F0;
  --success-bg: #EAF7EF;
  --success-text: #146B3A;
  --success-border: #9FD9B5;
  --warning-bg: #FFF6E0;
  --warning-text: #8A5300;
  --warning-border: #F4CF7A;
  --danger-bg: #FDECEE;
  --danger-text: #B4192F;
  --danger-border: #F3A9B3;
  --info-bg: #EEF3FA;
  --info-text: #1B3A6B;
  --info-border: #B3C7E6;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(27, 58, 107, 0.06);
  --shadow-md: 0 10px 28px rgba(27, 58, 107, 0.10);
  --font-body: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Lora", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background-color: var(--bg-warm);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ===== Header: thanh thương hiệu + thanh menu ngang ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-warm);
}

.topbar-inner,
.menubar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

.topbar-inner {
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--charcoal);
  cursor: pointer;
}

.brand-logo-nav {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  color: var(--charcoal);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--gold-text-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.menubar {
  background: var(--charcoal);
  border-bottom: 2px solid var(--gold);
}

.menubar-inner {
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.menubar-inner::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  background: transparent;
  border: 0;
  color: #DCE5F2;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 13px 18px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.nav-btn.active {
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.12);
}

.nav-btn.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--gold-bright);
}

.nav-user-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-warm);
  background: var(--surface);
  cursor: pointer;
  font-size: 1rem;
}

.icon-btn:hover {
  background: var(--bg-warm-alt);
}

.icon-btn-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger-text);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-warm);
  border: 1px solid var(--border-warm);
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.user-pill:hover {
  border-color: var(--gold-border);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--gold-bright);
  font-weight: 800;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-pill-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.user-pill-name {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--charcoal);
}

.role-tag {
  color: var(--gold-text-dark);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Main Container */
.main-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* Auth / Login View - Gold Logo on Deep Charcoal Background */
.auth-wrapper {
  max-width: 960px;
  margin: 28px auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-warm);
  background: var(--surface);
}

.auth-brand-panel {
  background: linear-gradient(145deg, #16171B 0%, #24262D 100%);
  color: #FFFFFF;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-right: 2px solid var(--gold);
}

.auth-logo-gold {
  width: 150px;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.25));
}

.auth-brand-panel h1 {
  margin: 0 0 8px;
  font-size: 1.55rem;
  color: var(--gold-bright);
  letter-spacing: 0.5px;
}

.auth-brand-panel p {
  margin: 0 0 20px;
  color: #D5D7DE;
  font-size: 0.94rem;
}

.auth-feature-list {
  text-align: left;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.86rem;
  color: #ECEEF2;
}

.auth-feature-list div {
  margin-bottom: 8px;
}
.auth-feature-list div:last-child {
  margin-bottom: 0;
}

.auth-form-panel {
  padding: 36px 32px;
  background: var(--surface);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--bg-warm-alt);
  padding-bottom: 10px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid var(--border-warm);
  background: var(--bg-warm);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.auth-tab.active {
  background: var(--charcoal);
  color: var(--gold-bright);
  border-color: var(--charcoal);
}

/* Cards & Sections */
.card {
  background: var(--surface);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.card-priority {
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, #FFFDF9 0%, #FFFFFF 100%);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.card-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--charcoal);
}

.card-subtitle {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-box {
  background: var(--bg-warm);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 16px;
}

.stat-box.gold-highlight {
  background: var(--charcoal);
  color: #FFFFFF;
  border-color: var(--gold);
}

.stat-box.gold-highlight .stat-label {
  color: #D5D7DE;
}

.stat-box.gold-highlight .stat-value {
  color: var(--gold-bright);
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--charcoal);
  margin-top: 4px;
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Buttons - High Contrast Checked */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Gold Button with Deep Charcoal Text (Contrast > 8.5:1) */
.btn-gold {
  background-color: var(--gold-bright);
  color: var(--charcoal);
  border-color: #E09A12;
}
.btn-gold:hover:not(:disabled) {
  background-color: #DFBC46;
}

/* Charcoal Button with Bright Gold/White Text (Contrast > 12:1) */
.btn-charcoal {
  background-color: var(--charcoal);
  color: #FFFFFF;
  border-color: var(--gold);
}
.btn-charcoal:hover:not(:disabled) {
  background-color: var(--charcoal-soft);
}

.btn-outline {
  background-color: #FFFFFF;
  color: var(--charcoal);
  border-color: #C5CFDD;
}
.btn-outline:hover:not(:disabled) {
  background-color: var(--bg-warm-alt);
}

.btn-danger {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 13px 22px;
  font-size: 1rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

.badge-gold {
  background: var(--gold-light);
  color: var(--gold-text-dark);
  border: 1px solid var(--gold-border);
}

.badge-charcoal {
  background: var(--charcoal);
  color: var(--gold-bright);
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.94rem;
  color: var(--charcoal);
  background: #FFFFFF;
  border: 1px solid #C6BFA8;
  border-radius: var(--radius-sm);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--charcoal);
  box-shadow: 0 0 0 2px rgba(197, 155, 39, 0.25);
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  background: var(--bg-warm-alt);
  color: var(--charcoal);
  font-weight: 700;
  text-align: left;
  padding: 11px 12px;
  border-bottom: 2px solid var(--border-warm);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-warm);
  vertical-align: top;
}

.data-table tr:hover td {
  background-color: #F7F9FC;
}

/* Alert Banner */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 0.92rem;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.alert-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.alert-info {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

/* Action Bar for Member Priority Event */
.priority-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-warm);
}

/* Sub-tabs inside views */
.sub-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.sub-tab {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-warm);
  background: var(--surface);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.sub-tab.active {
  background: var(--charcoal);
  color: var(--gold-bright);
  border-color: var(--gold);
}

/* Quick Demo Switcher Bar */
.demo-bar {
  background: var(--charcoal);
  color: #FFFFFF;
  padding: 8px 20px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--gold);
}

.demo-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-chip {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.76rem;
  cursor: pointer;
  font-weight: 600;
}

.demo-chip:hover {
  background: var(--gold-bright);
  color: var(--charcoal);
}

/* ===== Trang quản lý: tiêu đề trang, tab con, cột lọc, thanh công cụ ===== */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--charcoal);
}

.page-desc {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.page-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-warm);
  margin-bottom: 18px;
  overflow-x: auto;
}

.page-tab {
  background: none;
  border: 0;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.page-tab:hover {
  color: var(--charcoal);
}

.page-tab.active {
  color: var(--gold-text-dark);
  border-bottom-color: var(--gold);
  font-weight: 700;
}

.layout-sidebar {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 16px;
  position: sticky;
  top: 130px;
}

.filter-panel .form-group {
  margin-bottom: 14px;
}

.filter-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-warm);
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 220px;
  max-width: 520px;
  position: relative;
}

.search-box input {
  padding-left: 36px;
}

.search-box::before {
  content: "⌕";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 1.15rem;
  color: var(--text-muted);
  pointer-events: none;
}

.toolbar-spacer {
  flex: 1;
}

.toolbar-count {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.panel .data-table th {
  background: #F7F9FC;
  font-size: 0.82rem;
  text-transform: none;
}

.panel .data-table td {
  vertical-align: middle;
}

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.data-table th.sortable:hover {
  color: var(--gold-text-dark);
}

.sort-ind {
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-left: 4px;
}

.cell-main {
  font-weight: 700;
  color: var(--charcoal);
}

.cell-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.cell-muted {
  color: var(--text-muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  margin: 1px 2px 1px 0;
}

.tag-blue { background: var(--info-bg); color: var(--info-text); border-color: #D3E1FB; }
.tag-gold { background: var(--gold-light); color: var(--gold-text-dark); border-color: #F4CF7A; }
.tag-green { background: var(--success-bg); color: var(--success-text); border-color: #CDEBD6; }
.tag-orange { background: var(--warning-bg); color: var(--warning-text); border-color: #F4CF7A; }
.tag-red { background: var(--danger-bg); color: var(--danger-text); border-color: #F6CACA; }
.tag-gray { background: #F1F1F3; color: var(--text-secondary); border-color: #E2E2E6; }

.row-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.btn-icon:hover:not(:disabled) {
  background: var(--bg-warm-alt);
  border-color: var(--border-warm);
  color: var(--charcoal);
}

.btn-icon.danger:hover:not(:disabled) {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.btn-icon:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--info-text);
  font-weight: 600;
  cursor: pointer;
  font: inherit;
}

.link-btn:hover {
  text-decoration: underline;
}

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-warm);
  font-size: 0.84rem;
}

.pager button {
  min-width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border-warm);
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
}

.pager button.active {
  border-color: var(--gold);
  color: var(--gold-text-dark);
  background: var(--gold-light);
}

.pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
}

/* ===== Ô cửa sổ (modal) ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 29, 33, 0.55);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(28, 29, 33, 0.25);
}

.modal-lg {
  max-width: 1080px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-warm);
}

.modal-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--charcoal);
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--border-warm);
  background: #F7F9FC;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.form-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 6px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-warm);
}

.req {
  color: var(--danger-text);
}

.perm-preview {
  background: var(--bg-warm);
  border: 1px dashed var(--border-warm);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.84rem;
}

/* Phân nhóm quyền trong cửa sổ vai trò */
.perm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 22px;
}

.perm-group {
  margin-bottom: 18px;
  scroll-margin-top: 8px;
}

.perm-group-title {
  color: var(--gold-text-dark);
  font-weight: 800;
  font-size: 0.98rem;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-warm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.perm-box {
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.perm-box-head {
  background: #F7F9FC;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-warm);
}

.perm-box-body {
  padding: 12px 14px;
}

.perm-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  font-size: 0.9rem;
}

.perm-check input {
  margin-top: 4px;
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.perm-check small {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.perm-index {
  position: sticky;
  top: 0;
  align-self: start;
}

.perm-index-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.perm-index button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.perm-index button:hover,
.perm-index button.active {
  background: var(--gold-light);
  color: var(--gold-text-dark);
  font-weight: 700;
}

/* ===== Tổng quan ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  background: var(--gold-light);
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--charcoal);
  line-height: 1.2;
}

.kpi-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-warm);
  flex-wrap: wrap;
}

.panel-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--charcoal);
}

.seg {
  display: inline-flex;
  background: var(--bg-warm-alt);
  border-radius: 8px;
  padding: 3px;
}

.seg button {
  border: 0;
  background: none;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.seg button.active {
  background: var(--surface);
  color: var(--charcoal);
  box-shadow: var(--shadow-sm);
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 18px;
  align-items: end;
}

.podium-item {
  text-align: center;
  border-radius: var(--radius-md);
  padding: 14px 10px;
  border: 1px solid var(--border-warm);
  background: var(--bg-warm);
}

.podium-item.p1 {
  background: linear-gradient(180deg, #FFF6DA 0%, #FFFDF6 100%);
  border-color: var(--gold-border);
  padding-top: 22px;
}

.podium-medal {
  font-size: 1.8rem;
  line-height: 1;
}

.podium-name {
  font-weight: 800;
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--charcoal);
}

.podium-company {
  font-size: 0.76rem;
  color: var(--text-secondary);
  min-height: 1.1em;
}

.podium-points {
  margin-top: 6px;
  font-weight: 800;
  color: var(--gold-text-dark);
}

.rank-num {
  display: inline-flex;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  background: var(--bg-warm-alt);
  color: var(--text-secondary);
}

.rank-num.top {
  background: var(--charcoal);
  color: var(--gold-bright);
}

.me-row td {
  background: var(--gold-light) !important;
}

.bar-track {
  height: 6px;
  border-radius: 6px;
  background: var(--bg-warm-alt);
  overflow: hidden;
  min-width: 70px;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-bright) 100%);
}

.event-item {
  display: flex;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-warm);
  cursor: pointer;
}

.event-item:last-child {
  border-bottom: 0;
}

.event-item:hover {
  background: #F7F9FC;
}

.date-chip {
  width: 56px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--gold-border);
  overflow: hidden;
  text-align: center;
  background: var(--surface);
}

.date-chip-month {
  background: var(--charcoal);
  color: var(--gold-bright);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 0;
  text-transform: uppercase;
}

.date-chip-day {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--charcoal);
  line-height: 1.5;
}

.event-title {
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.35;
}

.event-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 3px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Khu vực nút Tham gia & Điểm danh ===== */
.action-panel {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.action-group {
  background: var(--surface);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 14px;
}

.action-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-note {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.act-btn {
  --c-main: #1F8A5B;
  --c-soft: #EAF6EF;
  --c-text: #155E3B;
  --c-border: #A9D9BE;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  min-height: 68px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--c-border);
  background: var(--c-soft);
  color: var(--c-text);
  font: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.act-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(28, 29, 33, 0.12);
  border-color: var(--c-main);
}

.act-btn:active:not(:disabled) {
  transform: translateY(0);
}

.act-btn:disabled {
  cursor: default;
}

.act-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  background: var(--c-main);
  color: #FFFFFF;
}

.act-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.act-label {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.25;
}

.act-sub {
  font-size: 0.76rem;
  opacity: 0.85;
  margin-top: 2px;
}

/* Xác nhận tham gia: xanh lá */
.act-yes {
  --c-main: #1F8A5B;
  --c-soft: #EAF6EF;
  --c-text: #155E3B;
  --c-border: #A9D9BE;
}

/* Không tham gia: đỏ trầm */
.act-no {
  --c-main: #C0392B;
  --c-soft: #FDF1EF;
  --c-text: #8C1D1D;
  --c-border: #F0B8B0;
}

/* Lựa chọn hiện tại: tô đậm */
.act-yes.is-selected,
.act-no.is-selected {
  background: var(--c-main);
  border-color: var(--c-main);
  color: #FFFFFF;
}

.act-yes.is-selected .act-icon,
.act-no.is-selected .act-icon {
  background: rgba(255, 255, 255, 0.22);
}

/* Lựa chọn còn lại khi đã chọn: mờ đi nhưng vẫn bấm được để đổi ý */
.action-row:has(.is-selected) .act-btn:not(.is-selected):not(:disabled) {
  opacity: 0.8;
}

/* Check-in: vàng SDC */
.act-checkin {
  --c-main: #C59B27;
  --c-text: #1C1D21;
  --c-border: #C59B27;
  background: linear-gradient(135deg, #E2C25A 0%, #C59B27 100%);
  color: #1C1D21;
}

.act-checkin .act-icon {
  background: #1C1D21;
  color: var(--gold-bright);
}

/* Check-out: xanh dương */
.act-checkout {
  --c-main: #1F5FA8;
  --c-border: #1F5FA8;
  background: linear-gradient(135deg, #3B7DD0 0%, #1F5FA8 100%);
  color: #FFFFFF;
}

.act-checkout .act-icon {
  background: rgba(255, 255, 255, 0.22);
}

/* Đã hoàn thành điểm danh */
.act-checkin.is-done,
.act-checkout.is-done {
  background: #EAF6EF;
  border-color: #A9D9BE;
  color: #155E3B;
}

.act-checkin.is-done .act-icon,
.act-checkout.is-done .act-icon {
  background: #1F8A5B;
  color: #FFFFFF;
}

/* Chưa đến lượt (ví dụ Check-out khi chưa Check-in) */
.act-checkout:disabled:not(.is-done) {
  background: #EEF1F5;
  border-color: #D6DCE4;
  color: #6B7685;
}

.act-checkout:disabled:not(.is-done) .act-icon {
  background: #B8C2CE;
}

.act-yes:disabled:not(.is-selected),
.act-no:disabled:not(.is-selected) {
  opacity: 0.5;
}

.test-panel {
  grid-column: 1 / -1;
  background: #F7F9FC;
  border: 1px dashed var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
}

.test-panel summary {
  cursor: pointer;
  font-weight: 700;
}

/* ===== Bản đồ địa điểm điểm danh ===== */
.loc-picker {
  background: var(--surface);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 14px;
}

.loc-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.input-row {
  display: flex;
  gap: 8px;
}

.input-row .form-control {
  flex: 1;
  min-width: 0;
}

.input-row .btn {
  white-space: nowrap;
}

.loc-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.loc-hint a,
.loc-summary a {
  color: var(--info-text);
  font-weight: 600;
}

.search-results {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}

.search-results:empty {
  display: none;
}

.search-item {
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 1px solid var(--border-warm);
  background: #FFFFFF;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

button.search-item:hover {
  border-color: var(--gold);
  background: var(--gold-light);
}

.loc-map,
.venue-map {
  height: 360px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-warm);
  overflow: hidden;
  background: #EEF0EC;
  position: relative;
  z-index: 0;
}

.venue-map {
  height: 260px;
}

.map-fallback {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.map-offline-note {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 26px;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-warm);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

.map-pin {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  background: var(--charcoal);
  border: 3px solid var(--gold-bright);
  transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  position: relative;
  top: 2px;
}

.map-pin::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-bright);
  top: 7px;
  left: 7px;
}

.loc-summary {
  margin-top: 4px;
  font-size: 0.86rem;
  background: var(--gold-light);
  border: 1px solid #F4CF7A;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.venue-block {
  margin-top: 16px;
}

.venue-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.venue-actions a.btn {
  text-decoration: none;
}

/* Mobile Responsive Adjustments */
@media (max-width: 820px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
    margin: 12px auto;
  }
  .auth-brand-panel {
    border-right: none;
    border-bottom: 2px solid var(--gold);
    padding: 28px 20px;
  }
  .auth-form-panel {
    padding: 24px 18px;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .topbar-inner,
  .menubar-inner {
    padding: 0 12px;
  }
  .brand-subtitle,
  .user-pill-text {
    display: none;
  }
  .user-pill {
    padding: 3px;
  }
  .layout-sidebar,
  .overview-grid,
  .loc-tools,
  .action-panel,
  .perm-layout {
    grid-template-columns: 1fr;
  }
  .filter-panel {
    position: static;
  }
  .perm-index {
    display: none;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .podium {
    gap: 6px;
    padding: 12px;
  }
  .modal-body {
    padding: 16px;
  }
  .nav-user-area .btn {
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .action-row {
    grid-template-columns: 1fr;
  }
  .loc-map {
    height: 300px;
  }
  .venue-map {
    height: 220px;
  }
  .brand-title {
    font-size: 0.92rem;
  }
  .kpi {
    padding: 12px;
  }
  .kpi-icon {
    display: none;
  }
  .kpi-value {
    font-size: 1.2rem;
  }
  .event-item {
    padding: 12px;
  }
  .main-container {
    padding: 16px 12px 64px;
  }
  .priority-actions .btn {
    width: 100%;
  }
}


/* ===== Đăng ký chờ duyệt ===== */
.nav-badge {
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger-text);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.auth-note {
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.auth-note a { color: var(--gold-text-dark, #8a6a12); font-weight: 700; }
.pending-panel {
  margin-bottom: 18px;
  border: 1px solid var(--gold-border);
  background: var(--gold-light);
}
.pending-list { display: grid; gap: 10px; }
.pending-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 1px solid var(--border-warm);
  border-radius: 12px;
}
.pending-avatar { flex: 0 0 auto; }
.pending-info { flex: 1 1 auto; min-width: 0; }
.pending-info .cell-sub { overflow-wrap: anywhere; }
.pending-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.pending-actions .act-btn { padding: 8px 14px; min-height: 0; font-size: 0.86rem; white-space: nowrap; }
.approve-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-warm-alt);
  border: 1px solid var(--border-warm);
  display: grid;
  gap: 4px;
}
@media (max-width: 600px) {
  .pending-item { flex-wrap: wrap; }
  .pending-actions { width: 100%; }
  .pending-actions .act-btn { flex: 1; }
}


/* =====================================================================
   GIAO DIỆN SÁNG: trắng + navy + gold (tham khảo phong cách thương mại cao cấp)
   ===================================================================== */
.page-title, .card-title, .panel-title, .modal-title, .brand-title,
.auth-brand-panel h1, .hero-title {
  font-family: var(--font-head);
  letter-spacing: 0.2px;
}
.page-title { color: var(--navy); font-size: 1.6rem; font-weight: 700; }
.page-title::after {
  content: ""; display: block; width: 44px; height: 3px; border-radius: 3px;
  background: var(--gold-bright); margin-top: 6px;
}
.panel-title, .card-title { color: var(--navy); font-weight: 700; }
.brand-title { color: var(--navy); font-weight: 700; font-size: 1.12rem; }
.brand-subtitle { color: var(--gold-text-dark); }

/* Thanh trên cùng & menu */
.topbar { border-bottom: 0; }
.menubar {
  background: linear-gradient(90deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-soft) 100%);
  border-bottom: 3px solid var(--gold-bright);
}
.nav-btn { color: #DCE5F2; font-weight: 600; }
.nav-btn:hover { background: rgba(255, 255, 255, 0.10); color: #FFFFFF; }
.nav-btn.active { color: var(--gold-bright); background: rgba(245, 179, 43, 0.14); }
.icon-btn { border-color: var(--border-warm); }
.icon-btn-badge, .nav-badge { background: var(--red); }
.user-pill { background: #FFFFFF; }
.user-pill:hover { border-color: var(--gold-bright); box-shadow: var(--shadow-sm); }
.user-avatar { background: var(--navy); color: var(--gold-bright); }
.user-pill-name { color: var(--navy); }

/* Nút: vàng = hành động chính, navy = hành động mạnh thứ hai */
.btn { border-radius: 10px; }
.btn-gold {
  background: linear-gradient(180deg, #FFC24A 0%, var(--gold-bright) 100%);
  color: var(--navy-deep);
  border-color: #E9A21B;
  box-shadow: 0 2px 6px rgba(233, 162, 27, 0.30);
}
.btn-gold:hover:not(:disabled) { background: var(--gold); box-shadow: 0 4px 12px rgba(233, 162, 27, 0.35); }
.btn-charcoal { background: var(--navy); color: #FFFFFF; border-color: var(--navy); }
.btn-charcoal:hover:not(:disabled) { background: var(--navy-soft); }
.btn-outline { color: var(--navy); border-color: #C5CFDD; }
.btn-outline:hover:not(:disabled) { background: var(--navy-tint); border-color: var(--navy-soft); }

/* Thẻ, bảng, panel */
.card, .panel, .kpi, .filter-panel { border-color: var(--border-warm); box-shadow: var(--shadow-sm); }
.card-priority { border: 2px solid var(--gold-bright); background: linear-gradient(180deg, #FFFBF1 0%, #FFFFFF 100%); }
.data-table th, .panel .data-table th {
  background: var(--navy-tint);
  color: var(--navy);
  font-weight: 700;
  border-bottom: 1px solid #D6E0EE;
}
.data-table tr:hover td { background: #F8FAFD; }
.filter-title { color: var(--navy); }
.page-tab.active { color: var(--navy); border-bottom-color: var(--gold-bright); }
.seg { background: var(--navy-tint); }
.seg button.active { background: var(--navy); color: #FFFFFF; }
.pager button.active { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.tag-blue { background: var(--navy-tint); color: var(--navy); border-color: #C9D7EC; }
.form-control:focus { border-color: var(--navy-soft); box-shadow: 0 0 0 3px rgba(44, 84, 144, 0.15); outline: none; }

/* Trang đăng nhập */
.auth-wrapper { border-color: var(--border-warm); box-shadow: var(--shadow-md); }
.auth-brand-panel {
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 179, 43, 0.22) 0, transparent 42%),
    radial-gradient(circle at 90% 95%, rgba(255, 255, 255, 0.10) 0, transparent 40%),
    linear-gradient(150deg, var(--navy-deep) 0%, var(--navy) 60%, var(--navy-soft) 100%);
  border-right: 4px solid var(--gold-bright);
}
.auth-brand-panel h1 { color: var(--gold-bright); font-size: 1.8rem; }
.auth-brand-panel p { color: #DCE5F2; }
.auth-feature-list { background: rgba(255, 255, 255, 0.08); border-color: rgba(245, 179, 43, 0.45); color: #F1F5FB; }
.auth-tab { background: var(--bg-warm); border-color: var(--border-warm); }
.auth-tab.active { background: var(--navy); color: var(--gold-bright); border-color: var(--navy); }

/* Banner chào mừng trang Tổng quan */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: 18px;
  color: #FFFFFF;
  background:
    radial-gradient(circle at 92% 20%, rgba(245, 179, 43, 0.35) 0, transparent 38%),
    linear-gradient(120deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-soft) 100%);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.hero::after {
  content: "";
  position: absolute;
  right: -40px; bottom: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 18px solid rgba(245, 179, 43, 0.18);
}
.hero-kicker { color: var(--gold-bright); font-size: 0.78rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.hero-title { margin: 4px 0 4px; font-size: 1.7rem; font-weight: 700; color: #FFFFFF; }
.hero-sub { color: #DCE5F2; font-size: 0.92rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-actions .btn-outline { background: rgba(255, 255, 255, 0.10); color: #FFFFFF; border-color: rgba(255, 255, 255, 0.45); }
.hero-actions .btn-outline:hover:not(:disabled) { background: rgba(255, 255, 255, 0.20); border-color: #FFFFFF; }

/* Thẻ KPI có màu riêng từng loại */
.kpi { transition: transform 0.15s ease, box-shadow 0.15s ease; border-top: 3px solid transparent; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi.k-navy { border-top-color: var(--navy); }
.kpi.k-gold { border-top-color: var(--gold-bright); }
.kpi.k-green { border-top-color: #22A05B; }
.kpi.k-red { border-top-color: var(--red); }
.kpi.k-navy .kpi-icon { background: var(--navy-tint); }
.kpi.k-gold .kpi-icon { background: var(--gold-light); }
.kpi.k-green .kpi-icon { background: #E5F6EC; }
.kpi.k-red .kpi-icon { background: #FDECEE; }
.kpi-value { color: var(--navy); }
.kpi-label { text-transform: uppercase; letter-spacing: 0.4px; font-size: 0.74rem; }

/* Bục vinh danh & lịch sự kiện */
.podium-item { background: #FFFFFF; }
.podium-item.p1 { background: linear-gradient(180deg, #FFF2CC 0%, #FFFFFF 100%); border-color: var(--gold-bright); box-shadow: 0 6px 18px rgba(233, 162, 27, 0.22); }
.podium-points { color: var(--gold-text-dark); }
.rank-num.top { background: var(--gold-bright); color: var(--navy-deep); }
.bar-fill { background: linear-gradient(90deg, var(--gold-bright), #FFD27A); }
.date-chip { border-color: #C9D7EC; box-shadow: var(--shadow-sm); }
.date-chip-month { background: var(--navy); color: var(--gold-bright); }
.date-chip-day { color: var(--navy); }
.event-title { color: var(--navy); }
.event-item:hover { background: #F7F9FC; }

/* Check-in: vàng như nút hành động chính */
.act-checkin {
  --c-main: #E9A21B;
  --c-text: #122A4F;
  --c-border: #E9A21B;
  background: linear-gradient(135deg, #FFD06B 0%, #F5B32B 100%);
  color: #122A4F;
}
.act-checkin .act-icon { background: #122A4F; }

@media (max-width: 600px) {
  .hero { padding: 20px; }
  .hero-title { font-size: 1.35rem; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .page-title { font-size: 1.35rem; }
}

button, input, select, textarea { font-family: inherit; }
.form-control { border-color: #CDD6E3; }
.form-control::placeholder { color: #98A2B3; }
.form-label { color: var(--navy); }
.brand-title { white-space: nowrap; }
.seg button { white-space: nowrap; }
@media (max-width: 600px) {
  .brand-title { font-size: 1rem; }
  .seg { overflow-x: auto; max-width: 100%; }
  .seg button { padding: 5px 9px; }
}

/* ===== Cài app (PWA) ===== */
.install-btn { white-space: nowrap; }
.install-card {
  margin-top: 22px;
  padding: 14px;
  border-radius: 12px;
  background: var(--navy-tint);
  border: 1px solid #C9D7EC;
  display: flex;
  align-items: center;
  gap: 12px;
}
.install-card img, .install-hero img { border-radius: 12px; flex-shrink: 0; }
.install-hero { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.install-steps { margin: 0; padding-left: 20px; line-height: 1.7; color: var(--text-primary); }
.install-steps li { margin-bottom: 6px; }
.kbd {
  display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 6px;
  border: 1px solid #C9D7EC; background: #FFFFFF; text-align: center; font-weight: 700;
}
@media (max-width: 600px) {
  .install-btn-text { display: none; }
  .install-btn { padding: 6px 10px; }
  .install-card { flex-wrap: wrap; }
  .install-card .btn { width: 100%; }
}
@media (max-width: 480px) {
  .topbar-inner { gap: 8px; }
  .brand-wrap > div { display: none; }
  .nav-user-area { gap: 6px; margin-left: auto; }
  .nav-user-area .btn-outline { padding: 6px 10px; }
}
