/* ===== DUBAI ANC — Worker Portal ===== */

/* --- Variables --- */
:root {
  --bg: #0b1220;
  --panel: #0f1a2e;
  --panel2: #101f3a;
  --text: #e8eefc;
  --muted: #8a95b0;
  --accent: #6ea8fe;
  --accent-glow: rgba(110,168,254,.15);
  --danger: #ff6b6b;
  --danger-glow: rgba(255,107,107,.12);
  --ok: #39d98a;
  --ok-glow: rgba(57,217,138,.12);
  --warn: #f0c040;
  --border: rgba(255,255,255,.07);
  --radius: 14px;
  --transition: .2s ease;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.18);
  --shadow-md: 0 8px 24px rgba(0,0,0,.25);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.35);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(110,168,254,.18); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(110,168,254,.35); }
* { scrollbar-width: thin; scrollbar-color: rgba(110,168,254,.18) transparent; }

/* --- Selection --- */
::selection { background: rgba(110,168,254,.3); color: #fff; }

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(170deg, #060c18 0%, #0b1220 40%, #0e1830 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  font-size: 14px;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; }

/* --- Page load animation --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --- Layout --- */
.app { min-height: 100vh; display: flex; }

/* --- Sidebar --- */
.sidebar {
  width: 260px;
  flex: 0 0 260px;
  padding: 20px 16px;
  border-right: 1px solid var(--border);
  background: rgba(12,20,38,.85);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideInLeft .4s ease both;
  position: relative;
  overflow: hidden;
}
.sidebar::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -40%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(110,168,254,.04) 0%, transparent 60%);
  pointer-events: none;
}
.brand {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent);
  padding: 2px 0 10px;
  border-bottom: 1px solid var(--border);
  text-shadow: 0 0 20px rgba(110,168,254,.3);
}
.brand span { color: var(--text); font-weight: 600; }
.profile {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16,31,58,.55);
  transition: all var(--transition);
}
.profile:hover { border-color: rgba(110,168,254,.2); background: rgba(16,31,58,.7); }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  flex-shrink: 0;
  transition: transform .3s ease, box-shadow .3s ease;
}
.profile:hover .avatar { transform: scale(1.05); box-shadow: 0 0 12px rgba(110,168,254,.2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(110,168,254,.3), rgba(57,217,138,.2));
}
.profile-name { font-weight: 700; font-size: 13px; }
.profile-email { color: var(--muted); font-size: 11px; margin-top: 1px; }

/* --- Menu --- */
.menu { display: flex; flex-direction: column; gap: 4px; }
.menu-item {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.menu-item svg { flex-shrink: 0; opacity: .7; transition: opacity var(--transition); }
.menu-item:hover svg, .menu-item.active svg { opacity: 1; }
.menu-item:hover { background: rgba(255,255,255,.04); color: var(--text); transform: translateX(3px); }
.menu-item.active {
  border-color: rgba(110,168,254,.3);
  background: var(--accent-glow);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent), var(--shadow-sm);
}
.menu-item:active { transform: scale(.98); }

/* --- Content --- */
.content {
  flex: 1;
  min-width: 0;
  padding: 24px 28px 40px;
  display: flex;
  flex-direction: column;
  animation: fadeIn .5s ease both;
  position: relative;
}
.content::before {
  content: '';
  position: absolute;
  top: 5%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(110,168,254,.035) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.content::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: 5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(57,217,138,.025) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.content > * { position: relative; z-index: 1; }
.content-full { max-width: 520px; margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; position: relative; z-index: 50; }
h1 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(14,24,48,.5);
  backdrop-filter: blur(12px);
  padding: 20px;
  flex: 1;
  animation: fadeInUp .45s ease both;
  animation-delay: .1s;
}

/* --- Flash --- */
.flash {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  animation: fadeInUp .3s ease both;
}
.flash-success { border-color: rgba(57,217,138,.35); background: rgba(57,217,138,.08); }
.flash-error { border-color: rgba(255,107,107,.35); background: rgba(255,107,107,.08); }
.flash-info { border-color: rgba(110,168,254,.35); background: rgba(110,168,254,.08); }

/* --- Grid & Cards --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(16,31,58,.45);
  transition: all .3s ease;
}
.card:hover { border-color: rgba(255,255,255,.12); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card h3 {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card h3 svg { flex-shrink: 0; opacity: .6; }
.card-full { grid-column: 1 / -1; }
.metric { font-size: 26px; font-weight: 800; letter-spacing: -.5px; text-shadow: 0 0 16px rgba(110,168,254,.2); }
.metric-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* --- Buttons --- */
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,.09); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-primary { border-color: rgba(110,168,254,.4); background: var(--accent-glow); color: var(--accent); }
.btn-primary:hover { background: rgba(110,168,254,.25); box-shadow: 0 4px 16px rgba(110,168,254,.2); }
.btn-danger { border-color: rgba(255,107,107,.4); background: var(--danger-glow); color: var(--danger); }
.btn-danger:hover { background: rgba(255,107,107,.2); box-shadow: 0 4px 16px rgba(255,107,107,.15); }
.btn-ok { border-color: rgba(57,217,138,.4); background: var(--ok-glow); color: var(--ok); }
.btn-ok:hover { background: rgba(57,217,138,.2); box-shadow: 0 4px 16px rgba(57,217,138,.15); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { transform: none; box-shadow: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* --- Forms --- */
.form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(6,10,20,.6);
  color: var(--text);
  outline: none;
  font-size: 14px;
  transition: border-color var(--transition);
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: rgba(110,168,254,.4); box-shadow: 0 0 0 3px rgba(110,168,254,.1); }
.field textarea { min-height: 90px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(138,149,176,.5); }

/* --- Table --- */
.table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.table th {
  font-size: 11px;
  color: var(--muted);
  text-align: left;
  padding: 0 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.table td {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(16,31,58,.4);
  font-size: 13px;
}
.table td:first-child {
  border-left: 1px solid var(--border);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
.table td:last-child {
  border-right: 1px solid var(--border);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--muted);
}
.badge-ok { border-color: rgba(57,217,138,.35); color: var(--ok); background: var(--ok-glow); }
.badge-danger { border-color: rgba(255,107,107,.35); color: var(--danger); background: var(--danger-glow); }
.badge-accent { border-color: rgba(110,168,254,.35); color: var(--accent); background: var(--accent-glow); }

/* --- Modal --- */
.modal { position: fixed; inset: 0; display: none; z-index: 100; }
.modal.open { display: block; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  animation: fadeIn .2s ease both;
}
.modal-card {
  position: relative;
  max-width: 480px;
  margin: 14vh auto 0;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(14,24,48,.97);
  backdrop-filter: blur(16px);
  padding: 20px;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(110,168,254,.06);
  animation: fadeInUp .3s ease both;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-title { font-weight: 800; font-size: 16px; }
.modal-body { margin-top: 12px; color: var(--muted); line-height: 1.5; }

/* --- Footer --- */
.footer {
  margin-top: 20px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  padding: 14px 0;
  opacity: .7;
}

/* --- Order Cards --- */
.order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.order-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16,31,58,.45);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all .3s ease;
}
.order-card:hover { border-color: rgba(255,255,255,.12); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.order-header { display: flex; justify-content: space-between; align-items: center; }
.order-code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 15px;
  color: var(--accent);
  font-weight: 700;
}
.order-date { font-size: 12px; color: var(--muted); }
.order-body { display: flex; flex-direction: column; gap: 8px; }
.order-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.order-field .label { color: var(--muted); }
.order-field .value { font-weight: 600; }
.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* --- Notify dropdown --- */
.notify-wrapper { position: relative; z-index: 1; }
.order-card.notify-open { position: relative; z-index: 50; }
.notify-dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 50;
  background: #0c1628;
  border: 1px solid rgba(110,168,254,.2);
  border-radius: 10px;
  padding: 6px;
  min-width: 220px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0,0,0,.5);
  display: none;
  margin-top: 4px;
}
.notify-dropdown button {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  transition: background var(--transition);
}
.notify-dropdown button:hover { background: rgba(255,255,255,.06); }

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-state h3 { font-size: 16px; color: var(--text); margin-bottom: 8px; }

/* --- FAQ Accordion --- */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16,31,58,.45);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: rgba(255,255,255,.12); }
.faq-item.open { border-color: rgba(110,168,254,.25); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}
.faq-question:hover { background: rgba(255,255,255,.03); }
.faq-chevron {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform .25s ease;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.faq-item.open .faq-answer {
  max-height: none;
  overflow: visible;
  padding: 0 18px 16px;
}

/* --- Login card --- */
.login-card {
  max-width: 420px;
  margin: 10vh auto 0;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(16,31,58,.5);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg), 0 0 120px rgba(110,168,254,.05);
  animation: fadeInUp .5s ease both;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 50% 0%, rgba(110,168,254,.06) 0%, transparent 60%);
  pointer-events: none;
}
.login-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  text-align: center;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-shadow: 0 0 30px rgba(110,168,254,.35);
}
.login-card .login-sub {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 20px;
}

/* --- Admin user cards --- */
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.user-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16,31,58,.45);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all .3s ease;
}
.user-card:hover { border-color: rgba(255,255,255,.12); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.user-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.user-card-header .name { font-weight: 700; font-size: 14px; }
.user-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.user-card-body .row {
  display: flex;
  justify-content: space-between;
}
.user-card-body .row .lbl { color: var(--muted); }
.user-card-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }

/* --- Blocked screen --- */
.blocked-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  min-height: 50vh;
}
.blocked-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--danger-glow);
  border: 1px solid rgba(255,107,107,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.blocked-screen h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--danger);
}
.blocked-screen p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 400px;
}

/* --- Sidebar status --- */
.sidebar-status {
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(16,31,58,.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}
.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-label { color: var(--muted); }
.status-value { color: var(--text); font-weight: 600; margin-left: auto; }
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok);
  animation: pulse-glow 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--ok); }
  50% { opacity: .5; box-shadow: 0 0 10px var(--ok); }
}

/* --- Topbar actions --- */
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.notif-wrapper { position: relative; }
.notif-bell {
  position: relative;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-bell:hover { color: var(--text); background: rgba(255,255,255,.05); transform: scale(1.1); }
.notif-bell:active { transform: scale(.95); }
.notif-badge {
  position: absolute;
  top: 1px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 6px var(--danger);
  line-height: 1;
  animation: pulse-glow 2s ease-in-out infinite;
}

/* --- Notification panel --- */
.notif-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 360px;
  max-height: 420px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(14,24,48,.97);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(110,168,254,.04);
  z-index: 999;
  overflow: hidden;
}
.notif-panel.open { display: flex; flex-direction: column; animation: fadeInUp .25s ease both; }
.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.notif-panel-title { font-weight: 700; font-size: 14px; }
.notif-panel-count { font-size: 11px; color: var(--accent); font-weight: 500; }
.notif-panel-body {
  overflow-y: auto;
  flex: 1;
  max-height: 360px;
}
.notif-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,.03); }
.notif-item.unread { background: rgba(110,168,254,.06); }
.notif-item.unread .notif-item-title { color: var(--accent); }
.notif-item-title { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.notif-item-body { font-size: 12px; color: var(--muted); line-height: 1.5; }
.notif-item-time { font-size: 11px; color: var(--muted); opacity: .6; margin-top: 4px; }

/* --- Dashboard greeting --- */
.dash-greeting { margin-bottom: 16px; animation: fadeInUp .5s ease both; animation-delay: .15s; }
.dash-greeting h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 2px;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dash-greeting p { color: var(--muted); font-size: 13px; }

/* --- System stats bar --- */
.sys-stats {
  display: flex;
  gap: 1px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
  animation: fadeInUp .5s ease both;
  animation-delay: .2s;
}
.sys-stat {
  flex: 1;
  background: rgba(16,31,58,.5);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background .3s ease;
}
.sys-stat:hover { background: rgba(16,31,58,.7); }
.sys-stat:first-child { border-radius: 12px 0 0 12px; }
.sys-stat:last-child { border-radius: 0 12px 12px 0; }
.sys-stat-val { font-size: 16px; font-weight: 800; color: var(--accent); text-shadow: 0 0 12px rgba(110,168,254,.25); }
.sys-stat-lbl { font-size: 11px; color: var(--muted); }

/* --- Activity feed --- */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  flex-shrink: 0;
  opacity: .7;
}
.activity-text { flex: 1; color: var(--muted); }
.activity-text strong { color: var(--text); font-weight: 600; }
.activity-code { color: var(--accent); font-family: 'SF Mono', monospace; font-size: 12px; }
.activity-time { font-size: 11px; color: var(--muted); white-space: nowrap; opacity: .7; }

/* --- Stats page --- */
.stats-header { margin-bottom: 16px; }
.stats-period-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.stats-tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(16,31,58,.5);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all var(--transition);
}
.stats-tab:hover { color: var(--text); border-color: rgba(110,168,254,.3); }
.stats-tab.active { color: var(--accent); background: rgba(110,168,254,.1); border-color: rgba(110,168,254,.4); }

.sort-link {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.sort-link:hover { color: var(--accent); }

.table thead th { position: sticky; top: 0; background: rgba(14,24,48,.95); z-index: 2; }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover td { background: rgba(110,168,254,.05); }

/* --- Profile info --- */
.profile-info-grid { display: flex; flex-direction: column; gap: 10px; }
.profile-info-row { display: flex; gap: 12px; align-items: baseline; }
.profile-info-label { font-size: 13px; color: var(--muted); min-width: 140px; flex-shrink: 0; }
.profile-info-value { font-size: 14px; color: var(--text); font-weight: 600; }

/* --- Glow divider --- */
.glow-divider {
  height: 1px;
  border: none;
  background: linear-gradient(90deg, transparent, rgba(110,168,254,.3), transparent);
  margin: 16px 0;
}

/* --- Tooltip --- */
[data-tooltip] {
  position: relative;
  cursor: help;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(14,24,48,.97);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: var(--shadow-md);
  z-index: 100;
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Smooth link underline --- */
.link-accent {
  color: var(--accent);
  position: relative;
  display: inline-block;
}
.link-accent::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .3s ease;
}
.link-accent:hover::after { width: 100%; }

/* --- Badge pulse --- */
.badge-pulse {
  position: relative;
}
.badge-pulse::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: inherit;
  opacity: .4;
  animation: pulse-glow 2s ease-in-out infinite;
  z-index: -1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 14px;
    gap: 10px;
  }
  .menu { flex-direction: row; overflow-x: auto; gap: 4px; }
  .menu-item { white-space: nowrap; font-size: 12px; padding: 7px 10px; }
  .menu-item:hover { transform: none; }
  .content { padding: 16px 14px 30px; }
  .grid { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: 1fr; }
  .user-grid { grid-template-columns: 1fr; }
  .sys-stats { flex-direction: column; }
  .sys-stat:first-child { border-radius: 12px 12px 0 0; }
  .sys-stat:last-child { border-radius: 0 0 12px 12px; }
  .notif-panel { width: 300px; right: -40px; }
  .topbar h1 { font-size: 17px; }
}
