/* ============================================================
   SRS Group of College — Portal Stylesheet
   ============================================================ */

:root {
  --sidebar-w: 260px;
  --nav-h: 60px;
  --sidebar-bg: #0f2444;
  --sidebar-hover: rgba(255,255,255,0.08);
  --sidebar-active: #1e40af;
  --sidebar-text: rgba(255,255,255,0.75);
  --sidebar-text-bright: #fff;
  --brand-accent: #3b82f6;
  --body-bg: #f0f4f9;
  --card-bg: #ffffff;
  --border-color: #e5eaf2;
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --primary: #1e40af;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--body-bg); color: var(--text-primary); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh;
  width: var(--sidebar-w); background: var(--sidebar-bg);
  display: flex; flex-direction: column; z-index: 1050;
  transition: transform .25s ease;
  overflow-y: auto; overflow-x: hidden;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.brand-initials {
  width: 40px; height: 40px; background: var(--brand-accent);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.brand-name  { color: #fff; font-weight: 600; font-size: 14px; line-height: 1.2; }
.brand-sub   { color: rgba(255,255,255,0.45); font-size: 11px; }

.sidebar-role-badge {
  margin: 12px 16px 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px; padding: 6px 12px;
  color: rgba(255,255,255,0.5); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .05em;
}

.sidebar-nav { list-style: none; margin: 8px 0 0; padding: 0 12px; flex: 1; }
.sidebar-item { margin-bottom: 2px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; text-decoration: none;
  color: var(--sidebar-text); font-size: 13.5px; font-weight: 500;
  transition: background .15s, color .15s;
}
.sidebar-link:hover  { background: var(--sidebar-hover); color: var(--sidebar-text-bright); }
.sidebar-link.active { background: var(--sidebar-active); color: #fff; }
.sidebar-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: auto;
}
.sidebar-footer-link {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 8px; border-radius: 8px;
  transition: background .15s;
}
.sidebar-footer-link:hover { background: var(--sidebar-hover); }
.avatar-sm-sidebar {
  width: 34px; height: 34px; background: var(--brand-accent);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.sf-name { color: var(--sidebar-text-bright); font-size: 13px; font-weight: 500; }
.sf-link { color: rgba(255,255,255,0.4); font-size: 11px; }

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

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin .25s ease;
}

/* ============================================================
   TOP NAVBAR
   ============================================================ */
.top-navbar {
  height: var(--nav-h); background: #fff;
  border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; z-index: 900;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.btn-hamburger {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px 8px; border-radius: 6px;
  transition: background .15s;
}
.btn-hamburger:hover { background: var(--body-bg); }
.avatar-sm {
  width: 28px; height: 28px; background: var(--primary);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* ============================================================
   CONTENT AREA
   ============================================================ */
.content-area { padding: 28px 28px 40px; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  background: var(--card-bg); border-radius: var(--radius);
  padding: 22px; border: 1px solid var(--border-color);
  box-shadow: var(--shadow); transition: box-shadow .2s;
  position: relative; overflow: hidden;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.stat-icon {
  position: absolute; right: 18px; top: 18px;
  width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.stat-icon.blue   { background: #dbeafe; color: #1e40af; }
.stat-icon.green  { background: #dcfce7; color: #16a34a; }
.stat-icon.amber  { background: #fef3c7; color: #d97706; }
.stat-icon.red    { background: #fee2e2; color: #dc2626; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.teal   { background: #ccfbf1; color: #0d9488; }

/* ============================================================
   DATA TABLE CARD
   ============================================================ */
.table-card {
  background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border-color); box-shadow: var(--shadow);
  overflow: hidden;
}
.table-card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.table-card-title { font-weight: 600; font-size: 15px; color: var(--text-primary); margin: 0; }
.table-card-body  { padding: 0; }
.table { margin-bottom: 0; }
.table thead th {
  background: var(--body-bg); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted);
  border-bottom: 1px solid var(--border-color); padding: 11px 16px; white-space: nowrap;
}
.table tbody td { padding: 12px 16px; vertical-align: middle; font-size: 13.5px; }
.table tbody tr:hover { background: rgba(241,245,249,.6); }
.table-card-footer { padding: 12px 20px; border-top: 1px solid var(--border-color); background: var(--body-bg); }

/* ============================================================
   FORMS
   ============================================================ */
.form-card {
  background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border-color); box-shadow: var(--shadow);
  padding: 28px;
}
.form-section-title {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted);
  padding-bottom: 10px; border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}
.form-label { font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.form-control, .form-select {
  font-size: 13.5px; border-color: var(--border-color);
  border-radius: 7px; padding: 8px 12px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,64,175,0.12);
}
.required-star { color: #dc2626; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { border-radius: 7px; font-size: 13.5px; font-weight: 500; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: #1d3a8a; border-color: #1d3a8a; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header-title { font-size: 20px; font-weight: 700; margin: 0; }
.page-header-sub   { font-size: 13px; color: var(--text-muted); margin: 2px 0 0; }

/* ============================================================
   BADGES
   ============================================================ */
.badge { font-size: 11.5px; font-weight: 500; padding: 4px 9px; border-radius: 5px; }

/* ============================================================
   ACTION BUTTONS (table rows)
   ============================================================ */
.btn-action { padding: 4px 9px; font-size: 12px; border-radius: 6px; }

/* ============================================================
   STAGE TIMELINE
   ============================================================ */
.stage-timeline { list-style: none; padding: 0; margin: 0; }
.stage-timeline-item {
  display: flex; gap: 14px; padding-bottom: 20px;
  position: relative;
}
.stage-timeline-item:not(:last-child)::before {
  content: ''; position: absolute; left: 15px; top: 32px;
  width: 2px; bottom: 0; background: var(--border-color);
}
.stage-dot {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; margin-top: 2px;
}
.stage-info .stage-name   { font-weight: 600; font-size: 14px; }
.stage-info .stage-meta   { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   DETAIL VIEW CARDS
   ============================================================ */
.detail-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 3px; }
.detail-value { font-size: 14px; color: var(--text-primary); }
.detail-group { margin-bottom: 16px; }

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.active { display: block; }
  #main-content { margin-left: 0; }
  .content-area { padding: 20px 16px 32px; }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh; background: linear-gradient(135deg, #0f2444 0%, #1e40af 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}
.login-card-header {
  background: var(--sidebar-bg); padding: 32px 36px 24px; text-align: center;
}
.login-logo {
  width: 64px; height: 64px; background: var(--brand-accent);
  border-radius: 14px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
}
.login-title    { color: #fff; font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.login-subtitle { color: rgba(255,255,255,0.55); font-size: 12.5px; margin: 0; }
.login-card-body { padding: 28px 36px 32px; }
.login-form .form-label { font-weight: 500; font-size: 13px; }
.login-footer { text-align: center; padding-top: 4px; color: var(--text-muted); font-size: 12px; }

/* ============================================================
   MISC
   ============================================================ */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state i { font-size: 48px; color: #cbd5e1; margin-bottom: 12px; display: block; }
.empty-state p { color: var(--text-muted); margin: 0; }

.card-section {
  background: var(--card-bg); border: 1px solid var(--border-color);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 24px;
}
.card-section-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border-color);
  font-weight: 600; font-size: 14px;
}
.card-section-body { padding: 20px; }

/* DataTables override */
.dataTables_wrapper .dataTables_filter input { border: 1px solid var(--border-color); border-radius: 7px; padding: 5px 10px; font-size: 13px; }
.dataTables_wrapper .dataTables_length select { border: 1px solid var(--border-color); border-radius: 7px; padding: 4px 8px; font-size: 13px; }
div.dataTables_wrapper div.dataTables_info { font-size: 12.5px; color: var(--text-muted); }

/* select2 */
.select2-container--bootstrap-5 .select2-selection { font-size: 13.5px; border-color: var(--border-color); border-radius: 7px; }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: #dc2626; color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px;
  border-radius: 10px; display: flex;
  align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1;
}
.sidebar-badge {
  margin-left: auto; background: #dc2626; color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
.notif-item {
  padding: 14px 16px; border-bottom: 1px solid var(--border-color);
  cursor: pointer; transition: background .15s;
}
.notif-item:hover { background: var(--body-bg); }
.notif-item.unread { background: #eff6ff; border-left: 3px solid var(--primary); }
.notif-item .notif-title { font-weight: 600; font-size: 14px; }
.notif-item .notif-msg   { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.notif-item .notif-time  { font-size: 11px; color: #94a3b8; margin-top: 4px; }
.notif-type-info    { border-left-color: #3b82f6 !important; }
.notif-type-success { border-left-color: #16a34a !important; }
.notif-type-warning { border-left-color: #d97706 !important; }
.notif-type-danger  { border-left-color: #dc2626 !important; }

/* ============================================================
   CHAT
   ============================================================ */
.chat-layout { display: flex; height: calc(100vh - 120px); border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; background: var(--card-bg); }
.chat-sidebar { width: 300px; flex-shrink: 0; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; }
.chat-sidebar-header { padding: 14px 16px; border-bottom: 1px solid var(--border-color); font-weight: 600; font-size: 14px; }
.chat-list { flex: 1; overflow-y: auto; }
.chat-list-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border-color); transition: background .15s; text-decoration: none; color: inherit; }
.chat-list-item:hover { background: var(--body-bg); }
.chat-list-item.active { background: #eff6ff; border-left: 3px solid var(--primary); }
.chat-list-item .chat-item-name { font-weight: 600; font-size: 13px; }
.chat-list-item .chat-item-sub  { font-size: 11px; color: var(--text-muted); }
.chat-list-item .chat-item-badge { margin-left: auto; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.chat-avatar img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-main-header { padding: 14px 20px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 12px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { display: flex; gap: 8px; max-width: 70%; }
.chat-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg .msg-avatar { width: 30px; height: 30px; border-radius: 50%; background: #e2e8f0; color: #475569; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.chat-msg .msg-bubble { background: var(--body-bg); border: 1px solid var(--border-color); border-radius: 12px 12px 12px 2px; padding: 8px 12px; font-size: 13.5px; line-height: 1.5; }
.chat-msg.mine .msg-bubble { background: var(--primary); color: #fff; border: none; border-radius: 12px 12px 2px 12px; }
.chat-msg .msg-meta { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.chat-msg.mine .msg-meta { text-align: right; color: rgba(255,255,255,0.7); }
.chat-msg .msg-sender { font-size: 11px; font-weight: 600; color: var(--primary); margin-bottom: 2px; }
.chat-msg.mine .msg-sender { display: none; }
.chat-input-area { padding: 14px 20px; border-top: 1px solid var(--border-color); display: flex; gap-10px; gap: 10px; align-items: flex-end; }
.chat-input-area textarea { flex: 1; resize: none; border-radius: 20px; padding: 10px 16px; font-size: 13.5px; border: 1px solid var(--border-color); outline: none; }
.chat-input-area textarea:focus { border-color: var(--primary); }
.chat-send-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.chat-send-btn:hover { background: #1d3a8a; }
.chat-empty { display: flex; align-items: center; justify-content: center; flex: 1; flex-direction: column; color: var(--text-muted); }
.chat-empty i { font-size: 48px; margin-bottom: 12px; }
@media (max-width: 768px) {
  .chat-sidebar { width: 100%; display: none; }
  .chat-sidebar.mobile-show { display: flex; }
  .chat-main { display: none; }
  .chat-main.mobile-show { display: flex; }
}

/* ============================================================
   AVATARS
   ============================================================ */
.avatar-sm-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.avatar-sidebar-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border-color); }
.avatar-lg-placeholder { width: 96px; height: 96px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 700; border: 3px solid var(--border-color); }

/* ============================================================
   Mobile Optimisations — srs-update-v8
   ============================================================ */

/* ── Hide non-essential table columns on mobile ── */
@media (max-width: 767px) {

  /* Tables: hide less-critical columns */
  .table .d-none-mobile,
  .table th.d-none-mobile,
  .table td.d-none-mobile { display: none !important; }

  /* Card-based student list on mobile */
  .mobile-card-list .table,
  .mobile-card-list thead { display: none !important; }

  .mobile-card-list .mobile-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
  }

  .mobile-card .mc-title {
    font-weight: 600; font-size: 14.5px;
    color: var(--color-text-primary);
    margin-bottom: 4px;
  }
  .mobile-card .mc-sub {
    font-size: 12px; color: var(--color-text-secondary);
    line-height: 1.6;
  }
  .mobile-card .mc-actions {
    display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap;
  }

  /* Page header stacks on mobile */
  .page-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }
  .page-header .d-flex { flex-wrap: wrap; }

  /* Sidebar collapses properly */
  .sidebar { z-index: 1045; }

  /* Stats cards: 2 per row on mobile */
  .row .col-6 .stat-card { padding: 12px 10px; }
  .stat-card .stat-value  { font-size: 20px; }
  .stat-card .stat-icon   { width: 36px; height: 36px; font-size: 16px; }

  /* Form cards full width */
  .form-card { padding: 16px; }

  /* Reduce button padding on mobile */
  .btn-action { padding: 4px 6px; font-size: 12px; }

  /* Fix modals on small screens */
  .modal-dialog { margin: 12px; }

  /* Timeline: reduce padding */
  #timeline { padding-left: 28px; }

  /* Table responsive scroll indicator */
  .table-responsive::after {
    content: '← scroll →';
    display: block;
    text-align: center;
    font-size: 11px;
    color: var(--color-text-secondary);
    padding: 4px;
    border-top: 1px solid var(--border-color);
  }

  /* Chat: full height on mobile */
  .chat-messages { max-height: 55vh; }

  /* Quick action grid: 3 per row on mobile */
  .quick-actions .col-4 { flex: 0 0 33.33%; max-width: 33.33%; }

  /* Hide page subtitle on very small screens */
  @media (max-width: 400px) {
    .page-header-sub { display: none; }
  }
}

/* ── Bottom navigation bar for mobile (app-like) ── */
@media (max-width: 767px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--sidebar-bg, #0f2444);
    border-top: 1px solid rgba(255,255,255,.1);
    z-index: 1040;
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
  .mobile-bottom-nav a {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 8px 4px 6px;
    color: rgba(255,255,255,.55);
    text-decoration: none; font-size: 10px;
    transition: color .2s;
  }
  .mobile-bottom-nav a.active,
  .mobile-bottom-nav a:hover { color: #fff; }
  .mobile-bottom-nav a i { font-size: 20px; margin-bottom: 2px; display: block; }
  .mobile-bottom-nav a .nav-badge {
    position: absolute; top: 4px;
    background: #ef4444; color: #fff;
    font-size: 9px; border-radius: 10px;
    padding: 1px 4px; min-width: 14px; text-align: center;
  }

  /* Push page content above bottom nav */
  body.has-bottom-nav .main-content {
    padding-bottom: 72px !important;
  }
}

@media (min-width: 768px) {
  .mobile-bottom-nav { display: none !important; }
}

/* ── Touch-friendly elements ── */
@media (max-width: 767px) {
  /* Larger tap targets */
  .btn-sm  { padding: 7px 14px; font-size: 13px; }
  .form-control, .form-select { font-size: 16px; } /* Prevents iOS zoom */

  /* Enrollment card on mobile */
  .enrollment-mobile-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px; padding: 14px;
    margin-bottom: 10px;
  }
  .enrollment-mobile-card .enr-header {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 8px;
  }
  .enrollment-mobile-card .enr-code { font-size: 11px; color: var(--color-text-secondary); }
  .enrollment-mobile-card .enr-course { font-weight: 600; font-size: 14px; }
  .enrollment-mobile-card .enr-meta {
    font-size: 12px; color: var(--color-text-secondary);
    display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px;
  }
}

/* ── Improved table on mobile — card stack ── */
@media (max-width: 575px) {
  .table-stack thead { display: none; }
  .table-stack tbody tr {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 10px 14px;
  }
  .table-stack tbody td {
    display: flex; justify-content: space-between;
    align-items: center; padding: 4px 0;
    border: none; font-size: 13px;
  }
  .table-stack tbody td::before {
    content: attr(data-label);
    font-weight: 500; color: var(--color-text-secondary);
    font-size: 12px; min-width: 100px;
  }
}

/* ── Utility additions ── */
.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }
.fw-600 { font-weight: 600 !important; }

/* ── Fix: User dropdown z-index and overflow ── */
.top-navbar {
  overflow: visible !important;
  position: relative;
  z-index: 100;
}
.top-navbar .dropdown {
  position: static !important;
}
.top-navbar .dropdown-menu {
  position: absolute !important;
  right: 0 !important;
  left: auto !important;
  top: 100% !important;
  z-index: 9999 !important;
  margin-top: 4px;
  min-width: 200px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
}
/* Remove the white rectangle (pseudo-element artifact from dropdown-toggle) */
.dropdown-toggle::after {
  margin-left: 6px;
  vertical-align: middle;
  font-size: 10px;
}
/* Hide any accidental blank pseudo-elements in topbar */
.top-navbar .dropdown-toggle::before {
  display: none !important;
}

/* ── Fix: Mobile sidebar toggle ── */
@media (max-width: 991px) {
  #sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1045;
  }
  #sidebar.open {
    transform: translateX(0);
  }
  #sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1044;
  }
  #sidebar-overlay.active {
    display: block;
  }
  #main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* ============================================================
   SIDEBAR GROUP LABELS & DIVIDERS — Redesigned nav
   ============================================================ */
.sidebar-group-label {
  list-style: none;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: rgba(255,255,255,.3);
  padding: 12px 16px 4px;
  margin-top: 2px;
}
.sidebar-group-label:first-child {
  padding-top: 4px;
  margin-top: 0;
}
.sidebar-divider {
  list-style: none;
  border-top: 1px solid rgba(255,255,255,.08);
  margin: 8px 12px;
}

/* ============================================================
   SIDEBAR GROUP LABELS & DIVIDERS
   ============================================================ */
.sidebar-group-label {
  list-style: none;
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: rgba(255,255,255,.28);
  padding: 14px 16px 4px;
  user-select: none;
}
.sidebar-group-label:first-child { padding-top: 6px; }
.sidebar-divider {
  list-style: none;
  border: none;
  border-top: 1px solid rgba(255,255,255,.07);
  margin: 6px 14px;
}

/* ============================================================
   ANNOUNCEMENT TICKER — pushes content down 36px
   ============================================================ */
body.srs-has-ticker {
  padding-top: 36px !important;
}
body.srs-has-ticker .top-navbar {
  top: 36px !important;
}
body.srs-has-ticker #sidebar {
  top: 36px !important;
  height: calc(100vh - 36px) !important;
}

/* ============================================================
   ACTION BUTTONS — always visible, never hidden
   ============================================================ */
.btn-action {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  visibility: visible !important;
}


