@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =========================================
   INFO HUB 5 — Root tokens
   ========================================= */
:root {
  /* layout */
  --shell: #060a15;
  --body: #060a15;
  --main-bg: #161e2d;
  --sidebar-width: 220px;
  --sidebar-collapsed: 64px;
  --topbar-h: 56px;

  /* base colors */
  --text: #e2e8f0;
  --muted: #94a3b8;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-soft: rgba(6, 10, 21, 0.15);
  --border: rgba(255, 255, 255, 0.06);

  /* brand + semantic */
  --brand: #DE232E;
  --raven: #ff800d;
  --success: #22c55e;
  --danger: #dc2626;
  --warning: #facc15;
  --info: #3b82f6;

  /* gradient tokens */
  --grad-brand: radial-gradient(circle at top, rgba(222, 35, 46, 0.45), rgba(22, 30, 45, 0.3));
  --grad-promo: linear-gradient(140deg, var(--brand), #ff4d6d);
  --grad-promo-alt: linear-gradient(135deg, var(--brand), var(--info));
  --grad-promo-raven: linear-gradient(135deg, var(--brand), var(--raven));

  /* alert tints */
  --alert-success-bg: rgba(34, 197, 94, 0.08);
  --alert-success-border: rgba(34, 197, 94, 0.25);
  --alert-danger-bg: rgba(220, 38, 38, 0.08);
  --alert-danger-border: rgba(220, 38, 38, 0.25);
  --alert-warning-bg: rgba(250, 204, 21, 0.08);
  --alert-warning-border: rgba(250, 204, 21, 0.25);
  --alert-info-bg: rgba(59, 130, 246, 0.08);
  --alert-info-border: rgba(59, 130, 246, 0.25);
  --alert-brand-bg: rgba(222, 35, 46, 0.1);
  --alert-brand-border: rgba(222, 35, 46, 0.35);
}

/* =========================================
   Reset / Base
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html { overflow-x: hidden; }

body {
  background: var(--body);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
li { list-style: none; }

/* Lock scroll when mobile sidebar open */
body.ih-sidebar-open {
  overflow: hidden;
}

/* Radial background helper (access/hero pages) */
.page-bg-radial {
  background: radial-gradient(circle at top, #020617, #020617 35%, #020617 60%, #020617);
}

/* =========================================
   Sidebar
   ========================================= */
#sidebar,
.layout-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--shell);
  z-index: 2000;
  transition: width .25s ease, transform .22s ease-out;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#sidebar::-webkit-scrollbar,
.layout-sidebar::-webkit-scrollbar {
  display: none;
}

#sidebar .brand,
.layout-sidebar .brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 0 1.1rem;
  color: #fff;
  font-weight: 600;
}
#sidebar .brand i,
.layout-sidebar .brand i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.5rem;
}

/* scrollable top menu */
#sidebar .side-menu.top,
.layout-sidebar .side-menu.top {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 .4rem;
  margin-top: .6rem;
}

#sidebar .side-menu li,
.layout-sidebar .side-menu li {
  margin-bottom: .35rem;
  border-radius: .85rem;
  overflow: visible; /* ensure dropdown content can show */
}

/* main sidebar links */
#sidebar .side-menu li > a,
.layout-sidebar .side-menu li > a {
  width: 100%;
  height: 46px; /* fixed height moves here */
  display: flex;
  gap: .65rem;
  align-items: center;
  border-radius: .85rem;
  color: rgba(226, 232, 240, 0.65);
  font-size: .8rem;
  padding: 0 .55rem 0 .4rem;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
  overflow: hidden;
}

#sidebar .side-menu li a i,
.layout-sidebar .side-menu li a i {
  width: 40px;
  text-align: center;
  font-size: 1.1rem;
}
#sidebar .side-menu li.active a,
#sidebar .side-menu li a:hover,
.layout-sidebar .side-menu li.active a,
.layout-sidebar .side-menu li a:hover {
  background: rgba(222, 35, 46, 0.14);
  color: #fff;
}

/* user block above bottom buttons */
#sidebar .user-block,
.layout-sidebar .user-block {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem .7rem .35rem .7rem;
  border-top: 1px solid rgba(255,255,255,0.03);
}
#sidebar .user-block img,
.layout-sidebar .user-block img {
  width: 46px;
  height: 46px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid rgba(222, 35, 46, 0.4);
  flex: 0 0 auto;
}
#sidebar .user-block .info,
.layout-sidebar .user-block .info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
#sidebar .user-block .info .name,
.layout-sidebar .user-block .info .name {
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
#sidebar .user-block .info .meta,
.layout-sidebar .user-block .info .meta {
  font-size: .7rem;
  color: rgb(172, 175, 179);
  white-space: nowrap;
}

/* bottom menu pinned */
#sidebar .side-menu.bottom,
.layout-sidebar .side-menu.bottom {
  margin-top: auto;
  padding: .8rem .4rem .8rem .4rem;
  background: var(--shell);
}
#sidebar .side-menu.bottom li a,
.layout-sidebar .side-menu.bottom li a {
  font-size: .78rem;
}

/* collapsed sidebar (desktop) */
#sidebar.collapsed,
.layout-sidebar.collapsed {
  width: var(--sidebar-collapsed);
}
#sidebar.collapsed .brand .text,
#sidebar.collapsed .side-menu li a .text,
#sidebar.collapsed .user-block .info,
.layout-sidebar.collapsed .brand .text,
.layout-sidebar.collapsed .side-menu li a .text,
.layout-sidebar.collapsed .user-block .info {
  display: none;
}
#sidebar.collapsed .user-block,
.layout-sidebar.collapsed .user-block {
  justify-content: center;
}
#sidebar.collapsed .side-menu li a,
.layout-sidebar.collapsed .side-menu li a {
  justify-content: center;
  padding-inline: 0;
}
#sidebar.collapsed .side-menu li a i,
.layout-sidebar.collapsed .side-menu li a i {
  margin-right: 0;
}

/* =========================================
   Content shell
   ========================================= */
#content,
.layout-main {
  position: relative;
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  transition: margin-left .25s ease, width .25s ease;
  min-height: 100vh;
}
#sidebar.collapsed ~ #content,
.layout-sidebar.collapsed ~ .layout-main {
  width: calc(100% - var(--sidebar-collapsed));
  margin-left: var(--sidebar-collapsed);
}

/* =========================================
   Topbar / Nav
   ========================================= */
#content nav,
.topbar {
  height: var(--topbar-h);
  background: var(--shell);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

/* toggle button */
#content nav .sidebar-toggle,
.topbar .sidebar-toggle {
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: .7rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  font-size: 1rem;
}

/* topbar logo */
.topbar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: .85rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e5e7eb;
  font-size: 1.1rem;
}

/* Ops bar (UTC clock + status) */
.ops-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
  margin-right: 1.75rem;
}
.ops-bar .server-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(34,197,94,0.6);
}
.ops-bar.offline .server-status {
  background: var(--danger);
  box-shadow: 0 0 6px rgba(220,38,38,0.6);
}
#utc-time {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  font-weight: 600;
}
#utc-date {
  font-size: 0.8rem;
  color: var(--muted);
}
@media (max-width: 640px) {
  .ops-bar #utc-date { display: none; }
}

/* desktop: hide topbar logo (we have it in the sidebar) */
@media (min-width: 769px) {
  .topbar-brand {
    display: none;
  }
}

/* mobile: center logo; hide clock unless sidebar open */
@media (max-width: 768px) {
  .topbar {
    padding-inline: 0.9rem;
  }

  .topbar-left {
    position: relative;
  }

  .topbar .sidebar-toggle {
    margin-left: 0.35rem;
    z-index: 1001;
  }

  .topbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .ops-bar {
    display: none;
    margin-right: 1rem;
  }

  body.ih-sidebar-open .ops-bar {
    display: flex;
  }
}

/* =========================================
   Main content
   ========================================= */
#content main,
.page-main {
  width: calc(100% - 1.5rem);
  padding: 1.75rem 1.75rem 2rem;
  background: var(--main-bg);
  border: 1px solid rgba(148, 163, 184, 0.05);
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  min-height: calc(100vh - var(--topbar-h));
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  line-height: 1.6;
}

.head-title,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.head-title h1,
.section-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #fff;
}
.head-title .breadcrumb,
.section-header .breadcrumb {
  display: flex;
  gap: .4rem;
  font-size: .8rem;
  color: rgba(226, 232, 240, 0.4);
}
.head-title .breadcrumb .active,
.section-header .breadcrumb .active {
  color: #fff;
}

/* =========================================
   Dashboard panels / stats
   ========================================= */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}
.card-stat {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  border-radius: 0.9rem;
  transition: background 0.2s ease;
}
.card-stat i {
  font-size: 1.5rem;
  color: var(--brand);
}
.card-stat h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}
.card-stat p {
  font-size: 0.85rem;
  color: var(--muted);
}
.card-stat:hover {
  background: rgba(222, 35, 46, 0.15);
}

.grid-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.card-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 1rem;
}
.card-panel h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}
.card-panel.card-panel-wide {
  grid-column: 1 / -1;
}

.panel-stack > .card-panel + .card-panel {
  margin-top: 1.25rem;
}

.activity-grid,
.grid-activity {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 1rem;
}
.card-activity {
  background: var(--surface-soft);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem 0.7rem;
}
.card-activity .activity-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.3rem;
}
.card-activity .activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.7rem;
  color: rgba(226,232,240,0.55);
}
.card-activity .actor i {
  margin-right: 0.25rem;
}

/* =========================================
   Alerts
   ========================================= */
.alert {
  border-radius: 0.7rem;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  border: 1px solid transparent;
}
.alert i {
  margin-top: 0.15rem;
  font-size: 0.9rem;
}
.alert + .alert {
  margin-top: .5rem;
}
.alert-success {
  background: var(--alert-success-bg);
  border-color: var(--alert-success-border);
  color: #dcfce7;
}
.alert-success i { color: var(--success); }

.alert-danger {
  background: var(--alert-danger-bg);
  border-color: var(--alert-danger-border);
  color: #fee2e2;
}
.alert-danger i { color: #f43f5e; }

.alert-warning {
  background: var(--alert-warning-bg);
  border-color: var(--alert-warning-border);
  color: #fef9c3;
}
.alert-warning i { color: var(--warning); }

.alert-info {
  background: var(--alert-info-bg);
  border-color: var(--alert-info-border);
  color: #dbeafe;
}
.alert-info i { color: var(--info); }

.alert-brand {
  background: var(--alert-brand-bg);
  border-color: var(--alert-brand-border);
  color: #ffe4e6;
}
.alert-brand i { color: var(--brand); }

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  transition: background 0.15s ease, border 0.15s ease, color 0.15s ease, filter 0.15s ease;
  padding: 0.5rem 0.9rem;
}

/* solid buttons (semantic) */
.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #02120a;
}
.btn-success:hover { background: #16a34a; }
.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #b91c1c; }
.btn-warning {
  background: var(--warning);
  border-color: var(--warning);
  color: #1f2937;
}
.btn-warning:hover { background: #eab308; }
.btn-info {
  background: var(--info);
  border-color: var(--info);
  color: #fff;
}
.btn-info:hover { background: #2563eb; }

/* BRAND button (uses brand gradient) */
.btn-brand {
  background: var(--grad-brand);
  border-color: rgba(222, 35, 46, 0.7);
  color: #fff;
  box-shadow: 0 10px 25px rgba(222, 35, 46, 0.35);
}
.btn-brand:hover {
  filter: brightness(1.08);
}

/* outline */
.btn-outline-success {
  border-color: rgba(34,197,94,0.5);
  color: #dcfce7;
}
.btn-outline-success:hover { background: rgba(34,197,94,0.16); }

.btn-outline-danger {
  border-color: rgba(220,38,38,0.6);
  color: #fee2e2;
}
.btn-outline-danger:hover { background: rgba(220,38,38,0.16); }

.btn-outline-warning {
  border-color: rgba(250,204,21,0.55);
  color: #fef9c3;
}
.btn-outline-warning:hover { background: rgba(250,204,21,0.12); }

.btn-outline-info {
  border-color: rgba(59,130,246,0.55);
  color: #dbeafe;
}
.btn-outline-info:hover { background: rgba(59,130,246,0.12); }

.btn-outline-brand {
  border-color: rgba(222, 35, 46, 0.7);
  color: #ffe4e6;
}
.btn-outline-brand:hover { background: rgba(222, 35, 46, 0.12); }

/* =========================================
   Promo / Standout cards + buttons
   ========================================= */

/* BRAND card (radial brand gradient) */
.card-brand {
  background: var(--grad-brand);
  border: 1px solid rgba(222, 35, 46, 0.45);
  box-shadow: 0 18px 45px rgba(222, 35, 46, 0.25);
  position: relative;
  overflow: hidden;
}
.card-brand::after {
  content: "";
  position: absolute;
  inset: -30% 10%;
  height: 140%;
  background: linear-gradient(120deg, rgba(255,255,255,0.45), rgba(255,255,255,0));
  filter: blur(40px);
  opacity: 0.27;
  pointer-events: none;
}
.card-brand h2,
.card-brand p {
  position: relative;
  z-index: 1;
}

/* PROMO card (linear promo gradient) */
.card-promo {
  background: var(--grad-promo);
  border: 1px solid rgba(222, 35, 46, 0.6);
  color: #fff;
  box-shadow: 0 18px 45px rgba(222, 35, 46, 0.25);
  position: relative;
  overflow: hidden;
}
.card-promo::after {
  content: "";
  position: absolute;
  inset: -30% 10%;
  height: 140%;
  background: linear-gradient(120deg, rgba(255,255,255,0.35), rgba(255,255,255,0));
  filter: blur(40px);
  opacity: 0.32;
  pointer-events: none;
}
.card-promo h2,
.card-promo p {
  position: relative;
  z-index: 1;
}

/* generic glow panel */
.panel-glow {
  background: linear-gradient(160deg, rgba(22,30,45,1) 0%, rgba(6,10,21,1) 60%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

/* PROMO button variants */
.btn-promo {
  background: var(--grad-promo);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 25px rgba(222, 35, 46, 0.35);
  position: relative;
  overflow: hidden;
}
.btn-promo::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.55), rgba(255,255,255,0));
  transform: skewX(-18deg);
  opacity: 0.4;
  pointer-events: none;
  transition: transform .4s ease;
}
.btn-promo:hover::before {
  transform: translateX(220%) skewX(-18deg);
}

/* PROMO-ALT (brand → info) */
.card-promo-alt {
  background: var(--grad-promo-alt);
  border: 1px solid rgba(59,130,246,0.35);
  color: #fff;
  box-shadow: 0 12px 30px rgba(59,130,246,0.25);
  position: relative;
  overflow: hidden;
}
.card-promo-alt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.25), transparent 70%);
  opacity: 0.35;
  pointer-events: none;
}
.card-promo-alt h2,
.card-promo-alt p {
  position: relative;
  z-index: 1;
}
.btn-promo-alt {
  background: var(--grad-promo-alt);
  border: none;
  color: #fff;
  box-shadow: 0 8px 20px rgba(59,130,246,0.3);
  position: relative;
  overflow: hidden;
}
.btn-promo-alt::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
  transform: skewX(-18deg);
  opacity: 0.4;
  transition: transform .4s ease;
  pointer-events: none;
}
.btn-promo-alt:hover::before {
  transform: translateX(220%) skewX(-18deg);
}

/* PROMO-RAVEN (brand → raven) */
.card-promo-raven {
  background: var(--grad-promo-raven);
  border: 1px solid rgba(249,115,22,0.4);
  color: #fff;
  box-shadow: 0 12px 30px rgba(249,115,22,0.25);
  position: relative;
  overflow: hidden;
}
.card-promo-raven::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom right, rgba(255,255,255,0.18), transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}
.card-promo-raven h2,
.card-promo-raven p {
  position: relative;
  z-index: 1;
}
.btn-promo-raven {
  background: var(--grad-promo-raven);
  border: none;
  color: #fff;
  box-shadow: 0 8px 20px rgba(249,115,22,0.35);
  position: relative;
  overflow: hidden;
}
.btn-promo-raven::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
  transform: skewX(-18deg);
  opacity: 0.4;
  transition: transform .4s ease;
  pointer-events: none;
}
.btn-promo-raven:hover::before {
  transform: translateX(220%) skewX(-18deg);
}

/* pulse utility */
.pulse {
  animation: pulseGlow 1.6s ease-in-out infinite;
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 rgba(222, 35, 46, 0.4); }
  50% { box-shadow: 0 0 25px rgba(222, 35, 46, 0.55); }
  100% { box-shadow: 0 0 0 rgba(222, 35, 46, 0); }
}

/* =========================================
   Sidebar dropdowns
   ========================================= */
#sidebar .has-dropdown,
.layout-sidebar .has-dropdown {
  position: relative;
}
#sidebar .has-dropdown > .dropdown-toggle,
.layout-sidebar .has-dropdown > .dropdown-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .55rem;
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.65);
  font-size: .8rem;
  padding: 0 .55rem 0 .4rem;
  height: 46px;
  border-radius: .85rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
#sidebar .has-dropdown > .dropdown-toggle .icon-wrap,
.layout-sidebar .has-dropdown > .dropdown-toggle .icon-wrap {
  width: 40px;
  text-align: center;
  font-size: 1.1rem;
}
#sidebar .has-dropdown > .dropdown-toggle .chevron,
.layout-sidebar .has-dropdown > .dropdown-toggle .chevron {
  margin-left: auto;
  transition: transform .2s ease;
  display: grid;
  place-items: center;
}
#sidebar .has-dropdown.open > .dropdown-toggle,
.layout-sidebar .has-dropdown.open > .dropdown-toggle {
  background: rgba(222, 35, 46, 0.14);
  color: #fff;
}
#sidebar .has-dropdown.open > .dropdown-toggle .chevron,
.layout-sidebar .has-dropdown.open > .dropdown-toggle .chevron {
  transform: rotate(90deg);
}
#sidebar .dropdown-menu,
.layout-sidebar .dropdown-menu {
  margin-top: 0.35rem;
  margin-left: 1.5rem;
  border-left: 2px solid rgba(255, 255, 255, 0.05);
  padding-left: 0.5rem;
  padding-bottom: 0.15rem; /* optional: adds a tiny bit of space */
  display: none;
  flex-direction: column;
  gap: 0.25rem;
}

#sidebar .dropdown-menu.show,
.layout-sidebar .dropdown-menu.show {
  display: flex;
}
#sidebar .dropdown-menu a,
.layout-sidebar .dropdown-menu a {
  width: 100%;
  height: 42px;
  display: flex;
  gap: .65rem;
  align-items: center;
  border-radius: .85rem;
  color: rgba(226, 232, 240, 0.65);
  font-size: 0.78rem;
  padding: 0 .55rem 0 .4rem;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
  overflow: hidden;
}
#sidebar .dropdown-menu a i,
.layout-sidebar .dropdown-menu a i {
  width: 32px;
  text-align: center;
  font-size: 1rem;
  opacity: 0.75;
}
#sidebar .dropdown-menu a:hover,
.layout-sidebar .dropdown-menu a:hover {
  background: rgba(222, 35, 46, 0.14);
  color: #fff;
}

#sidebar.collapsed .has-dropdown > .dropdown-toggle .text,
#sidebar.collapsed .dropdown-menu,
.layout-sidebar.collapsed .has-dropdown > .dropdown-toggle .text,
.layout-sidebar.collapsed .dropdown-menu {
  display: none !important;
}

/* =========================================
   Mobile sidebar: hamburger overlay
   ========================================= */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.sidebar-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  #sidebar,
  .layout-sidebar {
    width: 100%;
    max-width: 100%;
    inset: 0 0 auto 0;
    height: 100vh;
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }

  #sidebar.mobile-open,
  .layout-sidebar.mobile-open {
    transform: translateX(0);
  }

  #content,
  .layout-main {
    width: 100%;
    margin-left: 0;
  }

  #content main,
  .page-main {
    width: 100%;
    border-radius: 1rem 1rem 0 0;
  }

  #sidebar .side-menu.bottom,
  .layout-sidebar .side-menu.bottom {
    margin-top: auto;
    padding-bottom: 1rem;
    border-top: 1px solid rgba(255,255,255,0.03);
  }

  #sidebar .user-block,
  .layout-sidebar .user-block {
    border-top: 1px solid rgba(255,255,255,0.03);
  }

  #sidebar .side-menu.top,
  .layout-sidebar .side-menu.top {
    padding-right: .25rem;
    padding-left: .25rem;
  }

  /* override desktop collapsed width */
  #sidebar.collapsed,
  .layout-sidebar.collapsed {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 576px) {
  #content main,
  .page-main {
    padding: 1rem .9rem 1.5rem;
  }
  #content main h1,
  .page-main h1 { font-size: 1.4rem; }
  #content main p,
  .page-main p  { font-size: .9rem; }
}

/* =========================================
   Badges (normal + promo)
   ========================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 9999px;
  font-size: .65rem;
  font-weight: 500;
  line-height: 1;
  padding: .3rem .65rem;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}
.badge i { font-size: .65rem; }

.badge-brand {
  background: var(--grad-brand);
  border-color: rgba(222, 35, 46, 0.55);
  color: #ffe4e6;
}
.badge-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
  color: #dcfce7;
}
.badge-info {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #dbeafe;
}
.badge-warning {
  background: rgba(250, 204, 21, 0.1);
  border-color: rgba(250, 204, 21, 0.35);
  color: #fef9c3;
}
.badge-danger {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.3);
  color: #fee2e2;
}

/* Promo badges (with gradients) */
.badge-promo {
  background: var(--grad-promo);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}
.badge-promo-alt {
  background: var(--grad-promo-alt);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}
.badge-promo-raven {
  background: var(--grad-promo-raven);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}

/* =========================================
   Modals
   ========================================= */
.ih-modal,
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 5000;
}
.ih-modal.is-open,
.modal.is-open {
  display: block;
}
.ih-modal__overlay,
.modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 21, 0.7);
  backdrop-filter: blur(4px);
}
.ih-modal__dialog,
.modal__dialog {
  position: relative;
  max-width: 520px;
  width: calc(100% - 2.4rem);
  margin: 4.5rem auto 0;
  background: rgba(22, 30, 45, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 1rem;
  box-shadow: 0 18px 45px rgba(0,0,0,.4);
  padding: 1.4rem 1.4rem 1.1rem;
}
.ih-modal__header,
.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.ih-modal__title,
.modal__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  gap: .5rem;
  align-items: center;
}
.ih-modal__body,
.modal__body {
  color: rgba(226, 232, 240, 0.85);
  font-size: .85rem;
  line-height: 1.45;
  margin-bottom: 1rem;
}
.ih-modal__footer,
.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
}
.ih-modal__header .ih-modal-close-btn,
.ih-modal__header [data-modal-close],
.modal__header .modal-close-btn,
.modal__header [data-modal-close] {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
  border-radius: .55rem;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.ih-modal__footer .btn,
.modal__footer .btn {
  height: auto;
  min-height: 34px;
}
body.ih-modal-open,
body.modal-open {
  overflow: hidden;
}
@media (max-width: 520px) {
  .ih-modal__dialog,
  .modal__dialog {
    margin-top: 3.2rem;
    border-radius: .85rem;
  }
}

/* modal header variants */
.ih-modal--promo .ih-modal__header,
.modal--promo .modal__header {
  background: var(--grad-promo-alt);
  margin: -1.4rem -1.4rem 1rem;
  padding: 1rem 1.4rem;
  border-radius: 1rem 1rem 0 0;
}
.ih-modal--promo-alt .ih-modal__header,
.modal--promo-alt .modal__header {
  background: var(--grad-promo-alt);
  margin: -1.4rem -1.4rem 1rem;
  padding: 1rem 1.4rem;
  border-radius: 1rem 1rem 0 0;
}
.ih-modal--raven .ih-modal__header,
.modal--raven .modal__header {
  background: var(--grad-promo-raven);
  margin: -1.4rem -1.4rem 1rem;
  padding: 1rem 1.4rem;
  border-radius: 1rem 1rem 0 0;
}
.ih-modal--promo .ih-modal__title,
.ih-modal--promo-alt .ih-modal__title,
.ih-modal--raven .ih-modal__title,
.modal--promo .modal__title,
.modal--promo-alt .modal__title,
.modal--raven .modal__title {
  color: #fff;
}
.ih-modal--promo .ih-modal-close-btn,
.ih-modal--promo-alt .ih-modal-close-btn,
.ih-modal--raven .ih-modal-close-btn,
.modal--promo .modal-close-btn,
.modal--promo-alt .modal-close-btn,
.modal--raven .modal-close-btn {
  background: rgba(0,0,0,0.15);
  border-color: rgba(255,255,255,0.25);
  color: #fff;
}

/* =========================================
   Modal – BRAND variant (uses --grad-brand)
   ========================================= */
.ih-modal--brand .ih-modal__header,
.modal--brand .modal__header {
  background: var(--grad-brand);
  margin: -1.4rem -1.4rem 1rem;
  padding: 1rem 1.4rem;
  border-radius: 1rem 1rem 0 0;
}

.ih-modal--brand .ih-modal__title,
.modal--brand .modal__title {
  color: #fff;
}

.ih-modal--brand .ih-modal-close-btn,
.modal--brand .modal-close-btn {
  background: rgba(0,0,0,0.15);
  border-color: rgba(255,255,255,0.25);
  color: #fff;
}

.ih-modal--brand .btn-brand {
  background: var(--grad-brand);
  border-color: rgba(255,255,255,0.25);
  color: #fff;
  box-shadow: 0 0 18px rgba(222, 35, 46, 0.4);
}
.ih-modal--brand .btn-brand:hover {
  filter: brightness(1.15);
}

/* =========================================
   Modal – WIDE variant (scrollable)
   ========================================= */

.ih-modal--wide .ih-modal__dialog,
.modal--wide .modal__dialog {
  max-width: 900px;              /* adjust as needed */
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 1.1rem;        /* preserve footer spacing */
}

/* Ensure header/footer stay fixed */
.ih-modal--wide .ih-modal__header,
.modal--wide .modal__header,
.ih-modal--wide .ih-modal__footer,
.modal--wide .modal__footer {
  flex-shrink: 0;
}

/* Scroll ONLY the body */
.ih-modal--wide .ih-modal__body,
.modal--wide .modal__body {
  flex: 1 1 auto;
  min-height: 0;                 /* critical for flex scroll */
  overflow-y: auto;
  padding-right: .25rem;         /* scrollbar breathing room */
}

/* Slightly tighter margins on small screens */
@media (max-width: 720px) {
  .ih-modal--wide .ih-modal__dialog,
  .modal--wide .modal__dialog {
    max-width: calc(100% - 1.6rem);
    margin-top: 3.2rem;
  }
}

/* =========================================
   Toasts (incl. promo + brand)
   ========================================= */
#ih-toast-container,
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  z-index: 6000;
}
.ih-toast,
.toast {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: rgba(6, 10, 21, 0.96);
  border: 2px solid rgba(255,255,255,0.03);
  border-radius: .8rem;
  padding: .55rem .75rem .55rem .6rem;
  min-width: 240px;
  box-shadow: 0 12px 35px rgba(0,0,0,.28);
  animation: ihToastIn .12s ease-out;
}
.ih-toast.leaving,
.toast.leaving {
  animation: ihToastOut .18s ease-out forwards;
}
.ih-toast__icon i,
.toast__icon i {
  font-size: .9rem;
}
.ih-toast__message,
.toast__message {
  flex: 1 1 auto;
  font-size: .75rem;
}
.ih-toast__close,
.toast__close {
  background: transparent;
  border: none;
  color: rgba(226, 232, 240, 0.65);
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
}

/* semantic toast borders */
.ih-toast-info,
.toast-info {
  border-color: rgba(59, 130, 246, 0.65);
}
.ih-toast-success,
.toast-success {
  border-color: rgba(34, 197, 94, 0.65);
}
.ih-toast-warning,
.toast-warning {
  border-color: rgba(250, 204, 21, 0.65);
}
.ih-toast-danger,
.toast-danger {
  border-color: rgba(220, 38, 38, 0.65);
}

/* BRAND toast */
.ih-toast-brand,
.toast-brand {
  background: var(--grad-brand);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* PROMO toasts */
.ih-toast-promo,
.toast-promo {
  background: var(--grad-promo);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.ih-toast-promo-alt,
.toast-promo-alt {
  background: var(--grad-promo-alt);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.ih-toast-promo-raven,
.toast-promo-raven {
  background: var(--grad-promo-raven);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* close buttons on promo/brand toasts */
.ih-toast-promo .ih-toast__close,
.toast-promo .toast__close,
.ih-toast-promo-alt .ih-toast__close,
.toast-promo-alt .toast__close,
.ih-toast-promo-raven .ih-toast__close,
.toast-promo-raven .toast__close,
.ih-toast-brand .ih-toast__close,
.toast-brand .toast__close {
  color: rgba(255, 255, 255, 0.75);
}

@keyframes ihToastIn {
  from { transform: translateY(-4px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes ihToastOut {
  to { transform: translateY(-4px); opacity: 0; }
}

/* =========================================
   Forms
   ========================================= */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: .75rem;
}
.form-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(226, 232, 240, 0.55);
  font-weight: 500;
}
.input,
.select,
.textarea {
  background: rgba(6, 10, 21, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: .6rem;
  padding: .6rem .65rem;
  color: #e2e8f0;
  font-size: .8rem;
  transition: border .12s ease, box-shadow .12s ease;
  width: 100%;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}
.textarea {
  min-height: 120px;
  resize: vertical;
}

/* better select arrow */
.select {
  appearance: none;
  background-image: linear-gradient(135deg, #e2e8f0 50%, rgba(0,0,0,0) 51%);
  background-position: calc(100% - 1rem) 50%;
  background-size: 7px 7px;
  background-repeat: no-repeat;
  padding-right: 2.3rem;
}

/* custom checks/radios */
.form-check {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .77rem;
  color: rgba(226,232,240,.85);
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  appearance: none;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: .35rem;
  background: rgba(6,10,21,0.4);
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: border .12s ease, background .12s ease;
}
.form-check input[type="radio"] {
  border-radius: 999px;
}
.form-check input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: var(--brand);
}
.form-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px 4px 4px 3px;
  border: 2px solid rgba(0,0,0,.3);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
.form-check input[type="radio"]:checked {
  background: radial-gradient(circle, #fff 0%, #fff 42%, var(--brand) 43%, var(--brand) 100%);
  border-color: var(--brand);
}
.form-actions {
  display: flex;
  gap: .55rem;
  justify-content: flex-end;
  margin-top: .5rem;
}

/* =========================================
   Utility classes
   ========================================= */

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* Grid cols */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Gap */
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.5rem; }

/* Sizing */
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }

/* Margin */
.m-0 { margin: 0; }
.m-1 { margin: .25rem; }
.m-2 { margin: .5rem; }
.m-3 { margin: .75rem; }
.m-4 { margin: 1rem; }
.m-5 { margin: 1.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.5rem; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.5rem; }

.mx-1 { margin-left: .25rem; margin-right: .25rem; }
.mx-2 { margin-left: .5rem; margin-right: .5rem; }
.mx-3 { margin-left: .75rem; margin-right: .75rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }

.my-1 { margin-top: .25rem; margin-bottom: .25rem; }
.my-2 { margin-top: .5rem; margin-bottom: .5rem; }
.my-3 { margin-top: .75rem; margin-bottom: .75rem; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: .25rem; }
.p-2 { padding: .5rem; }
.p-3 { padding: .75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.5rem; }

.px-1 { padding-left: .25rem; padding-right: .25rem; }
.px-2 { padding-left: .5rem; padding-right: .5rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.py-1 { padding-top: .25rem; padding-bottom: .25rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

/* Typography: align */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Typography: weight + style */
.text-light { font-weight: 300; }
.text-medium { font-weight: 500; }
.text-semibold { font-weight: 600; }
.text-bold { font-weight: 700; }
.text-italic { font-style: italic; }

/* Typography: size */
.text-2xl { font-size: 1.75rem; }
.text-xl  { font-size: 1.5rem; }
.text-lg  { font-size: 1.25rem; }
.text-md  { font-size: 1rem; }
.text-sm  { font-size: .875rem; }
.text-xs  { font-size: .75rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

/* Typography: color */
.text-white { color: #ffffff; }
.text-muted { color: var(--muted); }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

/* Background helpers */
.bg-shell { background: var(--shell); }
.bg-body { background: var(--body); }
.bg-main { background: var(--main-bg); }
.bg-surface { background: var(--surface); }
.bg-surface-soft { background: var(--surface-soft); }

.bg-brand { background: var(--brand); }
.bg-success { background: var(--success); }
.bg-danger { background: var(--danger); }
.bg-warning { background: var(--warning); }
.bg-info { background: var(--info); }

/* Borders */
.border { border: 1px solid var(--border); }
.border-0 { border: 0; }

/* Radius */
.rounded { border-radius: .375rem; }
.rounded-md { border-radius: .5rem; }
.rounded-lg { border-radius: .75rem; }
.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

/* Shadows */
.shadow-soft {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.shadow-lg {
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

/* Auth helpers */
.center-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.auth-shell {
  width: 100%;
  max-width: 520px;
}
.auth-tabs {
  display: inline-flex;
  gap: .5rem;
  padding: .35rem;
  border-radius: 999px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.4);
  margin-bottom: 1.1rem;
}
.auth-tabs .btn {
  border-radius: 999px;
  font-size: .8rem;
  padding-inline: .9rem;
}
.auth-panel { margin-top: .35rem; }
.auth-panel.is-hidden { display: none; }
.auth-footer {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(148,163,184,0.25);
  font-size: .75rem;
  color: var(--muted);
  text-align: center;
}

/* =========================================
   Promo text gradients
   ========================================= */
.text-promo {
  font-weight: 900;
  background: var(--grad-promo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.text-promo-alt {
  font-weight: 900;
  background: var(--grad-promo-alt);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.text-promo-raven {
  font-weight: 900;
  background: var(--grad-promo-raven);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.text-promo-glow {
  text-shadow: 0 0 12px rgba(255,255,255,0.25);
}

/* =========================================
   Data patterns: Tables & List Rows
   ========================================= */

/* Semantic table */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  color: #e2e8f0;
}
.table thead {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.9);
}
.table th,
.table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
}
.table thead tr {
  background: rgba(15, 23, 42, 0.9);
}
.table tbody tr {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}
.table-striped tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.6);
}
.table-hover tbody tr:hover {
  background: rgba(30, 64, 175, 0.26);
}

/* Scroll container for wide tables */
.table-scroll {
  width: 100%;
  overflow-x: auto;
}
.table-scroll::-webkit-scrollbar {
  height: 6px;
}
.table-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.9);
}
.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

/* List-row alternative (for cards / compact lists) */
.list-rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.7rem;
  background: var(--surface-soft);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.list-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.list-row-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}
.list-row-meta {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* =========================================
   Status Pills / Chips
   ========================================= */

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
}
.badge-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.9);
}

/* generic statuses mapped to semantics */
.badge-status-available {
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(22, 163, 74, 0.14);
  color: #bbf7d0;
}
.badge-status-available .badge-status-dot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.badge-status-busy {
  border-color: rgba(250, 204, 21, 0.7);
  background: rgba(234, 179, 8, 0.14);
  color: #fef9c3;
}
.badge-status-busy .badge-status-dot {
  background: #facc15;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.7);
}

.badge-status-offline {
  border-color: rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: #cbd5f5;
}
.badge-status-offline .badge-status-dot {
  background: rgba(148, 163, 184, 0.85);
}

.badge-status-critical {
  border-color: rgba(220, 38, 38, 0.85);
  background: rgba(220, 38, 38, 0.18);
  color: #fee2e2;
}
.badge-status-critical .badge-status-dot {
  background: #dc2626;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.8);
}

/* =========================================
   Tabs / Sub-nav
   ========================================= */

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.48);
}
.tab {
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.7);
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tab i {
  font-size: 0.8rem;
}
.tab-active {
  background: rgba(15, 23, 42, 1);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.7), 0 8px 22px rgba(15, 23, 42, 0.85);
}
.tab-muted {
  opacity: 0.78;
}
.tabs-fill {
  display: flex;
}
.tabs-fill .tab {
  flex: 1 1 0;
  justify-content: center;
}

/* =========================================
   Progress & Steps
   ========================================= */

/* linear progress bar */
.progress {
  width: 100%;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(15, 23, 42, 1);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  max-width: 100%;
  background: var(--grad-brand);
  border-radius: inherit;
  transition: width 0.25s ease-out;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* small pill-style progress (for training, etc.) */
.progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
}
.progress-pill-bar {
  width: 70px;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 1);
  overflow: hidden;
}
.progress-pill-fill {
  height: 100%;
  width: 0;
  background: var(--grad-promo-alt);
  transition: width 0.25s ease-out;
}

/* stepper */
.stepper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
}
.step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
}
.step-circle {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.65);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  background: rgba(15, 23, 42, 0.95);
}
.step-label {
  white-space: nowrap;
}
.step-active .step-circle {
  border-color: rgba(222, 35, 46, 0.9);
  background: radial-gradient(circle at top, rgba(222, 35, 46, 0.55), rgba(15, 23, 42, 1));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(222, 35, 46, 0.6), 0 0 14px rgba(222, 35, 46, 0.8);
}
.step-active .step-label {
  color: #e2e8f0;
}
.step-complete .step-circle {
  border-color: rgba(34, 197, 94, 0.9);
  background: radial-gradient(circle, rgba(34, 197, 94, 0.95), rgba(22, 101, 52, 1));
  color: #022c22;
}
.step-complete .step-label {
  color: #bbf7d0;
}
.step-divider {
  flex: 1 1 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(148, 163, 184, 0.7), transparent);
}

/* =========================================
   Empty States
   ========================================= */

.empty-state {
  padding: 1.5rem 1.4rem;
  border-radius: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.9));
  text-align: center;
}
.empty-state-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 0.75rem;
  background: rgba(15, 23, 42, 1);
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e2e8f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
}
.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #e5e7eb;
}
.empty-state p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.empty-state .empty-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* =========================================
   Skeleton Loaders
   ========================================= */

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(15, 23, 42, 1);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    rgba(148, 163, 184, 0.08),
    rgba(148, 163, 184, 0.24),
    rgba(148, 163, 184, 0.08)
  );
  transform: translateX(-100%);
  animation: skeletonShimmer 1.35s ease-in-out infinite;
}
.skeleton-line {
  height: 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}
.skeleton-line.sm { height: 0.45rem; }
.skeleton-line.lg { height: 0.9rem; }
.skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
}
.skeleton-card {
  border-radius: 0.9rem;
  padding: 0.75rem;
}

@keyframes skeletonShimmer {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}

/* =========================================
   Text utilities
   ========================================= */

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.break-words {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.break-all {
  word-break: break-all;
}
.nowrap {
  white-space: nowrap;
}

/* =========================================
   Density helpers
   ========================================= */

.dense {
  font-size: 0.78rem;
}
.dense .table th,
.dense .table td {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}
.dense .list-row {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.roomy {
  font-size: 0.9rem;
}
.roomy .list-row {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.roomy .panel,
.roomy .card-panel {
  padding: 1.8rem;
}

/* =========================================
   Settings modal (Info Hub style)
   ========================================= */

.ih-modal--settings .ih-modal__dialog {
  max-width: 80vw;
  width: calc(100% - 6rem);          /* uniform 3rem gap left/right */
  margin: 3rem auto;                 /* uniform 3rem gap top/bottom */
  max-height: calc(100vh - 6rem);    /* same 3rem gap vertically */
  height: calc(100vh - 6rem);
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

/* Outer frame: border + radius + shadow */
.settings-frame {
  border-radius: 1.2rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  background: var(--shell);
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Header styled like main nav (no inner border) */
.settings-modal-header {
  height: var(--topbar-h);
  background: var(--shell);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
}

.settings-modal-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.settings-modal-header-left i {
  font-size: 1.1rem;
  color: var(--brand);
}

.settings-modal-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.settings-modal-subtitle {
  font-size: 0.75rem;
  color: var(--muted);
}

.settings-modal-close {
  background: rgba(148, 163, 184, 0.10);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
  border-radius: 0.55rem;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

/* Core shell with sidebar + content */
.settings-shell {
  flex: 1 1 auto;
  display: flex;
  background: transparent;
  min-height: 0; /* allow inner scroll */
}

/* Left sidebar (no border, same vibe as main sidebar) */
.settings-sidebar {
  width: 240px;
  background: var(--shell);
  padding: 1rem 0.6rem 1rem 0.6rem;
  display: flex;
  flex-direction: column;
}

.settings-sidebar h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.4rem;
  padding-left: 0.5rem;
}

/* MATCH main sidebar button styling */
.settings-sidebar-btn {
  width: 100%;
  height: 46px;
  margin-bottom: 0.35rem;
  border-radius: 0.85rem;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(226, 232, 240, 0.65);
  font-size: 0.8rem;
  padding: 0 0.55rem 0 0.4rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.settings-sidebar-btn i {
  width: 40px;
  text-align: center;
  font-size: 1.1rem;
}

/* hover / active same as .side-menu li a */
.settings-sidebar-btn:hover {
  background: rgba(222, 35, 46, 0.14);
  color: #fff;
}
.settings-sidebar-btn.active {
  background: rgba(222, 35, 46, 0.14);
  color: #fff;
}

/* Right content panel:
   - rounded TOP-LEFT corner only
   - no extra border, lighter panel goes to right edge */
.settings-content-panel {
  flex: 1 1 auto;
  background: var(--main-bg);
  border-radius: 1.2rem 0 0 0;  /* top-left only */
  padding: 1.3rem 1.6rem 1.1rem 1.6rem;
  display: flex;
  flex-direction: column;
  min-height: 0; /* allow inner scroll */
}

/* Scrollable section area */
.settings-section {
  display: none;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 0.3rem;
}
.settings-section.active {
  display: block;
}

.settings-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.settings-section p {
  color: var(--muted);
  margin-bottom: 1rem;
}

/* Actions at bottom, inside modal */
.settings-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
}

/* Responsive tweaks */
@media (max-width: 750px) {
  .ih-modal--settings .ih-modal__dialog {
    width: calc(100% - 2.4rem);      /* smaller gap on small screens */
    margin: 2rem auto;
    max-height: calc(100vh - 4rem);
    height: calc(100vh - 4rem);
  }

  .settings-shell {
    flex-direction: column;
  }

  .settings-sidebar {
    width: 100%;
    padding-inline: 0.7rem;
  }

  .settings-content-panel {
    border-radius: 0 0 1.2rem 1.2rem;
  }
}

/* =========================================
   Department Ranks editor
   ========================================= */

.rank-helper {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.rank-helper .badge {
  font-size: 0.65rem;
}

.rank-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rank-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  background: var(--surface-soft);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.75rem;
  padding: 0.7rem 0.8rem;
}

.rank-row-main {
  display: flex;
  flex: 1 1 auto;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rank-row .form-group {
  margin-bottom: 0;
  flex: 1 1 160px;
}

.rank-row .form-group.weight-group {
  max-width: 120px;
}

.rank-row .form-label {
  font-size: 0.68rem;
}

.rank-row-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.4rem;
}

/* Make remove button compact */
.rank-row-actions .btn {
  padding-inline: 0.6rem;
}

/* Add button inside section (top-right-ish) */
.rank-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.6rem;
}

/* On very small screens, stack a bit nicer */
@media (max-width: 640px) {
  .rank-row {
    align-items: stretch;
  }
  .rank-row-main {
    flex-direction: column;
  }
  .rank-row .form-group.weight-group {
    max-width: none;
  }
  .rank-row-actions {
    justify-content: flex-start;
  }
}

/* ============================================
   SETTINGS MODAL — SCROLLABLE CONTENT + SCROLLBAR
   Applies only inside the settings modal
   ============================================ */

/* Ensure this is the scroll container */
.ih-modal--settings .settings-content-panel {
  max-height: calc(100vh - 6rem);  /* adjust if you want taller/shorter */
  overflow-y: auto;
  padding-right: 1rem;           /* keeps text away from scrollbar */
  scroll-behavior: smooth;
}

/* WebKit scrollbars (Chromium, Opera GX, FiveM NUI, etc.) */
.ih-modal--settings .settings-content-panel::-webkit-scrollbar {
  width: 10px;
}

.ih-modal--settings .settings-content-panel::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 999px;
}

.ih-modal--settings .settings-content-panel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.ih-modal--settings .settings-content-panel::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Firefox fallback */
.ih-modal--settings .settings-content-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--surface);
}

.settings-subtabs {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.1rem;
  margin-bottom: 0.9rem;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.9);
}

.settings-subtab-btn {
  position: relative;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}

.settings-subtab-btn i {
  font-size: 0.85rem;
}

.settings-subtab-btn:hover {
  color: #e5e7eb;
  background: rgba(55, 65, 81, 0.9);
}

.settings-subtab-btn.active {
  background: linear-gradient(135deg, #de232e, #f97316);
  color: #f9fafb;
}

/* Subsection content areas */
.settings-subsection {
  display: none;
}

.settings-subsection.active {
  display: block;
}

/* =========================================
   Dashboard Module Cards
   ========================================= */

.dashboard-layout-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Card wrapper */
.module-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  background: var(--surface-soft);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.module-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.35);
}

/* Left side (icon + title + description) */
.module-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.module-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.module-title i {
  font-size: 1.05rem;
  color: var(--brand);
}

.module-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}

/* =========================================
   Toggle Switch (iOS-style)
   ========================================= */

.switch {
  position: relative;
  width: 42px;
  height: 22px;
  flex-shrink: 0;
  display: inline-block;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* slider background */
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  transition: background 0.25s ease;
}

/* slider circle */
.switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  border-radius: 999px;
  transition: transform 0.25s ease, background 0.25s ease;
}

/* when ON */
.switch input:checked + .switch-slider {
  background: var(--grad-brand);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* focus ring */
.switch input:focus + .switch-slider {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.settings-section--read-only {
  opacity: 0.75;
}

.settings-section--read-only .input,
.settings-section--read-only .select,
.settings-section--read-only .textarea {
  cursor: not-allowed;
}

/* ============================
   Department Permissions Editor
   ============================ */

.permissions-shell {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

/* Left: Role list */
.permissions-roles {
  flex: 0 0 240px;
  max-width: 260px;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.85); /* similar to card-panel bg */
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.75rem 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
}

.permissions-roles-header h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(226, 232, 240, 0.9);
}

.permissions-role-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
}

/* Individual role row */
.permissions-role-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.15rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.9);
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
  border: 1px solid transparent;
}

.permissions-role-list li .role-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hover/active states for role items */
.permissions-role-list li:hover {
  background: rgba(30, 64, 175, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

.permissions-role-list li.is-active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(249, 115, 22, 0.35));
  border-color: rgba(248, 113, 113, 0.9);
}

/* Right: permission detail panel */
.permissions-detail {
  flex: 1 1 auto;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.75rem 0.9rem 0.9rem;
  display: flex;
  flex-direction: column;
}

/* Permission toggle rows (future-friendly) */
.permissions-toggles {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.permissions-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(51, 65, 85, 0.9);
}

.permissions-toggle-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.permissions-toggle-row-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(241, 245, 249, 0.95);
}

.permissions-toggle-row-desc {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.95);
}

/* Little label for "system"/important perms, optional usage later */
.permissions-perm-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: rgba(148, 163, 184, 0.95);
}

/* Make the delete button less scary until a role is selected */
#dept-permissions-delete-role[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive: stack on narrow screens */
@media (max-width: 900px) {
  .permissions-shell {
    flex-direction: column;
  }

  .permissions-roles {
    flex: 0 0 auto;
    max-width: 100%;
  }
}

/* Disabled pages actions row */
.auth-actions {
  display: flex;
  gap: .6rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* =========================================
   Roster — Final row layout (IH5)
   ========================================= */

.page-roster .roster-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.95rem;
  gap: 1rem;
}

.page-roster .roster-row-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 auto;
}

/* Avatar: visually anchors the row */
.page-roster .roster-row-avatar {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid rgba(222, 35, 46, 0.35);
  flex: 0 0 auto;
}

/* Text block to the right of avatar */
.page-roster .roster-row-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.page-roster .roster-row-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.page-roster .roster-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-roster .roster-row-meta {
  display: flex;
  gap: 0.35rem;
}

/* Right-side modules: pulled inward slightly */
.page-roster .roster-row-right {
  display: flex;
  align-items: center;
  padding-left: 0.5rem;   /* brings modules left */
  flex: 0 0 auto;
}

.page-roster .roster-modules {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Hover polish */
.page-roster .roster-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.3);
}

/* Mobile: hide modules to keep rows clean */
@media (max-width: 768px) {
  .page-roster .roster-modules {
    display: none;
  }
}
