/* ========================================= #ea7942
   UNIVO CRM - Design System
   Colors from Univo logo: Orange #F05A28 / Blue #1D4ED8
   ========================================= */

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

:root {
  --primary:        #ea7942;
  --primary-light:  #FF7A4A;
  --primary-dark:   #C74315;
  --primary-bg:     #FFF3EE;

  --blue:           #1D4ED8;
  --blue-light:     #3B69F0;
  --blue-dark:      #1338B2;
  --blue-bg:        #EEF2FF;

  --success:        #10B981;
  --success-bg:     #ECFDF5;
  --warning:        #F59E0B;
  --warning-bg:     #FFFBEB;
  --danger:         #EF4444;
  --danger-bg:      #FEF2F2;
  --purple:         #8B5CF6;
  --purple-bg:      #F5F3FF;

  --bg:             #F0F2F8;
  --surface:        #FFFFFF;
  --surface-2:      #F8F9FD;
  --border:         #E4E8F0;
  --border-light:   #F0F2F8;

  --text-primary:   #111827;
  --text-secondary: #6B7280;
  --text-muted:     #9CA3AF;
  --text-white:     #FFFFFF;

  --nav-bg:            #3c76d3;
  --nav-text:          rgba(255,255,255,.75);
  --nav-text-hover:    #FFFFFF;
  --nav-hover-bg:      rgba(255,255,255,.12);
  --nav-active-bg:     #FFFFFF;
  --nav-active-text:   #3c76d3;
  --nav-label-text:    rgba(255,255,255,.55);
  --nav-border:        rgba(255,255,255,.15);
  --nav-muted-text:    rgba(255,255,255,.65);

  --sidebar-w:      260px;
  --header-h:       68px;
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;
  --radius-xl:      24px;

  --shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 16px rgba(0,0,0,.07), 0 2px 6px rgba(0,0,0,.04);
  --shadow-md:      0 8px 32px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);
  --shadow-lg:      0 20px 60px rgba(0,0,0,.14);

  --transition:     all .2s cubic-bezier(.4,0,.2,1);
}

.hide{ display: none !important;}
/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* =========================================
   LAYOUT - App Shell
   ========================================= */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* =========================================
   SIDEBAR
   ========================================= */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--nav-bg);
  border-right: 1px solid var(--nav-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-logo {
  padding: 18px 24px;
  border-bottom: 1px solid var(--nav-border);
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #fff;
}
.sidebar-logo img { height: 32px; }
.sidebar-logo .logo-badge {
  font-size: 10px;
  font-weight: 600;
  background: var(--primary-bg);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: .5px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--nav-label-text);
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--nav-text);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  margin-bottom: 2px;
}
.nav-item:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-text-hover);
}
.nav-item.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
}
.nav-item.active .nav-icon { color: var(--nav-active-text); }
.nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-item .badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
.nav-item .badge.blue { background: var(--blue); }

.nav-dropdown-toggle {
  justify-content: flex-start;
}
.nav-dropdown-arrow {
  margin-left: auto;
  width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.nav-dropdown-toggle.open .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .2s ease;
}
.nav-dropdown-menu.open {
  max-height: 1000px;
  overflow-y: auto;
}

.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 34px;
  border-radius: var(--radius);
  color: var(--nav-text);
  font-size: .8125rem;
  font-weight: 500;
  margin-bottom: 2px;
}
.nav-sub-item:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-text-hover);
}
.nav-sub-item.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
}
.nav-sub-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--nav-border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-user:hover { background: var(--nav-hover-bg); }
.sidebar-user .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
}
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--nav-text-hover);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user .user-role {
  font-size: .7rem;
  color: var(--nav-muted-text);
}

/* =========================================
   MAIN CONTENT
   ========================================= */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =========================================
   TOPBAR
   ========================================= */
.topbar {
  height: var(--header-h);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nav-text-hover);
  flex: 1;
}
.topbar-title span {
  font-weight: 400;
  color: var(--nav-muted-text);
  font-size: .85rem;
  margin-left: 6px;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  width: 240px;
  transition: var(--transition);
}
.topbar-search:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(240,90,40,.1);
}
.topbar-search input {
  border: none;
  background: transparent;
  font-size: .85rem;
  color: var(--text-primary);
  outline: none;
  width: 100%;
}
.topbar-search input::placeholder { color: var(--text-muted); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--nav-text);
  transition: var(--transition);
  position: relative;
}
.topbar-icon-btn:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-text-hover);
}
.topbar-type-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.topbar-type-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--nav-border);
  background: rgba(255,255,255,.06);
  color: var(--nav-text);
  font-size: .76rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.topbar-type-btn:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-text-hover);
  text-decoration: none;
}
.topbar-type-btn .type-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.topbar-type-btn.active {
  background: var(--nav-active-bg);
  border-color: var(--nav-active-bg);
  color: var(--nav-active-text);
}
.topbar-type-btn.is-super-admin.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-white);
}
.topbar-icon-btn .notif-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 7px; height: 7px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--nav-bg);
}
.topbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .75rem;
  cursor: pointer;
  border: 2px solid var(--nav-border);
}

/* =========================================
   PAGE CONTENT
   ========================================= */
.page-content {
  padding: 28px;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.page-header-left .page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.page-header-left .page-subtitle {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(240,90,40,.3);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-blue {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-blue:hover {
  background: var(--blue-dark);
  box-shadow: 0 4px 12px rgba(29,78,216,.3);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--bg);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); color: var(--text-primary); }

.btn-sm { padding: 6px 12px; font-size: .78rem; }
.btn-lg { padding: 12px 28px; font-size: .95rem; }
.btn-icon { padding: 9px; }
.btn-icon.btn-sm { padding: 6px; }

/* =========================================
   CARDS
   ========================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.card-subtitle {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.card-body { padding: 20px 24px; }
.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* =========================================
   STAT CARDS
   ========================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card.orange::after { background: var(--primary); }
.stat-card.blue::after   { background: var(--blue); }
.stat-card.green::after  { background: var(--success); }
.stat-card.purple::after { background: var(--purple); }
.stat-card.danger::after { background: var(--danger); }

.stats-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stats-grid-3 .stat-card { padding: 14px 16px; }
.stats-grid-3 .stat-icon {
  width: 32px; height: 32px;
  margin-bottom: 8px;
}
.stats-grid-3 .stat-icon svg { width: 16px; height: 16px; }
.stats-grid-3 .stat-value { font-size: 1.3rem; margin-bottom: 2px; }
.stats-grid-3 .stat-label { font-size: .72rem; margin-bottom: 0; }

.stat-card.clickable { cursor: pointer; }
.stat-card.clickable.active-filter { border-color: var(--primary); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.stat-icon.orange { background: var(--primary-bg); color: var(--primary); }
.stat-icon.blue   { background: var(--blue-bg);    color: var(--blue); }
.stat-icon.green  { background: var(--success-bg); color: var(--success); }
.stat-icon.purple { background: var(--purple-bg);  color: var(--purple); }
.stat-icon.danger { background: var(--danger-bg);  color: var(--danger); }

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: .8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}
.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 99px;
}
.stat-trend.up   { background: var(--success-bg); color: var(--success); }
.stat-trend.down { background: var(--danger-bg);  color: var(--danger); }

/* =========================================
   DASHBOARD GRID
   ========================================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

/* 12-column row layout for dashboard widgets (chart/table slots + Quick Actions/POP Employees) */
.dash-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.dash-row:last-child { margin-bottom: 0; }
.dash-col-4  { grid-column: span 4; }
.dash-col-6  { grid-column: span 6; }
.dash-col-8  { grid-column: span 8; }
.dash-col-12 { grid-column: span 12; }
.dash-row.hide,
.dash-col-4.hide, .dash-col-6.hide, .dash-col-8.hide, .dash-col-12.hide { display: none; }

/* Fixed-height widget with an internal scroller - the card header stays put, only its body scrolls */
.dash-fixed-height, .dash-fixed-height .card { height: 450px; display: flex; flex-direction: column; }
.dash-fixed-height .card-body { flex: 1; overflow-y: auto; }
.dashboard-grid-full { grid-column: 1 / -1; }

/* =========================================
   ACTIVITY FEED
   ========================================= */
.activity-list { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }
.activity-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 700;
}
.activity-dot.orange { background: var(--primary-bg); color: var(--primary); }
.activity-dot.blue   { background: var(--blue-bg);    color: var(--blue); }
.activity-dot.green  { background: var(--success-bg); color: var(--success); }
.activity-dot.purple { background: var(--purple-bg);  color: var(--purple); }
.activity-text { flex: 1; min-width: 0; }
.activity-text strong { font-weight: 600; color: var(--text-primary); }
.activity-text p { font-size: .82rem; color: var(--text-secondary); margin-top: 2px; }
.activity-time { font-size: .72rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; margin-top: 2px; }

/* =========================================
   PIPELINE
   ========================================= */
.pipeline-stages {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.pipeline-stage {
  flex: 1;
  min-width: 130px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px;
}
.pipeline-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pipeline-stage-name {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.pipeline-count {
  font-size: .72rem;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 99px;
  color: var(--text-secondary);
}
.pipeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.pipeline-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.pipeline-card-name { font-size: .8rem; font-weight: 600; color: var(--text-primary); }
.pipeline-card-course { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.pipeline-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

/* =========================================
   UPCOMING / TASKS
   ========================================= */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  transition: var(--transition);
}
.task-item:hover { border-color: var(--primary); background: var(--primary-bg); }
.task-checkbox {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.task-checkbox.done {
  background: var(--success);
  border-color: var(--success);
}
.task-info { flex: 1; min-width: 0; }
.task-name { font-size: .82rem; font-weight: 600; color: var(--text-primary); }
.task-meta { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.task-time {
  font-size: .72rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* =========================================
   TABLE
   ========================================= */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
thead th {
  background: var(--surface-2);
  padding: 12px 16px;
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
thead th:first-child { border-radius: var(--radius-lg) 0 0 0; }
thead th:last-child  { border-radius: 0 var(--radius-lg) 0 0; }

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

tbody td {
  padding: 14px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}
.td-primary { font-weight: 600; }
.td-muted { color: var(--text-muted); font-size: .8rem; }

.table-avatar {
  display: flex;
  align-items: center;
  gap: 12px;
}
.table-avatar .av {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .75rem;
  color: #fff;
  flex-shrink: 0;
}
.av-0 { background: linear-gradient(135deg,#F05A28,#C74315); }
.av-1 { background: linear-gradient(135deg,#1D4ED8,#1338B2); }
.av-2 { background: linear-gradient(135deg,#10B981,#059669); }
.av-3 { background: linear-gradient(135deg,#8B5CF6,#7C3AED); }
.av-4 { background: linear-gradient(135deg,#F59E0B,#D97706); }
.av-img { object-fit: cover; }
.avatar-img { object-fit: cover; }

/* =========================================
   DATATABLES OVERRIDES
   ========================================= */
.dataTables_wrapper .table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.dataTables_wrapper .dataTables_info {
  color: var(--text-muted);
  font-size: .8rem;
  padding-top: 14px;
}
.dataTables_wrapper .dataTables_paginate {
  padding-top: 14px;
}
.dataTables_wrapper .dataTables_paginate .pagination {
  margin: 0;
  justify-content: flex-end;
}
.dataTables_wrapper .dataTables_paginate .page-item .page-link {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  margin-left: 4px;
  font-size: .8rem;
}
.dataTables_wrapper .dataTables_paginate .page-item .page-link:hover {
  background: var(--bg);
  color: var(--text-primary);
}
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
  color: var(--text-muted);
  background: var(--surface);
}

/* =========================================
   BADGES / PILLS
   ========================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-blue    { background: var(--blue-bg);    color: var(--blue); }
.badge-orange  { background: var(--primary-bg); color: var(--primary); }
.badge-purple  { background: var(--purple-bg);  color: var(--purple); }
.badge-neutral { background: var(--bg); color: var(--text-secondary); }

/* =========================================
   FORMS
   ========================================= */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-primary);
}
.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-primary);
  font-size: .875rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(240,90,40,.12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled {
  background: var(--bg);
  color: var(--text-muted);
  cursor: not-allowed;
}

textarea.form-control {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  min-height: 96px;
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-hint { font-size: .75rem; color: var(--text-muted); }
.form-hint-lg { font-size: .875rem; }
.form-error { font-size: .75rem; color: var(--danger); }
.form-control.is-error { border-color: var(--danger); }
.form-control.is-error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.12); }

.input-group {
  position: relative;
}
.input-group .input-icon {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.input-group .form-control { padding-left: 38px; }
.input-group .input-icon-right {
  position: absolute;
  right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
}
.input-group .form-control.has-right { padding-right: 38px; }

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.form-check-input {
  width: 17px; height: 17px;
  border: 2px solid var(--border);
  border-radius: 4px;
  appearance: none;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
}
.form-check-input:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.form-check-input:checked::after {
  content: '';
  position: absolute;
  top: 1px; left: 4px;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}
.form-check-label { font-size: .85rem; color: var(--text-primary); cursor: pointer; }

/* Upload area */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface-2);
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.upload-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: var(--primary-bg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  color: var(--primary);
}
.upload-area h4 { font-size: .9rem; font-weight: 600; color: var(--text-primary); }
.upload-area p  { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }

/* Form Steps */
.form-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}
.form-step {
  display: flex;
  align-items: center;
  flex: 1;
}
.form-step:last-child { flex: none; }
.step-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}
.step-info { line-height: 1.3; }
.step-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 600; }
.step-name  { font-size: .8rem; font-weight: 600; color: var(--text-secondary); }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 12px;
  transition: var(--transition);
}
.form-step.active .step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.form-step.active .step-name { color: var(--primary); }
.form-step.done .step-num {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.form-step.done + .form-step .step-line-before,
.form-step.done .step-line { background: var(--success); }

/* =========================================
   FILTERS / TOOLBAR
   ========================================= */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar-left  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.toolbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  min-width: 240px;
  transition: var(--transition);
}
.search-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(240,90,40,.1);
}
.search-field svg { color: var(--text-muted); flex-shrink: 0; }
.search-field input {
  border: none; background: transparent;
  font-size: .85rem; color: var(--text-primary);
  outline: none; width: 100%;
}
.search-field input::placeholder { color: var(--text-muted); }

.filter-select {
  height: 38px;
  padding: 0 32px 0 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: .82rem;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: var(--transition);
}
.filter-select:focus { border-color: var(--primary); }

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
  justify-content: flex-end;
}
.page-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* =========================================
   LOGIN PAGE
   ========================================= */
.login-page { min-height: 100vh; display: flex; background: #fff; }

.login-left {
  flex: 1;
  background: #3c76d3;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 52px; position: relative; overflow: hidden;
}
.blob { display: none; position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.blob-1 { width: 420px; height: 420px; background: rgba(240,90,40,.25); top: -100px; right: -100px; }
.blob-2 { width: 320px; height: 320px; background: rgba(29,78,216,.3); bottom: -60px; left: -60px; }
.blob-3 { width: 200px; height: 200px; background: rgba(255,255,255,.06); top: 50%; left: 40%; }

.left-top { position: relative; z-index: 1; }
.left-logo { display: flex; align-items: center; gap: 18px; margin-bottom: 70px; }
.left-logo .logo-mark {
  width: 76px; height: 56px; padding: 8px 5px;
  background: #fff;
  border-radius: 14px; box-shadow: 0 6px 18px rgba(15,27,61,.18);
  display: flex; align-items: center; justify-content: center;
}
.left-logo .logo-mark img { max-width: 100%; max-height: 100%; object-fit: contain; }
.left-logo .logo-text { color: #fff; font-size: 1.3rem; font-weight: 800; letter-spacing: -.3px; }
.left-logo .logo-text span { color: #FCA572; }

.left-headline h1 {
  font-size: 2.8rem; font-weight: 800; color: #fff;
  line-height: 1.2; margin-bottom: 18px; letter-spacing: -.5px;
}
.left-headline h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #FCA572, #F9D080);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.left-headline p { color: rgba(255,255,255,.7); font-size: 1rem; line-height: 1.75; max-width: 380px; }

.left-cards { position: relative; z-index: 1; margin-top: 56px; display: flex; flex-direction: column; gap: 12px; }
.left-info-card {
  background: rgba(255,255,255,.1); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2); border-radius: 14px;
  padding: 16px 20px; display: flex; align-items: center; gap: 14px;
}
.left-info-icon {
  width: 40px; height: 40px; background: rgba(255,255,255,.15);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.left-info-text h4 { font-size: .85rem; font-weight: 700; color: #fff; }
.left-info-text p  { font-size: .75rem; color: rgba(255,255,255,.65); margin-top: 2px; }

.left-stats {
  position: relative; z-index: 1; display: flex; gap: 0;
  border-top: 1px solid rgba(255,255,255,.15); padding-top: 28px;
}
.left-stat { flex: 1; padding-right: 24px; border-right: 1px solid rgba(255,255,255,.15); margin-right: 24px; }
.left-stat:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.left-stat .val { font-size: 1.9rem; font-weight: 800; color: #fff; }
.left-stat .lbl { font-size: .72rem; color: rgba(255,255,255,.6); margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }

.login-right {
  width: 500px;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 60px; background: #fff;
}
.login-form-wrap { width: 100%; }
.login-greeting { margin-bottom: 36px; }
.login-greeting .wave { font-size: 1.5rem; margin-bottom: 10px; }
.login-greeting h2 { font-size: 1.75rem; font-weight: 800; color: var(--text-primary); letter-spacing: -.4px; line-height: 1.25; }
.login-greeting p { color: var(--text-secondary); font-size: .9rem; margin-top: 6px; }

.role-selector { display: flex; gap: 8px; background: var(--bg); padding: 5px; border-radius: var(--radius); margin-bottom: 28px; }
.role-btn { flex: 1; padding: 8px; border-radius: var(--radius-sm); border: none; background: transparent; font-size: .8rem; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: var(--transition); }
.role-btn.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

.login-form-group { margin-bottom: 18px; }
.login-options { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; }
.login-options a { font-size: .82rem; color: var(--primary); font-weight: 600; }
.login-options a:hover { text-decoration: underline; }
.login-options .form-check { margin: 0; }

.btn-login { width: 100%; height: 48px; font-size: .95rem; border-radius: var(--radius); justify-content: center; margin-bottom: 20px; position: relative; overflow: hidden; }
.btn-login::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.15), transparent); }

.login-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-size: .78rem; color: var(--text-muted); }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.sso-btn { width: 100%; height: 44px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .85rem; font-weight: 600; color: var(--text-primary); cursor: pointer; transition: var(--transition); margin-bottom: 12px; text-decoration: none; }
.sso-btn:hover { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); }

.login-bottom { margin-top: 28px; text-align: center; font-size: .78rem; color: var(--text-muted); line-height: 1.7; }
.login-bottom a { color: var(--primary); font-weight: 600; }
.eye-icon { cursor: pointer; }

/* =========================================
   MINI CHART BARS
   ========================================= */
.sparkbar {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
}
.sparkbar-bar {
  flex: 1;
  background: var(--primary-bg);
  border-radius: 3px 3px 0 0;
  transition: var(--transition);
}
.sparkbar-bar.active { background: var(--primary); }
.sparkbar-bar:hover  { background: var(--primary-light); }

/* =========================================
   PROGRESS
   ========================================= */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.progress-fill.blue   { background: linear-gradient(90deg, var(--blue), var(--blue-light)); }
.progress-fill.green  { background: linear-gradient(90deg, var(--success), #34D399); }
.progress-fill.purple { background: linear-gradient(90deg, var(--purple), #A78BFA); }

/* =========================================
   TAGS INPUT
   ========================================= */
.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 42px;
  align-items: center;
  transition: var(--transition);
}
.tags-wrap:focus-within { border-color: var(--primary); }
.tag-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-bg);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
}
.tag-pill button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  padding: 0;
  line-height: 1;
}
.tags-input {
  border: none; outline: none;
  font-size: .85rem;
  background: transparent;
  min-width: 100px;
  color: var(--text-primary);
}

/* =========================================
   DROPDOWN MENU
   ========================================= */
.dropdown { position: relative; display: inline-flex; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: 200;
  overflow: hidden;
  display: none;
}
/* Bootstrap-select's option list reuses the "dropdown-menu" class on its inner <ul>
   (class="dropdown-menu inner") - it relies on the outer wrapper's own show/hide state
   rather than toggling its own, so the blanket rule above would otherwise hide it permanently. */
.dropdown-menu.inner { display: block; }

/* Bootstrap-select popup polish - it ships almost unstyled, so give the search box and
   option list the same look/feel as the rest of the app's form controls and menus. */
.bootstrap-select .bs-searchbox {
  padding: 8px;
  border-bottom: 1px solid var(--border);
}
.bootstrap-select .bs-searchbox .form-control {
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  box-shadow: none;
}
.bootstrap-select .dropdown-menu.inner {
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}
.bootstrap-select .dropdown-menu li a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: var(--text-primary);
}
.bootstrap-select .dropdown-menu li a:hover {
  background: var(--bg);
}
.bootstrap-select .dropdown-menu li.selected a {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 600;
}
.bootstrap-select .dropdown-menu li:first-child a {
  color: var(--text-muted);
}
.bootstrap-select .no-results {
  padding: 10px 12px;
  font-size: .82rem;
  color: var(--text-muted);
}

/* Bootstrap-select copies the original <select>'s classes (e.g. "form-control", "filter-select")
   onto its own wrapper div, so our own decorative background/border/arrow-icon rules for those
   classes end up doubled on top of the real toggle button inside it. Strip every wrapper back
   down and let the toggle button alone carry the look, so there's only one visible box and one
   caret - applies to every dropdown in the app, not just the toolbar filter ones below. */
.bootstrap-select {
  height: auto;
  padding: 0;
  border: none;
  background: none;
  background-image: none;
  box-shadow: none;
}
.bootstrap-select .dropdown-toggle {
  height: 42px;
  padding: 0 32px 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-primary);
  font-size: .875rem;
  text-align: left;
}
.bootstrap-select .dropdown-toggle:hover,
.bootstrap-select .dropdown-toggle:focus {
  border-color: var(--primary);
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: none;
}

/* Toolbar filter dropdowns are more compact than full form fields - override just the sizing
   (the base reset + toggle background/border/color above already applies via .bootstrap-select). */
.bootstrap-select.filter-select .dropdown-toggle {
  height: 38px;
  padding: 0 32px 0 12px;
  font-size: .82rem;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: .82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--bg); color: var(--text-primary); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-bg); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* =========================================
   TOAST
   ========================================= */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--text-primary);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: .85rem;
  font-weight: 500;
  min-width: 280px;
  pointer-events: all;
  animation: slideInToast .3s ease;
}
.toast.success { background: var(--success); }
.toast.warning { background: var(--warning); color: var(--text-primary); }
.toast.error   { background: var(--danger); }
.toast-icon { flex-shrink: 0; }
.toast-msg { flex: 1; }
.toast-close { background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer; padding: 0; font-size: 1.1rem; line-height: 1; }

@keyframes slideInToast {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* =========================================
   MODAL (light)
   ========================================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.modal-close:hover { background: var(--bg); color: var(--text-primary); }
/* .modal-body { padding: 24px; } */
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
}

/* =========================================
   UTILITIES
   ========================================= */
.d-none  { display: none; }
.hidden  { display: none !important; }
.col-stack { display: flex; flex-direction: column; gap: 20px; }
.card-header-controls { display: flex; align-items: center; gap: 8px; }
.sc-name-wrap { flex: 1; }
.sc-actions   { display: flex; gap: 6px; }
.text-brand   { color: var(--primary); }
.text-blue    { color: var(--blue); }
.text-green   { color: var(--success); }
.text-purple  { color: var(--purple); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-right   { text-align: right; }
.record-count { font-size: .8rem; color: var(--text-muted); }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* =========================================
   LOGO BRAND
   ========================================= */
.logo-brand-name { font-size: 1.15rem; font-weight: 800; color: var(--text-primary); letter-spacing: -.3px; }
.logo-accent { color: var(--primary); }
.nav-section-label.spaced { margin-top: 8px; }

/* =========================================
   CHART WRAPPERS
   ========================================= */
.chart-wrap { position: relative; }
.chart-wrap canvas { width: 100% !important; }
.enroll-chart-wrap { height: 260px; }
.course-chart-wrap { height: 220px; }

/* =========================================
   GREETING BANNER
   ========================================= */
.greeting-banner {
  background: #3c76d3;
  border-radius: var(--radius-lg); padding: 24px 28px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
  overflow: hidden; position: relative;
}
.greeting-banner::before {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px; background: rgba(255,255,255,.06); border-radius: 50%;
}
.greeting-banner::after {
  content: ''; position: absolute; right: 80px; bottom: -80px;
  width: 180px; height: 180px; background: rgba(255,255,255,.04); border-radius: 50%;
}
.gb-text { position: relative; z-index: 1; }
.gb-text h2 { font-size: 1.25rem; font-weight: 800; color: #fff; }
.gb-text p  { font-size: .85rem; color: rgba(255,255,255,.75); margin-top: 4px; }
.gb-actions { position: relative; z-index: 1; display: flex; gap: 10px; }
.gb-highlight { color: #FCA572; }
.btn-white { background: rgba(255,255,255,.15); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.3); color: #fff; }
.btn-white:hover { background: rgba(255,255,255,.25); transform: translateY(-1px); }

/* =========================================
   QUICK ACTIONS
   ========================================= */
.quick-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-action {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border-radius: var(--radius); border: 1.5px solid var(--border);
  background: var(--surface-2); cursor: pointer; transition: var(--transition); text-decoration: none;
}
.quick-action:hover { border-color: var(--primary); background: var(--primary-bg); }
.quick-action:hover .qa-icon { background: var(--primary); color: #fff; }
.qa-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: var(--transition);
}
.qa-icon.orange { background: var(--primary-bg); color: var(--primary); }
.qa-icon.blue   { background: var(--blue-bg);    color: var(--blue); }
.qa-icon.green  { background: var(--success-bg); color: var(--success); }
.qa-icon.purple { background: var(--purple-bg);  color: var(--purple); }
.qa-text .qa-name { font-size: .8rem; font-weight: 700; color: var(--text-primary); }
.qa-text .qa-desc { font-size: .7rem; color: var(--text-muted); margin-top: 1px; }

/* =========================================
   STAGE CONVERSION
   ========================================= */
.conversion-row { display: flex; flex-direction: column; gap: 12px; }
.conv-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.conv-item-header span:first-child { font-size: .8rem; font-weight: 600; color: var(--text-primary); }
.conv-item-header span:last-child  { font-size: .78rem; font-weight: 700; }

/* =========================================
   LEAD SOURCES
   ========================================= */
.lead-source-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.lead-source-item:last-child { border-bottom: none; }
.ls-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ls-icon.orange  { background: var(--primary-bg); color: var(--primary); }
.ls-icon.blue    { background: var(--blue-bg);    color: var(--blue); }
.ls-icon.green   { background: var(--success-bg); color: var(--success); }
.ls-icon.warning { background: var(--warning-bg); color: var(--warning); }
.ls-icon.purple  { background: var(--purple-bg);  color: var(--purple); }
.ls-label    { flex: 1; font-size: .82rem; font-weight: 600; color: var(--text-primary); }
.ls-count    { font-size: .8rem; font-weight: 700; color: var(--text-secondary); }
.ls-pct      { font-size: .72rem; color: var(--text-muted); width: 36px; text-align: right; }
.ls-progress { width: 80px; margin: 0 12px; }

/* =========================================
   BADGE & PROGRESS EXTENSIONS
   ========================================= */
.badge-xs { font-size: .65rem; }
.pipeline-time { font-size: .7rem; color: var(--text-muted); }
.progress-fill.warning { background: linear-gradient(90deg, var(--warning), #FBBF24); }

/* =========================================
   CARD & FILTER VARIANTS
   ========================================= */
.card-body-sm    { padding: 12px 24px 20px; }
.card-body-xs    { padding: 10px 24px 20px; }
.filter-select-sm { height: 32px; font-size: .75rem; }
.filter-select-xs { height: 30px; font-size: .75rem; }
.search-field-sm  { min-width: 200px; }

/* =========================================
   VIEW TOGGLE
   ========================================= */
.view-toggle { display: flex; gap: 2px; background: var(--bg); padding: 3px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.view-btn { width: 32px; height: 30px; border-radius: 4px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); transition: var(--transition); }
.view-btn.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* =========================================
   BULK BAR
   ========================================= */
.bulk-bar { display: none; align-items: center; gap: 12px; background: var(--primary); color: #fff; padding: 10px 20px; border-radius: var(--radius); margin-bottom: 14px; font-size: .84rem; font-weight: 600; }
.bulk-bar.visible { display: flex; }
.bulk-bar-actions { display: flex; gap: 8px; margin-left: auto; }
.bulk-btn { padding: 5px 12px; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.15); color: #fff; font-size: .75rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.bulk-btn:hover { background: rgba(255,255,255,.25); }

/* =========================================
   ROW ACTIONS
   ========================================= */
.row-action-btn { width: 28px; height: 28px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); transition: var(--transition); }
.row-action-btn:hover { background: var(--bg); color: var(--text-primary); }
.row-action-btn.danger:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.row-actions-end { justify-content: flex-end; }

/* =========================================
   STUDENT CARD (card view)
   ========================================= */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.student-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; transition: var(--transition); cursor: pointer; display: flex; flex-direction: column; }
.student-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--primary); }
.sc-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sc-header .av { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .88rem; color: #fff; flex-shrink: 0; }
.sc-name   { font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.sc-course { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.sc-meta   { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sc-meta-item { display: flex; align-items: center; gap: 5px; font-size: .72rem; color: var(--text-secondary); }
.sc-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border-light); }
.sc-assign { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: var(--text-muted); }
.sc-assign .mini-av { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.mini-av { width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: .6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mini-av-primary { background: var(--primary); }
.mini-av-blue    { background: var(--blue); }
.mini-av-success { background: var(--success); }
.mini-av-purple  { background: var(--purple); }

/* =========================================
   TABLE VIEW TOGGLE STATE
   ========================================= */
.table-view         { display: block; }
.cards-view         { display: none; }
.table-view.hidden  { display: none; }
.cards-view.visible { display: block; }

/* =========================================
   KPI STRIP
   ========================================= */
.kpi-strip { display: flex; gap: 2px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.kpi-item { flex: 1; padding: 14px 20px; border-right: 1px solid var(--border); cursor: pointer; transition: var(--transition); }
.kpi-item:last-child { border-right: none; }
.kpi-item:hover { background: var(--bg); }
.kpi-item.active { background: var(--primary-bg); }
.kpi-item.active .kpi-val { color: var(--primary); }
.kpi-val   { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); }
.kpi-label { font-size: .72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; }
.kpi-trend { font-size: .68rem; color: var(--success); font-weight: 600; }
.kpi-trend.down { color: var(--danger); }

/* =========================================
   PAGINATION EXTENSIONS
   ========================================= */
.pagination-row  { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.pagination-info { font-size: .8rem; color: var(--text-muted); }
.page-ellipsis   { padding: 0 4px; color: var(--text-muted); }
.per-page-wrap   { display: flex; align-items: center; gap: 8px; }
.per-page-label  { font-size: .8rem; color: var(--text-muted); }

/* =========================================
   TABLE EXTENSIONS
   ========================================= */
.counsellor-cell    { display: flex; align-items: center; gap: 6px; }
.followup-due       { font-size: .78rem; color: var(--primary); font-weight: 600; }
.followup-upcoming  { font-size: .78rem; color: var(--text-secondary); }
.followup-confirmed { font-size: .78rem; color: var(--success); font-weight: 600; }
.followup-overdue   { font-size: .78rem; color: var(--warning); font-weight: 600; }
.modal-sm           { max-width: 400px; }
.select-all-wrap    { display: flex; align-items: center; gap: 8px; }
.th-check           { width: 36px; }
.modal-body p       { font-size: .9rem; color: var(--text-secondary); }

/* =========================================
   BUTTONS EXTENDED
   ========================================= */
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #DC2626; border-color: #DC2626; box-shadow: 0 4px 12px rgba(239,68,68,.3); transform: translateY(-1px); }

/* =========================================
   FORM EXTENSIONS
   ========================================= */
.form-error { display: none; }
.form-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 20px; }
.form-section-header { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.section-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.section-icon.orange { background: var(--primary-bg); color: var(--primary); }
.section-icon.blue   { background: var(--blue-bg);    color: var(--blue); }
.section-icon.green  { background: var(--success-bg); color: var(--success); }
.section-icon.purple { background: var(--purple-bg);  color: var(--purple); }
.section-title-wrap .section-title { font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.section-title-wrap .section-sub   { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.form-section-body { padding: 24px; }

/* =========================================
   RADIO CARDS
   ========================================= */
.radio-group { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-card { flex: 1; min-width: 110px; border: 2px solid var(--border); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 10px; }
.radio-card input[type="radio"] { display: none; }
.radio-card:has(input:checked), .radio-card.selected { border-color: var(--primary); background: var(--primary-bg); }
.radio-card-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; transition: var(--transition); display: flex; align-items: center; justify-content: center; }
.radio-card:has(input:checked) .radio-card-dot, .radio-card.selected .radio-card-dot { border-color: var(--primary); background: var(--primary); }
.radio-card:has(input:checked) .radio-card-dot::after, .radio-card.selected .radio-card-dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.radio-card-label { font-size: .82rem; font-weight: 600; color: var(--text-primary); }

/* =========================================
   PRIORITY SELECTOR
   ========================================= */
.priority-selector { display: flex; gap: 8px; }
.priority-btn { flex: 1; padding: 8px 12px; border-radius: var(--radius-sm); border: 2px solid var(--border); background: var(--surface); font-size: .78rem; font-weight: 600; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 6px; }
.priority-btn .dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-low    { background: var(--success); }
.dot-medium { background: var(--warning); }
.dot-high   { background: var(--primary); }
.dot-urgent { background: var(--danger); }
.priority-btn[data-prio="low"].active    { border-color: var(--success); background: var(--success-bg); color: var(--success); }
.priority-btn[data-prio="medium"].active { border-color: var(--warning); background: var(--warning-bg); color: var(--warning); }
.priority-btn[data-prio="high"].active   { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); }
.priority-btn[data-prio="urgent"].active { border-color: var(--danger);  background: var(--danger-bg);  color: var(--danger); }

/* =========================================
   STICKY FORM ACTIONS
   ========================================= */
.note-area { resize: vertical; min-height: 90px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; gap: 14px; z-index: 10; margin: 0 -28px; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
.sticky-actions-left { color: var(--text-muted); font-size: .8rem; }
.sticky-actions-left strong { color: var(--primary); }
.sticky-actions-right { display: flex; gap: 10px; }
.char-count { text-align: right; font-size: .72rem; color: var(--text-muted); margin-top: 4px; }

/* =========================================
   AVATAR FORM UPLOAD
   ========================================= */
.avatar-form-row   { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.avatar-upload-wrap { flex-shrink: 0; position: relative; }
.avatar-preview { width: 76px; height: 76px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.4rem; font-weight: 800; cursor: pointer; border: 3px solid var(--border); transition: var(--transition); }
.avatar-upload-label { font-size: .68rem; color: var(--text-muted); text-align: center; margin-top: 6px; cursor: pointer; }
.avatar-remove-btn { position: absolute; top: -4px; right: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #fff; border: 2px solid #fff; font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.form-field-grow { flex: 1; }
.phone-prefix { font-size: .8rem; font-weight: 700; color: var(--text-secondary); width: auto; padding: 0 4px; }
.phone-input  { padding-left: 44px; }
.docs-section { margin-top: 16px; }
.docs-label   { margin-bottom: 8px; display: block; }
.checkboxes-section { margin-top: 12px; }
.form-check-mb { margin-bottom: 10px; }
.task-name-done { text-decoration: line-through; opacity: .5; }
.file-list    { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.file-chip    { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .75rem; font-weight: 600; color: var(--text-primary); }
.file-chip-remove { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0; margin-left: 4px; }

/* =========================================
   TOPBAR USER DROPDOWN
   ========================================= */
.topbar-user-dropdown {
  position: relative;
}
.topbar-user-dropdown::before {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 190px;
  height: 8px;
}
.topbar-user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: var(--transition);
}
.topbar-user-trigger:hover {
  background: var(--nav-hover-bg);
  border-color: var(--nav-border);
}
.topbar-user-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--nav-text-hover);
  white-space: nowrap;
}
.topbar-user-chevron {
  color: var(--nav-muted-text);
  transition: transform .2s;
  flex-shrink: 0;
}
.topbar-user-dropdown:hover .topbar-user-chevron {
  transform: rotate(180deg);
}
.topbar-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 190px;
  z-index: 300;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s cubic-bezier(.4,0,.2,1), transform .18s cubic-bezier(.4,0,.2,1);
}
.topbar-user-dropdown:hover .topbar-user-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.topbar-user-menu-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-light);
}
.topbar-user-menu-name {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-primary);
}
.topbar-user-menu-role {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* =========================================
   PROFILE PAGE
   ========================================= */
.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border-light);
}
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  border: 3px solid var(--border);
  overflow: hidden;
}
.profile-avatar-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: var(--primary);
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: var(--transition);
}
.profile-avatar-edit-btn:hover { background: var(--primary-dark); }
.profile-avatar-info .profile-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}
.profile-avatar-info .profile-role {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.profile-avatar-info .profile-email {
  font-size: .8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* =========================================
   CHANGE PASSWORD PAGE
   ========================================= */
.password-page-wrap {
  max-width: 520px;
  margin: 0 auto;
}
.password-strength {
  height: 4px;
  border-radius: 99px;
  background: var(--border);
  margin-top: 8px;
  overflow: hidden;
}
.password-strength-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .3s, background .3s;
}
.password-strength-fill.weak   { width: 25%; background: var(--danger); }
.password-strength-fill.fair   { width: 50%; background: var(--warning); }
.password-strength-fill.good   { width: 75%; background: var(--blue); }
.password-strength-fill.strong { width: 100%; background: var(--success); }
.password-strength-label {
  font-size: .72rem;
  margin-top: 4px;
  font-weight: 600;
}
.password-strength-label.weak   { color: var(--danger); }
.password-strength-label.fair   { color: var(--warning); }
.password-strength-label.good   { color: var(--blue); }
.password-strength-label.strong { color: var(--success); }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dash-row { grid-template-columns: 1fr; }
  .dash-col-4, .dash-col-6, .dash-col-8, .dash-col-12 { grid-column: auto; }
}

@media (max-width: 900px) {
  .login-left { display: none; }
  .login-right { width: 100%; padding: 40px 28px; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar-search { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
}

/* ── OTP login styles ── */
.otp-send-btn {
  position: absolute; right: 0; top: 0; bottom: 0;
  padding: 0 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.otp-send-btn:hover:not(:disabled) { background: var(--primary-dark); }
.otp-send-btn:disabled { opacity: .6; cursor: not-allowed; }

.form-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  color: #22a55a;
  margin-top: 5px;
}

.otp-boxes {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}
.otp-box {
  flex: 1;
  height: 48px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-primary);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  caret-color: var(--primary);
}
.otp-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(240,90,40,.12);
}

.otp-resend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  min-height: 22px;
}
.otp-timer {
  font-size: .76rem;
  color: var(--text-muted);
}
.otp-resend-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.otp-resend-btn:hover { text-decoration: underline; }
.help-block{font-size: .75rem; color: var(--danger);}


    /* ---- Employee Form Extras ---- */
.acl-card {background: var(--surface);border: 1px solid var(--border);border-radius: var(--radius);overflow: hidden;margin-bottom: 12px;}
.acl-module-header {display: flex;align-items: center;gap: 10px;padding: 13px 18px;background: var(--surface-2);border-bottom: 1px solid var(--border);cursor: pointer;user-select: none;}
.acl-module-header:hover { background: var(--border-light); }
.acl-module-toggle {width: 20px; height: 20px;border: none; background: none;cursor: pointer; padding: 0;color: var(--text-secondary);transition: transform .2s;flex-shrink: 0;}
.acl-module-toggle.open { transform: rotate(90deg); }
.acl-module-name {font-weight: 600;font-size: .875rem;color: var(--text-primary);flex: 1;}
.acl-module-controls {display: flex;align-items: center;gap: 6px;}
.acl-master-check {display: flex;align-items: center;gap: 6px;font-size: .75rem;color: var(--text-secondary);padding: 4px 10px;border-radius: 20px;border: 1px solid var(--border);background: var(--surface);cursor: pointer;transition: var(--transition);}
.acl-master-check:hover { border-color: var(--primary); color: var(--primary); }
.acl-master-check input { margin: 0; accent-color: var(--primary); cursor: pointer; }
.acl-submodules { border-top: none; }
.acl-submodule-row {display: grid;grid-template-columns: 1fr auto;align-items: center;padding: 10px 18px 10px 44px;border-bottom: 1px solid var(--border-light);gap: 12px;}
.acl-submodule-row:last-child { border-bottom: none; }
.acl-submodule-name {font-size: .8125rem;color: var(--text-secondary);display: flex;align-items: center;gap: 7px;}
.acl-submodule-name::before {content: '';display: inline-block;width: 6px; height: 6px;border-radius: 50%;background: var(--border);flex-shrink: 0;}
.acl-perms {display: flex;align-items: center;gap: 6px;}
.perm-toggle {display: inline-flex;align-items: center;gap: 5px;padding: 4px 10px;border-radius: 20px;border: 1px solid var(--border);font-size: .72rem;font-weight: 500;cursor: pointer;transition: var(--transition);white-space: nowrap;color: var(--text-secondary);background: var(--surface);}
.perm-toggle input[type="checkbox"] { display: none; }
.perm-toggle .perm-dot {width: 7px; height: 7px;border-radius: 50%;background: var(--border);transition: var(--transition);flex-shrink: 0;}
.perm-toggle.active-view  { border-color: var(--purple); color: var(--purple); background: var(--purple-bg); }
.perm-toggle.active-view .perm-dot { background: var(--purple); }
.perm-toggle.active-read  { border-color: var(--blue); color: var(--blue); background: var(--blue-bg); }
.perm-toggle.active-read .perm-dot { background: var(--blue); }
.perm-toggle.active-write { border-color: var(--success); color: var(--success); background: var(--success-bg); }
.perm-toggle.active-write .perm-dot { background: var(--success); }
.perm-toggle.active-delete { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.perm-toggle.active-delete .perm-dot { background: var(--danger); }
.acl-header-row {display: grid;grid-template-columns: 1fr auto;align-items: center;padding: 8px 18px 8px 44px;background: var(--bg);border-bottom: 1px solid var(--border);}
.acl-col-labels {display: flex;align-items: center;gap: 6px;}
.acl-col-label {font-size: .7rem;font-weight: 600;text-transform: uppercase;letter-spacing: .05em;color: var(--text-muted);width: 72px;text-align: center;}
.role-badge-select {display: flex;flex-wrap: wrap;gap: 8px;}
.role-badge-btn {padding: 6px 16px;border-radius: 20px;border: 1.5px solid var(--border);background: var(--surface);font-size: .8rem;font-weight: 500;color: var(--text-secondary);cursor: pointer;transition: var(--transition);}
.role-badge-btn:hover { border-color: var(--primary); color: var(--primary); }
.role-badge-btn.selected { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); }
.role-badge-btn input { display: none; }
.form-section + .form-section { margin-top: 24px; }
.acl-section-desc {font-size: .8125rem;color: var(--text-secondary);margin-bottom: 16px;}
.acl-preset-bar {display: flex;align-items: center;gap: 8px;margin-bottom: 16px;flex-wrap: wrap;}
.acl-preset-label {font-size: .8rem;color: var(--text-secondary);font-weight: 500;}
.acl-preset-btn {padding: 5px 14px;border-radius: 20px;border: 1px solid var(--border);background: var(--surface);font-size: .78rem;cursor: pointer;color: var(--text-secondary);transition: var(--transition);}
.acl-preset-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.acl-admin-check {display: flex;align-items: center;gap: 5px;font-size: .75rem;font-weight: 600;color: var(--text-secondary);padding: 4px 10px;border-radius: 20px;border: 1.5px dashed var(--border);background: var(--surface);cursor: pointer;transition: var(--transition);margin-right: 4px;}
.acl-admin-check:hover { border-color: var(--warning); color: var(--warning); }
.acl-admin-check input { margin: 0; accent-color: var(--warning); cursor: pointer; }
.acl-admin-check.is-admin {border-style: solid;border-color: var(--warning);color: var(--warning);background: var(--warning-bg);}

/* ========================================== SUNIL JOSHI CSS BELOW =======================*/
/* start alert*/
.alert {border: 0;}
.alert .progress {background-color: transparent; box-shadow: none !important; height: 3px; border-radius: 0; margin: 19px 0px -15px -13px; }
.alert .progress-bar { box-shadow: none !important; background-color: rgba(0, 0, 0, 0.3); }
.app-alert-message { display: inline-block; margin-right: 5px; max-width: 350px; min-width: 165px; }
.app-alert.animate { bottom: 0; position: fixed; z-index: 9999; border-radius: 2px; box-shadow: 0 2px 1px rgba(0, 0, 0, 0.1); opacity: 0.25; right: -350px; }
.app-alert.alert-info { background-color: #22b9ff; color: #fff; }
.app-alert.alert-success { background-color: #485bbd; color: #fff; }
.app-alert.alert-danger { background-color: #f5325c; color: #fff; }
.app-alert.alert-warning { background-color: #ffb822; color: #fff; }
.app-alert a { color: #444; }
.app-alert{ z-index: 99999 !important; }
/* end alert*/

/* start modal box css */
.no-wrap { white-space: nowrap; }
.modal.modal-left .modal-dialog, .modal.modal-right .modal-dialog { max-width: 380px; min-height: calc(100vh - 0px); }
.modal.modal-left.show .modal-dialog, .modal.modal-right.show .modal-dialog { transform: translate(0, 0); }
.modal.modal-left .modal-content, .modal.modal-right .modal-content { height: calc(100vh - 0px); overflow-y: auto; }
.modal.modal-left .modal-dialog { transform: translate(-100%, 0); margin: 0px auto 0 0; }
.modal.modal-right .modal-dialog { transform: translate(100%, 0); margin: 0px 0 0 auto; }

.modal-left { position: absolute; top: 0; left: 0; z-index: 1050; display: none; width: 90%; height: 100%; overflow: hidden; outline: 0; margin: auto; left: 0; right: 0; }
.modal-left .modal-body { padding: 10px 35px }
.modal-left .modal-body h4 { padding: 10px 0px }
.help-block { color: red !important; }
.modal.right_modal.fade .modal-dialog { right: -50%; -webkit-transition: opacity 0.3s linear, right 0.3s ease-out; -moz-transition: opacity 0.3s linear, right 0.3s ease-out; -o-transition: opacity 0.3s linear, right 0.3s ease-out; transition: opacity 0.3s linear, right 0.3s ease-out; }
.modal.right_modal.fade.show .modal-dialog { right: 0; }
.modal-wrapper { background-color: #f2f3fa; padding: 20px; }
.modal-wrapper .modal-inner-wrapper { background-color: #fff; }
.modal-content { right: -105px; width: 92%; }
.close-task-detail { position: absolute; left: 75px; top: 20px; background-color: rgb(255 247 10 / 96%); padding: 9px 17px !important; color: #fff !important; border-radius: 22px 0px 0px 22px; font-size: 12px; transition: width 0.7s; }
.heading-h1 { font-size: 21px; font-weight: bold; line-height: 1.14; }

.modal-full { min-width: 100%; margin: 0; }
/* .modal-full .modal-content { min-height: 100vh; } */
/* .modal-full { max-width: 90%; margin: 0px auto; } */
.custom-modal-lg { max-width: 60%; margin: 0px auto; }

/* ---- Access Request: application repeater ---- */
.ar-item-block { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; position: relative; }
.ar-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ar-item-label { font-size: .7rem; font-weight: 700; letter-spacing: .05em; color: var(--primary); text-transform: uppercase; }
.ar-item-remove { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.ar-item-remove:hover { color: var(--danger); }
.ar-add-item-btn { width: 100%; border: 2px dashed var(--border); background: transparent; border-radius: var(--radius); padding: 12px; color: var(--primary); font-weight: 600; font-size: .85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 20px; transition: var(--transition); }
.ar-add-item-btn:hover { border-color: var(--primary); background: var(--primary-bg); }

/* ---- Access Request: toggle switch ---- */
.ar-toggle-row { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--text-primary); cursor: pointer; }
.ar-toggle-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.ar-toggle-switch input { opacity: 0; width: 0; height: 0; }
.ar-toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 22px; transition: var(--transition); }
.ar-toggle-slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: var(--transition); }
.ar-toggle-switch input:checked + .ar-toggle-slider { background: var(--primary); }
.ar-toggle-switch input:checked + .ar-toggle-slider::before { transform: translateX(16px); }

/* ---- Access Request: track panel ---- */
.ar-track-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ar-track-title { font-size: 1.1rem; font-weight: 700; }
.ar-track-subtitle { font-size: .8rem; color: var(--text-muted); margin-bottom: 14px; }
.ar-track-badges { display: flex; gap: 8px; margin-bottom: 18px; }
.ar-track-info-box { display: flex; gap: 12px; background: var(--blue-bg); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 24px; color: var(--blue); }
.ar-track-info-box.danger { background: var(--danger-bg); color: var(--danger); }
.ar-track-info-box svg { flex-shrink: 0; margin-top: 2px; }
.ar-track-info-title { font-weight: 700; font-size: .85rem; }
.ar-track-info-sub { font-size: .78rem; color: var(--text-secondary); margin-top: 2px; }
.ar-track-info-box.danger .ar-track-info-sub, .ar-track-info-box.danger .ar-track-info-title { color: var(--danger); }

.ar-stepper { display: flex; align-items: flex-start; margin-bottom: 28px; }
.ar-step { display: flex; flex-direction: column; align-items: center; text-align: center; width: 90px; flex-shrink: 0; }
.ar-step-circle { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; margin-bottom: 8px; }
.ar-step.active .ar-step-circle { border-color: var(--primary); background: var(--primary); color: #fff; }
.ar-step.done .ar-step-circle { border-color: var(--success); background: var(--success); color: #fff; }
.ar-step.rejected .ar-step-circle { border-color: var(--danger); background: var(--danger); color: #fff; }
.ar-step.returned .ar-step-circle { border-color: var(--warning); background: var(--warning); color: #fff; }
.ar-step-label { font-size: .75rem; font-weight: 600; color: var(--text-primary); }
.ar-step.active .ar-step-label { color: var(--primary); }
.ar-step-sub { font-size: .68rem; color: var(--text-muted); }
.ar-step-connector { flex: 1; height: 2px; background: var(--border); margin-top: 15px; }
.ar-step-connector.done { background: var(--success); }

.ar-track-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 18px; }
.ar-track-detail-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 4px; }
.ar-track-detail-value { font-size: .88rem; color: var(--text-primary); }
.ar-track-justification { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 4px; }

.ar-track-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.ar-timeline-item, .ar-comment-item, .ar-attachment-item { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: .85rem; }
.ar-timeline-item:last-child, .ar-comment-item:last-child, .ar-attachment-item:last-child { border-bottom: none; }
.ar-comment-add, .ar-attachment-upload, .ar-provision-form { margin-top: 12px; }
.ar-attachment-upload { display: flex; gap: 8px; align-items: center; }

.row-actions button[disabled] { opacity: .4; cursor: not-allowed; }
/* end modal box css */