/* ============================================================
   MotoMagus CRM - Visual Identity System
   Brand colors sampled from the supplied MotoMagus logo:
   orange #FF6C10 / graphite #272727 / white #FFFFFF
   ============================================================ */

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

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

:root {
  color-scheme: light;

  --brand-orange: #FF6C10;
  --brand-orange-dark: #E85B00;
  --brand-orange-deep: #C94D00;
  --brand-orange-soft: #FFF0E6;
  --brand-orange-faint: #FFF8F3;

  --ink: #272727;
  --ink-900: #111214;
  --ink-800: #1A1B1E;
  --ink-700: #303238;

  --white: #FFFFFF;
  --gray-25: #FCFCFD;
  --gray-50: #F7F8FA;
  --gray-100: #F0F2F5;
  --gray-150: #E9ECF0;
  --gray-200: #DDE1E7;
  --gray-300: #C8CDD5;
  --gray-400: #9097A3;
  --gray-500: #6C7480;
  --gray-600: #505763;
  --gray-700: #39404A;

  --success: #16805A;
  --success-soft: #E8F7F0;
  --warning: #C47A00;
  --warning-soft: #FFF4D6;
  --danger: #D6362E;
  --danger-dark: #B42318;
  --danger-soft: #FDECEA;
  --info: #2563EB;
  --info-soft: #EAF1FF;

  /* Compatibility aliases for existing inline styles. */
  --black: var(--ink);
  --red: var(--danger);
  --red-dark: var(--danger-dark);
  --amber: var(--warning);
  --green: var(--success);

  --sidebar-width: 252px;
  --topbar-height: 68px;
  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius: 13px;
  --radius-lg: 18px;
  --shadow-xs: 0 1px 2px rgba(17, 18, 20, .05);
  --shadow-sm: 0 8px 24px rgba(17, 18, 20, .06), 0 1px 3px rgba(17, 18, 20, .05);
  --shadow-md: 0 18px 50px rgba(17, 18, 20, .10);
  --focus-ring: 0 0 0 4px rgba(255, 108, 16, .16);
  --transition: 160ms ease;
}

html {
  min-height: 100%;
  background: var(--gray-50);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 0%, rgba(255,108,16,.055), transparent 22rem),
    var(--gray-50);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

img, svg {
  display: block;
}

a {
  color: var(--brand-orange-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-orange-dark);
}

::selection {
  color: var(--ink-900);
  background: rgba(255, 108, 16, .24);
}

:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ------------------------------
   Application shell
   ------------------------------ */
.crm-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background:
    radial-gradient(circle at 15% -5%, rgba(255,108,16,.24), transparent 14rem),
    linear-gradient(180deg, var(--ink-900) 0%, #15161A 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid rgba(255,255,255,.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}

.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 99px; }

.sidebar-brand {
  min-height: 126px;
  padding: 20px 18px 15px;
  border-bottom: 1px solid rgba(255,255,255,.075);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.brand-lockup {
  display: block;
  width: 176px;
  color: inherit;
  text-decoration: none;
}

.brand-lockup:hover { color: inherit; }

.brand-lockup img {
  width: 154px;
  height: auto;
  object-fit: contain;
}

.brand-product {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-left: 2px;
  color: rgba(255,255,255,.56);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.brand-product::before {
  content: '';
  width: 14px;
  height: 2px;
  border-radius: 99px;
  background: var(--brand-orange);
  box-shadow: 7px 0 18px rgba(255,108,16,.5);
}

.sidebar-close {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  color: rgba(255,255,255,.76);
  background: rgba(255,255,255,.08);
  cursor: pointer;
}

.sidebar-close svg { width: 18px; height: 18px; }

.sidebar-section {
  padding: 18px 12px 0;
}

.sidebar-section-label {
  padding: 0 10px 7px;
  color: rgba(255,255,255,.38);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  gap: 3px;
}

.sidebar-nav a {
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255,255,255,.67);
  text-decoration: none;
  font-size: 12.75px;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
}

.sidebar-nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,.065);
  transform: translateX(1px);
}

.sidebar-nav a.active {
  color: var(--white);
  background: linear-gradient(90deg, rgba(255,108,16,.19), rgba(255,108,16,.075));
  border-color: rgba(255,108,16,.22);
  box-shadow: inset 3px 0 0 var(--brand-orange);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.47);
  transition: color var(--transition), transform var(--transition);
}

.nav-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.sidebar-nav a:hover .nav-icon,
.sidebar-nav a.active .nav-icon {
  color: var(--brand-orange);
}

.sidebar-nav a.active .nav-icon {
  transform: scale(1.04);
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav a .nav-badge {
  margin-left: auto;
  min-width: 19px;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 4px 12px rgba(214,54,46,.2);
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px 16px 20px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
}

.user-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,108,16,.32);
  border-radius: 10px;
  color: var(--white);
  background: rgba(255,108,16,.15);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-meta {
  min-width: 0;
  flex: 1;
}

.user-name {
  overflow: hidden;
  color: rgba(255,255,255,.9);
  font-size: 11.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  margin-top: 1px;
  color: rgba(255,255,255,.39);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .04em;
}

.logout-link {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: rgba(255,255,255,.42);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.logout-link:hover {
  color: var(--brand-orange);
  background: rgba(255,255,255,.07);
}

.logout-link svg { width: 16px; height: 16px; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  border: 0;
  background: rgba(9,10,12,.55);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.main-content {
  margin-left: var(--sidebar-width);
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-height);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(221,225,231,.92);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px) saturate(140%);
}

.topbar-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.mobile-menu-toggle {
  display: none;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-200);
  border-radius: 11px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}

.mobile-menu-toggle svg { width: 19px; height: 19px; }

.topbar-heading { min-width: 0; }

.topbar-eyebrow {
  display: block;
  margin-bottom: 1px;
  color: var(--brand-orange-deep);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.topbar-title {
  overflow: hidden;
  color: var(--ink-900);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.page-body {
  width: 100%;
  max-width: 1680px;
  padding: 28px 30px 42px;
  flex: 1;
}

/* ------------------------------
   Cards and information blocks
   ------------------------------ */
.card {
  overflow: hidden;
  border: 1px solid var(--gray-150);
  border-radius: var(--radius);
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-sm);
}

.card-header {
  min-height: 58px;
  padding: 15px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(180deg, #fff 0%, #FDFDFE 100%);
}

.card-title {
  color: var(--ink-900);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.012em;
}

.card-body { padding: 20px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  min-height: 132px;
  padding: 19px 19px 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gray-150);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #FFFFFF 0%, #FCFCFD 100%);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.kpi-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--gray-300);
}

.kpi-card::after {
  content: '';
  width: 84px;
  height: 84px;
  position: absolute;
  right: -38px;
  top: -40px;
  border-radius: 50%;
  background: var(--gray-100);
  opacity: .72;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--gray-200);
  box-shadow: 0 14px 34px rgba(17,18,20,.085);
}

.kpi-card.red::before { background: var(--danger); }
.kpi-card.red::after { background: var(--danger-soft); }
.kpi-card.amber::before { background: var(--warning); }
.kpi-card.amber::after { background: var(--warning-soft); }
.kpi-card.green::before { background: var(--success); }
.kpi-card.green::after { background: var(--success-soft); }
.kpi-card.black::before { background: var(--brand-orange); }
.kpi-card.black::after { background: var(--brand-orange-soft); }

.kpi-label {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  color: var(--gray-500);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.kpi-value {
  position: relative;
  z-index: 1;
  color: var(--ink-900);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.045em;
}

.kpi-sub {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: var(--gray-400);
  font-size: 10.5px;
  font-weight: 600;
}

.kpi-sub a {
  color: inherit;
  text-decoration: none;
}

.kpi-sub a:hover { color: var(--brand-orange-deep); }

/* ------------------------------
   Tables
   ------------------------------ */
.tbl-wrap {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}

.tbl-wrap::-webkit-scrollbar { height: 7px; }
.tbl-wrap::-webkit-scrollbar-track { background: var(--gray-50); }
.tbl-wrap::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  padding: 11px 15px;
  color: var(--gray-600);
  background: var(--gray-25);
  border-bottom: 1px solid var(--gray-150);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--gray-100);
}

tbody tr:hover { background: var(--brand-orange-faint); }

tbody td {
  padding: 11px 15px;
  color: var(--gray-700);
  font-size: 12.75px;
  font-weight: 500;
  vertical-align: middle;
}

tbody td a:not(.btn) {
  color: var(--ink-900);
  font-weight: 700;
  text-decoration: none;
}

tbody td a:not(.btn):hover { color: var(--brand-orange-deep); }

/* ------------------------------
   Badges
   ------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9.75px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .015em;
  white-space: nowrap;
}

.badge-green { color: #0C6847; background: var(--success-soft); border-color: #C8ECDD; }
.badge-red { color: #A8241E; background: var(--danger-soft); border-color: #F4C9C5; }
.badge-amber { color: #915B00; background: var(--warning-soft); border-color: #F0DCA5; }
.badge-gray { color: var(--gray-600); background: var(--gray-100); border-color: var(--gray-150); }
.badge-black { color: #fff; background: var(--ink); border-color: var(--ink); }
.badge-blue { color: #1E4FBB; background: var(--info-soft); border-color: #CADBFF; }
.badge-brand { color: #9D3D00; background: var(--brand-orange-soft); border-color: #FFD4B8; }

.badge svg { width: 12px; height: 12px; flex: 0 0 12px; stroke-width: 1.9; }

/* ------------------------------
   Buttons
   ------------------------------ */
.btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 11.75px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), color var(--transition), background var(--transition), box-shadow var(--transition);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.btn svg { width: 15px; height: 15px; flex: 0 0 15px; }

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #FF791F 0%, var(--brand-orange) 100%);
  border-color: var(--brand-orange);
  box-shadow: 0 8px 18px rgba(255,108,16,.20);
}

.btn-primary:hover {
  color: #fff;
  background: var(--brand-orange-dark);
  border-color: var(--brand-orange-dark);
  box-shadow: 0 10px 22px rgba(255,108,16,.25);
}

.btn-dark {
  color: #fff;
  background: var(--ink-900);
  border-color: var(--ink-900);
  box-shadow: 0 7px 16px rgba(17,18,20,.13);
}

.btn-dark:hover { color: #fff; background: var(--ink-700); border-color: var(--ink-700); }

.btn-danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 7px 16px rgba(214,54,46,.16);
}

.btn-danger:hover { color: #fff; background: var(--danger-dark); border-color: var(--danger-dark); }

.btn-danger-soft {
  color: #A8241E;
  background: var(--danger-soft);
  border-color: #F2C3BF;
}

.btn-danger-soft:hover { color: #8C1D18; background: #FBE0DE; border-color: #EBAAA5; }

.btn-outline {
  color: var(--gray-700);
  background: var(--white);
  border-color: var(--gray-200);
  box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
  color: var(--brand-orange-deep);
  background: var(--brand-orange-faint);
  border-color: #FFC49D;
}

.btn-sm {
  min-height: 31px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 10.75px;
}

/* ------------------------------
   Forms and filters
   ------------------------------ */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--gray-600);
  font-size: 10.75px;
  font-weight: 800;
}

.form-control {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  background: var(--white);
  outline: none;
  font-family: inherit;
  font-size: 12.75px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: inset 0 1px 2px rgba(17,18,20,.018);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-control:hover { border-color: var(--gray-300); }

.form-control:focus {
  border-color: var(--brand-orange);
  box-shadow: var(--focus-ring);
}

.form-control::placeholder { color: var(--gray-400); font-weight: 500; }
select.form-control { cursor: pointer; }
textarea.form-control { min-height: 96px; resize: vertical; }

input[type='checkbox'], input[type='radio'] {
  accent-color: var(--brand-orange);
}

.filters-bar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid var(--gray-150);
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-xs);
}

.filters-bar .form-group { margin-bottom: 0; }

.filters-bar label {
  display: block;
  margin-bottom: 5px;
  color: var(--gray-500);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

/* ------------------------------
   Alerts
   ------------------------------ */
.alert {
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 11.75px;
  font-weight: 650;
  line-height: 1.55;
  margin-bottom: 16px;
}

.alert-success { color: #0C6847; background: var(--success-soft); border-color: #BDE7D5; }
.alert-error { color: #A8241E; background: var(--danger-soft); border-color: #F2C3BF; }
.alert-warning { color: #875300; background: var(--warning-soft); border-color: #EED795; }
.alert-info { color: #1C4CAE; background: var(--info-soft); border-color: #C8DAFF; }

/* ------------------------------
   Login / authentication
   ------------------------------ */
.login-body {
  overflow-x: hidden;
  background: var(--ink-900);
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(440px, .92fr);
  background: var(--gray-50);
}

.login-brand-panel {
  min-height: 100vh;
  padding: clamp(34px, 5vw, 68px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(circle at 8% 8%, rgba(255,108,16,.30), transparent 22rem),
    radial-gradient(circle at 100% 88%, rgba(255,108,16,.14), transparent 24rem),
    linear-gradient(145deg, #101114 0%, #1A1B1F 62%, #101114 100%);
}

.login-brand-panel::before,
.login-brand-panel::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.login-brand-panel::before {
  width: 520px;
  height: 520px;
  right: -300px;
  top: 16%;
  border: 1px solid rgba(255,108,16,.17);
  transform: rotate(45deg);
}

.login-brand-panel::after {
  width: 310px;
  height: 310px;
  right: -180px;
  top: 27%;
  border: 1px solid rgba(255,255,255,.06);
  transform: rotate(45deg);
}

.login-brand-content,
.login-brand-footer {
  position: relative;
  z-index: 1;
}

.login-brand-logo {
  width: min(310px, 74%);
  height: auto;
  margin-bottom: clamp(54px, 10vh, 112px);
}

.login-product-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 10px;
  border: 1px solid rgba(255,108,16,.26);
  border-radius: 999px;
  color: #FFD3B6;
  background: rgba(255,108,16,.10);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.login-product-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: 0 0 0 4px rgba(255,108,16,.12);
}

.login-brand-title {
  max-width: 660px;
  color: #fff;
  font-size: clamp(36px, 5vw, 66px);
  font-weight: 800;
  line-height: .99;
  letter-spacing: -.055em;
}

.login-brand-title em {
  color: var(--brand-orange);
  font-style: normal;
}

.login-brand-description {
  max-width: 560px;
  margin-top: 22px;
  color: rgba(255,255,255,.58);
  font-size: clamp(13px, 1.35vw, 16px);
  font-weight: 500;
  line-height: 1.7;
}

.login-feature-list {
  max-width: 650px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-top: 32px;
}

.login-feature {
  min-height: 78px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}

.login-feature svg {
  width: 17px;
  height: 17px;
  margin-bottom: 9px;
  color: var(--brand-orange);
}

.login-feature span {
  color: rgba(255,255,255,.72);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.login-brand-footer {
  margin-top: 48px;
  color: rgba(255,255,255,.34);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-form-panel {
  min-height: 100vh;
  padding: 40px clamp(26px, 6vw, 92px);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 70% 20%, rgba(255,108,16,.06), transparent 18rem),
    var(--gray-50);
}

.login-box {
  width: 100%;
  max-width: 430px;
  padding: 34px;
  border: 1px solid var(--gray-150);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-md);
}

.login-mobile-logo {
  display: none;
  width: 215px;
  height: auto;
  margin-bottom: 28px;
}

.login-kicker {
  margin-bottom: 8px;
  color: var(--brand-orange-deep);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.login-title {
  color: var(--ink-900);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.04em;
}

.login-description {
  margin-top: 8px;
  margin-bottom: 26px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.65;
}

.login-box .form-label { color: var(--gray-700); }
.login-box .form-control { min-height: 46px; }
.login-submit { width: 100%; min-height: 46px; margin-top: 4px; }

.login-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--gray-400);
  font-size: 9.5px;
  font-weight: 650;
}

.login-security-note svg { width: 13px; height: 13px; }

/* ------------------------------
   Utilities
   ------------------------------ */
.text-red { color: var(--danger); }
.text-green { color: var(--success); }
.text-amber { color: var(--warning); }
.text-muted { color: var(--gray-400); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-600 { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-12 { display: flex; gap: 12px; flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 14px; }

.empty-state {
  padding: 56px 20px;
  color: var(--gray-400);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.empty-state .empty-icon {
  margin-bottom: 12px;
  color: var(--gray-300);
  font-size: 34px;
}

.chart-wrap {
  position: relative;
  height: 290px;
}

/* ------------------------------
   Responsive behavior
   ------------------------------ */
@media (max-width: 1180px) {
  :root { --sidebar-width: 232px; }
  .page-body { padding-inline: 22px; }
  .topbar { padding-inline: 22px; }
}

@media (max-width: 920px) {
  body.sidebar-open { overflow: hidden; }

  .sidebar {
    width: min(292px, 86vw);
    transform: translateX(-102%);
    transition: transform 220ms ease;
    box-shadow: 24px 0 70px rgba(0,0,0,.3);
  }

  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { display: block; }

  .sidebar-close { display: inline-flex; }
  .mobile-menu-toggle { display: inline-flex; }
  .main-content { margin-left: 0; }
  .topbar { padding-inline: 18px; }
  .page-body { padding: 22px 18px 36px; }

  .login-page { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; padding: 32px 20px; }
  .login-mobile-logo { display: block; }
}

@media (max-width: 680px) {
  :root { --topbar-height: 62px; }
  body { font-size: 13px; }

  .topbar { gap: 12px; padding-inline: 14px; }
  .topbar-eyebrow { display: none; }
  .topbar-title { font-size: 15px; }
  .topbar-actions { gap: 7px; }
  .topbar-actions > .badge { display: none; }
  .topbar-actions .btn { min-width: 35px; padding-inline: 9px; }
  .topbar-actions .btn .btn-label { display: none; }

  .page-body { padding: 16px 12px 30px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .kpi-card { min-height: 118px; padding: 16px 14px; }
  .kpi-value { font-size: 21px; }
  .card-header { min-height: 52px; padding: 13px 14px; }
  .card-body { padding: 15px; }
  .filters-bar { padding: 12px; }
  .filters-bar .form-group { width: 100%; }
  .filters-bar .form-control { width: 100% !important; }
  .flex-between { align-items: flex-start; flex-direction: column; }
  .chart-wrap { height: 250px; }

  thead th { padding: 10px 12px; }
  tbody td { padding: 10px 12px; }

  .login-box { padding: 27px 22px; }
  .login-mobile-logo { width: 185px; }
}

@media (max-width: 420px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-card { min-height: 108px; }
  .login-form-panel { padding-inline: 14px; }
  .login-box { padding: 25px 19px; border-radius: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .sidebar, .topbar, .sidebar-backdrop { display: none !important; }
  .main-content { margin-left: 0; }
  .page-body { max-width: none; padding: 0; }
  body { background: #fff; }
  .card, .kpi-card { box-shadow: none; break-inside: avoid; }
}
