/* ============================================================
   Mariox DevPortal – Modern Workspace Theme
   Neutral light canvas, dark sidebar, blue/teal accent
   ============================================================ */

/* ── GOOGLE FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand */
  --primary:        #2563EB;
  --primary-dark:   #1D4ED8;
  --primary-light:  #EAF2FF;
  --primary-rgb:    37, 99, 235;
  --accent:         #14B8A6;

  /* Sidebar (dark) */
  --sidebar-bg:     #0B1220;
  --sidebar-hover:  rgba(148,163,184,0.10);
  --sidebar-active: #2563EB;
  --sidebar-text:   #94A3B8;
  --sidebar-text-active: #FFFFFF;
  --sidebar-border: rgba(255,255,255,0.08);
  --sidebar-w:      250px;

  /* Main content (light) */
  --bg:             #F4F7FB;
  --surface:        #FFFFFF;
  --surface-2:      #F8FBFF;
  --surface-glass:  rgba(255,255,255,0.78);
  --border:         #E4EAF2;
  --border-dark:    #CBD5E1;

  /* Text */
  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-muted:     #64748B;
  --text-white:     #FFFFFF;

  /* Status colors */
  --success:        #25C986;
  --success-light:  #E6F9F1;
  --warning:        #FFAB2E;
  --warning-light:  #FFF5E6;
  --danger:         #FC5A5A;
  --danger-light:   #FFF0F0;
  --info:           #2BBCF1;
  --info-light:     #E8F7FD;
  --violet:         #6366F1;
  --violet-light:   #EEF2FF;
  --cyan:           #06B6D4;
  --amber:          #F59E0B;
  --rose:           #F43F5E;

  /* Topbar */
  --topbar-h:       68px;
  --topbar-bg:      rgba(255,255,255,0.86);

  /* Shadows */
  --shadow-sm:      0 2px 8px rgba(15,23,42,0.06);
  --shadow-md:      0 8px 24px rgba(15,23,42,0.10);
  --shadow-lg:      0 18px 48px rgba(15,23,42,0.14);
  --shadow-card:    0 8px 28px rgba(15,23,42,0.06);

  /* Radius */
  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      14px;
  --radius-xl:      20px;
  --radius-full:    9999px;
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; min-height: 100%; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.10), transparent 28%),
    radial-gradient(circle at top right, rgba(20,184,166,0.08), transparent 24%),
    linear-gradient(180deg, #F8FAFC 0%, #EEF4FB 100%);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: -1;
}
body::before {
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.15), transparent 70%);
  filter: blur(8px);
}
body::after {
  bottom: -140px;
  left: -100px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20,184,166,0.12), transparent 72%);
  filter: blur(6px);
}
#app { min-height: 100vh; }
::selection { background: rgba(37,99,235,0.14); color: var(--primary-dark); }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
a { text-decoration: none; color: inherit; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, #0B1220 0%, #111827 100%);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.25s ease, transform 0.25s ease;
  will-change: transform;
}
/* Scrollbar inside sidebar */
#sidebar::-webkit-scrollbar { width: 3px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 10px 22px rgba(37,99,235,0.28);
}
.sidebar-logo-text { flex: 1; min-width: 0; }
.sidebar-logo-text h1 {
  font-size: 15px; font-weight: 800;
  color: #fff; letter-spacing: -0.3px;
  white-space: nowrap;
}
.sidebar-logo-text span {
  font-size: 10px; color: var(--sidebar-text);
  white-space: nowrap;
}

/* Nav sections */
.nav-section { padding: 10px 12px 4px; }
.nav-section-title {
  font-size: 10px; font-weight: 700;
  color: rgba(160,163,184,0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 10px 4px;
}
.nav-divider { height: 1px; background: var(--sidebar-border); margin: 8px 12px; }

.nav-group {
  position: relative;
  margin-bottom: 6px;
}
.nav-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
}
.nav-section-toggle:hover {
  transform: translateX(1px);
  background: rgba(255,255,255,0.04);
}
.nav-group.is-open .nav-section-toggle {
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}
.nav-section-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: rgba(226,232,240,0.82);
}
.nav-section-chip {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255,255,255,0.12);
}
.nav-section-caret {
  font-size: 12px;
  color: rgba(226,232,240,0.72);
  transition: transform 0.28s ease;
}
.nav-group.is-open .nav-section-caret {
  transform: rotate(180deg);
}
.nav-section-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 0.34s ease, opacity 0.24s ease, transform 0.24s ease;
  padding: 0 0 0 2px;
}
.nav-group.is-open .nav-section-body {
  max-height: 900px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 6px;
}
.nav-group .nav-item {
  margin-left: 8px;
}
.nav-group .nav-item .nav-icon {
  background: rgba(255,255,255,0.04);
}
.nav-group-admin .nav-section-toggle {
  background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(20,184,166,0.10));
  border-color: rgba(37,99,235,0.16);
}
.nav-group-pm .nav-section-toggle {
  background: linear-gradient(135deg, rgba(197,111,230,0.18), rgba(37,99,235,0.08));
  border-color: rgba(197,111,230,0.16);
}
.nav-group-dev .nav-section-toggle {
  background: linear-gradient(135deg, rgba(20,184,166,0.18), rgba(6,182,212,0.08));
  border-color: rgba(20,184,166,0.16);
}
.nav-group-analytics .nav-section-toggle {
  background: linear-gradient(135deg, rgba(236,72,153,0.16), rgba(139,92,246,0.10));
  border-color: rgba(236,72,153,0.14);
}
.nav-group-settings .nav-section-toggle {
  background: linear-gradient(135deg, rgba(148,163,184,0.15), rgba(255,255,255,0.04));
  border-color: rgba(148,163,184,0.14);
}
.nav-group-admin .nav-section-chip { background: rgba(37,99,235,0.26); }
.nav-group-pm .nav-section-chip { background: rgba(197,111,230,0.26); }
.nav-group-dev .nav-section-chip { background: rgba(20,184,166,0.24); }
.nav-group-analytics .nav-section-chip { background: rgba(236,72,153,0.22); }
.nav-group-settings .nav-section-chip { background: rgba(148,163,184,0.20); }

/* Nav items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.18s ease;
  margin-bottom: 2px;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #E5E7EB;
}
.nav-item.active {
  background: var(--primary);
  color: var(--sidebar-text-active);
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(37,99,235,0.35);
}
.nav-item.active .nav-icon { color: #fff; }
.nav-icon {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  flex-shrink: 0;
  color: var(--sidebar-text);
  transition: all 0.18s;
}
.nav-item:hover .nav-icon { color: #E5E7EB; }
.nav-badge {
  margin-left: auto;
  font-size: 10px; font-weight: 700;
  background: var(--rose);
  color: #fff;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.nav-badge.green { background: var(--success); }
.nav-badge.amber { background: var(--warning); }

/* Sidebar footer / user */
.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.18s;
}
.sidebar-user:hover { background: var(--sidebar-hover); }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info .u-name {
  font-size: 13px; font-weight: 700;
  color: #E8EAF6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-info .u-role {
  font-size: 11px; color: var(--sidebar-text);
  white-space: nowrap;
}

/* ── TOPBAR ─────────────────────────────────────────────── */
#topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  border-bottom: 1px solid rgba(148,163,184,0.16);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(15,23,42,0.06);
}
.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.topbar-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-muted);
  white-space: nowrap;
}
.topbar-breadcrumb .bc-sep { color: var(--border-dark); }
.topbar-breadcrumb .bc-active { color: var(--text-secondary); font-weight: 600; }

.topbar-actions {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
}
.topbar-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.18s;
  font-size: 14px;
  position: relative;
}
.topbar-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-sm);
}
.topbar-notif-dot {
  position: absolute; top: -3px; right: -3px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--topbar-bg);
}
.topbar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  cursor: pointer;
  background: var(--surface);
  transition: all 0.18s;
}
.topbar-user:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.topbar-user .tu-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.topbar-user .tu-role { font-size: 11px; color: var(--text-muted); }

/* Mobile hamburger */
.topbar-hamburger {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: transparent;
  align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary); font-size: 16px;
}

/* ── MAIN CONTENT ────────────────────────────────────────── */
#main {
  margin-left: var(--sidebar-w);
  padding-top: var(--topbar-h);
  min-height: 100vh;
  background: transparent;
  min-width: 0;
}
.page { padding: 24px; display: none; min-width: 0; }
.page.active { display: block; animation: fadeIn 0.3s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  min-width: 0;
}
.page-title { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

#page-billing-admin {
  padding-top: 12px;
  padding-bottom: 12px;
}

.billing-page {
  height: calc(100vh - var(--topbar-h) - 24px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.billing-page .page-header {
  margin-bottom: 12px;
  flex-shrink: 0;
}
.billing-page .grid-4 {
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.billing-page .stat-card {
  padding: 14px 16px;
}
.billing-page .stat-label {
  margin-bottom: 6px;
}
.billing-page .stat-value {
  font-size: 24px;
}
.billing-page .stat-sub {
  font-size: 11px;
}
.billing-table-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.billing-table-header {
  flex-shrink: 0;
}
.billing-table-header .form-select {
  width: 120px !important;
  padding-top: 8px;
  padding-bottom: 8px;
}
.billing-table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}
.billing-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--border);
  background: rgba(248,250,252,0.92);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.billing-page .data-table thead th {
  padding-top: 8px;
  padding-bottom: 8px;
}
.billing-page .data-table tbody td {
  padding-top: 9px;
  padding-bottom: 9px;
}

.page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  margin-bottom: 18px;
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15,23,42,0.96), rgba(37,99,235,0.92)),
    radial-gradient(circle at top right, rgba(20,184,166,0.28), transparent 30%);
  color: #fff;
  box-shadow: 0 20px 50px rgba(15,23,42,0.16);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  right: -56px;
  top: -56px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  filter: blur(6px);
}
.page-hero-copy { position: relative; z-index: 1; max-width: 720px; }
.page-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.86);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.page-hero .page-title {
  font-size: 28px;
  line-height: 1.1;
  color: #fff;
}
.page-hero .page-subtitle {
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  margin-top: 8px;
  max-width: 56ch;
}
.page-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.summary-card {
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.summary-card .summary-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
}
.summary-card .summary-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-top: 4px;
}
.summary-card .summary-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.summary-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface-2);
  color: var(--primary);
}
.summary-icon.green { background: var(--success-light); color: #047857; }
.summary-icon.blue { background: var(--primary-light); color: var(--primary); }
.summary-icon.amber { background: #FFF7ED; color: #C2410C; }
.summary-icon.red { background: #FEF2F2; color: #DC2626; }
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(248,250,252,0.96), rgba(255,255,255,0.94));
}
.table-toolbar .hint {
  font-size: 12px;
  color: var(--text-muted);
}
.selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}
.surface-card {
  overflow: hidden;
  border-radius: 24px;
}
.table-check {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
}
.card-header h3 {
  font-size: 14px; font-weight: 700;
  color: var(--text-primary);
}
.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Stat / Summary cards */
.stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.88));
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card.purple::before { background: linear-gradient(90deg, var(--primary), #9B8FFF); }
.stat-card.green::before  { background: linear-gradient(90deg, var(--success), #40E8A0); }
.stat-card.amber::before  { background: linear-gradient(90deg, var(--warning), #FFD580); }
.stat-card.danger::before { background: linear-gradient(90deg, var(--danger),  #FF8C8C); }
.stat-card.cyan::before   { background: linear-gradient(90deg, var(--cyan),    #67E3FF); }
.stat-card.violet::before { background: linear-gradient(90deg, var(--violet),  #C084FC); }

.stat-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.7px;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 28px; font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1; margin-bottom: 6px;
}
.stat-sub { font-size: 12px; color: var(--text-muted); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-icon.purple { background: var(--primary-light); color: var(--primary); }
.stat-icon.green  { background: var(--success-light);  color: var(--success); }
.stat-icon.amber  { background: var(--warning-light);  color: var(--warning); }
.stat-icon.danger { background: var(--danger-light);   color: var(--danger); }
.stat-icon.cyan   { background: var(--info-light);     color: var(--cyan); }
.stat-icon.violet { background: var(--violet-light);   color: var(--violet); }

.stat-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: var(--radius-full);
}
.stat-trend.up   { color: var(--success); background: var(--success-light); }
.stat-trend.down { color: var(--danger);  background: var(--danger-light); }

/* ── AVATARS ─────────────────────────────────────────────── */
.avatar {
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; flex-shrink: 0;
  border-radius: var(--radius-sm);
  font-size: 12px; width: 32px; height: 32px;
}
.avatar.sm   { width: 24px; height: 24px; font-size: 10px; border-radius: 5px; }
.avatar.md   { width: 36px; height: 36px; font-size: 13px; border-radius: 8px; }
.avatar.lg   { width: 44px; height: 44px; font-size: 16px; border-radius: 10px; }
.avatar.xl   { width: 56px; height: 56px; font-size: 20px; border-radius: 12px; }
.avatar.round { border-radius: 50%; }

/* ── TABLES ──────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.7px;
  background: var(--surface-2);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }
.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-secondary);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(37,99,235,0.03); }
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }

/* ── BADGES / CHIPS ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
  white-space: nowrap;
}
.badge-critical,
.badge-red,
.badge-danger    { background: #FEF2F2; color: #DC2626; }
.badge-high,
.badge-warning   { background: #FFF7ED; color: #C2410C; }
.badge-medium,
.badge-yellow    { background: #FFFBEB; color: #B45309; }
.badge-low,
.badge-gray,
.badge-backlog,
.badge-todo      { background: #F1F5F9; color: #64748B; }
.badge-done,
.badge-green,
.badge-success   { background: #ECFDF5; color: #047857; }
.badge-blocked   { background: #FEE2E2; color: #B91C1C; }
.badge-inprogress,
.badge-blue,
.badge-info      { background: #EFF6FF; color: #1D4ED8; }
.badge-review,
.badge-purple    { background: #EEF2FF; color: #4F46E5; }
.badge-qa,
.badge-cyan      { background: #ECFEFF; color: #0E7490; }
.badge-primary   { background: var(--primary-light); color: var(--primary); }
.badge-indigo    { background: #EEF2FF; color: #4338CA; }
.badge-teal      { background: #F0FDFA; color: #0F766E; }

.status-chip {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
  display: inline-block;
}
.status-active    { background: var(--success-light); color: #1B9A66; }
.status-on_hold   { background: var(--warning-light); color: #B45309; }
.status-completed { background: var(--primary-light); color: var(--primary); }
.status-cancelled { background: var(--surface-2);     color: var(--text-muted); }
.status-inactive  { background: var(--surface-2);     color: var(--text-muted); }
.status-pending   { background: var(--warning-light); color: #B45309; }
.status-approved  { background: var(--success-light); color: #1B9A66; }
.status-rejected  { background: var(--danger-light);  color: #B91C1C; }

.type-bug      { color: var(--danger); }
.type-story    { color: var(--info); }
.type-task     { color: var(--violet); }
.type-epic     { color: var(--amber); }
.type-sub_task { color: var(--text-muted); }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 700;
  cursor: pointer; border: none;
  transition: all 0.18s ease;
  font-family: 'Plus Jakarta Sans', inherit;
  white-space: nowrap;
  letter-spacing: 0.1px;
  line-height: 1;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 10px 20px rgba(37,99,235,0.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 14px 28px rgba(37,99,235,0.30);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--surface); color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-light);
}
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary); color: #fff;
  box-shadow: 0 10px 20px rgba(37,99,235,0.25);
}
.btn-success {
  background: var(--success-light); color: #1B9A66;
  border: 1.5px solid rgba(37,201,134,0.2);
}
.btn-success:hover { background: var(--success); color: #fff; }
.btn-danger {
  background: var(--danger-light); color: var(--danger);
  border: 1.5px solid rgba(252,90,90,0.2);
}
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-warning {
  background: var(--warning-light); color: #B45309;
  border: 1.5px solid rgba(255,171,46,0.2);
}
.btn-warning:hover { background: var(--warning); color: #fff; }
.btn-sm  { padding: 6px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-xs  { padding: 4px 10px; font-size: 11px; border-radius: var(--radius-sm); }
.btn-lg  { padding: 12px 24px; font-size: 14px; }
.btn-icon {
  width: 34px; height: 34px; padding: 0;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.18s;
  font-size: 13px;
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ── FORMS ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12px; font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
  text-transform: uppercase; letter-spacing: 0.6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: 'Plus Jakarta Sans', inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  line-height: 1.5;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-input::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239BA3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; appearance: none; }
.form-textarea { resize: vertical; min-height: 90px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 11.5px; color: var(--danger); margin-top: 5px; }

/* ── PROGRESS BARS ───────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}
.progress-fill.purple { background: linear-gradient(90deg, var(--primary), #9B8FFF); }
.progress-fill.green  { background: linear-gradient(90deg, var(--success), #40E8A0); }
.progress-fill.amber  { background: linear-gradient(90deg, var(--warning), #FFD580); }
.progress-fill.rose, .progress-fill.danger { background: linear-gradient(90deg, var(--danger), #FF8C8C); }
.progress-fill.blue   { background: linear-gradient(90deg, var(--primary), #818CF8); }
.progress-fill.cyan   { background: linear-gradient(90deg, var(--cyan), #67E3FF); }
.progress-bar.lg { height: 8px; }
.progress-bar.xl { height: 12px; }
.progress-bar.sm { height: 4px; }

/* ══ JIRA-STYLE KANBAN BOARD ══════════════════════════════ */
.kanban-board {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 12px;
  min-height: calc(100vh - 260px);
  align-items: flex-start;
}
.kanban-board::-webkit-scrollbar { height: 6px; }
.kanban-board::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.kanban-col {
  flex-shrink: 0; width: 272px;
  background: rgba(248,250,252,0.88);
  border: 1.5px solid rgba(148,163,184,0.16);
  border-radius: 10px;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 270px);
}
.kanban-col-header {
  padding: 12px 12px 10px;
  display: flex; align-items: center; gap: 8px;
  border-radius: 8px 8px 0 0;
  background: #fff;
  border-bottom: 1.5px solid var(--border);
}
.kanban-col-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-secondary);
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kanban-col-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kanban-col-count {
  font-size: 10px; font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}
.kanban-tasks {
  padding: 8px;
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
  gap: 6px; min-height: 80px;
}
.kanban-tasks::-webkit-scrollbar { width: 4px; }
.kanban-tasks::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.task-card {
  background: #fff;
  border: 1.5px solid #E8EAEE;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: grab;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.task-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(37,99,235,0.12);
  transform: translateY(-1px);
}
.task-card.dragging {
  opacity: 0.4; transform: rotate(2deg) scale(0.96);
  cursor: grabbing; box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.task-card .task-type-icon { font-size: 10px; margin-right: 4px; }
.task-card .task-title {
  font-size: 13px; color: #1e293b;
  font-weight: 500; line-height: 1.4; margin-bottom: 8px;
}
.task-card .task-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.task-card .task-footer {
  display: flex; align-items: center;
  justify-content: space-between; margin-top: 8px;
}
.kanban-droptarget {
  background: rgba(37,99,235,0.05) !important;
  border: 2px dashed var(--primary) !important;
}
.add-task-btn {
  padding: 8px 12px;
  display: flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: 12px; font-weight: 500;
  cursor: pointer;
  border-radius: 0 0 8px 8px;
  transition: all 0.15s;
  border-top: 1px dashed var(--border);
}
.add-task-btn:hover {
  background: rgba(37,99,235,0.06);
  color: var(--primary);
  border-top-color: var(--primary);
}

/* ── MODAL / DRAWER ──────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.52);
  backdrop-filter: blur(10px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.18s;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: min(580px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-lg  { width: min(760px, 96vw); }
.modal-xl  { width: min(960px, 98vw); }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  position: sticky; top: 0;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 1;
}
.modal-header h3 {
  font-size: 16px; font-weight: 800;
  color: var(--text-primary);
}
.modal-body  { padding: 24px; }
.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.close-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: transparent; border: none;
  cursor: pointer; color: var(--text-muted);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s;
}
.close-btn:hover { background: var(--surface-2); color: var(--danger); }

/* Drawer */
.drawer {
  position: fixed; right: 0; top: 0;
  height: 100vh; width: min(640px, 95vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 500;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: -10px 0 60px rgba(0,0,0,0.12);
}
.drawer.open { transform: translateX(0); }
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(26,28,46,0.4);
  z-index: 499; display: none;
}
.drawer-overlay.show { display: block; }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.42);
  backdrop-filter: blur(3px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}
.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ── TABS ────────────────────────────────────────────────── */
.tab-bar {
  display: flex; gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 9px 18px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: 13px; font-weight: 700;
  color: var(--text-muted);
  cursor: pointer; border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.18s;
  font-family: 'Plus Jakarta Sans', inherit;
}
.tab-btn:hover { color: var(--text-primary); background: var(--surface-2); }
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--primary-light);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.2s; }

/* ── TOAST ───────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 18px;
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  animation: slideUp 0.25s ease;
  display: flex; align-items: center; gap: 10px;
  max-width: 340px; min-width: 220px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--primary); }
.toast.warning { border-left: 4px solid var(--warning); }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SEARCH BAR ──────────────────────────────────────────── */
.search-wrap { position: relative; display: inline-flex; align-items: center; }
.search-wrap i { position: absolute; left: 12px; color: var(--text-muted); font-size: 13px; pointer-events: none; }
.search-bar {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px 8px 36px;
  color: var(--text-primary); font-size: 13px;
  outline: none; width: 220px;
  transition: all 0.18s;
  font-family: 'Plus Jakarta Sans', inherit;
}
.search-bar:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  width: 280px; background: var(--surface);
}
.search-bar::placeholder { color: var(--text-muted); }

/* ── EMPTY STATES ────────────────────────────────────────── */
.empty-state { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.empty-state i { font-size: 44px; margin-bottom: 14px; opacity: 0.3; color: var(--primary); }
.empty-state p { font-size: 14px; font-weight: 600; }
.empty-state small { font-size: 12px; display: block; margin-top: 6px; }

/* ── TOOLTIPS ────────────────────────────────────────────── */
[data-tip] { position: relative; cursor: default; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 7px); left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary); color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 5px 9px; border-radius: var(--radius-sm);
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.15s; z-index: 999;
  box-shadow: var(--shadow-sm);
}
[data-tip]:hover::after { opacity: 1; }

/* ── DOCUMENT CENTER ─────────────────────────────────────── */
.doc-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all 0.18s; cursor: pointer;
  box-shadow: var(--shadow-card);
}
.doc-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.doc-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

/* ── INVOICE STATUS ──────────────────────────────────────── */
.invoice-status-paid            { background: var(--success-light); color: #1B9A66; }
.invoice-status-pending         { background: var(--warning-light); color: #B45309; }
.invoice-status-sent            { background: var(--info-light);    color: #0D8BB3; }
.invoice-status-overdue         { background: var(--danger-light);  color: #B91C1C; }
.invoice-status-partially_paid  { background: var(--primary-light); color: var(--primary); }
.invoice-status-cancelled       { background: var(--surface-2);     color: var(--text-muted); }

/* ── MILESTONE / TIMELINE ────────────────────────────────── */
.milestone-timeline { position: relative; padding-left: 26px; }
.milestone-timeline::before {
  content: ''; position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.milestone-item { position: relative; padding-bottom: 24px; }
.milestone-dot {
  position: absolute; left: -26px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px;
}
.milestone-dot.done   { background: var(--success); border-color: var(--success); color: #fff; }
.milestone-dot.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-light); }
.milestone-dot.delay  { background: var(--danger);  border-color: var(--danger);  color: #fff; }

/* ── ACTIVITY FEED ───────────────────────────────────────── */
.feed-item {
  display: flex; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.feed-item:last-child { border-bottom: none; }
.feed-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.feed-content { flex: 1; min-width: 0; }
.feed-content .feed-title { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.feed-content .feed-time  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── SPRINT BOARD ────────────────────────────────────────── */
.sprint-header {
  background: var(--primary-light);
  border: 1.5px solid rgba(37,99,235,0.2);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.sprint-stat .val { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.sprint-stat .lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── UTILIZATION RING ────────────────────────────────────── */
.util-ring { position: relative; width: 70px; height: 70px; }
.util-ring svg { transform: rotate(-90deg); }
.util-ring .util-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--text-primary);
}

/* ── CLIENT PORTAL ───────────────────────────────────────── */
.client-topbar {
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, #252742 100%);
}
.client-project-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s; cursor: pointer;
  box-shadow: var(--shadow-card);
}
.client-project-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ── TASK DETAIL DRAWER ──────────────────────────────────── */
.task-detail .detail-header { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.task-detail .task-id { font-size: 11px; color: var(--text-muted); font-weight: 700; margin-bottom: 5px; letter-spacing: 0.5px; }
.task-detail .task-title-lg { font-size: 18px; font-weight: 800; color: var(--text-primary); line-height: 1.4; }
.task-detail .task-meta-row { display: flex; flex-wrap: wrap; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--border); }
.task-detail .meta-item { display: flex; flex-direction: column; gap: 4px; }
.task-detail .meta-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.task-detail .meta-value { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.comment-box {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}
.comment-box textarea {
  width: 100%; background: transparent;
  border: none; padding: 12px 14px;
  color: var(--text-primary); font-size: 13px;
  font-family: 'Plus Jakarta Sans', inherit; resize: none;
  min-height: 80px; outline: none;
}
.comment-box textarea::placeholder { color: var(--text-muted); }
.comment-box-footer {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
  background: var(--surface-2);
}
.comment-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }

/* ── LOGIN PAGE ──────────────────────────────────────────── */
#login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(37,99,235,0.18), transparent 24%),
    radial-gradient(circle at 80% 10%, rgba(20,184,166,0.12), transparent 18%),
    linear-gradient(135deg, #F8FAFC 0%, #EEF4FB 100%);
  padding: 24px;
}
.login-card {
  width: min(460px, 100%);
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: 28px;
  padding: 34px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo-mark {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff;
  margin: 0 auto 14px;
  box-shadow: 0 12px 28px rgba(37,99,235,0.30);
}
.login-logo h1 { font-size: 22px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.login-logo p  { font-size: 13px; color: var(--text-muted); }
.login-tabs {
  display: flex; background: rgba(241,245,249,0.9);
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: 18px;
  padding: 4px; margin-bottom: 22px; gap: 4px;
}
.login-tab-btn {
  flex: 1; padding: 8px;
  border-radius: var(--radius-sm); border: none;
  font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.18s;
  font-family: 'Plus Jakarta Sans', inherit;
  background: transparent; color: var(--text-muted);
}
.login-tab-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.quick-logins { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 18px; }
.quick-login-btn {
  background: rgba(248,250,252,0.9);
  border: 1.5px solid rgba(148,163,184,0.16);
  border-radius: var(--radius-md);
  padding: 8px 10px; cursor: pointer;
  text-align: center; transition: all 0.18s;
}
.quick-login-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}
.quick-login-btn .ql-role { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.quick-login-btn .ql-name { font-size: 12px; color: var(--text-primary); font-weight: 700; margin-top: 1px; }

/* ── MISC UTILITIES ──────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.text-muted    { color: var(--text-muted); }
.text-secondary{ color: var(--text-secondary); }
.text-primary  { color: var(--primary); }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }
.text-warning  { color: var(--warning); }
.text-white    { color: #fff; }
.text-dark     { color: var(--text-primary); }
.font-bold     { font-weight: 700; }
.font-extrabold{ font-weight: 800; }
.font-mono     { font-family: 'IBM Plex Mono', 'JetBrains Mono', 'Fira Code', monospace; }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.p-0 { padding: 0; }
.rounded-full { border-radius: var(--radius-full); }
.w-full { width: 100%; }
.no-select { user-select: none; }
.cursor-pointer { cursor: pointer; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }

/* Section divider with label */
.section-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* Info item row */
.info-row {
  display: flex; justify-content: space-between;
  align-items: center; padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-row .info-key { color: var(--text-muted); font-weight: 600; }
.info-row .info-val { color: var(--text-primary); font-weight: 700; }

/* Icon badge */
.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

/* Page top decorative band */
.page-banner {
  background: linear-gradient(135deg, #0F172A 0%, #2563EB 60%, #14B8A6 100%);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-banner::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.page-banner h2 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.page-banner p  { font-size: 13px; opacity: 0.8; }

/* ── MODERN PRIMITIVES / LEGACY COMPAT ───────────────────── */
.glass-card {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin: 2px 4px 2px 0;
  border-radius: var(--radius-full);
  background: #EEF2FF;
  color: #4338CA;
  font-size: 11px;
  font-weight: 700;
}
.loading-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(37,99,235,0.16);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-fade-in { animation: fadeIn 0.3s ease both; }

/* Shell compatibility classes used by app.js */
.logo,
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.logo h1,
.sidebar-logo-text h1 {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.logo span,
.sidebar-logo-text span {
  display: block;
  font-size: 10px;
  color: var(--sidebar-text);
  white-space: nowrap;
}
.user-card,
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
}
.user-card:hover,
.sidebar-user:hover {
  background: var(--sidebar-hover);
  transform: translateY(-1px);
}
.icon-btn,
.topbar-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(148,163,184,0.22);
  background: rgba(255,255,255,0.8);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.18s;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.icon-btn:hover,
.topbar-btn:hover {
  border-color: rgba(37,99,235,0.32);
  color: var(--primary);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.breadcrumb,
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.breadcrumb .current,
.topbar-breadcrumb .bc-active {
  color: var(--text-primary);
  font-weight: 700;
}
.notif-btn,
.topbar-btn {
  position: relative;
}
.notif-dot,
.topbar-notif-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid #fff;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-wrap: wrap; }
  .page-actions { flex-wrap: wrap; justify-content: flex-end; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .search-bar { width: 180px; }
  .search-bar:focus { width: 220px; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  #sidebar { transform: translateX(-110%); width: min(84vw, 320px); }
  #sidebar.mobile-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  #topbar { left: 0; }
  #main { margin-left: 0; }
  .topbar-hamburger { display: inline-flex; }
  #topbar {
    padding: 0 14px;
    gap: 10px;
    height: var(--topbar-h);
  }
  .breadcrumb,
  .topbar-breadcrumb {
    display: none;
  }
  .topbar-actions {
    margin-left: auto;
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }
  .search-wrap {
    flex: 1 1 140px;
    min-width: 0;
  }
  .search-bar {
    width: 100%;
    max-width: none;
  }
  .search-bar:focus {
    width: 100%;
  }
  .icon-btn,
  .topbar-btn {
    width: 36px;
    height: 36px;
  }
  .page {
    padding: 14px;
  }
  .page-header,
  .page-hero,
  .table-toolbar,
  .card-header,
  .billing-table-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .page-actions,
  .page-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .page-actions > *,
  .page-hero-actions > * {
    width: 100%;
  }
  .page-actions .btn,
  .page-hero-actions .btn,
  .page-actions .form-select,
  .page-hero-actions .form-select {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  .page-title {
    font-size: 18px;
  }
  .page-hero {
    padding: 16px;
    border-radius: 18px;
  }
  .page-hero .page-title {
    font-size: 22px;
  }
  .billing-page {
    height: auto;
    overflow: visible;
  }
  .billing-table-shell {
    min-height: 520px;
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .kanban-board {
    gap: 10px;
    min-height: auto;
    padding-bottom: 10px;
  }
  .kanban-col {
    width: min(88vw, 300px);
    max-height: none;
  }
  .kanban-tasks {
    max-height: 60vh;
  }
  .drawer {
    width: 100vw;
  }
  .table-wrap {
    border-radius: var(--radius-md);
  }
  .data-table thead th,
  .data-table tbody td {
    padding-left: 12px;
    padding-right: 12px;
  }
  .login-card {
    padding: 22px;
    border-radius: 24px;
  }
}
@media (max-width: 480px) {
  #topbar {
    padding: 0 12px;
  }
  .page {
    padding: 12px;
  }
  .page-title {
    font-size: 17px;
  }
  .page-subtitle {
    font-size: 12px;
  }
  .login-card { padding: 24px; }
  .quick-logins { grid-template-columns: 1fr; }
  .summary-card {
    padding: 14px;
    border-radius: 16px;
  }
  .summary-card .summary-value {
    font-size: 22px;
  }
  .stat-card {
    padding: 16px;
  }
  .stat-value {
    font-size: 24px;
  }
  .card-header,
  .card-body,
  .card-footer {
    padding-left: 14px;
    padding-right: 14px;
  }
  .modal {
    width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 20px);
    border-radius: 18px;
  }
  .modal-body {
    padding: 16px;
  }
  .modal-footer {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
  }
  .modal-footer .btn {
    width: 100%;
  }
  .search-wrap {
    width: 100%;
  }
  .search-bar {
    height: 38px;
  }
  .page-banner {
    padding: 16px 18px;
  }
}

/* ════════════════════════════════════════════════════════════
   ORANJI WARM THEME OVERRIDE
   Re-skins the entire UI to a warm, glassy, orange/coral/amber
   palette inspired by the Oranji creative deck. Layered on top
   of the base styles so removing this block restores the light
   theme. All class names are unchanged.
   ════════════════════════════════════════════════════════════ */

:root {
  --primary:        #FF7A45;
  --primary-dark:   #E0612C;
  --primary-light:  rgba(255,122,69,0.22);
  --primary-rgb:    255,122,69;
  --accent:         #FFB347;

  --sidebar-bg:          #1A0F0A;
  --sidebar-hover:       rgba(255,255,255,0.06);
  --sidebar-active:      #FF7A45;
  --sidebar-text:        #C9A38A;
  --sidebar-text-active: #FFFFFF;
  --sidebar-border:      rgba(255,255,255,0.06);

  --bg:            transparent;
  --surface:       rgba(255,255,255,0.04);
  --surface-2:     rgba(255,255,255,0.02);
  --surface-glass: rgba(255,255,255,0.05);
  --border:        rgba(255,255,255,0.08);
  --border-dark:   rgba(255,255,255,0.18);

  --text-primary:   #FFF1E6;
  --text-secondary: #E8D2BD;
  --text-muted:     #9F8678;

  --success:       #58C68A;
  --success-light: rgba(88,198,138,0.18);
  --warning:       #FFCB47;
  --warning-light: rgba(255,203,71,0.18);
  --danger:        #FF5E3A;
  --danger-light:  rgba(255,94,58,0.18);
  --info:          #FFB347;
  --info-light:    rgba(255,179,71,0.18);
  --violet:        #C56FE6;
  --violet-light:  rgba(197,111,230,0.18);
  --cyan:          #F4C842;

  --topbar-bg:    rgba(26,15,10,0.60);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.30);
  --shadow-md:    0 10px 26px rgba(0,0,0,0.45);
  --shadow-lg:    0 22px 56px rgba(0,0,0,0.60);
  --shadow-card:  0 10px 30px rgba(0,0,0,0.40);
}

body {
  background:
    radial-gradient(ellipse 1400px 900px at 15% -5%, rgba(255,140,60,0.95), transparent 60%),
    radial-gradient(ellipse 1100px 800px at 88% 5%, rgba(255,180,80,0.85), transparent 55%),
    radial-gradient(ellipse 1300px 900px at 105% 100%, rgba(232,90,40,0.95), transparent 60%),
    radial-gradient(ellipse 1000px 800px at -5% 100%, rgba(200,70,35,0.80), transparent 60%),
    radial-gradient(ellipse 800px 600px at 50% 50%, rgba(180,80,40,0.45), transparent 70%),
    linear-gradient(140deg, #6B2E18 0%, #8B4022 35%, #6B2E18 70%, #4A1F10 100%) !important;
  background-attachment: fixed !important;
  color: var(--text-primary) !important;
}
body::before, body::after { display: none !important; }

::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
::selection { background: rgba(255,122,69,0.40); color: #fff; }

/* Sidebar */
#sidebar {
  background:
    radial-gradient(ellipse 400px 300px at top, rgba(255,140,75,0.30), transparent 55%),
    radial-gradient(ellipse 300px 400px at bottom, rgba(255,100,50,0.20), transparent 60%),
    linear-gradient(180deg, #3A1610 0%, #2A0F08 50%, #240C06 100%) !important;
  border-right: 1px solid rgba(255,180,120,0.16) !important;
  box-shadow:
    4px 0 20px rgba(0,0,0,0.40),
    inset -1px 0 0 rgba(255,180,120,0.06) !important;
}
.sidebar-logo-mark,
.login-logo-mark {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  box-shadow: 0 10px 22px rgba(255,122,69,0.38) !important;
}
.nav-item.active {
  background: var(--primary) !important;
  box-shadow: 0 10px 24px rgba(255,122,69,0.40) !important;
}
.nav-group-admin .nav-section-toggle    { background: linear-gradient(135deg, rgba(255,122,69,0.20), rgba(255,179,71,0.10)); border-color: rgba(255,122,69,0.18); }
.nav-group-pm .nav-section-toggle       { background: linear-gradient(135deg, rgba(197,111,230,0.18), rgba(255,122,69,0.10)); border-color: rgba(197,111,230,0.18); }
.nav-group-dev .nav-section-toggle      { background: linear-gradient(135deg, rgba(255,179,71,0.18), rgba(244,200,66,0.10)); border-color: rgba(255,179,71,0.18); }
.nav-group-analytics .nav-section-toggle{ background: linear-gradient(135deg, rgba(251,111,140,0.16), rgba(197,111,230,0.10)); border-color: rgba(251,111,140,0.16); }
.nav-group-settings .nav-section-toggle { background: linear-gradient(135deg, rgba(199,200,214,0.14), rgba(255,255,255,0.04)); border-color: rgba(199,200,214,0.14); }
.sidebar-user-info .u-name { color: #ECEDF6 !important; }
.sidebar-user-info .u-role { color: var(--sidebar-text) !important; }

/* Topbar */
#topbar {
  background: linear-gradient(180deg, rgba(70,32,18,0.55), rgba(50,22,12,0.40)) !important;
  border-bottom: 1px solid rgba(255,180,120,0.18) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.30) !important;
}
.topbar-title { color: var(--text-primary) !important; }
.topbar-breadcrumb { color: var(--text-muted) !important; }
.topbar-breadcrumb .bc-active { color: var(--text-secondary) !important; }
.topbar-btn,
.icon-btn {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  color: var(--text-secondary) !important;
}
.topbar-btn:hover,
.icon-btn:hover {
  background: rgba(255,122,69,0.18) !important;
  border-color: rgba(255,122,69,0.45) !important;
  color: #fff !important;
}
.topbar-user {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}
.topbar-user:hover { border-color: rgba(255,122,69,0.45) !important; }
.topbar-user .tu-name { color: var(--text-primary) !important; }
.topbar-user .tu-role { color: var(--text-muted) !important; }
.topbar-notif-dot,
.notif-dot { border-color: #1A0F0A !important; }
.topbar-hamburger {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: var(--text-secondary) !important;
}

/* Page header */
.page-title { color: var(--text-primary) !important; }
.page-subtitle { color: var(--text-muted) !important; }

/* Cards / glass surfaces */
.card,
.glass-card,
.summary-card,
.doc-card,
.client-project-card,
.comment-box {
  background:
    linear-gradient(135deg, rgba(255,150,80,0.10), rgba(80,30,15,0.20)),
    linear-gradient(180deg, rgba(50,22,12,0.70), rgba(30,12,6,0.78)) !important;
  border: 1px solid rgba(255,180,120,0.22) !important;
  backdrop-filter: blur(18px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
  color: var(--text-secondary) !important;
  box-shadow:
    0 12px 32px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,200,140,0.10) !important;
}
.stat-card {
  background:
    linear-gradient(135deg, rgba(255,150,80,0.14), rgba(80,30,15,0.18)),
    linear-gradient(180deg, rgba(60,28,16,0.70), rgba(32,14,8,0.78)) !important;
  border: 1px solid rgba(255,180,120,0.24) !important;
  color: var(--text-secondary) !important;
  box-shadow:
    0 12px 32px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,200,140,0.12) !important;
}
.card:hover,
.stat-card:hover,
.glass-card:hover {
  border-color: rgba(255,180,120,0.35) !important;
}
.card-header { border-bottom: 1px solid rgba(255,255,255,0.08) !important; }
.card-header h3 { color: var(--text-primary) !important; }
.card-footer {
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  background: rgba(255,255,255,0.02) !important;
}
.summary-card .summary-value,
.stat-value { color: #fff !important; }
.summary-card .summary-label,
.stat-label { color: var(--text-muted) !important; }
.summary-card .summary-note,
.stat-sub { color: var(--text-muted) !important; }
.doc-card:hover,
.client-project-card:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 18px 42px rgba(255,122,69,0.20) !important;
}

/* Stat / summary icon tints */
.stat-icon.purple { background: rgba(255,122,69,0.18) !important; color: #FFB347 !important; }
.stat-icon.green  { background: rgba(88,198,138,0.18) !important; color: #58C68A !important; }
.stat-icon.amber  { background: rgba(255,203,71,0.18) !important; color: #FFCB47 !important; }
.stat-icon.danger { background: rgba(255,94,58,0.18) !important; color: #FF5E3A !important; }
.stat-icon.cyan   { background: rgba(244,200,66,0.18) !important; color: #F4C842 !important; }
.stat-icon.violet { background: rgba(197,111,230,0.18) !important; color: #C56FE6 !important; }
.summary-icon       { background: rgba(255,255,255,0.05) !important; color: var(--accent) !important; }
.summary-icon.green { background: rgba(88,198,138,0.18) !important; color: #58C68A !important; }
.summary-icon.blue  { background: rgba(255,122,69,0.18) !important; color: var(--accent) !important; }
.summary-icon.amber { background: rgba(255,203,71,0.18) !important; color: #FFCB47 !important; }
.summary-icon.red   { background: rgba(255,94,58,0.18) !important; color: #FF5E3A !important; }

/* Tables */
.data-table thead th {
  background: rgba(255,255,255,0.04) !important;
  color: var(--text-muted) !important;
  border-bottom: 1px solid rgba(255,255,255,0.10) !important;
}
.data-table tbody td {
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  color: var(--text-secondary) !important;
}
.data-table tbody tr:hover td { background: rgba(255,122,69,0.07) !important; }
.table-toolbar {
  background: rgba(255,255,255,0.03) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}
.selection-chip {
  background: rgba(255,255,255,0.06) !important;
  color: var(--text-secondary) !important;
}
.billing-table-footer {
  background: rgba(255,255,255,0.03) !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
}
.table-check { accent-color: var(--primary) !important; }

/* Forms */
.form-input, .form-select, .form-textarea {
  background-color: rgba(0,0,0,0.32) !important;
  border: 1px solid rgba(255,180,120,0.22) !important;
  color: var(--text-primary) !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.30) !important;
}
.form-input:hover, .form-select:hover, .form-textarea:hover {
  border-color: rgba(255,180,120,0.38) !important;
  background-color: rgba(0,0,0,0.40) !important;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(255,122,69,0.25), inset 0 1px 2px rgba(0,0,0,0.30) !important;
  background-color: rgba(0,0,0,0.44) !important;
}
.form-input::placeholder,
.form-textarea::placeholder { color: rgba(232,210,189,0.45) !important; }
.form-label {
  color: var(--text-secondary) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.7px !important;
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23B6B7C6' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 32px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}
.form-select option { background: #2A1812; color: var(--text-primary); }
/* Native selects without .form-select class — also re-skin */
select:not(.form-select) {
  background-color: rgba(0,0,0,0.32) !important;
  color: var(--text-primary) !important;
  border: 1px solid rgba(255,180,120,0.22) !important;
  border-radius: 8px;
  padding: 6px 28px 6px 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23B6B7C6' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}
select:not(.form-select) option { background: #2A1812; color: var(--text-primary); }

/* Search */
.search-bar {
  background-color: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  color: var(--text-primary) !important;
}
.search-bar:focus { background-color: rgba(255,255,255,0.07) !important; border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(255,122,69,0.20) !important; }
.search-bar::placeholder { color: var(--text-muted) !important; }
.search-wrap i { color: var(--text-muted) !important; }

/* Buttons */
.btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(255,122,69,0.38) !important;
}
.btn-primary:hover {
  background: var(--primary-dark) !important;
  box-shadow: 0 14px 28px rgba(255,122,69,0.45) !important;
}
.btn-secondary {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: var(--text-secondary) !important;
}
.btn-secondary:hover {
  background: rgba(255,122,69,0.18) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}
.btn-outline {
  background: transparent !important;
  color: var(--accent) !important;
  border-color: var(--primary) !important;
}
.btn-outline:hover {
  background: var(--primary) !important;
  color: #fff !important;
}
.btn-success {
  background: rgba(88,198,138,0.18) !important;
  color: #86E0A8 !important;
  border: 1px solid rgba(88,198,138,0.30) !important;
}
.btn-success:hover { background: var(--success) !important; color: #fff !important; }
.btn-danger {
  background: rgba(255,94,58,0.18) !important;
  color: #FF8866 !important;
  border: 1px solid rgba(255,94,58,0.30) !important;
}
.btn-danger:hover { background: var(--danger) !important; color: #fff !important; }
.btn-warning {
  background: rgba(255,203,71,0.18) !important;
  color: #FFD986 !important;
  border: 1px solid rgba(255,203,71,0.30) !important;
}
.btn-warning:hover { background: var(--warning) !important; color: #fff !important; }
.btn-icon {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: var(--text-muted) !important;
}
.btn-icon:hover {
  background: rgba(255,122,69,0.18) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

/* Badges – brighter foreground on dark glass */
.badge-critical, .badge-red, .badge-danger        { background: rgba(255,94,58,0.18) !important; color: #FF8866 !important; }
.badge-high, .badge-warning                       { background: rgba(255,203,71,0.18) !important; color: #FFD986 !important; }
.badge-medium, .badge-yellow                      { background: rgba(255,205,86,0.18) !important; color: #FFD479 !important; }
.badge-low, .badge-gray, .badge-backlog, .badge-todo { background: rgba(255,255,255,0.08) !important; color: #C7C8D6 !important; }
.badge-done, .badge-green, .badge-success         { background: rgba(88,198,138,0.18) !important; color: #86E0A8 !important; }
.badge-blocked                                    { background: rgba(255,94,58,0.22) !important; color: #FF8866 !important; }
.badge-inprogress, .badge-blue, .badge-info       { background: rgba(255,165,119,0.18) !important; color: #FFB694 !important; }
.badge-review, .badge-purple                      { background: rgba(197,111,230,0.18) !important; color: #D9A8F0 !important; }
.badge-qa, .badge-cyan                            { background: rgba(244,200,66,0.18) !important; color: #FFD96B !important; }
.badge-primary                                    { background: rgba(255,122,69,0.20) !important; color: #FFB67A !important; }
.badge-indigo                                     { background: rgba(197,111,230,0.20) !important; color: #D9A8F0 !important; }
.badge-teal                                       { background: rgba(255,168,99,0.20) !important; color: #FFD089 !important; }

/* Status chips */
.status-active    { background: rgba(88,198,138,0.18) !important; color: #86E0A8 !important; }
.status-on_hold   { background: rgba(255,203,71,0.18) !important; color: #FFD986 !important; }
.status-completed { background: rgba(255,122,69,0.20) !important; color: #FFB67A !important; }
.status-cancelled { background: rgba(255,255,255,0.06) !important; color: var(--text-muted) !important; }
.status-inactive  { background: rgba(255,255,255,0.06) !important; color: var(--text-muted) !important; }
.status-pending   { background: rgba(255,203,71,0.18) !important; color: #FFD986 !important; }
.status-approved  { background: rgba(88,198,138,0.18) !important; color: #86E0A8 !important; }
.status-rejected  { background: rgba(255,94,58,0.18) !important; color: #FF8866 !important; }

/* Invoice statuses */
.invoice-status-paid           { background: rgba(88,198,138,0.18) !important; color: #86E0A8 !important; }
.invoice-status-pending        { background: rgba(255,203,71,0.18) !important; color: #FFD986 !important; }
.invoice-status-sent           { background: rgba(255,165,119,0.18) !important; color: #FFB694 !important; }
.invoice-status-overdue        { background: rgba(255,94,58,0.20) !important; color: #FF8866 !important; }
.invoice-status-partially_paid { background: rgba(255,122,69,0.20) !important; color: #FFB67A !important; }
.invoice-status-cancelled      { background: rgba(255,255,255,0.06) !important; color: var(--text-muted) !important; }

/* Type colors */
.type-bug      { color: #FF8866 !important; }
.type-story    { color: #FFB694 !important; }
.type-task     { color: #D9A8F0 !important; }
.type-epic     { color: #FFD986 !important; }
.type-sub_task { color: var(--text-muted) !important; }

/* Tabs */
.tab-bar { border-bottom: 2px solid rgba(255,255,255,0.08) !important; }
.tab-btn { color: var(--text-muted) !important; }
.tab-btn:hover { background: rgba(255,255,255,0.04) !important; color: var(--text-primary) !important; }
.tab-btn.active {
  color: var(--accent) !important;
  border-bottom-color: var(--primary) !important;
  background: rgba(255,122,69,0.14) !important;
}

/* Modal & Drawer */
.modal-overlay {
  background: rgba(8,4,2,0.78) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}
.modal,
.drawer {
  background:
    radial-gradient(ellipse at top, rgba(255,140,75,0.16), transparent 60%),
    linear-gradient(180deg, #4A2418 0%, #2E1610 100%) !important;
  border: 1px solid rgba(255,180,120,0.22) !important;
  color: var(--text-secondary) !important;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,180,120,0.06) inset !important;
}
.modal-header {
  background: linear-gradient(180deg, rgba(255,122,69,0.06), transparent) !important;
  border-bottom: 1px solid rgba(255,180,120,0.14) !important;
}
.modal-header h3 { color: var(--text-primary) !important; }
.modal-footer {
  background: rgba(0,0,0,0.32) !important;
  border-top: 1px solid rgba(255,180,120,0.14) !important;
}
.close-btn { color: var(--text-muted) !important; }
.close-btn:hover { background: rgba(255,94,58,0.20) !important; color: #FF8866 !important; }
.drawer-overlay {
  background: rgba(8,4,2,0.60) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* Toast */
.toast {
  background: linear-gradient(180deg, #4A2418 0%, #2E1610 100%) !important;
  border: 1px solid rgba(255,180,120,0.22) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45) !important;
}

/* Kanban */
.kanban-col {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
}
.kanban-col-header {
  background: rgba(255,255,255,0.04) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}
.kanban-col-title { color: var(--text-secondary) !important; }
.task-card {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.30) !important;
  color: var(--text-secondary) !important;
}
.task-card:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 10px 24px rgba(255,122,69,0.25) !important;
}
.task-card .task-title { color: var(--text-primary) !important; }
.kanban-droptarget {
  background: rgba(255,122,69,0.10) !important;
  border: 2px dashed var(--primary) !important;
}
.add-task-btn {
  color: var(--text-muted) !important;
  border-top: 1px dashed rgba(255,255,255,0.10) !important;
}
.add-task-btn:hover {
  background: rgba(255,122,69,0.10) !important;
  color: var(--accent) !important;
  border-top-color: var(--primary) !important;
}

/* Page hero / banner */
.page-hero {
  background:
    linear-gradient(135deg, rgba(26,15,10,0.96), rgba(255,122,69,0.86)),
    radial-gradient(circle at top right, rgba(255,179,71,0.30), transparent 30%) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45) !important;
}
.page-banner {
  background: linear-gradient(135deg, #1A0E08 0%, #FF7A45 60%, #FFB347 100%) !important;
}

/* Sprint header */
.sprint-header {
  background: rgba(255,122,69,0.10) !important;
  border: 1px solid rgba(255,122,69,0.30) !important;
}
.sprint-stat .val { color: var(--text-primary) !important; }
.sprint-stat .lbl { color: var(--text-muted) !important; }

/* Comment box */
.comment-box-footer {
  background: rgba(255,255,255,0.02) !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
}
.comment-box textarea { color: var(--text-primary) !important; }
.comment-box textarea::placeholder { color: var(--text-muted) !important; }
.comment-item { border-bottom: 1px solid rgba(255,255,255,0.08) !important; }

/* Activity feed */
.feed-item { border-bottom: 1px solid rgba(255,255,255,0.08) !important; }
.feed-content .feed-title { color: var(--text-secondary) !important; }
.feed-content .feed-time { color: var(--text-muted) !important; }

/* Milestone timeline */
.milestone-timeline::before { background: rgba(255,255,255,0.10) !important; }
.milestone-dot {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.15) !important;
}

/* Info row */
.info-row { border-bottom: 1px solid rgba(255,255,255,0.08) !important; }
.info-row .info-key { color: var(--text-muted) !important; }
.info-row .info-val { color: var(--text-primary) !important; }

/* Section label */
.section-label {
  color: var(--text-muted) !important;
  border-bottom: 2px solid rgba(255,255,255,0.10) !important;
}

/* Divider */
.divider { background: rgba(255,255,255,0.08) !important; }

/* Tag */
.tag { background: rgba(197,111,230,0.18) !important; color: #D9A8F0 !important; }

/* Empty state */
.empty-state { color: var(--text-muted) !important; }
.empty-state i { color: var(--accent) !important; }

/* Tooltip */
[data-tip]::after {
  background: #100804 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.45) !important;
}

/* Progress bars */
.progress-bar { background: rgba(255,255,255,0.10) !important; }
.progress-fill.purple { background: linear-gradient(90deg, var(--primary), var(--accent)) !important; }
.progress-fill.green  { background: linear-gradient(90deg, #58C68A, #79E6B2) !important; }
.progress-fill.amber  { background: linear-gradient(90deg, #FFCB47, #FFD080) !important; }
.progress-fill.rose,
.progress-fill.danger { background: linear-gradient(90deg, #FF5E3A, #FF8866) !important; }
.progress-fill.blue   { background: linear-gradient(90deg, #FFA577, #FFB694) !important; }
.progress-fill.cyan   { background: linear-gradient(90deg, #F4C842, #FFD96B) !important; }

/* Util ring */
.util-ring .util-text { color: var(--text-primary) !important; }

/* Loading spinner */
.loading-spinner {
  border-color: rgba(255,122,69,0.18) !important;
  border-top-color: var(--primary) !important;
}

/* Client topbar */
.client-topbar {
  background: linear-gradient(135deg, #241510 0%, #1A0E08 100%) !important;
}

/* Login page */
#login-page {
  background:
    radial-gradient(circle 800px at 20% 20%, rgba(255,140,75,0.55), transparent 60%),
    radial-gradient(circle 700px at 85% 15%, rgba(255,180,90,0.48), transparent 58%),
    radial-gradient(circle 900px at 50% 100%, rgba(232,108,55,0.50), transparent 65%),
    linear-gradient(135deg, #4A2418 0%, #5C2E1C 50%, #3A1A10 100%) !important;
}
.login-card {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 30px 70px rgba(0,0,0,0.55) !important;
}
.login-logo h1 { color: var(--text-primary) !important; }
.login-logo p  { color: var(--text-muted) !important; }
.login-tabs {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}
.login-tab-btn { color: var(--text-muted) !important; }
.login-tab-btn.active {
  background: rgba(255,122,69,0.22) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(255,122,69,0.30) !important;
}
.quick-login-btn {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}
.quick-login-btn:hover {
  background: rgba(255,122,69,0.16) !important;
  border-color: var(--primary) !important;
}
.quick-login-btn .ql-role { color: var(--text-muted) !important; }
.quick-login-btn .ql-name { color: var(--text-primary) !important; }

/* Misc text utilities */
.text-dark { color: var(--text-primary) !important; }
.text-primary { color: var(--accent) !important; }

/* ── Support ticket timeline (Freshdesk-style) ─────────── */
.sup-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.sup-timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 17px;
  width: 2px;
  background: rgba(255,255,255,0.06);
  z-index: 0;
}
.sup-timeline-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.sup-timeline-rail {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.sup-timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #14122A;
  box-shadow: 0 0 0 4px rgba(26,15,10,0.92);
}
.sup-timeline-body {
  min-width: 0;
}
.sup-event {
  font-size: 12.5px;
  color: var(--text-secondary);
  padding: 6px 0 0;
}
.sup-event-line strong { color: var(--text-primary); }
.sup-comment {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 14px;
}
.sup-comment.is-internal {
  background: rgba(255,203,71,0.08);
  border-color: rgba(255,203,71,0.25);
}
.sup-timeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.sup-timeline-meta strong { color: var(--text-primary); }
.sup-comment-body {
  white-space: pre-wrap;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.55;
}
.sup-time { color: var(--text-muted); font-weight: 500; }
.sup-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}
.sup-pill-internal {
  background: rgba(255,203,71,0.18);
  color: #FFD986;
}

/* ── Roles & Permissions ──────────────────────────────────── */
.role-card {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 16px 18px;
}
.role-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.role-card-title {
  font-size: 15px;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}
.role-card-title strong { font-weight: 700; }
.role-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
}
.role-card-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.role-perm-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,122,69,0.15);
  color: #FFB67A;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid rgba(255,122,69,0.30);
}
.role-perm-chip-more {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border-color: rgba(255,255,255,0.08);
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.perm-group {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  padding: 12px;
}
.perm-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.perm-group-head strong {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
}
.perm-group-head i {
  color: var(--accent);
}
.perm-group-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.perm-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
  transition: background .15s;
}
.perm-row:hover { background: rgba(255,255,255,0.04); }
.perm-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.perm-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.perm-row-label { color: var(--text-primary); font-weight: 500; }
.perm-row-key { color: var(--text-muted); font-size: 10.5px; font-family: 'IBM Plex Mono', monospace; }

/* ════════════════════════════════════════════════════════════
   ORANJI – PREMIUM POLISH PASS
   Italic-serif brand accents, layered gradient buttons, glass
   highlights, refined shadows, subtle noise grain, vivid active
   states. Pushes the warm theme to deck-grade quality.
   ════════════════════════════════════════════════════════════ */

/* Noise / highlight overlays disabled — were covering content.
   The Oranji warm-glow ambience still comes through via the body
   radial gradients and card layered tints below. */
body::before, body::after { display: none !important; }

/* ── Italic serif brand accent ───────────────────────────── */
.sidebar-logo-text h1,
.logo h1 {
  font-family: 'Playfair Display', 'Plus Jakarta Sans', serif !important;
  font-style: italic !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  font-size: 17px !important;
  background: linear-gradient(135deg, #FFE3C4 0%, #FFB347 60%, #FF7A45 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
.sidebar-logo-text span,
.logo span {
  font-family: 'Playfair Display', 'Plus Jakarta Sans', serif !important;
  font-style: italic !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  font-size: 16px !important;
  text-transform: none !important;
  background: linear-gradient(135deg, #FFE3C4 0%, #FFB347 60%, #FF7A45 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  display: block !important;
}

/* Page hero / banner serif accent for headlines */
.page-hero .page-title,
.page-banner h2 {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
}

/* ── Sidebar logo mark — refined copper gradient + glow ── */
.sidebar-logo-mark,
.login-logo-mark {
  background:
    linear-gradient(135deg, #FFD0A0 0%, #FF9A4D 35%, #FF6A2C 75%, #C04015 100%) !important;
  box-shadow:
    0 12px 28px rgba(255,106,44,0.55),
    inset 0 1px 0 rgba(255,255,255,0.40),
    inset 0 -2px 4px rgba(120,40,15,0.50) !important;
  border: 1px solid rgba(255,200,140,0.30) !important;
}

/* ── Sidebar nav-item active — vivid Oranji gradient ───── */
.nav-item.active {
  background:
    linear-gradient(135deg, #FFB068 0%, #FF7A45 50%, #E55520 100%) !important;
  box-shadow:
    0 10px 28px rgba(255,106,44,0.50),
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -2px 6px rgba(150,50,15,0.40) !important;
  border: 1px solid rgba(255,200,140,0.30) !important;
  color: #fff !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(120,40,15,0.45) !important;
}
.nav-item.active .nav-icon {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(120,40,15,0.50) !important;
}
.nav-item:hover:not(.active) {
  background: rgba(255,180,120,0.08) !important;
  color: #FFE3C4 !important;
}
.nav-item { color: rgba(232,210,189,0.78) !important; }
.nav-icon { color: rgba(232,210,189,0.65) !important; }

/* ── Buttons — premium gradient + sheen ──────────────────── */
.btn-primary {
  background:
    linear-gradient(135deg, #FFB068 0%, #FF7A45 50%, #E55520 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(255,200,140,0.30) !important;
  box-shadow:
    0 10px 22px rgba(255,106,44,0.42),
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -2px 4px rgba(150,50,15,0.30) !important;
  text-shadow: 0 1px 2px rgba(120,40,15,0.40) !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  position: relative !important;
  overflow: hidden !important;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #FFC07C 0%, #FF8855 50%, #F06030 100%) !important;
  box-shadow:
    0 14px 30px rgba(255,106,44,0.55),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -2px 4px rgba(150,50,15,0.30) !important;
  transform: translateY(-1px) !important;
}
.btn-primary:active { transform: translateY(0) !important; }

.btn-secondary,
.btn-outline {
  background: linear-gradient(180deg, rgba(60,30,18,0.55), rgba(40,18,10,0.55)) !important;
  border: 1px solid rgba(255,180,120,0.28) !important;
  color: #FFE3C4 !important;
  box-shadow:
    0 6px 14px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,200,140,0.10) !important;
}
.btn-secondary:hover,
.btn-outline:hover {
  background: linear-gradient(180deg, rgba(255,122,69,0.20), rgba(180,70,40,0.20)) !important;
  border-color: rgba(255,180,120,0.55) !important;
  color: #fff !important;
}

/* ── Card hover lift ─────────────────────────────────────── */
.card,
.glass-card,
.summary-card,
.stat-card,
.doc-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}
.stat-card:hover,
.summary-card:hover,
.doc-card:hover,
.client-project-card:hover {
  transform: translateY(-3px) !important;
  box-shadow:
    0 18px 40px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,180,120,0.22) inset !important;
}

/* ── Stat-card top edge accent line ──────────────────────── */
.stat-card {
  position: relative !important;
  overflow: hidden !important;
}
.stat-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0; left: 0; right: 0 !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent 0%, rgba(255,180,90,0.7) 30%, rgba(255,122,69,0.9) 50%, rgba(255,180,90,0.7) 70%, transparent 100%) !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

/* ── Card-header refined ─────────────────────────────────── */
.card-header {
  background: linear-gradient(180deg, rgba(255,180,120,0.06), transparent) !important;
  border-bottom: 1px solid rgba(255,180,120,0.14) !important;
}

/* ── Page header title — slight italic accent option ───── */
.page-title {
  font-weight: 800 !important;
  letter-spacing: -0.4px !important;
  background: linear-gradient(135deg, #FFF1E6 0%, #FFD0A0 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* ── Stat icon — copper rim + inner glow ────────────────── */
.stat-icon,
.summary-icon {
  border: 1px solid rgba(255,200,140,0.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 4px 12px rgba(0,0,0,0.35) !important;
  border-radius: 12px !important;
}

/* ── Progress bar refined gradient + glow ────────────────── */
.progress-bar {
  background: rgba(0,0,0,0.35) !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.45) !important;
  height: 7px !important;
}
.progress-fill {
  box-shadow: 0 0 8px currentColor !important;
}
.progress-fill.purple,
.progress-fill.blue {
  background: linear-gradient(90deg, #FFB068, #FF7A45, #E55520) !important;
  color: rgba(255,122,69,0.5) !important;
}
.progress-fill.green {
  background: linear-gradient(90deg, #88D8A8, #58C68A, #3FAA70) !important;
  color: rgba(88,198,138,0.45) !important;
}
.progress-fill.amber {
  background: linear-gradient(90deg, #FFE0A0, #FFCB47, #E5A82C) !important;
  color: rgba(255,203,71,0.45) !important;
}
.progress-fill.rose,
.progress-fill.danger {
  background: linear-gradient(90deg, #FFA088, #FF5E3A, #D04420) !important;
  color: rgba(255,94,58,0.45) !important;
}
.progress-fill.cyan {
  background: linear-gradient(90deg, #FFEC9F, #F4C842, #E5A82C) !important;
  color: rgba(244,200,66,0.45) !important;
}

/* ── Badges & status chips — gradient + edge ─────────────── */
.badge,
.status-chip,
[class*="invoice-status-"] {
  border: 1px solid currentColor !important;
  background-image: linear-gradient(180deg, rgba(255,255,255,0.06), transparent) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10) !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
}

/* ── Topbar action buttons refinement ────────────────────── */
.topbar-btn,
.icon-btn {
  background: linear-gradient(180deg, rgba(60,30,18,0.55), rgba(40,18,10,0.55)) !important;
  border: 1px solid rgba(255,180,120,0.22) !important;
  color: #FFE3C4 !important;
  box-shadow:
    0 6px 14px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,200,140,0.12) !important;
}
.topbar-btn:hover,
.icon-btn:hover {
  background: linear-gradient(180deg, rgba(255,122,69,0.22), rgba(200,70,35,0.22)) !important;
  border-color: rgba(255,180,120,0.55) !important;
  color: #fff !important;
}

/* ── Search bar refinement ───────────────────────────────── */
.search-bar {
  background: linear-gradient(180deg, rgba(0,0,0,0.32), rgba(0,0,0,0.40)) !important;
  border: 1px solid rgba(255,180,120,0.22) !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.30) !important;
}
.search-bar:focus {
  background: linear-gradient(180deg, rgba(0,0,0,0.40), rgba(0,0,0,0.50)) !important;
  border-color: var(--primary) !important;
  box-shadow:
    0 0 0 3px rgba(255,122,69,0.22),
    inset 0 1px 2px rgba(0,0,0,0.30) !important;
}

/* ── Page hero / banner upgrade ──────────────────────────── */
.page-hero {
  background:
    radial-gradient(ellipse at 90% 10%, rgba(255,180,90,0.40), transparent 50%),
    linear-gradient(135deg, rgba(58,22,12,0.88), rgba(255,122,69,0.78)) !important;
  border: 1px solid rgba(255,180,120,0.25) !important;
  box-shadow:
    0 24px 56px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,200,140,0.18) !important;
}

/* ── Tables — alternating subtle warm tint ──────────────── */
.data-table tbody tr:nth-child(even) td {
  background: rgba(255,180,120,0.025) !important;
}
.data-table tbody tr:hover td {
  background: rgba(255,122,69,0.08) !important;
}

/* ── Primary text headings hierarchy ─────────────────────── */
.modal-header h3,
.card-header h3 {
  font-weight: 800 !important;
  letter-spacing: -0.2px !important;
}

/* ── Refined scrollbars ──────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.25); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FF9A4D, #E55520) !important;
  border-radius: 4px;
  border: 2px solid rgba(0,0,0,0.20);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #FFB068, #FF7A45) !important;
}

/* ── Selection ───────────────────────────────────────────── */
::selection { background: rgba(255,122,69,0.45) !important; color: #FFF1E6 !important; }

/* ── Focus rings consistent warm ─────────────────────────── */
*:focus-visible {
  outline: 2px solid rgba(255,122,69,0.65) !important;
  outline-offset: 2px !important;
}

/* ── Tab bar polish ──────────────────────────────────────── */
.tab-btn.active {
  background:
    linear-gradient(180deg, rgba(255,122,69,0.22), rgba(255,122,69,0.10)) !important;
  border-bottom-color: var(--primary) !important;
  color: #FFD0A0 !important;
  box-shadow: inset 0 -3px 0 var(--primary) !important;
}

/* ── Avatars refinement ──────────────────────────────────── */
.avatar {
  box-shadow:
    0 4px 10px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.20) !important;
  border: 1px solid rgba(255,200,140,0.18) !important;
}

/* ── Sidebar / Login logo image ─────────────────────────── */
.sidebar-logo-mark img,
.login-logo-mark img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  display: block !important;
}
.sidebar-logo-mark,
.login-logo-mark {
  padding: 4px !important;
  background: linear-gradient(135deg, #FFE3C4 0%, #FFB347 100%) !important;
  overflow: hidden !important;
}
.login-logo h1 {
  font-family: 'Playfair Display', 'Plus Jakarta Sans', serif !important;
  font-style: italic !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  background: linear-gradient(135deg, #FFE3C4 0%, #FFB347 60%, #FF7A45 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* ── Notification bell badge ────────────────────────────── */
.notif-btn { position: relative !important; }
.notif-badge {
  position: absolute !important;
  top: -5px !important;
  right: -5px !important;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FF6A2C, #C04015);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(26,15,10,0.85);
  box-shadow: 0 2px 8px rgba(255,106,44,0.55);
  pointer-events: none;
}

/* ── Notification panel rows ────────────────────────────── */
.notif-list {
  max-height: 480px;
  overflow-y: auto;
}
.notif-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,180,120,0.10);
  cursor: pointer;
  transition: background 0.15s ease;
  align-items: center;
}
.notif-row:hover {
  background: rgba(255,122,69,0.08);
}
.notif-row.is-unread {
  background: linear-gradient(90deg, rgba(255,122,69,0.10), transparent 60%);
}
.notif-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  border: 1px solid;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.notif-row-body { min-width: 0; }
.notif-row-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-row-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-row-time {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.2px;
}
.notif-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(255,122,69,0.6);
  flex-shrink: 0;
}
