/* ============================================================
   Insight Dial - Main Stylesheet
   /css/main.css
   Light theme, clean, professional
   ============================================================ */

/* ---- Variables ---- */
:root {
  --id-primary:       #e83e58;
  --id-primary-dark:  #c92f48;
  --id-primary-light: #ffd9de;
  --id-secondary:     #64748b;
  --id-success:       #16a34a;
  --id-warning:       #d97706;
  --id-danger:        #dc2626;
  --id-info:          #ff7a59;

  --id-bg:            #f6f4fb;
  --id-bg-white:      #ffffff;
  --id-bg-card:       #ffffff;
  /* SAP-style sidebar: light background, dense, blue active-state --
     replaces the previous dark indigo theme entirely. */
  --id-sidebar-bg:      #0d0920;
  --id-sidebar-text:    #b9b3d6;
  --id-sidebar-text-dim:#8d86b3;
  --id-sidebar-hover:   #1a1338;
  --id-sidebar-active:  rgba(255,93,115,.18);
  --id-sidebar-active-text: #ff8a9a;
  --id-sidebar-border:  #2c2552;

  --id-border:        #e2e8f0;
  --id-text:          #1a1333;
  --id-text-muted:    #64748b;
  --id-text-light:    #94a3b8;

  --id-shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --id-shadow-md:     0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --id-shadow-lg:     0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);

  --id-radius:        0.5rem;
  --id-radius-lg:     0.75rem;

  --id-sidebar-width: 260px;
  --id-topbar-height: 64px;
  --id-font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Bootstrap 5 uses its own variables for .bg-primary, .badge, .text-primary, links - point them at the brand teal */
:root {
  --bs-primary: #e83e58;
  --bs-primary-rgb: 0, 127, 163;
  --bs-link-color: #e83e58;
  --bs-link-color-rgb: 0, 127, 163;
  --bs-link-hover-color: #c92f48;
  --bs-link-hover-color-rgb: 0, 90, 150;
  --bs-info: #ff7a59;
  --bs-info-rgb: 0, 145, 185;
}
.form-check-input:checked { background-color: #e83e58; border-color: #e83e58; }
.form-switch .form-check-input:checked { background-color: #e83e58; border-color: #e83e58; }
.form-check-input:focus { border-color: #ff7a59; box-shadow: 0 0 0 .2rem rgba(255,122,89,.2); }
.page-link { color: #e83e58; }
.page-item.active .page-link { background-color: #e83e58; border-color: #e83e58; }
.nav-pills .nav-link.active, .nav-tabs .nav-link.active { color: #c92f48; }

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--id-font);
  background: var(--id-bg);
  color: var(--id-text);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

a { color: var(--id-primary); text-decoration: none; }
a:hover { color: var(--id-primary-dark); text-decoration: underline; }

img { max-width: 100%; }

/* ---- Auth Layout ---- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffe9ec 0%, #f6fbfd 100%);
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--id-bg-white);
  border-radius: var(--id-radius-lg);
  box-shadow: var(--id-shadow-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-logo .brand-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--id-primary);
  letter-spacing: -0.5px;
}

/* ---- Logo images (sized per page) ---- */
.auth-logo .auth-logo-img {            /* login / register / reset: large, centred */
  display: block;
  width: 260px;
  max-width: 82%;
  height: auto;
  margin: 0 auto .5rem;
}
.sidebar-brand .brand-logo-link { display: block; line-height: 0; }
.sidebar-brand .brand-logo {           /* sidebar: compact logo, never wider than the sidebar */
  height: 46px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: .35rem;
}
.topbar-brand-mobile { display: none; line-height: 0; margin-right: .5rem; }
.topbar-brand-mobile img { height: 30px; width: auto; }
.page-logo-lg  { width: 300px; max-width: 86%; height: auto; display: block; margin: 0 auto 1rem; }   /* home / big pages */
.page-logo-md  { width: 200px; max-width: 70%; height: auto; display: block; margin: 0 auto 1.25rem; } /* error pages */
.doc-logo      { height: 46px; width: auto; display: block; }                                         /* invoices / print */
@media (max-width: 576px) { .auth-logo .auth-logo-img { width: 220px; } }
@media print { .doc-logo { height: 40px; } }

.auth-logo .brand-tagline {
  font-size: 0.8125rem;
  color: var(--id-text-muted);
  margin-top: 0.25rem;
}

.auth-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--id-text);
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--id-text-muted);
  margin-bottom: 1.75rem;
}

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

/* Sidebar */
.sidebar {
  width: var(--id-sidebar-width);
  background: var(--id-sidebar-bg);
  border-right: 1px solid var(--id-sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--id-sidebar-border);
}

.sidebar-brand .brand-name {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sidebar-brand .brand-role {
  color: var(--id-sidebar-text-dim);
  font-size: 0.6875rem;
}

.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0;
}

.nav-section-label {
  color: var(--id-sidebar-text-dim);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  /* Tightened top/bottom padding specifically, per request -- this
     is the spacing between one nav section and the next. */
  padding: 0.5rem 1.25rem 0.125rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  /* Reduced from 0.625rem/1.5rem -- denser, SAP-style row height. */
  padding: 0.4rem 1.25rem;
  color: var(--id-sidebar-text);
  font-size: 0.8125rem;
  font-weight: 400;
  border-radius: 0;
  border-left: 3px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.sidebar-nav .nav-link i {
  width: 16px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--id-sidebar-text-dim);
}

.sidebar-nav .nav-link:hover {
  background: var(--id-sidebar-hover);
  color: #fff;
  text-decoration: none;
}

.sidebar-nav .nav-link.active {
  background: var(--id-sidebar-active);
  color: var(--id-sidebar-active-text);
  border-left-color: var(--id-sidebar-active-text);
  font-weight: 500;
}

.sidebar-nav .nav-link.active i { color: var(--id-sidebar-active-text); }

.sidebar-user {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--id-sidebar-border);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.sidebar-user .avatar {
  width: 32px; height: 32px;
  background: var(--id-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8125rem; color: #fff;
  flex-shrink: 0;
}

.sidebar-user .user-info .name {
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

.sidebar-user .user-info .role {
  color: var(--id-sidebar-text-dim);
  font-size: 0.6875rem;
}

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

/* Topbar */
.topbar {
  height: var(--id-topbar-height);
  background: var(--id-bg-white);
  border-bottom: 1px solid var(--id-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky; top: 0; z-index: 999;
  box-shadow: var(--id-shadow);
}

.topbar-left { display: flex; align-items: center; gap: 1rem; }

.topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--id-text);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.notif-btn {
  position: relative;
  background: none; border: none;
  width: 38px; height: 38px;
  border-radius: var(--id-radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--id-text-muted);
  cursor: pointer;
  transition: background .15s;
}

.notif-btn:hover { background: var(--id-bg); color: var(--id-text); }

.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--id-danger);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* Page content */
.page-content {
  padding: 2rem 1.75rem;
  flex: 1;
}

.page-header {
  margin-bottom: 1.75rem;
}

.page-header h1 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--id-text);
  margin: 0 0 0.25rem;
}

.page-header p {
  color: var(--id-text-muted);
  font-size: 0.875rem;
  margin: 0;
}

/* ---- Cards ---- */
.card {
  background: var(--id-bg-card);
  border: 1px solid var(--id-border);
  border-radius: var(--id-radius-lg);
  box-shadow: var(--id-shadow);
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--id-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--id-text);
  margin: 0;
}

.card-body { padding: 1.5rem; }

/* ---- Stat Cards ---- */
.stat-card {
  background: var(--id-bg-white);
  border: 1px solid var(--id-border);
  border-radius: var(--id-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--id-shadow);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--id-radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-icon.primary   { background: #dff1f7; color: var(--id-primary); }
.stat-icon.success   { background: #dcfce7; color: var(--id-success); }
.stat-icon.warning   { background: #fef3c7; color: var(--id-warning); }
.stat-icon.danger    { background: #fee2e2; color: var(--id-danger); }
.stat-icon.info      { background: #e0f2fe; color: var(--id-info); }

.stat-info .stat-label {
  font-size: 0.8125rem;
  color: var(--id-text-muted);
  font-weight: 500;
}

.stat-info .stat-value {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--id-text);
  line-height: 1.2;
  margin: 0.1rem 0;
}

.stat-info .stat-change {
  font-size: 0.75rem;
  font-weight: 600;
}

.stat-change.up   { color: var(--id-success); }
.stat-change.down { color: var(--id-danger); }

/* ---- Forms ---- */
.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--id-text);
  margin-bottom: 0.375rem;
}

.form-control, .form-select {
  border: 1.5px solid var(--id-border);
  border-radius: var(--id-radius);
  padding: 0.5625rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--id-text);
  background: var(--id-bg-white);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

.form-control:focus, .form-select:focus {
  border-color: var(--id-primary);
  box-shadow: 0 0 0 3px rgba(255,122,89,.18);
  outline: none;
}

.form-text {
  font-size: 0.8125rem;
  color: var(--id-text-muted);
  margin-top: 0.25rem;
}

.form-check-input:checked {
  background-color: var(--id-primary);
  border-color: var(--id-primary);
}

/* ---- Buttons ---- */
.btn {
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--id-radius);
  padding: 0.5rem 1.125rem;
  transition: all .15s;
  cursor: pointer;
  border: 1.5px solid transparent;
  display: inline-flex; align-items: center; gap: 0.375rem;
}

.btn-primary {
  background: var(--id-primary);
  color: #fff;
  border-color: var(--id-primary);
}
.btn-primary:hover { background: var(--id-primary-dark); border-color: var(--id-primary-dark); color: #fff; }

.btn-outline-primary {
  background: transparent;
  color: var(--id-primary);
  border-color: var(--id-primary);
}
.btn-outline-primary:hover { background: var(--id-primary); color: #fff; }

.btn-success { background: var(--id-success); border-color: var(--id-success); color: #fff; }
.btn-danger  { background: var(--id-danger);  border-color: var(--id-danger);  color: #fff; }
.btn-secondary { background: var(--id-secondary); border-color: var(--id-secondary); color: #fff; }
.btn-light { background: var(--id-bg); border-color: var(--id-border); color: var(--id-text); }

.btn-sm { padding: 0.3125rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ---- Tables ---- */
.table-wrapper {
  background: var(--id-bg-white);
  border: 1px solid var(--id-border);
  border-radius: var(--id-radius-lg);
  /* overflow-x:auto lets a wide table scroll horizontally on a
     narrow screen instead of being invisibly clipped by
     overflow:hidden with no way to reach the hidden columns.
     overflow-y:hidden keeps the rounded-corner clipping this
     container was already using. */
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: var(--id-shadow);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.table thead th {
  background: var(--id-bg);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--id-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--id-border);
  white-space: nowrap;
}

.table tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--id-border);
  font-size: 0.875rem;
  color: var(--id-text);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f8fafc; }

/* ---- Badges ---- */
.badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25em 0.625em;
  border-radius: 20px;
}

/* ---- Alerts ---- */
.alert {
  border-radius: var(--id-radius);
  border: none;
  font-size: 0.875rem;
  padding: 0.875rem 1rem;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid var(--id-warning);
}

.alert-danger {
  background: #fee2e2;
  color: #7f1d1d;
  border-left: 4px solid var(--id-danger);
}

.alert-success {
  background: #dcfce7;
  color: #14532d;
  border-left: 4px solid var(--id-success);
}

.alert-info {
  background: #e0f2fe;
  color: #c92f48;
  border-left: 4px solid var(--id-info);
}

/* ---- Wallet Warning Bar ---- */
.wallet-warning-bar {
  background: #fef3c7;
  border-bottom: 2px solid var(--id-warning);
  padding: 0.625rem 1.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wallet-danger-bar {
  background: #fee2e2;
  border-bottom: 2px solid var(--id-danger);
  padding: 0.625rem 1.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #7f1d1d;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---- Impersonation ("View As") Bar ---- */
.impersonation-bar {
  background: #c92f48;
  padding: 0.625rem 1.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.impersonation-bar strong { font-weight: 800; }

/* ---- Pagination ---- */
.pagination { gap: 0.25rem; }

.page-link {
  border-radius: var(--id-radius) !important;
  border: 1.5px solid var(--id-border);
  color: var(--id-text);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
}

.page-item.active .page-link {
  background: var(--id-primary);
  border-color: var(--id-primary);
  color: #fff;
}

/* ---- Dropdown ---- */
.dropdown-menu {
  border: 1px solid var(--id-border);
  border-radius: var(--id-radius);
  box-shadow: var(--id-shadow-lg);
  font-size: 0.875rem;
  padding: 0.375rem;
}

.dropdown-item {
  border-radius: 0.375rem;
  padding: 0.5rem 0.875rem;
  color: var(--id-text);
  font-weight: 500;
}

.dropdown-item:hover { background: var(--id-bg); color: var(--id-primary); }

/* ---- Help Doc ---- */
.help-doc-btn {
  border: 1px solid var(--id-border);
  background: var(--id-bg-white);
  color: var(--id-text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: var(--id-radius);
}

.help-doc-btn:hover {
  background: var(--id-bg);
  color: var(--id-primary);
  border-color: var(--id-primary-light);
}

.help-doc-panel {
  width: 420px;
  max-width: 92vw;
}

.help-doc-panel .offcanvas-header {
  border-bottom: 1px solid var(--id-border);
  padding: 1.25rem;
}

.help-doc-panel .offcanvas-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--id-text);
}

.help-doc-panel .offcanvas-body {
  padding: 1.25rem;
}

.help-doc-section {
  margin-bottom: 1.75rem;
}

.help-doc-section p {
  font-size: 0.875rem;
  color: var(--id-text);
  line-height: 1.6;
  margin: 0;
}

.help-doc-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--id-text-muted);
  margin-bottom: 0.625rem;
}

.help-doc-list {
  margin: 0;
  padding-left: 1.125rem;
}

.help-doc-list li {
  font-size: 0.875rem;
  color: var(--id-text);
  line-height: 1.6;
  margin-bottom: 0.625rem;
}

.help-doc-list li:last-child { margin-bottom: 0; }

.help-doc-limitations .help-doc-label {
  color: var(--id-warning);
}

.help-doc-limitations {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--id-radius);
  padding: 1rem;
}

/* ---- Mobile sidebar toggle ---- */
.sidebar-toggle {
  display: none;
  background: none; border: none;
  font-size: 1.25rem;
  color: var(--id-text);
  cursor: pointer;
}

/* ---- Utilities ---- */
.text-muted  { color: var(--id-text-muted) !important; }
.text-primary{ color: var(--id-primary) !important; }
.text-success{ color: var(--id-success) !important; }
.text-danger { color: var(--id-danger) !important; }
.text-warning{ color: var(--id-warning) !important; }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.fs-sm  { font-size: 0.8125rem; }
.fs-xs  { font-size: 0.75rem; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--id-shadow-lg);
  }

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

  .sidebar-toggle { display: block; }
  .topbar-brand-mobile { display: inline-block; }
  .topbar-left .topbar-title { display: none; }   /* the logo takes the title's place on small screens */

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 999;
  }

  .sidebar-overlay.open { display: block; }
}

@media (max-width: 575.98px) {
  .auth-card { padding: 2rem 1.25rem; }
  .page-content { padding: 1.25rem 1rem; }
  .topbar { padding: 0 1rem; }

  /* topbar-right has no wrap and no width limits by default -- on a
     narrow phone, a full username + a variable-width publisher
     switcher + the notification bell can genuinely overflow past the
     screen edge. Reduce the gap, cap the switcher's width with an
     ellipsis for a long publisher name, and hide the username text
     (keeping just the icon) -- the same pattern used for this exact
     situation on most mobile-responsive admin dashboards. */
  .topbar-right { gap: 0.5rem; }

  .topbar-right form select {
    max-width: 110px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .topbar-right .dropdown-toggle {
    padding: 0.375rem 0.5rem;
  }

  .topbar-right .topbar-username {
    display: none;
  }

  .topbar-right .dropdown-toggle i {
    margin-right: 0 !important;
    font-size: 1.125rem;
  }

  /* Systemic fix, found during a mobile audit: .filter-bar is used
     across ~22 pages platform-wide, almost always as a d-flex form
     with NO flex-wrap -- a search input (often with its own
     max-width:300px inline style), a button, and sometimes a "Clear"
     link, all forced onto one un-wrapping row. On a real phone width
     this overflows badly. Rather than edit 22 separate page files
     (each its own risk of introducing a new bug), this one rule
     forces every filter-bar's direct form to wrap and lets inputs
     take full width -- works regardless of what any individual page
     does internally, and doesn't require every future filter-bar to
     remember to add flex-wrap itself. */
  .filter-bar form,
  .filter-bar > .d-flex {
    flex-wrap: wrap;
  }

  .filter-bar input[type="text"],
  .filter-bar input[type="search"],
  .filter-bar input[type="date"],
  .filter-bar select {
    max-width: none !important;
    flex: 1 1 auto;
    min-width: 140px;
  }
}

/* Compact alert chips (dashboard) */
.alert-chips { display:flex; flex-wrap:wrap; gap:10px; }
.alert-chip { --c:#ff5d73; --bg:#e0f3f6; display:inline-flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--id-border,#e3e8f2); border-radius:999px; padding:5px 5px 5px 7px; font-size:.875rem; color:#0f1b33; box-shadow:0 1px 2px rgba(15,27,51,.06); text-decoration:none; transition:box-shadow .15s, transform .15s; }
.alert-chip:hover { text-decoration:none; color:#0f1b33; box-shadow:0 4px 12px rgba(15,27,51,.12); transform:translateY(-1px); }
.alert-chip.tone-danger  { --c:#dc2626; --bg:#fdecec; }
.alert-chip.tone-warning { --c:#d97706; --bg:#fef3dc; }
.alert-chip .ac-dot { width:26px; height:26px; border-radius:50%; background:var(--bg); color:var(--c); display:inline-flex; align-items:center; justify-content:center; font-size:.8rem; }
.alert-chip .ac-btn { background:var(--c); color:#fff; font-weight:600; font-size:.8rem; padding:4px 12px; border-radius:999px; }

/* Admin dashboard top */
.dash-top { display:grid; grid-template-columns:1.5fr 1fr 1fr; gap:16px; }
.dash-hero { background:linear-gradient(135deg,#ff5d73,#ffb347); color:#1a0f2e; border-radius:16px; padding:20px 22px; text-decoration:none; display:block; box-shadow:0 8px 24px rgba(255,93,115,.25); }
.dash-hero:hover { color:#1a0f2e; text-decoration:none; }
.dh-label { font-size:.82rem; opacity:.85; }
.dh-value { font-size:2.6rem; font-weight:700; letter-spacing:-1px; margin-top:2px; line-height:1.15; }
.dh-delta { font-size:.8rem; font-weight:700; background:rgba(26,15,46,.12); padding:3px 9px; border-radius:999px; vertical-align:middle; letter-spacing:0; }
.dh-spark { width:100%; height:64px; margin-top:8px; }
.dash-card { background:#fff; border:1px solid var(--id-border,#e3e8f2); border-radius:16px; padding:20px 22px; text-decoration:none; color:#0f1b33; display:block; box-shadow:0 1px 2px rgba(15,27,51,.05),0 8px 24px rgba(15,27,51,.05); }
a.dash-card:hover { color:#0f1b33; text-decoration:none; box-shadow:0 10px 28px rgba(15,27,51,.1); }
.dc-label { font-size:.82rem; color:#5b6780; }
.dc-value { font-size:1.9rem; font-weight:700; letter-spacing:-.5px; margin-top:2px; }
.dc-delta { font-size:.75rem; font-weight:700; padding:2px 8px; border-radius:999px; vertical-align:middle; margin-left:4px; letter-spacing:0; }
.dc-delta.up { color:#0b7a55; background:#ddf3e8; } .dc-delta.down { color:#b42318; background:#fdecec; }
.dc-spark { width:100%; height:44px; margin-top:10px; }
.dc-sub { font-size:.8rem; color:#5b6780; margin-top:6px; }
.dc-row { display:flex; justify-content:space-between; align-items:center; font-size:.9rem; margin-top:12px; }
.dc-btn { color:#fff !important; font-weight:600; font-size:.78rem; padding:4px 12px; border-radius:999px; text-decoration:none !important; }
.dc-ok { margin-top:14px; color:#0b7a55; font-size:.9rem; }
.dash-tiles { display:grid; grid-template-columns:repeat(6,1fr); gap:14px; }
.dash-tile { display:flex; align-items:center; gap:12px; background:#fff; border:1px solid var(--id-border,#e3e8f2); border-radius:14px; padding:14px 16px; text-decoration:none; color:#0f1b33; box-shadow:0 1px 2px rgba(15,27,51,.05); }
.dash-tile:hover { color:#0f1b33; text-decoration:none; box-shadow:0 6px 18px rgba(15,27,51,.1); }
.dt-ic { width:38px; height:38px; border-radius:11px; display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; flex-shrink:0; }
.dt-n { display:block; font-size:1.4rem; font-weight:700; line-height:1; } .dt-l { display:block; font-size:.78rem; color:#5b6780; margin-top:3px; }
@media (max-width:1100px) { .dash-top { grid-template-columns:1fr 1fr; } .dash-hero { grid-column:1 / -1; } .dash-tiles { grid-template-columns:repeat(3,1fr); } }
@media (max-width:600px) { .dash-top { grid-template-columns:1fr; } .dash-tiles { grid-template-columns:repeat(2,1fr); } }
