/* ============================================================
   BETOLLA ERP/CRM — THEME CSS
   Brand: Luxury Gold / Cream / Deep Brown
   ============================================================ */

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

:root {
  --gold-50: #9E8959;
  --gold-100: #C1AB79;
  --gold-200: #eed696;
  --gold-400: #FFFFFF;
  --gold-600: #9a7530;
  --gold-800: #5c4118;
  --gold-900: #3a2708;

  --brown-50: #f5f0ea;
  --brown-100: #e3d5c3;
  --brown-200: #c8b49a;
  --brown-400: #9E8959;
  --brown-600: #6e5035;
  --brown-800: #3a2708;
  --brown-900: #1e1209;

  --cream: #faf7f2;
  --cream-dark: #f0ebe0;
  --white: #ffffff;

  --sidebar-w: 260px;
  --header-h: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 4px rgba(58, 39, 8, 0.08);
  --shadow-md: 0 4px 16px rgba(58, 39, 8, 0.12);
  --shadow-lg: 0 8px 32px rgba(58, 39, 8, 0.16);

  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Jost', sans-serif;

  --transition: 0.22s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--brown-800);
  font-size: 14px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--cream-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-200);
  border-radius: 99px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* SIDEBAR */
#sidebar {
  width: var(--sidebar-w);
  height: 100%;
  background: var(--brown-900);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  transition: width var(--transition);
  position: relative;
  z-index: 100;
}

#sidebar.collapsed {
  width: 64px;
}

#sidebar.collapsed .nav-label,
#sidebar.collapsed .sidebar-logo-text,
#sidebar.collapsed .sidebar-role-badge,
#sidebar.collapsed .nav-section-title {
  display: none;
}

#sidebar.collapsed .nav-item {
  justify-content: center;
}

#sidebar.collapsed .nav-item i {
  margin: 0;
}

.sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-200));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--brown-900);
  flex-shrink: 0;
}

.sidebar-logo-text {
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
}

.sidebar-logo-sub {
  color: var(--gold-400);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.sidebar-user {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-600), var(--gold-400));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  color: var(--gold-50);
  flex-shrink: 0;
}

.sidebar-user-name {
  color: var(--cream);
  font-size: 13px;
  font-weight: 500;
}

.sidebar-role-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(201, 168, 76, 0.18);
  color: var(--gold-200);
  border-radius: 99px;
  font-size: 10px;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-section-title {
  padding: 10px 18px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.5);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: rgba(250, 247, 242, 0.65);
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  position: relative;
}

.nav-item:hover {
  background: rgba(201, 168, 76, 0.08);
  color: var(--gold-200);
}

.nav-item.active {
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold-200);
  border-left-color: var(--gold-400);
}

.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  font-size: 13px;
  font-weight: 400;
}

.nav-badge {
  margin-left: auto;
  background: var(--gold-400);
  color: var(--brown-900);
  border-radius: 99px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 600;
}

/* MAIN AREA */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* HEADER */
#header {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

#toggle-sidebar {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brown-600);
  font-size: 18px;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

#toggle-sidebar:hover {
  background: var(--cream);
}

.header-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--brown-800);
  flex: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  background: none;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  cursor: pointer;
  color: var(--brown-600);
  font-size: 14px;
  transition: all var(--transition);
  position: relative;
}

.header-btn:hover {
  background: var(--cream);
  border-color: var(--gold-200);
}

.header-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e24b4a;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* CONTENT */
#content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ============================================================
   CARDS & COMPONENTS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--cream-dark);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--brown-800);
}

.card-subtitle {
  font-size: 12px;
  color: var(--brown-400);
  margin-top: 2px;
}

.card-body {
  padding: 20px;
}

/* STAT CARDS */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--cream-dark);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brown-400);
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--brown-800);
}

.stat-trend {
  font-size: 12px;
  margin-top: 4px;
}

.stat-trend.up {
  color: #3b6d11;
}

.stat-trend.down {
  color: #a32d2d;
}

.stat-icon {
  float: right;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-icon.gold {
  background: var(--gold-50);
  color: var(--gold-600);
}

.stat-icon.green {
  background: #eaf3de;
  color: #3b6d11;
}

.stat-icon.blue {
  background: #e6f1fb;
  color: #185fa5;
}

.stat-icon.red {
  background: #fcebeb;
  color: #a32d2d;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold-400);
  color: var(--brown-900);
}

.btn-primary:hover {
  background: var(--gold-600);
  color: var(--cream);
}

.btn-secondary {
  background: var(--cream);
  color: var(--brown-700);
  border: 1px solid var(--cream-dark);
}

.btn-secondary:hover {
  background: var(--cream-dark);
  border-color: var(--gold-200);
}

.btn-danger {
  background: #fcebeb;
  color: #a32d2d;
  border: 1px solid #f7c1c1;
}

.btn-danger:hover {
  background: #e24b4a;
  color: white;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-icon {
  padding: 7px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  cursor: pointer;
  color: var(--brown-600);
  font-size: 14px;
  transition: all var(--transition);
}

.btn-icon:hover {
  background: var(--gold-50);
  border-color: var(--gold-200);
  color: var(--gold-600);
}

/* TABLES */
.table-wrapper {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--brown-400);
  background: var(--cream);
  border-bottom: 1px solid var(--cream-dark);
}

table.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(240, 235, 224, 0.6);
  vertical-align: middle;
}

table.data-table tr:hover td {
  background: var(--cream);
}

table.data-table tr:last-child td {
  border-bottom: none;
}

/* BADGES / STATUS */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
}

.badge-gold {
  background: var(--gold-50);
  color: var(--gold-600);
}

.badge-green {
  background: #eaf3de;
  color: #3b6d11;
}

.badge-blue {
  background: #e6f1fb;
  color: #185fa5;
}

.badge-red {
  background: #fcebeb;
  color: #a32d2d;
}

.badge-gray {
  background: var(--cream-dark);
  color: var(--brown-600);
}

.badge-amber {
  background: #faeeda;
  color: #854f0b;
}

/* FORMS */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brown-600);
  margin-bottom: 5px;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--brown-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

.form-control::placeholder {
  color: var(--brown-200);
}

select.form-control {
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 18, 9, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform var(--transition);
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--brown-800);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--brown-400);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.modal-close:hover {
  background: var(--cream);
  color: var(--brown-800);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* PAGE GRID */
.page-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.page-grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* SEARCH BAR */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.search-bar i {
  color: var(--brown-400);
}

.search-bar input {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--brown-800);
  flex: 1;
}

.search-bar input:focus {
  outline: none;
}

/* TABS */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--cream);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.tab {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--brown-400);
  transition: all var(--transition);
  border: none;
  background: none;
}

.tab.active {
  background: var(--white);
  color: var(--brown-800);
  box-shadow: var(--shadow-sm);
}

.tab:hover:not(.active) {
  color: var(--brown-600);
}

/* AVATAR */
.avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.avatar-md {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.avatar-gold {
  background: var(--gold-50);
  color: var(--gold-600);
}

.avatar-blue {
  background: #e6f1fb;
  color: #185fa5;
}

.avatar-green {
  background: #eaf3de;
  color: #3b6d11;
}

.avatar-coral {
  background: #faece7;
  color: #993c1d;
}

/* DIVIDER */
.divider {
  height: 1px;
  background: var(--cream-dark);
  margin: 16px 0;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--brown-400);
}

.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 13px;
}

/* TOAST */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  min-width: 240px;
  animation: toastIn 0.3s ease;
}

.toast.success {
  border-left: 3px solid #3b6d11;
}

.toast.error {
  border-left: 3px solid #a32d2d;
}

.toast.info {
  border-left: 3px solid var(--gold-400);
}

@keyframes toastIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* PERMISSION LOCKED */
.perm-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--brown-400);
}

.perm-locked i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.perm-locked h3 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--brown-600);
  margin-bottom: 8px;
}

/* PROGRESS BAR */
.progress {
  height: 6px;
  background: var(--cream-dark);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-200));
  border-radius: 99px;
  transition: width 0.5s ease;
}

/* LOGIN SCREEN */
#login-screen {
  position: fixed;
  inset: 0;
  background: var(--brown-900);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-logo {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--brown-800);
  letter-spacing: 3px;
  margin-bottom: 4px;
}

.login-tagline {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 32px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--brown-400);
  margin-bottom: 24px;
}

/* NOTIFICATION DROPDOWN */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 300px;
  z-index: 500;
  display: none;
}

.dropdown.open {
  display: block;
}

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--cream-dark);
  font-weight: 600;
  font-size: 13px;
}

.dropdown-item {
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  transition: background var(--transition);
}

.dropdown-item:hover {
  background: var(--cream);
}

.dropdown-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--gold-50);
  color: var(--gold-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.dropdown-item-text {
  font-size: 12px;
  color: var(--brown-600);
  line-height: 1.4;
}

.dropdown-item-time {
  font-size: 11px;
  color: var(--brown-400);
  margin-top: 2px;
}

/* TIMELINE */
.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--cream-dark);
}

.timeline-item {
  position: relative;
  padding-bottom: 16px;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-400);
  border: 2px solid var(--white);
}

.timeline-time {
  font-size: 11px;
  color: var(--brown-400);
  margin-bottom: 3px;
}

.timeline-content {
  font-size: 13px;
  color: var(--brown-600);
}

/* CALENDAR MINI */
.mini-calendar {
  font-size: 12px;
}

.mini-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
}

.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 2px;
}

.cal-day-name {
  color: var(--brown-400);
  font-size: 10px;
  padding: 4px 0;
}

.cal-day {
  padding: 5px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.cal-day:hover {
  background: var(--cream);
}

.cal-day.today {
  background: var(--gold-400);
  color: var(--brown-900);
  font-weight: 600;
}

.cal-day.has-event {
  position: relative;
}

.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-400);
}

/* CHART PLACEHOLDER */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 0 4px;
}

.chart-bar {
  flex: 1;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--gold-100);
  transition: background var(--transition);
}

.chart-bar:hover {
  background: var(--gold-400);
}

.chart-bar.active {
  background: var(--gold-400);
}

/* PIPELINE */
.pipeline {
  display: flex;
  gap: 0;
}

.pipeline-stage {
  flex: 1;
  padding: 12px 8px;
  background: var(--cream);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--brown-400);
  position: relative;
  border-right: 1px solid var(--cream-dark);
}

.pipeline-stage:last-child {
  border-right: none;
}

.pipeline-stage.active {
  background: var(--gold-50);
  color: var(--gold-600);
}

.pipeline-count {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  display: block;
  color: var(--brown-800);
  margin-top: 4px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  #sidebar {
    width: 64px;
  }

  #sidebar .nav-label,
  #sidebar .sidebar-logo-text,
  #sidebar .sidebar-role-badge,
  #sidebar .nav-section-title {
    display: none;
  }

  #sidebar .nav-item {
    justify-content: center;
  }

  #sidebar .nav-item i {
    margin: 0;
  }

  .page-grid-2,
  .page-grid-3 {
    grid-template-columns: 1fr;
  }

  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}


/* Screen 04 — Orders responsive hardening */
@media (max-width: 1180px) {
  .order-detail-layout {
    grid-template-columns: 1fr !important;
  }

  .order-side-panel {
    position: static !important;
  }
}

@media (max-width: 760px) {
  .order-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #orders-body .data-table,
  #order-detail-body .data-table {
    min-width: 760px;
  }
}

@media (max-width: 520px) {
  .order-kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Screen 07 — Procurement responsive hardening */
.procurement-page .page-header-row {
  gap: 1rem;
  align-items: flex-start;
}

.procurement-page .action-cell {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.procurement-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.procurement-form-grid label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-weight: 600;
}

.procurement-form-grid .span-2 {
  grid-column: 1 / -1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .25rem .65rem;
  background: rgba(15, 23, 42, .06);
  font-weight: 700;
  font-size: .82rem;
}

@media (max-width: 768px) {
  .procurement-page .page-header-row {
    flex-direction: column;
  }

  .procurement-page .page-header-row .btn {
    width: 100%;
    justify-content: center;
  }

  .procurement-form-grid {
    grid-template-columns: 1fr;
  }

  .procurement-page .data-table th,
  .procurement-page .data-table td {
    white-space: nowrap;
  }
}

/* ============================================================
   Screen 12 — System Admin / Settings / Logs / Sessions
   Safe responsive UI improvements
   ============================================================ */
.screen-admin-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(250, 246, 238, .88));
  border: 1px solid rgba(92, 64, 38, .12);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(42, 26, 12, .06);
}

.admin-page-head h2 {
  margin: 4px 0 6px;
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -.02em;
}

.admin-page-head p {
  margin: 0;
  color: var(--brown-400, #7b6249);
  font-size: 13px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brown-500, #5f4631);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-actions,
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-actions .form-control {
  min-width: 180px;
}

.admin-toolbar {
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(92, 64, 38, .10);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(42, 26, 12, .04);
}

.admin-toolbar .form-control {
  max-width: 240px;
}

.logs-toolbar .form-control {
  max-width: 210px;
}

.search-box {
  position: relative;
  flex: 1 1 280px;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brown-400, #7b6249);
}

.search-box input {
  padding-left: 36px;
  max-width: 100%;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.admin-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(92, 64, 38, .10);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(42, 26, 12, .05);
  border-left: 4px solid rgba(92, 64, 38, .25);
}

.admin-stat-card i {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(92, 64, 38, .08);
  color: var(--brown-700, #2a170b);
  font-size: 18px;
}

.admin-stat-card strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.admin-stat-card span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--brown-400, #7b6249);
}

.admin-stat-card.success {
  border-left-color: #2f9e44;
}

.admin-stat-card.warning {
  border-left-color: #f59f00;
}

.admin-stat-card.info {
  border-left-color: #1971c2;
}

.admin-card {
  background: #fff;
  border: 1px solid rgba(92, 64, 38, .10);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(42, 26, 12, .055);
  overflow: hidden;
}

.setting-group-card {
  margin-bottom: 16px;
}

.admin-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(250, 246, 238, .75);
  border-bottom: 1px solid rgba(92, 64, 38, .10);
}

.admin-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.admin-card-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--brown-400, #7b6249);
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 920px;
}

.admin-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brown-400, #7b6249);
  background: rgba(250, 246, 238, .55);
  padding: 12px 14px;
  border-bottom: 1px solid rgba(92, 64, 38, .10);
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(92, 64, 38, .08);
  vertical-align: top;
  font-size: 13px;
}

.admin-table tbody tr:hover {
  background: rgba(250, 246, 238, .45);
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(92, 64, 38, .08);
  color: var(--brown-700, #2a170b);
  white-space: nowrap;
}

.admin-badge.success {
  background: rgba(47, 158, 68, .12);
  color: #2b8a3e;
}

.admin-badge.warning {
  background: rgba(245, 159, 0, .15);
  color: #9a6700;
}

.admin-badge.info {
  background: rgba(25, 113, 194, .12);
  color: #1864ab;
}

.admin-badge.muted {
  background: rgba(108, 117, 125, .12);
  color: #6c757d;
}

.muted-small {
  font-size: 11px;
  color: var(--brown-400, #7b6249);
  margin-top: 3px;
}

.ua-cell {
  display: inline-block;
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--brown-500, #5f4631);
  font-size: 12px;
}

.admin-note {
  padding: 12px 16px;
  color: var(--brown-400, #7b6249);
  font-size: 12px;
  background: rgba(250, 246, 238, .65);
  border-top: 1px solid rgba(92, 64, 38, .08);
}

.text-end {
  text-align: right !important;
}

@media (max-width: 1200px) {
  .admin-summary-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 768px) {
  .admin-page-head {
    flex-direction: column;
    padding: 14px;
    border-radius: 14px;
  }

  .admin-actions,
  .admin-toolbar {
    width: 100%;
    align-items: stretch;
  }

  .admin-actions .btn,
  .admin-actions .form-control,
  .admin-toolbar .form-control,
  .search-box {
    width: 100%;
    max-width: none;
  }

  .admin-summary-grid {
    grid-template-columns: 1fr;
  }

  .admin-table {
    min-width: 0;
    border-spacing: 0 10px;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    padding: 12px;
    margin: 10px;
    border: 1px solid rgba(92, 64, 38, .10);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(42, 26, 12, .04);
  }

  .admin-table td {
    padding: 8px 0;
    border: 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    text-align: right;
  }

  .admin-table td::before {
    content: attr(data-label);
    font-weight: 800;
    color: var(--brown-400, #7b6249);
    text-align: left;
    flex: 0 0 38%;
  }

  .ua-cell {
    max-width: 170px;
  }

  .text-end {
    text-align: right !important;
  }
}

/* ============================================================
   STAGE 13 — UI/UX PROFESSIONAL POLISH
   Safe visual layer only. No API, DB, or business-logic changes.
   ============================================================ */
:root {
  --stage13-bg: #fbf7ef;
  --stage13-surface: rgba(255, 255, 255, .92);
  --stage13-line: rgba(92, 64, 38, .11);
  --stage13-text: #2d1e10;
  --stage13-muted: #7b6249;
  --stage13-soft: rgba(193, 171, 121, .14);
  --stage13-radius-xl: 24px;
  --stage13-radius-lg: 18px;
  --stage13-shadow-card: 0 14px 38px rgba(42, 26, 12, .075);
  --stage13-shadow-hover: 0 18px 52px rgba(42, 26, 12, .115);
}

body {
  background:
    radial-gradient(circle at top left, rgba(193, 171, 121, .18), transparent 34rem),
    linear-gradient(180deg, #fbf7ef 0%, #f7f0e6 100%);
}

#content {
  background:
    radial-gradient(circle at 88% 10%, rgba(193, 171, 121, .14), transparent 26rem),
    transparent;
  scroll-behavior: smooth;
}

/* Premium page headers */
.page-header,
.page-head,
.admin-page-head,
.hr-page-head,
.itcrm-page-head,
.section-header {
  background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(250, 246, 238, .82));
  border: 1px solid var(--stage13-line);
  border-radius: var(--stage13-radius-xl);
  box-shadow: var(--stage13-shadow-card);
  padding: clamp(16px, 2vw, 24px);
  margin-bottom: 18px;
}

.page-title,
.header-title,
.admin-page-head h2,
.hr-page-head h2,
.itcrm-page-head h2 {
  letter-spacing: -.01em;
}

.page-subtitle,
.admin-page-head p,
.hr-page-head p,
.itcrm-page-head p,
.card-subtitle {
  color: var(--stage13-muted);
}

/* Unified premium cards */
.card,
.stat-card,
.panel-card,
.admin-card,
.dist-card,
.section-card,
.setting-group-card {
  border: 1px solid var(--stage13-line) !important;
  border-radius: var(--stage13-radius-xl) !important;
  box-shadow: var(--stage13-shadow-card) !important;
  background: var(--stage13-surface) !important;
  backdrop-filter: blur(10px);
}

.card,
.stat-card,
.panel-card,
.admin-card,
.dist-card,
.section-card,
.admin-stat-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover,
.stat-card:hover,
.panel-card:hover,
.admin-card:hover,
.dist-card:hover,
.section-card:hover,
.admin-stat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--stage13-shadow-hover) !important;
  border-color: rgba(193, 171, 121, .28) !important;
}

.card-header,
.admin-card-head,
.dist-card-header {
  background: linear-gradient(135deg, rgba(250, 246, 238, .78), rgba(255, 255, 255, .78));
}

/* KPI cards: clearer hierarchy */
.stat-grid,
.stats-grid,
.admin-summary-grid,
.hr-summary-grid,
.itcrm-summary-grid,
.kpi-grid {
  gap: clamp(12px, 1.6vw, 18px) !important;
}

.stat-card,
.admin-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
}

.stat-card::after,
.admin-stat-card::after {
  content: '';
  position: absolute;
  right: -38px;
  top: -38px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(193, 171, 121, .13);
  pointer-events: none;
}

.stat-label {
  color: var(--stage13-muted);
  font-weight: 800;
}

.stat-value,
.admin-stat-card strong {
  color: var(--stage13-text);
  letter-spacing: -.02em;
}

.stat-icon,
.admin-stat-card i {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55);
}

/* Tables: desktop readability */
.table-responsive,
.admin-table-wrap {
  border-radius: var(--stage13-radius-lg);
}

.table,
.data-table,
.admin-table {
  background: #fff;
}

.table th,
.data-table th,
.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #faf6ee !important;
  color: var(--stage13-muted) !important;
  font-weight: 850 !important;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.table td,
.data-table td,
.admin-table td {
  color: #3e2b19;
}

.table tbody tr,
.data-table tbody tr,
.admin-table tbody tr {
  transition: background .15s ease, transform .15s ease;
}

.table tbody tr:hover,
.data-table tbody tr:hover,
.admin-table tbody tr:hover {
  background: rgba(250, 246, 238, .62) !important;
}

/* Buttons and forms */
.btn,
.bt-btn,
button.btn {
  border-radius: 12px !important;
  font-weight: 750;
  letter-spacing: .01em;
}

.btn-primary,
.bt-btn-primary {
  background: linear-gradient(135deg, #8c6a2e, #c1ab79) !important;
  border-color: rgba(92, 64, 38, .12) !important;
  box-shadow: 0 10px 20px rgba(140, 106, 46, .18);
}

.btn-primary:hover,
.bt-btn-primary:hover {
  filter: brightness(.98);
  transform: translateY(-1px);
}

.btn-secondary,
.bt-btn-secondary {
  background: rgba(92, 64, 38, .07) !important;
  color: #4a3320 !important;
  border-color: rgba(92, 64, 38, .10) !important;
}

.form-control,
.form-select,
.bt-input,
.bt-select,
.bt-textarea,
input,
select,
textarea {
  border-radius: 12px !important;
  border-color: rgba(92, 64, 38, .16) !important;
}

.form-control:focus,
.form-select:focus,
.bt-input:focus,
.bt-select:focus,
.bt-textarea:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: rgba(193, 171, 121, .78) !important;
  box-shadow: 0 0 0 4px rgba(193, 171, 121, .16) !important;
}

/* Badges / statuses */
.badge,
.status-pill,
.admin-badge,
.status-badge {
  border-radius: 999px !important;
  font-weight: 800 !important;
  letter-spacing: .01em;
}

.badge.bg-warning,
.admin-badge.warning,
.status-warning {
  background: rgba(245, 159, 0, .16) !important;
  color: #8a5a00 !important;
}

.badge.bg-success,
.admin-badge.success,
.status-success {
  background: rgba(47, 158, 68, .13) !important;
  color: #247534 !important;
}

.badge.bg-danger,
.status-danger {
  background: rgba(210, 55, 55, .12) !important;
  color: #9b2525 !important;
}

.badge.bg-info,
.admin-badge.info,
.status-info {
  background: rgba(25, 113, 194, .12) !important;
  color: #165a9c !important;
}

/* Loading and empty states */
.empty-state,
.loading-state {
  border: 1px dashed rgba(92, 64, 38, .18);
  background: linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(250, 246, 238, .72));
  border-radius: 18px;
  padding: clamp(24px, 4vw, 44px) !important;
  color: var(--stage13-muted);
  text-align: center;
}

.empty-state::before {
  content: '—';
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: rgba(193, 171, 121, .16);
  color: #8c6a2e;
  line-height: 41px;
  font-weight: 900;
}

/* Toasts */
#toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 28px));
}

.toast {
  border-radius: 16px !important;
  border: 1px solid rgba(92, 64, 38, .12) !important;
  box-shadow: 0 18px 44px rgba(42, 26, 12, .16) !important;
  background: rgba(255, 255, 255, .96) !important;
  backdrop-filter: blur(12px);
  color: #2d1e10 !important;
  padding: 13px 15px !important;
}

.toast.success {
  border-left: 4px solid #2f9e44 !important;
}

.toast.error {
  border-left: 4px solid #c92a2a !important;
}

.toast.warning {
  border-left: 4px solid #f59f00 !important;
}

.toast.info {
  border-left: 4px solid #1971c2 !important;
}

/* Modal polish */
.bt-modal-overlay {
  padding: 16px;
}

.bt-modal {
  border-radius: 22px !important;
  border: 1px solid rgba(255, 255, 255, .55);
}

.bt-modal-header,
.bt-modal-footer {
  background: rgba(250, 246, 238, .7);
}

/* Mobile navigation + layout */
.mobile-nav-backdrop {
  display: none;
}

@media (max-width: 900px) {
  #app {
    position: relative;
  }

  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px !important;
    transform: translateX(-100%);
    transition: transform .24s ease;
    box-shadow: 24px 0 60px rgba(30, 18, 9, .24);
  }

  body.sidebar-open #sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(30, 18, 9, .42);
    z-index: 80;
  }

  #sidebar .nav-label,
  #sidebar .sidebar-logo-text,
  #sidebar .sidebar-role-badge,
  #sidebar .nav-section-title {
    display: block !important;
  }

  #sidebar .nav-item {
    justify-content: flex-start !important;
  }

  #main {
    width: 100%;
  }

  #header {
    padding: 0 14px;
    gap: 10px;
  }

  .header-title {
    font-size: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #content {
    padding: 16px;
  }
}

/* Mobile cards for common tables without changing JS */
@media (max-width: 760px) {

  .stat-grid,
  .stats-grid,
  .admin-summary-grid,
  .hr-summary-grid,
  .itcrm-summary-grid,
  .kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .card-header,
  .admin-card-head,
  .page-header,
  .page-head,
  .admin-page-head,
  .hr-page-head,
  .itcrm-page-head {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }

  .table-responsive {
    overflow: visible !important;
  }

  table.table:not(.keep-table),
  table.data-table:not(.keep-table) {
    min-width: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    background: transparent !important;
  }

  table.table:not(.keep-table) thead,
  table.data-table:not(.keep-table) thead {
    display: none;
  }

  table.table:not(.keep-table),
  table.table:not(.keep-table) tbody,
  table.table:not(.keep-table) tr,
  table.table:not(.keep-table) td,
  table.data-table:not(.keep-table),
  table.data-table:not(.keep-table) tbody,
  table.data-table:not(.keep-table) tr,
  table.data-table:not(.keep-table) td {
    display: block;
    width: 100%;
  }

  table.table:not(.keep-table) tr,
  table.data-table:not(.keep-table) tr {
    background: #fff;
    border: 1px solid rgba(92, 64, 38, .11);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(42, 26, 12, .055);
    margin-bottom: 12px;
    padding: 10px 12px;
    overflow: hidden;
  }

  table.table:not(.keep-table) td,
  table.data-table:not(.keep-table) td {
    border: 0 !important;
    padding: 8px 0 !important;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    text-align: right;
  }

  table.table:not(.keep-table) td::before,
  table.data-table:not(.keep-table) td::before {
    content: attr(data-label);
    min-width: 38%;
    max-width: 48%;
    text-align: left;
    color: var(--stage13-muted);
    font-weight: 850;
  }

  table.table:not(.keep-table) td:not([data-label])::before,
  table.data-table:not(.keep-table) td:not([data-label])::before {
    content: '';
    display: none;
  }

  .btn,
  .bt-btn {
    min-height: 38px;
  }
}

@media (max-width: 520px) {
  #content {
    padding: 12px;
  }

  .stat-card,
  .card-body,
  .admin-card-head,
  .admin-card .card-body {
    padding: 14px !important;
  }

  .header-actions {
    gap: 4px;
  }

  .header-btn {
    padding: 6px 8px;
  }

  #toast-container {
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   Stage 13.2 — Clients / CRM screen refinement
   Scope: layout, readability, responsive behavior only.
   ============================================================ */
.crm-shell {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px clamp(18px, 2vw, 34px) 44px;
}

.crm-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

.crm-hero-copy {
  max-width: 760px;
}

.crm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--brown-500, #8a6b3a);
  margin-bottom: 8px;
}

.crm-hero h2 {
  margin: 0;
  font-size: clamp(28px, 2.4vw, 42px);
  letter-spacing: -.035em;
  color: var(--brown-900, #25170f);
}

.crm-hero p {
  margin: 8px 0 0;
  color: var(--brown-500, #7d6247);
  font-size: 15px;
  line-height: 1.65;
}

.crm-primary-action {
  min-height: 46px;
  padding-inline: 20px !important;
  border-radius: 15px !important;
  box-shadow: 0 14px 28px rgba(143, 104, 35, .18);
  white-space: nowrap;
}

.crm-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.crm-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 18px;
  border: 1px solid rgba(159, 126, 70, .16);
  border-radius: 22px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 14px 34px rgba(55, 34, 13, .055);
  backdrop-filter: blur(10px);
}

.crm-stat-card strong {
  display: block;
  font-size: 27px;
  line-height: 1;
  color: var(--brown-900, #25170f);
}

.crm-stat-card span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brown-500, #7d6247);
}

.crm-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #8a6422;
  background: linear-gradient(135deg, rgba(210, 171, 85, .24), rgba(255, 255, 255, .7));
  flex: 0 0 auto;
}

.crm-stat-card.green .crm-stat-icon {
  color: #26734d;
  background: rgba(38, 115, 77, .10);
}

.crm-stat-card.blue .crm-stat-icon {
  color: #235f8e;
  background: rgba(35, 95, 142, .10);
}

.crm-stat-card.amber .crm-stat-icon {
  color: #9a6a00;
  background: rgba(207, 149, 14, .14);
}

.crm-skeleton {
  opacity: .7;
}

.crm-toolbar-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin-bottom: 18px;
  border-radius: 22px;
  border: 1px solid rgba(159, 126, 70, .14);
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 12px 30px rgba(55, 34, 13, .045);
}

.crm-searchbox {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid rgba(159, 126, 70, .18);
  border-radius: 16px;
  background: #fff;
}

.crm-searchbox i {
  color: var(--gold-600, #a87b24);
}

.crm-searchbox input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--brown-900, #25170f);
}

.crm-select {
  min-height: 46px;
  width: 100%;
  padding: 0 12px;
  border-radius: 16px;
  border: 1px solid rgba(159, 126, 70, .18);
  background: #fff;
  color: var(--brown-800, #3e291c);
  font-weight: 700;
}

.crm-directory-card {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(159, 126, 70, .16);
  box-shadow: 0 18px 44px rgba(55, 34, 13, .07);
}

.crm-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(159, 126, 70, .12);
}

.crm-section-header h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.02em;
  color: var(--brown-900, #25170f);
}

.crm-section-header p {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--brown-500, #7d6247);
}

.crm-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(178, 139, 55, .14);
  color: var(--brown-800, #3e291c);
  font-weight: 900;
}

.clients-table-wrapper {
  overflow-x: auto;
}

.clients-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
}

.clients-table th {
  padding: 16px 18px;
  text-align: left;
  font-size: 12px;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: var(--brown-500, #7d6247);
  background: rgba(248, 242, 231, .92);
}

.clients-table td {
  padding: 18px;
  border-bottom: 1px solid rgba(159, 126, 70, .10);
  vertical-align: middle;
  color: var(--brown-800, #3e291c);
}

.client-row {
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.client-row:hover {
  background: rgba(178, 139, 55, .055);
}

.client-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--brown-500, #7d6247);
  white-space: nowrap;
}

.client-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 240px;
}

.client-identity strong,
.client-card-top strong {
  display: block;
  font-weight: 900;
  color: var(--brown-900, #25170f);
}

.client-identity span,
.client-card-top span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--brown-500, #7d6247);
}

.crm-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.crm-meta i {
  color: var(--gold-600, #a87b24);
}

.crm-stage-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.crm-date {
  color: var(--brown-500, #7d6247);
  white-space: nowrap;
}

.crm-action-cell {
  text-align: right;
}

.crm-row-action {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: rgba(43, 31, 20, .06);
  color: var(--brown-900, #25170f);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}

.crm-row-action:hover {
  transform: translateX(2px);
  background: rgba(178, 139, 55, .18);
}

.clients-mobile-list {
  display: none;
}

.client-mobile-card {
  display: none;
}

.crm-empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--brown-500, #7d6247);
}

.crm-empty-state i {
  font-size: 42px;
  display: block;
  margin-bottom: 14px;
  color: var(--gold-600, #a87b24);
}

.crm-empty-state h3 {
  margin: 0 0 8px;
  color: var(--brown-900, #25170f);
}

@media (max-width: 1180px) {
  .crm-stats-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .crm-toolbar-card {
    grid-template-columns: 1fr 1fr;
  }

  .crm-searchbox {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .crm-shell {
    padding: 18px 14px 30px;
  }

  .crm-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-primary-action {
    width: 100%;
    justify-content: center;
  }

  .crm-stats-grid {
    grid-template-columns: 1fr;
  }

  .crm-toolbar-card {
    grid-template-columns: 1fr;
  }

  .clients-table-wrapper {
    display: none;
  }

  .clients-mobile-list {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .client-mobile-card {
    display: block;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(159, 126, 70, .14);
    background: #fff;
  }

  .client-card-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }

  .client-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--brown-600, #6a4d35);
  }

  .client-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .crm-section-header {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .client-card-meta {
    grid-template-columns: 1fr;
  }
}


/* Stage 13.3 Owner Quick Actions */
.owner-actions-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(250, 244, 232, .86));
  border: 1px solid rgba(174, 132, 54, .18);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 18px 45px rgba(41, 25, 9, .08);
}

.owner-actions-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.owner-actions-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9b742d;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.owner-actions-head h3 {
  margin: 4px 0 3px;
  color: #2b1b0d;
  font-size: 1.25rem;
}

.owner-actions-head p {
  margin: 0;
  color: rgba(43, 27, 13, .66);
}

.owner-actions-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px;
}

.owner-action-card {
  width: 100%;
  min-height: 122px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(174, 132, 54, .17);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, .82);
  color: #2b1b0d;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.owner-action-card:hover {
  transform: translateY(-3px);
  border-color: rgba(174, 132, 54, .38);
  box-shadow: 0 16px 32px rgba(41, 25, 9, .10);
}

.owner-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(174, 132, 54, .13);
  color: #9b742d;
  font-size: 1.1rem;
}

.owner-action-copy strong {
  display: block;
  font-size: .96rem;
  line-height: 1.2;
}

.owner-action-copy small {
  display: block;
  margin-top: 5px;
  color: rgba(43, 27, 13, .62);
  line-height: 1.35;
}

.owner-action-arrow {
  align-self: flex-end;
  opacity: .45;
}

.owner-action-card.danger .owner-action-icon {
  color: #9f2b2b;
  background: rgba(159, 43, 43, .10);
}

.owner-action-card.amber .owner-action-icon {
  color: #b27a00;
  background: rgba(178, 122, 0, .12);
}

.owner-action-card.green .owner-action-icon {
  color: #26734d;
  background: rgba(38, 115, 77, .10);
}

.owner-action-card.blue .owner-action-icon {
  color: #235f8e;
  background: rgba(35, 95, 142, .10);
}

.owner-action-card.dark .owner-action-icon {
  color: #2b1b0d;
  background: rgba(43, 27, 13, .10);
}

@media (max-width: 1400px) {
  .owner-actions-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 800px) {
  .owner-actions-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .owner-actions-grid {
    grid-template-columns: 1fr;
  }

  .owner-action-card {
    min-height: auto;
    flex-direction: row;
    align-items: center;
  }

  .owner-action-arrow {
    align-self: center;
    margin-left: auto;
  }
}

/* ============================================================
   Stage 1 — Global SaaS Login Screen Refinement
   Scope: frontend/index.html auth screen only.
   ============================================================ */
#login-screen.auth-shell {
  position: fixed;
  inset: 0;
  min-height: 100svh;
  padding: clamp(18px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 18%, rgba(193, 171, 121, .28), transparent 32%),
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, .15), transparent 28%),
    linear-gradient(135deg, #170d07 0%, #2a190e 42%, #5b421f 100%);
  isolation: isolate;
}

#login-screen.auth-shell::before,
#login-screen.auth-shell::after {
  content: '';
  position: absolute;
  inset: auto;
  pointer-events: none;
  z-index: -1;
}

#login-screen.auth-shell::before {
  width: 520px;
  height: 520px;
  left: -160px;
  bottom: -220px;
  border-radius: 50%;
  background: rgba(193, 171, 121, .18);
  filter: blur(14px);
}

#login-screen.auth-shell::after {
  width: 760px;
  height: 760px;
  right: -300px;
  top: -330px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .035);
}

.auth-panel {
  width: min(1120px, 100%);
  min-height: min(720px, calc(100svh - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, .78fr);
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 32px;
  background: rgba(255, 255, 255, .09);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .34);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.auth-brand-side {
  position: relative;
  padding: clamp(30px, 5vw, 64px);
  color: #fffaf1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .025)),
    radial-gradient(circle at 78% 72%, rgba(193, 171, 121, .28), transparent 34%);
}

.auth-brand-side::after {
  content: '';
  position: absolute;
  width: 340px;
  height: 340px;
  right: -110px;
  bottom: -120px;
  border-radius: 44px;
  transform: rotate(24deg);
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .045);
}

.auth-brand-topline {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 9px 14px 9px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #c1ab79);
  color: #211207;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
}

.auth-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 610px;
}

.auth-eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  color: #f2d897;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.auth-hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 900;
}

.auth-hero-copy p {
  max-width: 560px;
  color: rgba(255, 250, 241, .76);
  font-size: 15px;
  line-height: 1.85;
}

.auth-feature-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 560px;
}

.auth-feature-card {
  min-height: 82px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .115);
  border: 1px solid rgba(255, 255, 255, .16);
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 250, 241, .9);
  font-weight: 800;
}

.auth-feature-card i {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, .16);
  color: #f2d897;
  font-size: 19px;
}

.login-card.auth-card {
  width: 100%;
  max-width: none;
  min-height: 100%;
  border-radius: 0;
  padding: clamp(24px, 4vw, 46px);
  background: rgba(255, 255, 255, .96);
  box-shadow: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card-header {
  text-align: left;
  margin-bottom: 24px;
}

.auth-card .login-logo {
  font-family: var(--font-body);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.025em;
  color: #1f1208;
}

.auth-card .login-tagline {
  margin: 10px 0 0;
  color: #8c6a2e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
  padding: 6px;
  border-radius: 18px;
  background: #f5efe6;
  border: 1px solid rgba(92, 64, 38, .10);
}

.auth-tab-btn {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px !important;
}

.auth-form-wrap {
  animation: authFade .22s ease both;
}

@keyframes authFade {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card .login-subtitle {
  margin: 0 0 22px;
  color: #6e5035;
  font-size: 14px;
  font-weight: 650;
}

.auth-field {
  margin-bottom: 15px;
  text-align: left;
}

.auth-field .form-label {
  color: #4c3320;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 7px;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #9e8959;
  font-size: 15px;
  z-index: 1;
}

.auth-input-wrap .form-control {
  min-height: 48px;
  padding-left: 44px !important;
  background: #fffdf9;
  color: #24150b;
  font-size: 14px;
}

.auth-message {
  min-height: 18px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.auth-message-error {
  color: #a32d2d;
}

.auth-message-success {
  color: #2f7d32;
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  justify-content: center;
  padding: 12px 18px !important;
  font-size: 14px;
  box-shadow: 0 16px 30px rgba(140, 106, 46, .24) !important;
}

.auth-live-note {
  margin-top: 16px;
  padding: 15px;
  border-radius: 18px;
  background: linear-gradient(135deg, #faf6ee, #fffdf9);
  border: 1px solid rgba(92, 64, 38, .10);
  color: #6e5035;
}

.auth-live-note div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: #8c6a2e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-live-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
}

.auth-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(92, 64, 38, .10);
  color: #7b6148;
  text-align: center;
  font-size: 12px;
  letter-spacing: .02em;
}

.auth-footer strong {
  color: #2a190e;
}

.auth-orb {
  position: absolute;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #f2d897;
  font-size: 23px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .18);
  backdrop-filter: blur(14px);
  animation: authFloat 7s ease-in-out infinite;
}

.auth-orb-one {
  left: 4%;
  top: 12%;
  animation-delay: -.7s;
}

.auth-orb-two {
  right: 5%;
  top: 18%;
  animation-delay: -1.9s;
}

.auth-orb-three {
  left: 8%;
  bottom: 13%;
  animation-delay: -3.2s;
}

.auth-orb-four {
  right: 9%;
  bottom: 14%;
  animation-delay: -4.4s;
}

.auth-orb-five {
  left: 48%;
  top: 5%;
  animation-delay: -5.1s;
}

.auth-orb-six {
  left: 43%;
  bottom: 5%;
  animation-delay: -2.5s;
}

@keyframes authFloat {

  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  50% {
    transform: translate3d(0, -18px, 0) rotate(5deg);
  }
}

@media (max-width: 1100px) {
  .auth-panel {
    grid-template-columns: 1fr;
    min-height: auto;
    max-width: 680px;
  }

  .auth-brand-side {
    min-height: 360px;
  }

  .login-card.auth-card {
    border-radius: 0;
  }

  .auth-orb-five,
  .auth-orb-six {
    display: none;
  }
}

@media (max-width: 680px) {
  #login-screen.auth-shell {
    align-items: flex-start;
    padding: 12px;
  }

  .auth-panel {
    border-radius: 24px;
  }

  .auth-brand-side {
    padding: 26px;
    min-height: auto;
  }

  .auth-hero-copy h1 {
    font-size: 34px;
  }

  .auth-hero-copy p {
    font-size: 13px;
    line-height: 1.7;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
  }

  .auth-feature-card {
    min-height: 64px;
    padding: 12px;
  }

  .login-card.auth-card {
    padding: 24px 18px;
  }

  .auth-tabs {
    grid-template-columns: 1fr;
  }

  .auth-orb {
    display: none;
  }
}

@media (max-width: 420px) {
  .auth-brand-topline {
    width: 100%;
    font-size: 11px;
  }

  .auth-hero-copy h1 {
    font-size: 30px;
  }

  .auth-card .login-logo {
    font-size: 28px;
  }

  .auth-input-wrap .form-control {
    min-height: 46px;
  }
}

/* ============================================================
   Stage 2 — Owner / Executive Dashboard UI
   Scope: visual enhancement only for Company Owner screen.
   ============================================================ */
.executive-owner-page {
  max-width: 100%;
}

.owner-command-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  min-height: 164px;
  margin-bottom: 22px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(158, 137, 89, .18);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 8%, rgba(193, 171, 121, .24), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(250, 246, 238, .86));
  box-shadow: 0 20px 55px rgba(42, 26, 12, .09);
}

.owner-command-hero::before {
  content: '';
  position: absolute;
  inset: auto -90px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(193, 171, 121, .14);
  pointer-events: none;
}

.owner-command-hero::after {
  content: '';
  position: absolute;
  inset: -80px auto auto 42%;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(158, 137, 89, .16);
  border-radius: 42px;
  transform: rotate(22deg);
  pointer-events: none;
}

.owner-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.owner-hero-copy .eyebrow,
.executive-owner-page .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #9b742d;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.owner-hero-copy h2 {
  margin: 6px 0 5px;
  color: #2b1b0d;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
}

.owner-hero-copy p {
  max-width: 660px;
  margin: 0;
  color: rgba(43, 27, 13, .68);
  font-size: .98rem;
}

.owner-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.owner-hero-orbit {
  position: absolute;
  right: 210px;
  top: 22px;
  width: 120px;
  height: 120px;
  pointer-events: none;
  opacity: .95;
}

.owner-hero-orbit span {
  position: absolute;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(158, 137, 89, .20);
  color: #9b742d;
  box-shadow: 0 12px 25px rgba(42, 26, 12, .08);
  animation: ownerFloat 5.5s ease-in-out infinite;
}

.owner-hero-orbit span:nth-child(1) {
  left: 0;
  top: 42px;
  animation-delay: 0s;
}

.owner-hero-orbit span:nth-child(2) {
  right: 4px;
  top: 0;
  animation-delay: .8s;
}

.owner-hero-orbit span:nth-child(3) {
  right: 12px;
  bottom: 0;
  animation-delay: 1.6s;
}

@keyframes ownerFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

.executive-owner-page .owner-kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 16px !important;
  margin-bottom: 22px;
}

.executive-owner-page .owner-kpi-card {
  float: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 142px;
  padding: 20px 22px;
  border-radius: 24px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(255, 252, 246, .90)) !important;
}

.executive-owner-page .owner-kpi-card .stat-icon {
  float: none;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(158, 137, 89, .13);
  color: #9b742d;
}

.executive-owner-page .owner-kpi-card.green .stat-icon {
  color: #26734d;
  background: rgba(38, 115, 77, .10);
}

.executive-owner-page .owner-kpi-card.blue .stat-icon {
  color: #235f8e;
  background: rgba(35, 95, 142, .10);
}

.executive-owner-page .owner-kpi-card.amber .stat-icon {
  color: #b27a00;
  background: rgba(178, 122, 0, .12);
}

.executive-owner-page .owner-kpi-card.danger .stat-icon {
  color: #9f2b2b;
  background: rgba(159, 43, 43, .10);
}

.executive-owner-page .owner-kpi-card .stat-value {
  font-size: clamp(1.75rem, 2.2vw, 2.45rem);
  line-height: 1.05;
}

.executive-owner-page .owner-kpi-card .stat-change {
  margin-top: 8px;
  color: rgba(43, 27, 13, .62);
  font-size: .9rem;
}

.executive-owner-page .owner-actions-panel {
  margin-bottom: 22px;
}

.executive-owner-page .owner-actions-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.executive-owner-page .owner-action-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
}

.executive-owner-page .owner-action-card::after {
  content: '';
  position: absolute;
  right: -26px;
  top: -26px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(158, 137, 89, .08);
}

.owner-action-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.owner-action-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(250, 246, 238, .86);
  color: rgba(43, 27, 13, .68);
  border: 1px solid rgba(158, 137, 89, .16);
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.executive-owner-page .owner-action-copy,
.executive-owner-page .owner-action-arrow {
  position: relative;
  z-index: 1;
}

.executive-owner-page .grid-2 {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(420px, 1.15fr);
  gap: 18px;
}

.executive-owner-page .panel-card {
  overflow: hidden;
}

.executive-owner-page .panel-header {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(92, 64, 38, .10);
  background: linear-gradient(135deg, rgba(250, 246, 238, .86), rgba(255, 255, 255, .78));
}

.executive-owner-page .panel-header h3 {
  margin: 0;
  color: #2b1b0d;
  font-size: 1.05rem;
}

.executive-owner-page .panel-body {
  padding: 16px 18px;
}

.executive-owner-page .list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(92, 64, 38, .08);
}

.executive-owner-page .list-row:last-child {
  border-bottom: 0;
}

.executive-owner-page .muted {
  color: rgba(43, 27, 13, .58);
}

.executive-owner-page .mt-4 {
  margin-top: 22px;
}

@media (max-width: 1400px) {

  .executive-owner-page .owner-kpi-grid,
  .executive-owner-page .owner-actions-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .owner-hero-orbit {
    right: 170px;
    opacity: .7;
  }
}

@media (max-width: 992px) {
  .owner-command-hero {
    grid-template-columns: 1fr;
  }

  .owner-hero-actions {
    justify-content: flex-start;
  }

  .owner-hero-orbit {
    right: 20px;
    top: 18px;
    opacity: .35;
  }

  .executive-owner-page .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .owner-command-hero {
    padding: 20px;
    border-radius: 22px;
  }

  .owner-hero-actions,
  .owner-hero-actions .btn,
  .owner-actions-refresh {
    width: 100%;
  }

  .executive-owner-page .owner-kpi-grid,
  .executive-owner-page .owner-actions-grid {
    grid-template-columns: 1fr;
  }

  .executive-owner-page .owner-kpi-card {
    min-height: 118px;
  }

  .executive-owner-page .owner-action-card {
    min-height: auto;
  }

  .executive-owner-page .data-table {
    min-width: 760px;
  }
}

/* Stage 4 — HR Management Workspace */
.hr-page {
  max-width: 100%;
}

.hr-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 30px;
  border: 1px solid rgba(158, 137, 89, .18);
  background: radial-gradient(circle at 92% 10%, rgba(193, 171, 121, .26), transparent 18rem), linear-gradient(135deg, rgba(255, 255, 255, .97), rgba(250, 246, 238, .88));
  box-shadow: 0 20px 55px rgba(42, 26, 12, .08);
}

.hr-hero h2 {
  margin: 6px 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 3.35rem);
  line-height: 1;
  color: #2b1b0d;
}

.hr-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(43, 27, 13, .65);
}

.hr-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
}

.hr-floating-icons {
  position: absolute;
  right: 38%;
  top: 18px;
  width: 140px;
  height: 120px;
  pointer-events: none;
  opacity: .75;
}

.hr-floating-icons i {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(158, 137, 89, .18);
  color: #9b742d;
  box-shadow: 0 12px 25px rgba(42, 26, 12, .08);
  animation: hrFloat 5.5s ease-in-out infinite;
}

.hr-floating-icons i:nth-child(1) {
  left: 0;
  top: 35px
}

.hr-floating-icons i:nth-child(2) {
  right: 12px;
  top: 0;
  animation-delay: .7s
}

.hr-floating-icons i:nth-child(3) {
  right: 0;
  bottom: 0;
  animation-delay: 1.4s
}

@keyframes hrFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0)
  }

  50% {
    transform: translateY(-10px) rotate(5deg)
  }
}

.hr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.hr-kpi-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-height: 132px;
  padding: 19px;
  border: 1px solid rgba(158, 137, 89, .15);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(255, 252, 246, .9));
  box-shadow: 0 12px 32px rgba(42, 26, 12, .06);
}

.hr-kpi-card span {
  display: block;
  color: rgba(43, 27, 13, .58);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hr-kpi-card strong {
  display: block;
  margin-top: 10px;
  color: #2b1b0d;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.2vw, 2.4rem);
  line-height: 1;
}

.hr-kpi-card small {
  display: block;
  margin-top: 9px;
  color: rgba(43, 27, 13, .58);
}

.hr-kpi-card>i {
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #9b742d;
  background: rgba(158, 137, 89, .12);
  font-size: 1.25rem;
}

.hr-kpi-card.green>i {
  color: #26734d;
  background: rgba(38, 115, 77, .10);
}

.hr-kpi-card.blue>i {
  color: #235f8e;
  background: rgba(35, 95, 142, .10);
}

.hr-kpi-card.amber>i {
  color: #b27a00;
  background: rgba(178, 122, 0, .12);
}

.hr-kpi-card.danger>i {
  color: #9f2b2b;
  background: rgba(159, 43, 43, .10);
}

.hr-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 180px;
  gap: 12px;
  margin-bottom: 18px;
}

.hr-search {
  position: relative;
}

.hr-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(43, 27, 13, .48);
}

.hr-search input,
.hr-toolbar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(158, 137, 89, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  color: #2b1b0d;
  outline: none;
  padding: 0 14px;
}

.hr-search input {
  padding-left: 42px;
}

.hr-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(340px, .8fr);
  gap: 18px;
  align-items: start;
}

.hr-panel {
  overflow: hidden;
  border: 1px solid rgba(158, 137, 89, .14);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 35px rgba(42, 26, 12, .06);
}

.hr-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(92, 64, 38, .09);
  background: linear-gradient(135deg, rgba(250, 246, 238, .86), rgba(255, 255, 255, .78));
}

.hr-panel-head h3 {
  margin: 0;
  color: #2b1b0d;
  font-size: 1.05rem;
}

.hr-panel-head p {
  margin: 4px 0 0;
  color: rgba(43, 27, 13, .56);
}

.hr-table {
  min-width: 1000px;
}

.hr-table th {
  white-space: nowrap;
}

.hr-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hr-person span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8edd1, #fffaf0);
  color: #6b4a1c;
  font-weight: 900;
}

.hr-person b {
  display: block;
}

.hr-person small {
  color: rgba(43, 27, 13, .56);
}

.hr-pill,
.hr-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 850;
  border: 1px solid rgba(158, 137, 89, .16);
  background: rgba(250, 246, 238, .8);
  color: rgba(43, 27, 13, .7);
  white-space: nowrap;
}

.hr-status.excellent {
  color: #26734d;
  background: rgba(38, 115, 77, .10);
}

.hr-status.good {
  color: #235f8e;
  background: rgba(35, 95, 142, .10);
}

.hr-status.watch {
  color: #b27a00;
  background: rgba(178, 122, 0, .12);
}

.hr-status.risk {
  color: #9f2b2b;
  background: rgba(159, 43, 43, .10);
}

.hr-score {
  display: grid;
  gap: 6px;
  min-width: 110px;
}

.hr-score b {
  color: #2b1b0d;
}

.hr-score span {
  overflow: hidden;
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgba(158, 137, 89, .13);
}

.hr-score em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b7944e, #ead7a5);
}

.hr-side-stack {
  display: grid;
  gap: 18px;
}

.hr-dept-list,
.hr-flags {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.hr-dept-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(158, 137, 89, .14);
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(250, 246, 238, .72));
}

.hr-dept-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.hr-dept-head span {
  color: rgba(43, 27, 13, .55);
  font-size: .78rem;
  font-weight: 800;
}

.hr-dept-score {
  margin: 12px 0;
  font-family: var(--font-display);
  font-size: 2rem;
  color: #2b1b0d;
}

.hr-dept-score small {
  font-size: .85rem;
  color: rgba(43, 27, 13, .45);
}

.hr-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hr-mini-grid span {
  padding: 8px;
  border-radius: 12px;
  background: rgba(250, 246, 238, .72);
  color: rgba(43, 27, 13, .55);
  font-size: .72rem;
}

.hr-mini-grid b {
  display: block;
  color: #2b1b0d;
}

.hr-flag-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(158, 137, 89, .13);
  background: rgba(255, 252, 246, .75);
}

.hr-flag-item i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  color: #9f2b2b;
  background: rgba(159, 43, 43, .08);
}

.hr-flag-item strong,
.hr-flag-item small {
  display: block;
}

.hr-flag-item small,
.hr-flag-item span {
  color: rgba(43, 27, 13, .55);
}

.hr-loading,
.hr-error {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: 34px;
  border-radius: 28px;
  border: 1px solid rgba(158, 137, 89, .14);
  background: rgba(255, 255, 255, .88);
}

.hr-loading i {
  font-size: 2rem;
  color: #9b742d;
  animation: spin 1.1s linear infinite;
}

.hr-error i {
  font-size: 2.2rem;
  color: #9f2b2b;
}

@media (max-width: 1400px) {
  .hr-kpi-grid {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
  }

  .hr-main-grid {
    grid-template-columns: 1fr
  }

  .hr-floating-icons {
    right: 220px;
    opacity: .4
  }
}

@media (max-width: 800px) {
  .hr-hero {
    grid-template-columns: 1fr;
    border-radius: 22px
  }

  .hr-hero-actions,
  .hr-hero-actions .btn {
    width: 100%
  }

  .hr-kpi-grid,
  .hr-toolbar {
    grid-template-columns: 1fr
  }

  .hr-floating-icons {
    right: 20px;
    opacity: .25
  }

  .hr-mini-grid {
    grid-template-columns: 1fr
  }

  .hr-flag-item {
    grid-template-columns: 36px 1fr
  }

  .hr-flag-item span {
    grid-column: 2
  }
}

/* ============================================================
   Stage 5 — Department-aware Dashboard UI
   Safe frontend-only enhancement. Does not change API/business logic.
   ============================================================ */
.dept-dashboard-shell {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 24px 28px 36px;
  background: linear-gradient(135deg, #fbf7ef 0%, #f7efe2 48%, #fffaf3 100%);
  min-height: calc(100vh - 76px)
}

.dept-dashboard-loading {
  min-height: 320px
}

.dept-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(150, 105, 38, .12);
  border-radius: 26px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 55px rgba(50, 28, 12, .08);
  backdrop-filter: blur(16px);
  margin-bottom: 20px
}

.dept-hero:before {
  content: "";
  position: absolute;
  right: -80px;
  top: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 154, 74, .20), rgba(198, 154, 74, 0) 68%)
}

.dept-hero:after {
  content: "";
  position: absolute;
  left: 38%;
  bottom: -120px;
  width: 280px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66, 123, 180, .12), rgba(66, 123, 180, 0) 70%)
}

.dept-hero-copy {
  position: relative;
  z-index: 1
}

.dept-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff6e5;
  border: 1px solid rgba(190, 145, 65, .18);
  color: #8a672a;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: uppercase
}

.dept-hero h2 {
  font-size: 28px;
  line-height: 1.12;
  margin: 12px 0 8px;
  color: #231206;
  letter-spacing: -.03em
}

.dept-hero p {
  max-width: 720px;
  margin: 0;
  color: #725b45;
  font-size: 14px
}

.dept-hero .btn {
  position: relative;
  z-index: 2;
  white-space: nowrap
}

.dept-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px
}

.dept-kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(150, 105, 38, .12);
  box-shadow: 0 15px 38px rgba(45, 25, 10, .07);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  transition: transform .18s ease, box-shadow .18s ease
}

.dept-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 55px rgba(45, 25, 10, .10)
}

.dept-kpi-card:after {
  content: "";
  position: absolute;
  right: -42px;
  top: -46px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: #f8f2e8
}

.dept-kpi-card span {
  display: block;
  color: #806244;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em
}

.dept-kpi-card strong {
  display: block;
  margin-top: 12px;
  color: #1f1208;
  font-size: 30px;
  line-height: 1;
  font-family: Georgia, serif;
  font-weight: 500
}

.dept-kpi-card small {
  display: block;
  margin-top: 10px;
  color: #8b7a66;
  font-size: 12px
}

.dept-kpi-card>i {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: #f5ecdc;
  color: #9a742d
}

.dept-tone-red>i {
  background: #fff0ee;
  color: #d86455
}

.dept-tone-blue>i {
  background: #eef7ff;
  color: #2b7bb9
}

.dept-tone-green>i {
  background: #edf9f3;
  color: #329665
}

.dept-tone-amber>i {
  background: #fff5dd;
  color: #b58120
}

.dept-tone-gold>i {
  background: #f6ecd5;
  color: #9a742d
}

.dept-actions-card,
.dept-panel {
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(150, 105, 38, .12);
  border-radius: 24px;
  box-shadow: 0 15px 42px rgba(45, 25, 10, .07);
  overflow: hidden
}

.dept-actions-card {
  padding: 20px;
  margin-bottom: 20px
}

.dept-section-title,
.dept-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px
}

.dept-section-title span,
.dept-panel-head span {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #a17937
}

.dept-section-title h3,
.dept-panel-head h3 {
  margin: 3px 0 0;
  color: #251407;
  font-size: 18px
}

.dept-section-title small {
  color: #8b7a66
}

.dept-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px
}

.dept-action-tile {
  position: relative;
  text-align: left;
  border: 1px solid rgba(150, 105, 38, .12);
  background: linear-gradient(145deg, #fff, #fffaf2);
  border-radius: 18px;
  padding: 16px 42px 16px 16px;
  min-height: 112px;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease
}

.dept-action-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(188, 146, 64, .45);
  box-shadow: 0 14px 32px rgba(45, 25, 10, .08)
}

.dept-action-tile>i:first-child {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f7eddc;
  color: #9d742c;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  font-size: 17px
}

.dept-action-tile strong {
  display: block;
  color: #241308;
  font-size: 14px
}

.dept-action-tile span {
  display: block;
  margin-top: 5px;
  color: #8b7a66;
  font-size: 12px;
  line-height: 1.35
}

.dept-action-tile em {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #b18438;
  font-size: 22px
}

.dept-content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  align-items: start
}

.dept-panel {
  min-height: 240px
}

.dept-panel-large {
  grid-row: span 2
}

.dept-panel-head {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(150, 105, 38, .12);
  background: linear-gradient(180deg, #fffaf2, #fff)
}

.dept-pipeline-list {
  padding: 16px 18px
}

.dept-pipeline-row {
  margin-bottom: 14px
}

.dept-pipeline-row div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: #372011
}

.dept-pipeline-row span {
  font-weight: 800;
  color: #866536
}

.dept-progress {
  height: 8px;
  border-radius: 999px;
  background: #efe6d7;
  overflow: hidden
}

.dept-progress i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c99b44, #4b9f72);
  min-width: 4px
}

.dept-list {
  padding: 10px
}

.dept-list-item {
  width: 100%;
  display: block;
  text-align: left;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid rgba(150, 105, 38, .10);
  background: transparent;
  cursor: pointer;
  border-radius: 14px;
  transition: background .15s ease
}

.dept-list-item:hover {
  background: #fff7e8
}

.dept-list-item strong {
  display: block;
  color: #2b1709;
  font-size: 13px
}

.dept-list-item span {
  display: block;
  margin-top: 4px;
  color: #8a7965;
  font-size: 11px
}

.dept-empty {
  padding: 22px;
  text-align: center;
  color: #8c7b68;
  font-size: 13px
}

.dept-owner .dept-kicker {
  background: #fff2d4
}

.dept-finance .dept-kicker {
  background: #f0fbf6;
  color: #31714f
}

.dept-sales .dept-kicker {
  background: #eff7ff;
  color: #2d6f9f
}

.dept-inventory .dept-kicker {
  background: #fff3ed;
  color: #9b5a2f
}

.dept-delivery .dept-kicker {
  background: #eef7ff;
  color: #316c9b
}

.dept-hr .dept-kicker {
  background: #f3efff;
  color: #6548a8
}

@media (max-width:1400px) {
  .dept-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .dept-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .dept-content-grid {
    grid-template-columns: 1fr
  }
}

@media (max-width:768px) {
  .dept-dashboard-shell {
    padding: 16px 14px 28px
  }

  .dept-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
    border-radius: 22px
  }

  .dept-hero h2 {
    font-size: 23px
  }

  .dept-kpi-grid,
  .dept-actions-grid {
    grid-template-columns: 1fr
  }

  .dept-kpi-card {
    min-height: 128px
  }

  .dept-kpi-card strong {
    font-size: 26px
  }

  .dept-section-title,
  .dept-panel-head {
    align-items: flex-start;
    flex-direction: column
  }

  .dept-panel-large {
    grid-row: auto
  }
}

/* ============================================================
   Stage 14 — Delivery Road Map / Browser GPS Tracking
   ============================================================ */
.delivery-hero-live .section-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--gold-700, #a88435);
  font-weight: 800;
}

.delivery-command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  margin: 0 0 18px;
}

.delivery-stat {
  min-height: 126px;
  position: relative;
  overflow: hidden;
}

.delivery-stat .stat-icon {
  float: right;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(168, 132, 53, .12);
}

.delivery-stat .stat-icon.green {
  background: rgba(31, 134, 89, .12);
  color: #1f8659;
}

.delivery-stat .stat-icon.red {
  background: rgba(190, 54, 54, .12);
  color: #be3636;
}

.delivery-stat .stat-icon.blue {
  background: rgba(58, 132, 191, .12);
  color: #3a84bf;
}

.delivery-live-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  margin: 0 0 18px;
  border: 1px solid rgba(168, 132, 53, .16);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(250, 246, 237, .82));
  box-shadow: 0 18px 42px rgba(45, 27, 12, .08);
}

.delivery-map-modal {
  width: min(1120px, 94vw) !important;
  max-width: 1120px !important;
}

.delivery-map-body {
  padding: 16px !important;
}

.delivery-map-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.delivery-track-state {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(168, 132, 53, .10);
  color: var(--brown-600, #735433);
  font-size: 12px;
  font-weight: 700;
}

.delivery-live-map {
  width: 100%;
  min-height: 520px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(168, 132, 53, .20);
  background: #f4efe5;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
}

.delivery-map-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(31, 134, 89, .08);
  color: #2d674c;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.delivery-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-soft {
  background: rgba(168, 132, 53, .10);
  color: var(--brown-500, #7b5b37);
  border: 1px solid rgba(168, 132, 53, .16);
}

@media (max-width: 1100px) {
  .delivery-command-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .delivery-live-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .delivery-command-grid {
    grid-template-columns: 1fr;
  }

  .delivery-live-map {
    min-height: 420px;
  }

  .delivery-map-toolbar .btn {
    width: 100%;
    justify-content: center;
  }

  .delivery-track-state {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   STAGE 16 — SMART RECEPTION WORKSPACE
   Safe UI-only layer for Reception screen
   ============================================================ */
.rec-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 30px 32px;
  margin-bottom: 20px;
  border: 1px solid rgba(158, 137, 89, .16);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(253, 247, 236, .88));
  box-shadow: 0 22px 60px rgba(45, 25, 10, .08)
}

.rec-hero:before {
  content: "";
  position: absolute;
  right: -86px;
  top: -96px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 171, 121, .32), rgba(193, 171, 121, 0) 68%)
}

.rec-hero:after {
  content: "";
  position: absolute;
  left: 42%;
  bottom: -100px;
  width: 320px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 90, 45, .10), rgba(120, 90, 45, 0) 70%)
}

.rec-hero-copy,
.rec-hero-actions {
  position: relative;
  z-index: 1
}

.rec-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end
}

.rec-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff4db;
  border: 1px solid rgba(158, 137, 89, .18);
  color: #8d6728;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase
}

.rec-hero h2 {
  margin: 12px 0 8px;
  color: #271609;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -.03em
}

.rec-hero p {
  max-width: 780px;
  margin: 0;
  color: #725b45;
  font-size: 14px
}

.rec-loading {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #8a765d
}

.rec-loading i {
  font-size: 32px;
  margin-bottom: 10px;
  color: #a98542
}

.rec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px
}

.rec-kpi {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 138px;
  padding: 21px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(158, 137, 89, .14);
  box-shadow: 0 16px 44px rgba(45, 25, 10, .07);
  transition: transform .18s ease, box-shadow .18s ease
}

.rec-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 56px rgba(45, 25, 10, .11)
}

.rec-kpi:after {
  content: "";
  position: absolute;
  right: -42px;
  top: -46px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: #f8f2e8
}

.rec-kpi span {
  display: block;
  color: #806244;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em
}

.rec-kpi strong {
  display: block;
  margin-top: 12px;
  color: #231407;
  font-size: 31px;
  line-height: 1;
  font-family: var(--font-display);
  font-weight: 700
}

.rec-kpi small {
  display: block;
  margin-top: 9px;
  color: #8b7a66;
  font-size: 12px
}

.rec-kpi>i {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 21px;
  background: #f6eddd;
  color: #9a742d
}

.rec-green>i {
  background: #ecfbf2;
  color: #2f9d63
}

.rec-blue>i {
  background: #edf7ff;
  color: #2d7ab7
}

.rec-gold>i {
  background: #fff4dd;
  color: #a6782e
}

.rec-red>i {
  background: #fff0ee;
  color: #d35d52
}

.rec-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 18px;
  align-items: start
}

.rec-panel {
  background: rgba(255, 255, 255, .90);
  border: 1px solid rgba(158, 137, 89, .14);
  border-radius: 25px;
  box-shadow: 0 18px 52px rgba(45, 25, 10, .075);
  overflow: hidden
}

.rec-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(158, 137, 89, .12);
  background: linear-gradient(180deg, #fffaf2, #fff)
}

.rec-section-label {
  display: block;
  color: #a17937;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase
}

.rec-toolbar h3,
.rec-side-head h3 {
  margin: 4px 0 0;
  color: #251407;
  font-size: 20px
}

.rec-toolbar p {
  margin: 4px 0 0;
  color: #8a765d;
  font-size: 12px
}

.rec-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end
}

.rec-search {
  height: 42px;
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid rgba(158, 137, 89, .18);
  background: #fff;
  border-radius: 15px;
  color: #92784f
}

.rec-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font: inherit;
  color: #2c1a0d
}

.rec-tools select {
  height: 42px;
  border: 1px solid rgba(158, 137, 89, .18);
  background: #fff;
  border-radius: 15px;
  padding: 0 14px;
  color: #2c1a0d;
  font: inherit
}

.rec-table-wrap {
  overflow: auto
}

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

.rec-table th {
  padding: 13px 16px;
  text-align: left;
  background: #f7f1e8;
  color: #7d6040;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap
}

.rec-table td {
  padding: 15px 16px;
  border-top: 1px solid rgba(158, 137, 89, .10);
  vertical-align: middle;
  color: #372315
}

.rec-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px
}

.rec-person>b,
.rec-inside-card>b {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff8e8, #efe2c5);
  color: #503719;
  font-weight: 900
}

.rec-person strong {
  display: block;
  color: #251407
}

.rec-person span {
  display: block;
  margin-top: 2px;
  color: #947b5c;
  font-size: 12px
}

.rec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap
}

.rec-badge-green {
  background: #e9f9ef;
  color: #2d8c59
}

.rec-badge-gold {
  background: #fff3d9;
  color: #9a6d22
}

.rec-badge-red {
  background: #fff0ee;
  color: #c95148
}

.rec-badge-gray {
  background: #f1ece4;
  color: #765f49
}

.rec-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end
}

.rec-side {
  position: sticky;
  top: 86px
}

.rec-side-head {
  padding: 20px 20px 14px;
  border-bottom: 1px solid rgba(158, 137, 89, .12);
  background: linear-gradient(180deg, #fffaf2, #fff)
}

.rec-inside-list {
  padding: 12px
}

.rec-inside-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease
}

.rec-inside-card:hover {
  background: #fff6e6;
  transform: translateY(-1px)
}

.rec-inside-card span {
  min-width: 0;
  flex: 1
}

.rec-inside-card strong {
  display: block;
  color: #271609;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.rec-inside-card small {
  display: block;
  color: #8a765d;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.rec-inside-card i {
  color: #b3873d
}

.rec-empty {
  text-align: center;
  padding: 54px 20px;
  color: #8a765d
}

.rec-empty i {
  font-size: 42px;
  color: #a98542;
  opacity: .8
}

.rec-empty h3 {
  margin: 10px 0 4px;
  color: #2c1a0d;
  font-size: 17px
}

.rec-empty p {
  margin: 0;
  color: #927b61
}

.rec-empty-small {
  padding: 34px 18px
}

.rec-empty-side {
  padding: 38px 16px
}

.rec-pass {
  text-align: center;
  padding: 10px 8px 0
}

.rec-pass-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px
}

.rec-pass-top b {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f7ecd5;
  color: #2b190c;
  font-family: var(--font-display);
  font-size: 20px
}

.rec-pass-top span {
  font-weight: 900;
  letter-spacing: .05em;
  color: #2b190c
}

.rec-pass h2 {
  margin: 8px 0 2px;
  color: #241408;
  font-size: 25px
}

.rec-pass p {
  margin: 0 0 15px;
  color: #856d51
}

.rec-pass strong {
  display: block;
  margin: 12px 0 4px;
  color: #8a6628;
  letter-spacing: .12em
}

.rec-pass small {
  display: block;
  margin-bottom: 15px;
  color: #8a765d
}

.rec-pass-qr {
  width: 154px;
  height: 154px;
  margin: 0 auto;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 3px;
  background: #fff;
  border: 1px solid rgba(158, 137, 89, .18);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(45, 25, 10, .08)
}

.rec-pass-qr i {
  display: block;
  border-radius: 3px;
  background: #f2eadc
}

.rec-pass-qr i.on {
  background: #2b190c
}

@media (max-width:1200px) {
  .rec-workspace-grid {
    grid-template-columns: 1fr
  }

  .rec-side {
    position: static
  }

  .rec-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .rec-toolbar {
    flex-direction: column
  }

  .rec-tools,
  .rec-search {
    width: 100%;
    min-width: 0
  }

  .rec-tools select {
    flex: 1
  }
}

@media (max-width:760px) {
  .rec-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 20px;
    border-radius: 22px
  }

  .rec-hero h2 {
    font-size: 25px
  }

  .rec-hero-actions {
    width: 100%;
    justify-content: stretch
  }

  .rec-hero-actions .btn {
    flex: 1
  }

  .rec-kpi-grid {
    grid-template-columns: 1fr
  }

  .rec-toolbar {
    padding: 18px 16px
  }

  .rec-tools {
    display: grid;
    grid-template-columns: 1fr
  }

  .rec-table thead {
    display: none
  }

  .rec-table,
  .rec-table tbody,
  .rec-table tr,
  .rec-table td {
    display: block;
    width: 100%
  }

  .rec-table tr {
    padding: 12px;
    border-top: 1px solid rgba(158, 137, 89, .12)
  }

  .rec-table td {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 4px;
    border: 0
  }

  .rec-table td:before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    color: #8d6e48
  }

  .rec-table td:first-child {
    display: block
  }

  .rec-table td:first-child:before {
    display: none
  }

  .rec-actions {
    justify-content: flex-start
  }

  .rec-panel {
    border-radius: 21px
  }
}

@media print {

  #sidebar,
  .topbar,
  .rec-hero,
  .rec-kpi-grid,
  .rec-workspace-grid {
    display: none !important
  }

  .modal-backdrop {
    background: #fff !important
  }

  .modal {
    box-shadow: none !important;
    border: 0 !important
  }

  .rec-pass {
    display: block !important
  }
}

/* Stage 15 Driver Portal restored */
.driver-shell {
  display: grid;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: 24px
}

.driver-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(31, 24, 18, .96), rgba(114, 78, 38, .92));
  color: #fff;
  box-shadow: 0 18px 50px rgba(45, 32, 20, .18)
}

.driver-hero:before {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 214, 132, .18);
  animation: driverFloat 8s ease-in-out infinite
}

.driver-hero:after {
  content: "";
  position: absolute;
  left: 55%;
  bottom: -70px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18)
}

@keyframes driverFloat {
  50% {
    transform: translate(-16px, 20px) scale(1.08)
  }
}

.driver-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap
}

.driver-hero h2 {
  margin: 6px 0 4px;
  font-size: clamp(24px, 4vw, 38px);
  letter-spacing: -.03em
}

.driver-hero p {
  margin: 0;
  color: rgba(255, 255, 255, .76);
  max-width: 680px
}

.driver-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .11);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 700
}

.driver-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.driver-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px
}

.driver-kpi {
  border-radius: 22px;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(130, 93, 50, .12);
  box-shadow: 0 12px 34px rgba(45, 32, 20, .07)
}

.driver-kpi i {
  font-size: 20px;
  color: var(--gold-700)
}

.driver-kpi .value {
  font-size: 28px;
  font-weight: 900;
  color: var(--brown-900);
  margin-top: 8px
}

.driver-kpi .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brown-400);
  font-weight: 800
}

.driver-list {
  display: grid;
  gap: 14px
}

.driver-card {
  background: #fff;
  border: 1px solid rgba(130, 93, 50, .13);
  border-radius: 26px;
  padding: 18px;
  box-shadow: 0 14px 42px rgba(45, 32, 20, .08);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  position: relative;
  overflow: hidden
}

.driver-card:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-700))
}

.driver-card-main {
  display: grid;
  gap: 10px
}

.driver-track {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--brown-500);
  font-weight: 800
}

.driver-card h3 {
  margin: 0;
  font-size: 20px;
  color: var(--brown-900)
}

.driver-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px
}

.driver-meta div {
  border-radius: 16px;
  background: rgba(244, 238, 229, .65);
  padding: 10px
}

.driver-meta span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--brown-400);
  font-weight: 800
}

.driver-meta strong {
  display: block;
  margin-top: 3px;
  color: var(--brown-850);
  word-break: break-word
}

.driver-workflow {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: space-between
}

.driver-step-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px
}

.driver-step {
  border: 0;
  border-radius: 16px;
  padding: 11px 10px;
  background: var(--cream);
  color: var(--brown-800);
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px
}

.driver-step:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(45, 32, 20, .11)
}

.driver-step.primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  color: #fff
}

.driver-step.danger {
  background: #fee2e2;
  color: #991b1b
}

.driver-gps-panel {
  border-radius: 20px;
  border: 1px dashed rgba(130, 93, 50, .22);
  padding: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .9), rgba(248, 244, 238, .9));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap
}

.driver-empty {
  border-radius: 28px;
  background: #fff;
  padding: 42px 20px;
  text-align: center;
  border: 1px solid rgba(130, 93, 50, .12);
  box-shadow: 0 14px 40px rgba(45, 32, 20, .07)
}

.driver-empty i {
  font-size: 44px;
  color: var(--gold-700)
}

.driver-note-field {
  width: 100%;
  border: 1px solid rgba(130, 93, 50, .18);
  border-radius: 16px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 42px;
  background: #fff
}

.driver-safe-note {
  font-size: 12px;
  color: rgba(255, 255, 255, .74);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px
}

@media(max-width:900px) {
  .driver-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .driver-card {
    grid-template-columns: 1fr
  }

  .driver-meta {
    grid-template-columns: 1fr
  }
}

@media(max-width:560px) {
  .driver-shell {
    gap: 14px
  }

  .driver-hero {
    border-radius: 22px;
    padding: 19px
  }

  .driver-actions,
  .driver-actions .btn {
    width: 100%
  }

  .driver-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px
  }

  .driver-kpi {
    padding: 13px;
    border-radius: 18px
  }

  .driver-kpi .value {
    font-size: 24px
  }

  .driver-card {
    border-radius: 22px;
    padding: 16px
  }

  .driver-step-row {
    grid-template-columns: 1fr
  }

  .driver-gps-panel .btn {
    width: 100%
  }
}

/* ============================================================
   Stage 19 — Smart IT Operations Center
   ============================================================ */

.it-ops-page {
  display: grid;
  gap: 18px;
}

.it-ops-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 20%, rgba(177, 141, 76, .18), transparent 28%),
    linear-gradient(135deg, #fff, #f7f1e7);
  box-shadow: 0 18px 50px rgba(43, 26, 15, .08);
  border: 1px solid rgba(177, 141, 76, .18);
}

.it-ops-hero h2 {
  margin: 6px 0;
  font-size: clamp(24px, 3vw, 38px);
  color: #2a1a0f;
}

.it-ops-hero p {
  margin: 0;
  color: #7b6246;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a9823d;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.it-ops-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px;
}

.it-kpi {
  min-height: 112px;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .15);
  box-shadow: 0 16px 38px rgba(43, 26, 15, .07);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.it-kpi span {
  display: block;
  color: #8a7357;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.it-kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  color: #2a1a0f;
}

.it-kpi i {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #f6efe3;
  color: #a9823d;
  font-size: 22px;
}

.it-kpi.warning i {
  background: #fff4d6;
  color: #b58100;
}

.it-kpi.info i {
  background: #e8f4ff;
  color: #2376a8;
}

.it-kpi.success i {
  background: #e8f8ef;
  color: #1f9d55;
}

.it-kpi.danger i {
  background: #fff0ef;
  color: #c0392b;
}

.it-sla-strip {
  display: grid;
  grid-template-columns: 220px 1fr 320px;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-radius: 22px;
  background: #211309;
  color: #fff;
  box-shadow: 0 18px 44px rgba(33, 19, 9, .18);
}

.sla-info strong {
  display: block;
  color: #f4d892;
}

.sla-info span,
.sla-note {
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
}

.sla-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}

.sla-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #42d77d, #f6d365, #e74c3c);
}

.it-toolbar {
  display: grid;
  grid-template-columns: 1fr 210px 210px auto auto;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 14px 34px rgba(43, 26, 15, .06);
}

.it-search-box {
  position: relative;
}

.it-search-box i {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: #a9823d;
}

.it-search-box input {
  padding-left: 42px;
}

.view-toggle {
  display: flex;
  gap: 6px;
}

.it-ops-card {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(177, 141, 76, .16);
}

.it-ops-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.it-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.it-kanban-col {
  min-height: 520px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(177, 141, 76, .16);
  border-radius: 26px;
  padding: 14px;
  box-shadow: 0 18px 44px rgba(43, 26, 15, .06);
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.kanban-head strong {
  color: #2a1a0f;
}

.kanban-head span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f3eadb;
  color: #8a6835;
  font-weight: 800;
}

.kanban-list {
  display: grid;
  gap: 12px;
}

.kanban-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(177, 141, 76, .35);
  border-radius: 20px;
  color: #9b8468;
}

.it-ticket-card {
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 14px 34px rgba(43, 26, 15, .07);
  cursor: grab;
  transition: transform .18s ease, box-shadow .18s ease;
}

.it-ticket-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(43, 26, 15, .11);
}

.ticket-top,
.ticket-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.it-ticket-card h4 {
  margin: 12px 0 6px;
  color: #2a1a0f;
}

.it-ticket-card p {
  color: #79654d;
  font-size: 13px;
  line-height: 1.6;
  max-height: 44px;
  overflow: hidden;
}

.ticket-meta {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: #8a7357;
  font-size: 12px;
}

.priority-critical {
  background: #ffe8e6;
  color: #b32218;
}

.priority-high {
  background: #fff0d6;
  color: #b76a00;
}

.priority-medium {
  background: #f4ead4;
  color: #8a6835;
}

.priority-low {
  background: #edf2f7;
  color: #57606a;
}

.status-open {
  background: #fff4d6;
  color: #9b6a00;
}

.status-progress {
  background: #e7f2ff;
  color: #2368a2;
}

.status-done {
  background: #e6f8ed;
  color: #1f8f4d;
}

.status-muted {
  background: #f1f1f1;
  color: #777;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20, 12, 7, .46);
  display: flex;
  justify-content: flex-end;
}

.it-drawer {
  width: min(520px, 100%);
  height: 100%;
  background: #fffaf2;
  padding: 26px;
  overflow-y: auto;
  box-shadow: -20px 0 60px rgba(0, 0, 0, .18);
  animation: drawerIn .22s ease-out;
}

@keyframes drawerIn {
  from {
    transform: translateX(30px);
    opacity: .4;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.drawer-close {
  float: right;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: #f3eadb;
  color: #2a1a0f;
  font-size: 22px;
}

.drawer-header {
  margin-top: 36px;
}

.drawer-header h2 {
  margin: 8px 0 12px;
  color: #2a1a0f;
}

.drawer-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.drawer-section {
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
}

.drawer-section h4 {
  margin: 0 0 10px;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.drawer-grid div {
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
}

.drawer-grid span {
  display: block;
  color: #9b8468;
  font-size: 12px;
  margin-bottom: 5px;
}

.ticket-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.ticket-timeline li {
  padding-left: 26px;
  position: relative;
}

.ticket-timeline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ddd;
}

.ticket-timeline li.done::before {
  background: #1f9d55;
}

.ticket-timeline span {
  display: block;
  color: #8a7357;
  font-size: 12px;
}

.drawer-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  .it-ops-kpis {
    grid-template-columns: repeat(3, 1fr);
  }

  .it-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .it-kanban {
    grid-template-columns: repeat(4, 280px);
  }

  .it-sla-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .it-ops-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
  }

  .it-ops-kpis {
    grid-template-columns: 1fr;
  }

  .it-toolbar {
    grid-template-columns: 1fr;
  }

  .drawer-grid {
    grid-template-columns: 1fr;
  }

  .it-ticket-card {
    cursor: default;
  }
}

.it-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(24, 14, 8, .55);
  display: grid;
  place-items: center;
  padding: 20px;
}

.it-modal-box {
  width: min(560px, 100%);
  background: #fffaf2;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .25);
  border: 1px solid rgba(177, 141, 76, .22);
}

.it-modal-header,
.it-modal-footer {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid rgba(177, 141, 76, .15);
}

.it-modal-footer {
  border-bottom: 0;
  border-top: 1px solid rgba(177, 141, 76, .15);
  justify-content: flex-end;
  gap: 10px;
}

.it-modal-body {
  padding: 22px;
  display: grid;
  gap: 10px;
}

.it-modal-body label {
  font-weight: 800;
  color: #4a321f;
  margin-top: 8px;
}

.it-modal-body textarea {
  min-height: 120px;
  resize: vertical;
}

.it-modal-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: #f3eadb;
  color: #2a1a0f;
  font-size: 24px;
  cursor: pointer;
}

/* ============================================================
   Stage 20 — Smart IT Support Professional + Guided Request
   Restores CRM Quality page compatibility
   ============================================================ */
.it-ops-page {
  display: grid;
  gap: 18px
}

.it-ops-hero.pro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 30px;
  border-radius: 30px;
  background: radial-gradient(circle at 88% 22%, rgba(177, 141, 76, .22), transparent 30%), linear-gradient(135deg, #fff, #f7f1e7);
  box-shadow: 0 18px 50px rgba(43, 26, 15, .08);
  border: 1px solid rgba(177, 141, 76, .18)
}

.it-ops-hero h2 {
  margin: 7px 0;
  font-size: clamp(24px, 3vw, 38px);
  color: #2a1a0f
}

.it-ops-hero p {
  margin: 0;
  color: #7b6246
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a9823d;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase
}

.it-ops-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px
}

.it-kpi {
  min-height: 112px;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .15);
  box-shadow: 0 16px 38px rgba(43, 26, 15, .07);
  display: flex;
  align-items: center;
  justify-content: space-between
}

.it-kpi span {
  display: block;
  color: #8a7357;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase
}

.it-kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  color: #2a1a0f
}

.it-kpi i {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #f6efe3;
  color: #a9823d;
  font-size: 22px
}

.it-kpi.warning i {
  background: #fff4d6;
  color: #b58100
}

.it-kpi.info i {
  background: #e8f4ff;
  color: #2376a8
}

.it-kpi.success i {
  background: #e8f8ef;
  color: #1f9d55
}

.it-kpi.danger i {
  background: #fff0ef;
  color: #c0392b
}

.it-sla-strip {
  display: grid;
  grid-template-columns: 220px 1fr 320px;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border-radius: 22px;
  background: #211309;
  color: #fff;
  box-shadow: 0 18px 44px rgba(33, 19, 9, .18)
}

.sla-info strong {
  display: block;
  color: #f4d892
}

.sla-info span,
.sla-note {
  color: rgba(255, 255, 255, .72);
  font-size: 13px
}

.sla-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden
}

.sla-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #42d77d, #f6d365, #e74c3c)
}

.it-toolbar.pro {
  display: grid;
  grid-template-columns: 1fr 210px 210px auto auto;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 14px 34px rgba(43, 26, 15, .06)
}

.it-search-box {
  position: relative
}

.it-search-box i {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: #a9823d
}

.it-search-box input {
  padding-left: 42px
}

.view-toggle {
  display: flex;
  gap: 6px
}

.it-ops-card {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(177, 141, 76, .16)
}

.it-ops-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.it-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px
}

.it-kanban-col {
  min-height: 520px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(177, 141, 76, .16);
  border-radius: 26px;
  padding: 14px;
  box-shadow: 0 18px 44px rgba(43, 26, 15, .06)
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px
}

.kanban-head strong {
  color: #2a1a0f
}

.kanban-head span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f3eadb;
  color: #8a6835;
  font-weight: 800
}

.kanban-list {
  display: grid;
  gap: 12px
}

.kanban-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(177, 141, 76, .35);
  border-radius: 20px;
  color: #9b8468
}

.it-ticket-card {
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 14px 34px rgba(43, 26, 15, .07);
  cursor: grab;
  transition: transform .18s ease, box-shadow .18s ease
}

.it-ticket-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(43, 26, 15, .11)
}

.ticket-top,
.ticket-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap
}

.it-ticket-card h4 {
  margin: 12px 0 6px;
  color: #2a1a0f
}

.it-ticket-card p {
  color: #79654d;
  font-size: 13px;
  line-height: 1.6;
  max-height: 44px;
  overflow: hidden
}

.ticket-meta {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: #8a7357;
  font-size: 12px
}

.priority-critical {
  background: #ffe8e6;
  color: #b32218
}

.priority-high {
  background: #fff0d6;
  color: #b76a00
}

.priority-medium {
  background: #f4ead4;
  color: #8a6835
}

.priority-low {
  background: #edf2f7;
  color: #57606a
}

.status-open {
  background: #fff4d6;
  color: #9b6a00
}

.status-progress {
  background: #e7f2ff;
  color: #2368a2
}

.status-done {
  background: #e6f8ed;
  color: #1f8f4d
}

.status-muted {
  background: #f1f1f1;
  color: #777
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20, 12, 7, .46);
  display: flex;
  justify-content: flex-end
}

.it-drawer {
  width: min(520px, 100%);
  height: 100%;
  background: #fffaf2;
  padding: 26px;
  overflow-y: auto;
  box-shadow: -20px 0 60px rgba(0, 0, 0, .18);
  animation: drawerIn .22s ease-out
}

@keyframes drawerIn {
  from {
    transform: translateX(30px);
    opacity: .4
  }

  to {
    transform: translateX(0);
    opacity: 1
  }
}

.drawer-close {
  float: right;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: #f3eadb;
  color: #2a1a0f;
  font-size: 22px
}

.drawer-header {
  margin-top: 36px
}

.drawer-header h2 {
  margin: 8px 0 12px;
  color: #2a1a0f
}

.drawer-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.drawer-section {
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16)
}

.drawer-section h4 {
  margin: 0 0 10px
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px
}

.drawer-grid div {
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16)
}

.drawer-grid span {
  display: block;
  color: #9b8468;
  font-size: 12px;
  margin-bottom: 5px
}

.ticket-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px
}

.ticket-timeline li {
  padding-left: 26px;
  position: relative
}

.ticket-timeline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ddd
}

.ticket-timeline li.done::before {
  background: #1f9d55
}

.ticket-timeline span {
  display: block;
  color: #8a7357;
  font-size: 12px
}

.drawer-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.it-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(24, 14, 8, .55);
  display: grid;
  place-items: center;
  padding: 20px
}

.it-modal-box {
  width: min(760px, 100%);
  max-height: 92vh;
  background: #fffaf2;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .25);
  border: 1px solid rgba(177, 141, 76, .22);
  display: grid;
  grid-template-rows: auto 1fr auto
}

.it-modal-header,
.it-modal-footer {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid rgba(177, 141, 76, .15)
}

.it-modal-footer {
  border-bottom: 0;
  border-top: 1px solid rgba(177, 141, 76, .15);
  justify-content: flex-end;
  gap: 10px
}

.it-modal-body {
  padding: 22px;
  display: grid;
  gap: 10px;
  overflow: auto
}

.it-modal-body label {
  font-weight: 800;
  color: #4a321f;
  margin-top: 8px
}

.it-modal-body textarea {
  min-height: 120px;
  resize: vertical
}

.it-modal-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: #f3eadb;
  color: #2a1a0f;
  font-size: 24px;
  cursor: pointer
}

.it-help-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px
}

.it-help-option {
  border: 1px solid rgba(177, 141, 76, .18);
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  text-align: left;
  display: grid;
  gap: 7px;
  cursor: pointer;
  transition: .18s ease
}

.it-help-option:hover,
.it-help-option.active {
  border-color: #b18d4c;
  background: #fff6e7;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(43, 26, 15, .09)
}

.it-help-option i {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #f3eadb;
  color: #a9823d;
  font-size: 20px
}

.it-help-option strong {
  color: #2a1a0f
}

.it-help-option span {
  color: #80684c;
  font-size: 12px;
  line-height: 1.45
}

.it-selected-help {
  padding: 14px 16px;
  border-radius: 18px;
  background: #211309;
  color: #fff;
  display: grid;
  gap: 4px
}

.it-selected-help span {
  color: rgba(255, 255, 255, .72);
  font-size: 13px
}

.it-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.screen11-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 14px
}

.screen11-kpi {
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .15);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(43, 26, 15, .06)
}

.screen11-kpi strong {
  display: block;
  font-size: 26px;
  color: #2a1a0f
}

.screen11-kpi span {
  color: #8a7357;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase
}

.screen11-filter-card {
  display: grid;
  grid-template-columns: 1fr 180px 180px 180px auto;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 14px 34px rgba(43, 26, 15, .06)
}

.screen11-card {
  border-radius: 24px;
  overflow: hidden
}

.screen11-mobile-list {
  display: none
}

.screen11-mobile-card {
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 12px 28px rgba(43, 26, 15, .06)
}

.mobile-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px
}

.mobile-meta {
  display: grid;
  gap: 5px;
  color: #8a7357;
  font-size: 12px
}

@media(max-width:1200px) {

  .it-ops-kpis,
  .screen11-kpis {
    grid-template-columns: repeat(3, 1fr)
  }

  .it-toolbar.pro {
    grid-template-columns: 1fr 1fr
  }

  .it-kanban {
    grid-template-columns: repeat(4, 280px)
  }

  .it-sla-strip {
    grid-template-columns: 1fr
  }

  .it-help-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .screen11-filter-card {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:768px) {
  .it-ops-hero.pro {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px
  }

  .it-ops-kpis,
  .screen11-kpis,
  .it-toolbar.pro,
  .drawer-grid,
  .it-form-grid,
  .screen11-filter-card {
    grid-template-columns: 1fr
  }

  .it-ticket-card {
    cursor: default
  }

  .it-help-grid {
    grid-template-columns: 1fr
  }

  .screen11-table {
    display: none
  }

  .screen11-mobile-list {
    display: grid;
    gap: 12px;
    padding: 14px
  }
}

/* CRM Quality Professional Workspace */

.crm-quality-help-panel {
  padding: 16px 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff8e8, #fff);
  border: 1px solid rgba(177, 141, 76, .18);
  box-shadow: 0 14px 34px rgba(43, 26, 15, .06);
  display: grid;
  gap: 6px;
}

.crm-quality-help-panel strong {
  color: #2a1a0f;
}

.crm-quality-help-panel span {
  color: #8a7357;
  font-size: 14px;
}

.crm-quality-kanban .it-ticket-card h4 {
  color: #2a1a0f;
}

.crm-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.crm-choice {
  text-align: left;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(177, 141, 76, .18);
  background: #fff;
  cursor: pointer;
  transition: .18s ease;
}

.crm-choice strong {
  display: block;
  color: #2a1a0f;
  margin-bottom: 4px;
}

.crm-choice span {
  display: block;
  color: #8a7357;
  font-size: 12px;
  line-height: 1.4;
}

.crm-choice:hover,
.crm-choice.active {
  border-color: #a9823d;
  background: #f7eedf;
  box-shadow: 0 10px 24px rgba(169, 130, 61, .14);
}

.crm-quality-modal .it-modal-header p {
  margin: 4px 0 0;
  color: #8a7357;
  font-size: 13px;
}

@media (max-width: 768px) {
  .crm-option-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Stage 21 — Reports & Analytics Center
   Safe additive CSS only
   ============================================================ */

.reports-center {
  display: grid;
  gap: 18px;
}

.reports-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 28px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 18%, rgba(193, 171, 121, .22), transparent 30%),
    linear-gradient(135deg, #fff, #f7f1e7);
  border: 1px solid rgba(177, 141, 76, .18);
  box-shadow: 0 18px 50px rgba(43, 26, 15, .08);
}

.reports-hero h2 {
  margin: 7px 0;
  font-size: clamp(24px, 3vw, 38px);
  color: #2a1a0f;
}

.reports-hero p {
  margin: 0;
  color: #7b6246;
}

.reports-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reports-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 14px;
}

.report-kpi {
  min-height: 120px;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .15);
  box-shadow: 0 16px 38px rgba(43, 26, 15, .07);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  overflow: hidden;
  position: relative;
}

.report-kpi::after {
  content: '';
  position: absolute;
  right: -38px;
  top: -38px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(193, 171, 121, .12);
}

.report-kpi span {
  display: block;
  color: #8a7357;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.report-kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  color: #2a1a0f;
}

.report-kpi small {
  display: block;
  margin-top: 8px;
  color: #8a7357;
}

.report-kpi i {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #f6efe3;
  color: #a9823d;
  font-size: 22px;
}

.reports-toolbar {
  display: grid;
  grid-template-columns: 1fr 180px 180px 180px auto;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 14px 34px rgba(43, 26, 15, .06);
}

.reports-search {
  position: relative;
}

.reports-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #a9823d;
}

.reports-search input {
  padding-left: 42px;
}

.reports-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, .8fr);
  gap: 18px;
  align-items: start;
}

.report-card {
  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 16px 42px rgba(43, 26, 15, .07);
  overflow: hidden;
}

.report-card-head {
  padding: 18px 20px;
  background: linear-gradient(135deg, #fffaf2, #fff);
  border-bottom: 1px solid rgba(177, 141, 76, .13);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.report-card-head h3 {
  margin: 4px 0 0;
  color: #2a1a0f;
}

.report-card-head p {
  margin: 4px 0 0;
  color: #8a7357;
  font-size: 13px;
}

.report-table-wrap {
  overflow-x: auto;
}

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

.report-table th {
  padding: 14px 16px;
  background: #f7f1e8;
  color: #7d6040;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.report-table td {
  padding: 14px 16px;
  border-top: 1px solid rgba(158, 137, 89, .10);
  color: #372315;
}

.report-chart-list {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.report-chart-row {
  display: grid;
  gap: 8px;
}

.report-chart-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #2a1a0f;
  font-weight: 800;
}

.report-chart-bar {
  height: 10px;
  border-radius: 999px;
  background: #efe6d7;
  overflow: hidden;
}

.report-chart-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a9823d, #ead7a5);
}

.report-side-stack {
  display: grid;
  gap: 18px;
}

.report-mini-list {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.report-mini-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(177, 141, 76, .14);
  background: linear-gradient(145deg, #fff, #fffaf2);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.report-mini-item strong {
  display: block;
  color: #2a1a0f;
}

.report-mini-item span {
  display: block;
  margin-top: 3px;
  color: #8a7357;
  font-size: 12px;
}

.report-mini-value {
  font-weight: 900;
  color: #a9823d;
}

@media (max-width: 1300px) {
  .reports-kpis {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .reports-grid {
    grid-template-columns: 1fr;
  }

  .reports-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .reports-hero {
    flex-direction: column;
    padding: 22px;
  }

  .reports-actions,
  .reports-actions .btn {
    width: 100%;
  }

  .reports-kpis,
  .reports-toolbar {
    grid-template-columns: 1fr;
  }

  .report-table {
    min-width: 760px;
  }
}

/* ============================================================
   Stage 22 — Reports & Analytics Command Center
   Safe additive CSS only. Append to theme.css.
   ============================================================ */
.reports-command-center {
  display: grid;
  gap: 18px
}

.reports-command-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 30px;
  border-radius: 30px;
  background: radial-gradient(circle at 88% 18%, rgba(193, 171, 121, .25), transparent 30%), linear-gradient(135deg, #fff, #f7f1e7);
  border: 1px solid rgba(177, 141, 76, .18);
  box-shadow: 0 20px 56px rgba(43, 26, 15, .09)
}

.reports-command-hero:after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -80px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(177, 141, 76, .13)
}

.reports-hero-copy {
  position: relative;
  z-index: 1
}

.reports-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a9823d;
  font-weight: 850;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase
}

.reports-command-hero h2 {
  margin: 8px 0;
  font-size: clamp(26px, 3vw, 42px);
  color: #2a1a0f;
  letter-spacing: -.035em
}

.reports-command-hero p {
  margin: 0;
  max-width: 820px;
  color: #7b6246
}

.reports-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px
}

.reports-control-panel {
  display: grid;
  grid-template-columns: 180px 180px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 14px 34px rgba(43, 26, 15, .06)
}

.reports-control-panel label {
  display: grid;
  gap: 6px
}

.reports-control-panel label>span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a7357
}

.reports-wide-control {
  min-width: 0
}

.reports-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.reports-tab {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid rgba(177, 141, 76, .16);
  border-radius: 14px;
  background: #fff;
  color: #4a321f;
  font-weight: 850;
  cursor: pointer
}

.reports-tab.active {
  background: linear-gradient(135deg, #8c6a2e, #c1ab79);
  color: #fff;
  box-shadow: 0 10px 22px rgba(140, 106, 46, .18)
}

.reports-loading {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 28px;
  background: rgba(255, 255, 255, .84);
  border: 1px solid rgba(177, 141, 76, .14);
  color: #8a7357
}

.reports-loading i {
  font-size: 34px;
  color: #a9823d
}

.reports-loading.error i {
  color: #c0392b
}

.reports-scope-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 24px;
  background: #211309;
  color: #fff;
  box-shadow: 0 18px 44px rgba(33, 19, 9, .16)
}

.reports-scope-card span {
  display: block;
  color: #f4d892;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase
}

.reports-scope-card strong {
  display: block;
  margin-top: 4px;
  font-size: 22px
}

.reports-scope-card p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, .7)
}

.scope-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  white-space: nowrap
}

.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px
}

.reports-kpi {
  position: relative;
  overflow: hidden;
  min-height: 124px;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .15);
  box-shadow: 0 16px 38px rgba(43, 26, 15, .07);
  display: flex;
  justify-content: space-between;
  gap: 14px
}

.reports-kpi:after {
  content: "";
  position: absolute;
  right: -38px;
  top: -38px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(193, 171, 121, .12)
}

.reports-kpi span {
  display: block;
  color: #8a7357;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase
}

.reports-kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  color: #2a1a0f
}

.reports-kpi small {
  display: block;
  margin-top: 7px;
  color: #8a7357;
  font-size: 12px
}

.reports-kpi i {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #f6efe3;
  color: #a9823d;
  font-size: 22px
}

.reports-kpi.green i {
  background: #e8f8ef;
  color: #1f9d55
}

.reports-kpi.blue i {
  background: #e8f4ff;
  color: #2376a8
}

.reports-kpi.purple i {
  background: #f2ecff;
  color: #6d4dbb
}

.reports-kpi.red i {
  background: #fff0ef;
  color: #c0392b
}

.reports-roadmap-card {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  padding: 20px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff, #fff8ea);
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 18px 48px rgba(43, 26, 15, .08)
}

.roadmap-health {
  display: flex;
  gap: 16px;
  align-items: center
}

.roadmap-health h3 {
  margin: 4px 0;
  color: #2a1a0f
}

.roadmap-health p {
  margin: 0;
  color: #8a7357
}

.roadmap-ring {
  --score: 0;
  width: 118px;
  height: 118px;
  flex: 0 0 118px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#a9823d calc(var(--score)*1%), #efe6d7 0);
  position: relative
}

.roadmap-ring:before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: #fff
}

.roadmap-ring strong,
.roadmap-ring span {
  position: relative;
  z-index: 1
}

.roadmap-ring strong {
  font-size: 24px;
  color: #2a1a0f
}

.roadmap-ring span {
  margin-top: 30px;
  font-size: 11px;
  color: #8a7357;
  font-weight: 900;
  text-transform: uppercase
}

.roadmap-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px
}

.roadmap-step {
  position: relative;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(177, 141, 76, .16);
  background: #fff;
  display: grid;
  gap: 6px
}

.roadmap-step b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f3eadb;
  color: #8a6835
}

.roadmap-step.done b {
  background: #e8f8ef;
  color: #1f9d55
}

.roadmap-step strong {
  color: #2a1a0f
}

.roadmap-step span {
  color: #8a7357;
  font-size: 12px
}

.reports-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px
}

.reports-dashboard-grid.one-two {
  grid-template-columns: 1.3fr .7fr
}

.reports-card {
  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 16px 42px rgba(43, 26, 15, .07);
  overflow: hidden
}

.reports-wide-card {
  grid-column: 1/-1
}

.reports-card-head {
  padding: 18px 20px;
  background: linear-gradient(135deg, #fffaf2, #fff);
  border-bottom: 1px solid rgba(177, 141, 76, .13);
  display: flex;
  justify-content: space-between;
  gap: 12px
}

.reports-card-head span {
  display: block;
  color: #a9823d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase
}

.reports-card-head h3 {
  margin: 4px 0 0;
  color: #2a1a0f
}

.reports-card-head p {
  margin: 4px 0 0;
  color: #8a7357;
  font-size: 13px
}

.reports-bars {
  padding: 16px;
  display: grid;
  gap: 14px
}

.report-bar-row {
  display: grid;
  gap: 8px
}

.report-bar-row>div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #2a1a0f;
  font-weight: 850
}

.report-bar-row span {
  color: #4a321f
}

.report-bar {
  height: 10px;
  border-radius: 999px;
  background: #efe6d7;
  overflow: hidden
}

.report-bar span,
.mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a9823d, #ead7a5)
}

.funnel-chart {
  padding: 18px;
  display: grid;
  gap: 10px;
  justify-items: center
}

.funnel-row {
  width: var(--w);
  min-width: 110px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #8c6a2e, #c1ab79);
  color: #fff;
  font-weight: 850
}

.collection-donut-wrap {
  padding: 18px;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: center
}

.collection-donut {
  --p: 0;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#1f9d55 calc(var(--p)*1%), #efe6d7 0);
  position: relative
}

.collection-donut:before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  background: #fff
}

.collection-donut strong,
.collection-donut span {
  position: relative;
  z-index: 1
}

.collection-donut strong {
  font-size: 26px;
  color: #2a1a0f
}

.collection-donut span {
  margin-top: 40px;
  color: #8a7357;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase
}

.collection-ledger {
  display: grid;
  gap: 10px
}

.collection-ledger div,
.report-mini-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(177, 141, 76, .14);
  background: linear-gradient(145deg, #fff, #fffaf2);
  display: flex;
  justify-content: space-between;
  gap: 12px
}

.collection-ledger span,
.report-mini-item span {
  display: block;
  color: #8a7357;
  font-size: 12px
}

.collection-ledger strong,
.report-mini-item strong {
  display: block;
  color: #2a1a0f
}

.followup-tiles {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px
}

.followup-tiles div {
  padding: 16px;
  border-radius: 18px;
  background: #fffaf2;
  border: 1px solid rgba(177, 141, 76, .14);
  text-align: center
}

.followup-tiles i {
  color: #a9823d;
  font-size: 22px
}

.followup-tiles strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  color: #2a1a0f
}

.followup-tiles span {
  color: #8a7357;
  font-size: 12px;
  font-weight: 850
}

.reports-source-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px
}

.source-card,
.workload-card {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, #fffaf2);
  border: 1px solid rgba(177, 141, 76, .14)
}

.source-card strong,
.workload-card strong {
  display: block;
  color: #2a1a0f
}

.source-card span,
.workload-card span,
.workload-card small {
  display: block;
  color: #8a7357;
  font-size: 12px;
  margin-top: 3px
}

.source-metrics {
  display: grid;
  grid-template-columns: repeat(3, auto 1fr);
  align-items: end;
  gap: 2px 8px;
  margin: 14px 0
}

.source-metrics b {
  color: #2a1a0f
}

.source-metrics small {
  color: #8a7357
}

.mini-bar {
  height: 8px;
  border-radius: 999px;
  background: #efe6d7;
  overflow: hidden
}

.workload-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px
}

.report-mini-list {
  padding: 16px;
  display: grid;
  gap: 10px
}

.report-mini-value {
  font-weight: 900;
  color: #a9823d
}

.reports-table {
  min-width: 900px
}

.reports-empty {
  padding: 28px;
  text-align: center;
  color: #8a7357
}

.text-center {
  text-align: center
}

@media(max-width:1500px) {
  .reports-kpi-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr))
  }

  .reports-source-grid,
  .workload-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr))
  }

  .reports-roadmap-card {
    grid-template-columns: 1fr
  }

  .roadmap-steps {
    grid-template-columns: repeat(3, minmax(140px, 1fr))
  }
}

@media(max-width:1000px) {
  .reports-control-panel {
    grid-template-columns: 1fr 1fr
  }

  .reports-wide-control {
    grid-column: 1/-1
  }

  .reports-dashboard-grid,
  .reports-dashboard-grid.one-two {
    grid-template-columns: 1fr
  }

  .collection-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center
  }

  .reports-scope-card {
    align-items: flex-start;
    flex-direction: column
  }
}

@media(max-width:760px) {
  .reports-command-hero {
    flex-direction: column;
    padding: 22px
  }

  .reports-actions,
  .reports-actions .btn {
    width: 100%;
    justify-content: center
  }

  .reports-control-panel,
  .reports-kpi-grid,
  .reports-source-grid,
  .workload-grid,
  .roadmap-steps {
    grid-template-columns: 1fr
  }

  .reports-tabs {
    display: grid;
    grid-template-columns: 1fr
  }

  .reports-tab {
    justify-content: center
  }

  .reports-roadmap-card {
    padding: 16px
  }

  .roadmap-health {
    align-items: flex-start;
    flex-direction: column
  }

  .followup-tiles {
    grid-template-columns: 1fr
  }

  .scope-date {
    white-space: normal
  }

  .reports-table {
    min-width: 760px
  }
}

@media print {

  #sidebar,
  #header,
  .reports-actions,
  .reports-control-panel {
    display: none !important
  }

  .reports-command-center {
    gap: 10px
  }

  .reports-card,
  .reports-kpi,
  .reports-roadmap-card,
  .reports-scope-card {
    box-shadow: none !important
  }
}

/* ============================================================
   Stage 23 — Smart User Management
   Safe additive CSS. Append to frontend/css/theme.css only.
   ============================================================ */
.users-mgmt-pro {
  display: grid;
  gap: 18px;
}

.users-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 30px;
  border-radius: 30px;
  background: radial-gradient(circle at 88% 18%, rgba(193, 171, 121, .22), transparent 30%), linear-gradient(135deg, #fff, #f7f1e7);
  border: 1px solid rgba(177, 141, 76, .18);
  box-shadow: 0 18px 50px rgba(43, 26, 15, .08);
}

.users-hero:after {
  content: '';
  position: absolute;
  right: -50px;
  top: -60px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(193, 171, 121, .16);
  pointer-events: none;
}

.users-hero h2 {
  margin: 7px 0;
  font-size: clamp(24px, 3vw, 38px);
  color: #2a1a0f;
}

.users-hero p {
  margin: 0;
  color: #7b6246;
  max-width: 760px;
}

.users-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a9823d;
  font-weight: 850;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.users-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.users-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 14px;
}

.users-kpi {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .15);
  box-shadow: 0 16px 38px rgba(43, 26, 15, .07);
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.users-kpi:after {
  content: '';
  position: absolute;
  right: -38px;
  top: -38px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(193, 171, 121, .12);
}

.users-kpi span {
  display: block;
  color: #8a7357;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.users-kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  color: #2a1a0f;
  line-height: 1;
}

.users-kpi small {
  display: block;
  margin-top: 9px;
  color: #8a7357;
  font-size: 12px;
}

.users-kpi i {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #f6efe3;
  color: #a9823d;
  font-size: 22px;
}

.users-kpi.green i {
  background: #e8f8ef;
  color: #1f9d55;
}

.users-kpi.red i {
  background: #fff0ef;
  color: #c0392b;
}

.users-kpi.blue i {
  background: #e8f4ff;
  color: #2376a8;
}

.users-kpi.purple i {
  background: #f1ecff;
  color: #7151b8;
}

.users-control-panel {
  display: grid;
  grid-template-columns: 1fr 180px 190px 160px auto auto;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 14px 34px rgba(43, 26, 15, .06);
}

.users-search {
  position: relative;
}

.users-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #a9823d;
}

.users-search input {
  padding-left: 42px;
}

.users-view-toggle {
  display: flex;
  gap: 6px;
}

.users-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.users-directory-card,
.users-insight-card {
  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 16px 42px rgba(43, 26, 15, .07);
  overflow: hidden;
}

.users-card-head {
  padding: 18px 20px;
  background: linear-gradient(135deg, #fffaf2, #fff);
  border-bottom: 1px solid rgba(177, 141, 76, .13);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.users-card-head.compact {
  padding: 16px 18px;
}

.users-card-head span {
  color: #a9823d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.users-card-head h3 {
  margin: 4px 0 0;
  color: #2a1a0f;
}

.users-card-head p {
  margin: 4px 0 0;
  color: #8a7357;
  font-size: 13px;
}

.users-count-pill {
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f3eadb;
  color: #8a6835;
}

.users-table-wrap {
  overflow-x: auto;
}

.users-table {
  min-width: 980px;
}

.users-person-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
}

.users-person-cell strong,
.users-profile-top strong {
  display: block;
  color: #2a1a0f;
}

.users-person-cell small,
.users-profile-top span {
  display: block;
  color: #8a7357;
  font-size: 12px;
}

.users-person-cell em {
  display: block;
  color: #a9823d;
  font-size: 11px;
  font-style: normal;
}

.users-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.users-pill.role {
  background: #f4ead4;
  color: #8a6835;
}

.users-pill.active {
  background: #e6f8ed;
  color: #1f8f4d;
}

.users-pill.inactive {
  background: #f1f1f1;
  color: #777;
}

.users-health {
  display: inline-grid;
  gap: 1px;
  padding: 6px 10px;
  border-radius: 14px;
  background: #f4ead4;
  color: #8a6835;
  min-width: 72px;
  text-align: center;
}

.users-health b {
  line-height: 1;
}

.users-health small {
  font-size: 10px;
  opacity: .78;
}

.users-health.good {
  background: #e6f8ed;
  color: #1f8f4d;
}

.users-health.watch {
  background: #fff4d6;
  color: #9b6a00;
}

.users-health.risk {
  background: #fff0ef;
  color: #c0392b;
}

.users-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.users-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
  padding: 16px;
}

.users-profile-card {
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  box-shadow: 0 14px 34px rgba(43, 26, 15, .06);
}

.users-profile-card.inactive {
  opacity: .72;
}

.users-profile-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.users-profile-top .users-pill {
  margin-left: auto;
}

.users-profile-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
  color: #8a7357;
  font-size: 12px;
}

.users-profile-meta span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.users-profile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.users-dept-map {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.users-dept-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(177, 141, 76, .14);
  background: linear-gradient(145deg, #fff, #fffaf2);
}

.users-dept-item strong {
  display: block;
  color: #2a1a0f;
}

.users-dept-item span {
  display: block;
  color: #8a7357;
  font-size: 12px;
  margin-top: 3px;
}

.users-mini-bar {
  margin-top: 11px;
  height: 8px;
  border-radius: 999px;
  background: #efe6d7;
  overflow: hidden;
}

.users-mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a9823d, #ead7a5);
}

.users-side-empty {
  padding: 24px;
  color: #8a7357;
  text-align: center;
}

.users-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20, 12, 7, .46);
  display: flex;
  justify-content: flex-end;
}

.users-drawer {
  width: min(540px, 100%);
  height: 100%;
  background: #fffaf2;
  padding: 26px;
  overflow-y: auto;
  box-shadow: -20px 0 60px rgba(0, 0, 0, .18);
  animation: usersDrawerIn .22s ease-out;
}

@keyframes usersDrawerIn {
  from {
    transform: translateX(30px);
    opacity: .4;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.users-drawer-close {
  float: right;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: #f3eadb;
  color: #2a1a0f;
  font-size: 22px;
  cursor: pointer;
}

.users-drawer-top {
  clear: both;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 26px;
}

.users-drawer-top h2 {
  margin: 6px 0 2px;
  color: #2a1a0f;
}

.users-drawer-top p {
  margin: 0;
  color: #8a7357;
}

.users-drawer-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.users-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.users-drawer-grid div,
.users-drawer-section {
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
}

.users-drawer-grid span {
  display: block;
  color: #9b8468;
  font-size: 12px;
  margin-bottom: 5px;
}

.users-drawer-grid strong {
  color: #2a1a0f;
}

.users-drawer-section {
  margin-top: 18px;
}

.users-drawer-section h4 {
  margin: 0 0 12px;
  color: #2a1a0f;
}

.users-drawer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.users-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.users-modal-subtitle {
  margin: 4px 0 0;
  color: #8a7357;
  font-size: 13px;
}

.users-safe-note {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: #f7eedf;
  color: #6b5132;
  border: 1px solid rgba(177, 141, 76, .16);
}

.avatar-gray {
  background: #f1f1f1;
  color: #777;
}

@media(max-width:1300px) {
  .users-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .users-main-grid {
    grid-template-columns: 1fr;
  }

  .users-control-panel {
    grid-template-columns: 1fr 1fr;
  }

  .users-card-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media(max-width:760px) {
  .users-hero {
    flex-direction: column;
    padding: 22px;
  }

  .users-hero-actions,
  .users-hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .users-kpi-grid,
  .users-control-panel,
  .users-form-grid,
  .users-drawer-grid {
    grid-template-columns: 1fr;
  }

  .users-card-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .users-profile-meta {
    grid-template-columns: 1fr;
  }
}

/* Stage 24 — Smart Lead Distribution Center */

.dist-smart-page {
  display: grid;
  gap: 18px;
}

.dist-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 28px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 86% 18%, rgba(193, 171, 121, .22), transparent 30%),
    linear-gradient(135deg, #fff, #f7f1e7);
  border: 1px solid rgba(177, 141, 76, .18);
  box-shadow: 0 18px 50px rgba(43, 26, 15, .08);
}

.dist-hero h2 {
  margin: 7px 0;
  font-size: clamp(24px, 3vw, 38px);
  color: #2a1a0f;
}

.dist-hero p {
  margin: 0;
  color: #7b6246;
}

.dist-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.dist-kpi {
  min-height: 120px;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .15);
  box-shadow: 0 16px 38px rgba(43, 26, 15, .07);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  overflow: hidden;
  position: relative;
}

.dist-kpi::after {
  content: '';
  position: absolute;
  right: -38px;
  top: -38px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(193, 171, 121, .12);
}

.dist-kpi span {
  display: block;
  color: #8a7357;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dist-kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  color: #2a1a0f;
}

.dist-kpi small {
  display: block;
  margin-top: 8px;
  color: #8a7357;
}

.dist-kpi i {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #f6efe3;
  color: #a9823d;
  font-size: 22px;
}

.dist-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .7fr);
  gap: 18px;
  align-items: start;
}

.dist-panel {
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .16);
  border-radius: 28px;
  box-shadow: 0 16px 42px rgba(43, 26, 15, .07);
  overflow: hidden;
}

.dist-panel-head {
  padding: 18px 20px;
  background: linear-gradient(135deg, #fffaf2, #fff);
  border-bottom: 1px solid rgba(177, 141, 76, .13);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.dist-panel-head span {
  color: #a9823d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.dist-panel-head h3 {
  margin: 4px 0;
  color: #2a1a0f;
}

.dist-panel-head p {
  margin: 0;
  color: #8a7357;
  font-size: 13px;
}

.dist-rep-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dist-rep-card {
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, #fffaf2);
  border: 1px solid rgba(177, 141, 76, .15);
  box-shadow: 0 12px 28px rgba(43, 26, 15, .05);
  display: grid;
  gap: 14px;
}

.dist-rep-card.recommended {
  border-color: rgba(169, 130, 61, .55);
  box-shadow: 0 18px 44px rgba(169, 130, 61, .18);
}

.dist-rep-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dist-avatar {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #a9823d, #e4c983);
  color: #fff;
  font-weight: 900;
}

.dist-rep-top h4 {
  margin: 0;
  color: #2a1a0f;
}

.dist-rep-top p {
  margin: 4px 0 0;
  color: #8a7357;
  font-size: 12px;
}

.dist-ai-badge {
  margin-left: auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #211309;
  color: #f4d892;
  font-size: 11px;
  font-weight: 900;
}

.dist-meter {
  display: grid;
  gap: 8px;
}

.dist-meter-top {
  display: flex;
  justify-content: space-between;
  color: #2a1a0f;
  font-weight: 900;
}

.dist-bar {
  height: 10px;
  border-radius: 999px;
  background: #efe6d7;
  overflow: hidden;
}

.dist-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.dist-bar i.green {
  background: #2fbf71;
}

.dist-bar i.gold {
  background: #d6aa48;
}

.dist-bar i.amber {
  background: #f59e0b;
}

.dist-bar i.red {
  background: #dc2626;
}

.dist-status {
  font-weight: 900;
  font-size: 12px;
}

.dist-status.green {
  color: #1f8f4d;
}

.dist-status.gold {
  color: #a9823d;
}

.dist-status.amber {
  color: #b76a00;
}

.dist-status.red {
  color: #b91c1c;
}

.dist-rep-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.dist-rep-stats div {
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(177, 141, 76, .12);
}

.dist-rep-stats span {
  display: block;
  color: #8a7357;
  font-size: 11px;
}

.dist-rep-stats strong {
  display: block;
  margin-top: 4px;
  color: #2a1a0f;
}

.dist-lead-list {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.dist-lead-mini {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #fffaf2);
  border: 1px solid rgba(177, 141, 76, .14);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.dist-lead-mini strong {
  display: block;
  color: #2a1a0f;
}

.dist-lead-mini span {
  display: block;
  margin-top: 4px;
  color: #8a7357;
  font-size: 12px;
}

.dist-empty {
  padding: 42px 18px;
  text-align: center;
  color: #8a7357;
}

.dist-empty i {
  display: block;
  font-size: 34px;
  margin-bottom: 10px;
  color: #a9823d;
}

@media (max-width: 1300px) {
  .dist-layout {
    grid-template-columns: 1fr;
  }

  .dist-kpi-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .dist-hero {
    flex-direction: column;
    padding: 22px;
  }

  .dist-kpi-grid,
  .dist-rep-grid {
    grid-template-columns: 1fr;
  }

  .dist-rep-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}