/* ============================================================
   NIMDEE HYEREN – Attendance App
   Neumorphic design matching the XORAX DATA reference UI
   ============================================================ */

:root {
  --bg: #e8ecf0;
  --bg-dark: #d1d9e0;
  --surface: #e8ecf0;
  --shadow-light: #ffffff;
  --shadow-dark: #b8c0cc;
  --primary: #1a237e;
  --primary-mid: #283593;
  --primary-light: #3949ab;
  --accent: #c8a400;
  --accent-light: #f5c842;
  --text-main: #1a1f36;
  --text-muted: #6b7a99;
  --text-light: #9aa5bc;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #0ea5e9;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Neumorphic shadows */
  --shadow-out: 6px 6px 14px var(--shadow-dark),
    -6px -6px 14px var(--shadow-light);
  --shadow-in: inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
  --shadow-out-sm: 4px 4px 8px var(--shadow-dark),
    -4px -4px 8px var(--shadow-light);
  --shadow-card: 8px 8px 20px var(--shadow-dark),
    -8px -8px 20px var(--shadow-light);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

/* ─── Loading screen ─────────────────────────────────────────── */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 20px;
  transition: opacity 0.4s ease;
}
#loading-screen.hide {
  opacity: 0;
  pointer-events: none;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--bg-dark);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Page routing ───────────────────────────────────────────── */
.page {
  display: none;
  min-height: 100vh;
}
.page.active {
  display: block;
}

/* ─── AUTH PAGES ─────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: var(--bg);
}

.auth-logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
  gap: 12px;
}

.auth-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: var(--shadow-out);
  object-fit: contain;
  padding: 6px;
  background: var(--surface);
}

.auth-logo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: var(--shadow-out);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: 800;
}

.auth-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-align: center;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
}

.auth-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.auth-card .auth-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ─── Form controls ──────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-main);
  font-size: 15px;
  box-shadow: var(--shadow-in);
  outline: none;
  transition: box-shadow 0.2s;
}

.form-input:focus {
  box-shadow: inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light),
    0 0 0 2px var(--primary-light);
}

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

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a99' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 40px;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 4px 4px 10px rgba(26, 35, 126, 0.35),
    -2px -2px 6px var(--shadow-light);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 6px 6px 14px rgba(26, 35, 126, 0.4),
    -2px -2px 6px var(--shadow-light);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 2px 2px 6px rgba(26, 35, 126, 0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-out-sm);
}

.btn-secondary:hover {
  box-shadow: var(--shadow-out);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 4px 4px 10px rgba(239, 68, 68, 0.3);
}

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 4px 4px 10px rgba(34, 197, 94, 0.3);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── Error / info messages ──────────────────────────────────── */
.error-msg {
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
  display: none;
  align-items: center;
  gap: 6px;
}

.error-msg.show {
  display: flex;
}

.success-msg {
  color: var(--success);
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
  display: none;
  align-items: center;
  gap: 6px;
}

.success-msg.show {
  display: flex;
}

.info-box {
  background: var(--surface);
  box-shadow: var(--shadow-in);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 16px 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.info-box .icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.auth-link {
  font-size: 13px;
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
}

.auth-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ─── DASHBOARD SHELL ────────────────────────────────────────── */
.dashboard {
  max-width: 540px;
  margin: 0 auto;
  padding-bottom: 90px; /* space for bottom nav */
}

/* Top header bar */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

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

.dash-header-logo img,
.dash-header-logo .logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: var(--shadow-out-sm);
  object-fit: contain;
  background: var(--surface);
  padding: 3px;
}

.dash-header-logo .logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-size: 16px;
  font-weight: 800;
  padding: 0;
}

.dash-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.dash-brand span:first-child {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.dash-brand span:last-child {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.dash-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-out-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: box-shadow 0.2s;
  position: relative;
}

.dash-avatar:hover {
  box-shadow: var(--shadow-out);
}

.verified-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: white;
  font-weight: 700;
}

/* ─── Hero card ──────────────────────────────────────────────── */
.hero-card {
  margin: 12px 20px 0;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 24px 24px 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 4px 0 0 4px;
}

.hero-greeting {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.hero-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  background: rgba(34, 197, 94, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  position: absolute;
  top: 24px;
  right: 24px;
}

.hero-status::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
}

/* Balance / stat card */
.balance-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-in);
  margin-bottom: 16px;
}

.balance-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.balance-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.balance-value .unit {
  font-size: 20px;
  color: var(--text-muted);
}

/* Quick action buttons */
.quick-actions-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.qa-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-out-sm);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--primary-light);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.qa-btn:hover {
  box-shadow: var(--shadow-out);
  transform: translateY(-1px);
}

.qa-btn:active {
  box-shadow: var(--shadow-in);
  transform: translateY(0);
}

.qa-btn .qa-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-out-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ─── Stats row ──────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
  border-top: 1px solid var(--bg-dark);
  padding-top: 16px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-item + .stat-item {
  border-left: 1px solid var(--bg-dark);
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ─── Section headings ───────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  cursor: pointer;
  background: none;
  border: none;
  text-decoration: none;
}

/* ─── Quick action grid (home screen) ───────────────────────── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 20px;
}

.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  background: none;
  text-decoration: none;
}

.quick-tile .tile-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-out-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.2s;
}

.quick-tile:hover .tile-icon {
  box-shadow: var(--shadow-out);
  transform: translateY(-2px);
}

.quick-tile:active .tile-icon {
  box-shadow: var(--shadow-in);
}

.quick-tile .tile-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

/* ─── Attendance list cards ──────────────────────────────────── */
.attendance-list {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attendance-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-out-sm);
  display: flex;
  align-items: center;
  gap: 14px;
}

.attendance-card .ac-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.attendance-card .ac-info {
  flex: 1;
  min-width: 0;
}

.attendance-card .ac-name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendance-card .ac-index {
  font-size: 12px;
  color: var(--text-muted);
}

.status-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.status-badge.present {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
}

.status-badge.absent {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

/* ─── Bottom navigation ──────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 540px;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-around;
  padding: 12px 16px 20px;
  z-index: 200;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-size: 10px;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item .nav-icon {
  font-size: 22px;
  transition: transform 0.2s;
}

.nav-item.active .nav-icon {
  transform: scale(1.15);
}

/* ─── Tab panels ─────────────────────────────────────────────── */
.tab-panel {
  display: none;
  padding-top: 8px;
}

.tab-panel.active {
  display: block;
}

/* ─── Percentage ring ────────────────────────────────────────── */
.pct-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 0 8px;
}

.pct-ring {
  position: relative;
  width: 100px;
  height: 100px;
}

.pct-ring svg {
  transform: rotate(-90deg);
}

.pct-ring .track {
  fill: none;
  stroke: var(--bg-dark);
  stroke-width: 8;
}

.pct-ring .fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.pct-ring .center-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.pct-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ─── History table ──────────────────────────────────────────── */
.history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  padding: 0 20px;
}

.history-table thead th {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  text-align: left;
}

.history-table tbody tr {
  background: var(--surface);
  box-shadow: var(--shadow-out-sm);
  border-radius: var(--radius-sm);
}

.history-table tbody td {
  padding: 12px 10px;
  font-size: 13px;
}

.history-table tbody td:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.history-table tbody td:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ─── Timetable modal / panel ────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal-sheet {
  width: 100%;
  max-width: 540px;
  background: var(--bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px 40px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--bg-dark);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
}

/* Timetable day block */
.tt-day {
  margin-bottom: 20px;
}

.tt-day-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
}

.tt-slot {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-out-sm);
  margin-bottom: 8px;
  border-left: 3px solid currentColor;
}

.tt-slot-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.tt-slot-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.tt-slot-code {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-light);
}

.tt-slot-venue {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── Admin: Mark Attendance ─────────────────────────────────── */
.date-selector-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 20px 16px;
}

.date-selector-row .form-input {
  flex: 1;
}

.roster-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-out-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}

.roster-item .ri-info {
  flex: 1;
  min-width: 0;
}

.roster-item .ri-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-item .ri-index {
  font-size: 12px;
  color: var(--text-muted);
}

.roster-item select {
  flex-shrink: 0;
  width: 110px;
  padding: 8px 30px 8px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: var(--shadow-in);
  border: none;
  background: var(--surface);
  color: var(--text-main);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a99' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}

.roster-item select.present {
  color: var(--success);
}

.roster-item select.absent {
  color: var(--danger);
}

/* ─── Whitelist manager ──────────────────────────────────────── */
.whitelist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-out-sm);
}

.whitelist-row .wr-info {
  flex: 1;
  min-width: 0;
}

.whitelist-row .wr-name {
  font-size: 13px;
  font-weight: 700;
}

.whitelist-row .wr-index {
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── Settings card ──────────────────────────────────────────── */
.settings-block {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-out-sm);
  margin-bottom: 16px;
}

.settings-block h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Toast notifications ────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
  width: calc(100% - 40px);
  max-width: 400px;
}

.toast {
  background: var(--text-main);
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  animation: toastIn 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.toast.success { background: var(--success); }
.toast.danger  { background: var(--danger); }
.toast.info    { background: var(--primary); }

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

/* ─── Misc helpers ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state .es-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 14px;
}

.divider {
  height: 1px;
  background: var(--bg-dark);
  margin: 0 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface);
  box-shadow: var(--shadow-out-sm);
  color: var(--text-muted);
}

.online-indicator {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  z-index: 900;
  display: none;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.online-indicator.show {
  display: flex;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 380px) {
  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .balance-value {
    font-size: 28px;
  }

  .auth-card {
    padding: 24px 20px;
  }
}

@media (min-width: 541px) {
  body {
    background: #d8dde3;
  }

  .dashboard,
  .bottom-nav {
    border-left: 1px solid var(--bg-dark);
    border-right: 1px solid var(--bg-dark);
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--bg-dark);
  border-radius: 4px;
}
