/* ==========================================================================
   HajeriPro CRM - stylesheet
   One file for the whole panel. Colours live in the tokens below; change
   them here and every page follows.
   ========================================================================== */

:root {
  --primary:      #5e0c12;
  --primary-lg:   #7a1a22;
  --primary-dim:  #fdf0f0;
  --primary-soft: #f9eaea;

  --bg:           #f4f5f9;
  --surface:      #ffffff;
  --border:       #ebe3e4;
  --border-strong:#dccfd1;

  --text:         #1f1417;
  --text-sub:     #5f4a4f;
  --text-muted:   #957d83;

  --green:        #15803d;  --green-bg: #dcfce7;
  --amber:        #b45309;  --amber-bg: #fef3c7;
  --red:          #b91c1c;  --red-bg:   #fee2e2;
  --blue:         #1d4ed8;  --blue-bg:  #dbeafe;
  --sky:          #0369a1;  --sky-bg:   #e0f2fe;
  --purple:       #6d28d9;  --purple-bg:#ede9fe;

  --sw:           250px;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 1px 2px rgba(31,20,23,.04), 0 4px 14px rgba(94,12,18,.05);
  --font:         'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sw); height: 100vh;
  background: var(--primary);
  display: flex; flex-direction: column;
  z-index: 200; overflow: hidden;
}

.sb-head {
  display: flex; align-items: center; justify-content: center;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  flex-shrink: 0;
}
.sb-head img { max-width: 100%; height: auto; }

.role-badge {
  margin: 14px 16px 0;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.role-dot { width: 7px; height: 7px; border-radius: 50%; background: #86efac; flex-shrink: 0; }
.role-text { font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.9); white-space: nowrap; }

.nav-scroll { flex: 1; overflow-y: auto; padding: 8px 0 12px; }
.nav-scroll::-webkit-scrollbar { width: 4px; }
.nav-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 10px; }

.nav-sec { padding: 12px 0 2px; }
.nav-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: rgba(255,255,255,.4); padding: 4px 20px 6px;
}

.nav-a {
  display: flex; align-items: center; gap: 10px;
  margin: 1px 10px; padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px; color: rgba(255,255,255,.72);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-a.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.nav-text { flex: 1; }
.nav-count {
  min-width: 22px; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-align: center;
  background: rgba(255,255,255,.16); color: #fff;
}
.nav-count.is-alert { background: #ef4444; color: #fff; }

.sb-foot {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.uav {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.uinfo { min-width: 0; }
.uinfo .uname { font-size: 12.5px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uinfo .urole { font-size: 10.5px; color: rgba(255,255,255,.55); text-transform: capitalize; }

/* ==========================================================================
   MAIN + TOPBAR
   ========================================================================== */
.main {
  margin-left: var(--sw);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.tb-left { display: flex; align-items: center; gap: 12px; }
.page-title h2 { font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.2; }
.page-title p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tb-right { display: flex; align-items: center; gap: 8px; }

.content { padding: 26px 28px 48px; flex: 1; }

/* Section header above a page's main content */
.section-hd {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-bottom: 18px;
}
.section-hd h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.section-hd .sec-actions { display: flex; gap: 8px; align-items: center; }

/* ==========================================================================
   KPI CARDS
   ========================================================================== */
.kpi-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.kpi.accent-red::before    { background: var(--primary); }
.kpi.accent-green::before  { background: #16a34a; }
.kpi.accent-amber::before  { background: #d97706; }
.kpi.accent-blue::before   { background: #2563eb; }
.kpi.accent-purple::before { background: #7c3aed; }

.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 8px; }
.kpi-val {
  font-size: 26px; font-weight: 700; color: var(--text);
  line-height: 1.1; font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   CARDS
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-hd h3 { font-size: 14px; font-weight: 700; color: var(--text); }
.card-hd .meta { font-size: 12px; color: var(--text-muted); }
.card-hd a { font-size: 12px; color: var(--primary); font-weight: 600; }
.card-body { padding: 20px; }

/* Heading used as a card title on detail pages */
.card > h4 {
  padding: 16px 20px 12px;
  font-size: 14px; font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--border);
}

/* Two-column grid for detail pages */
.row { display: flex; flex-wrap: wrap; margin: 0 -8px 20px; }
.row > [class^="col-"], .row > [class*=" col-"] { padding: 0 8px; margin-bottom: 16px; }
.row .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.row .col-md-6 { flex: 0 0 50%; max-width: 50%; }
.row .col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 20px; }

/* Key / value layout used on detail pages */
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table tr { border-bottom: 1px solid var(--border); }
.detail-table tr:last-child { border-bottom: none; }
.detail-table td { padding: 12px 0; font-size: 13px; }
.detail-table td:first-child { width: 220px; font-weight: 600; color: var(--text); }
.detail-table td:last-child { color: var(--text-sub); }

.card > table.table:not(.table-bordered) { width: 100%; border-collapse: collapse; }
.card > table.table:not(.table-bordered) tr { border-bottom: 1px solid var(--border); }
.card > table.table:not(.table-bordered) tr:last-child { border-bottom: none; }
.card > table.table:not(.table-bordered) th {
  width: 36%; padding: 11px 20px; text-align: left; vertical-align: top;
  font-size: 12.5px; font-weight: 600; color: var(--text);
}
.card > table.table:not(.table-bordered) td {
  padding: 11px 20px; text-align: left; vertical-align: top;
  font-size: 13px; color: var(--text-sub);
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-responsive { width: 100%; overflow-x: auto; }

.table, #mytable {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
}
.table th {
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  text-align: left; white-space: normal;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 13px 14px;
  font-size: 13px; color: var(--text-sub);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: var(--primary-dim); }
.table .bold { color: var(--text); font-weight: 600; }

/* Bordered variant (used for history tables) keeps the grid lines */
.table-bordered th, .table-bordered td { border: 1px solid var(--border); }

/* Empty state inside tables and cards */
.empty { text-align: center; padding: 32px 20px; color: var(--text-muted); font-size: 13px; }

/* ==========================================================================
   DATATABLES (search / sort / export), styled to match the app
   ========================================================================== */
.dt-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.dataTables_wrapper .dataTables_filter { margin: 0; }
.dataTables_wrapper .dataTables_filter label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--text-sub); }
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 12px; font-size: 13px; min-width: 200px;
}
.dataTables_wrapper .dt-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.dataTables_wrapper .dt-button {
  border: 1px solid var(--border) !important; background: #fff !important;
  color: var(--text-sub) !important; box-shadow: none !important;
  border-radius: var(--radius-sm) !important; font-size: 12px !important;
  padding: 6px 12px !important;
}
.dataTables_wrapper .dt-button:hover { background: var(--primary-soft) !important; color: var(--primary) !important; }
.dataTables_wrapper .dataTables_scrollHead { overflow: visible !important; }
table.dataTable thead .sorting:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc:after { opacity: .4; }
@media (max-width: 640px) {
  .dt-toolbar { flex-direction: column; align-items: stretch; }
  .dataTables_wrapper .dataTables_filter input { width: 100%; min-width: 0; }
}

/* ==========================================================================
   BADGES (status pills)
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1.4;
  white-space: nowrap;
  background: var(--bg); color: var(--text-sub);
}
.b-new        { background: var(--blue-bg);   color: var(--blue); }
.b-followup   { background: var(--amber-bg);  color: var(--amber); }
.b-demo       { background: var(--sky-bg);    color: var(--sky); }
.b-converted  { background: var(--green-bg);  color: var(--green); }
.b-closed     { background: var(--red-bg);    color: var(--red); }
.b-pending    { background: var(--amber-bg);  color: var(--amber); }
.badge-success{ background: var(--green-bg);  color: var(--green); }
.badge-warning{ background: var(--amber-bg);  color: var(--amber); }
.badge-danger { background: var(--red-bg);    color: var(--red); }

/* ==========================================================================
   TIMELINE (lead activity log)
   ========================================================================== */
.timeline { padding: 16px 20px; display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; position: relative; }
.tl-item::before {
  content: ''; position: absolute; left: 13px; top: 30px; bottom: 0;
  width: 1px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--primary-dim); color: var(--primary); font-size: 12px;
}
.tl-body { flex: 1; padding-bottom: 18px; min-width: 0; }
.tl-title { font-size: 13px; font-weight: 600; color: var(--text); }
.tl-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.tl-note {
  font-size: 12.5px; color: var(--text-sub); margin-top: 6px;
  background: var(--primary-soft); border-left: 3px solid var(--primary);
  border-radius: 6px; padding: 8px 10px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-login, button.btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; line-height: 1.2;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn-primary:active, .btn-secondary:active, .btn-success:active,
.btn-danger:active, .btn-login:active { transform: translateY(1px); }

.btn-primary, .btn-login { background: var(--primary); color: #fff; }
.btn-primary:hover, .btn-login:hover { background: var(--primary-lg); }

.btn-secondary {
  background: var(--surface); color: var(--text-sub); border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #116b33; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #991b1b; }

/* "View" button used in every list row (same look on every page) */
.btn-view {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 14px; min-width: 64px;
  border: 1px solid var(--primary); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--primary);
  font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  transition: background .15s, color .15s;
}
.btn-view:hover { background: var(--primary); color: #fff; }

/* Small button used in table rows */
.btn-sm { padding: 6px 12px; font-size: 12px; }

a.btn-primary.btn-sm, a.btn-secondary.btn-sm { text-decoration: none; }

.btn-login { width: 100%; padding: 12px; }

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; margin-bottom: 7px;
  font-size: 12px; font-weight: 600; color: var(--text);
}
.form-group label.required::after { content: " *"; color: var(--red); }

.form-control {
  width: 100%; height: 42px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-size: 13px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}
select.form-control { cursor: pointer; }
textarea.form-control { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; }

.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ==========================================================================
   ALERTS
   ========================================================================== */
.alert {
  margin: 16px 20px; padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
}
.alert-warning { background: var(--amber-bg); color: var(--amber); border: 1px solid #fde68a; }
.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid #bbf7d0; }
.flash-wrap .alert { margin: 16px 28px 0; }
.flash-wrap { position: relative; z-index: 1; }
.card > .alert { margin: 16px 20px 20px; }

/* ==========================================================================
   LOGIN PAGE (login.php)
   ========================================================================== */
.login-page { min-height: 100vh; display: flex; }
.login-left {
  width: 50%; color: #fff;
  background: linear-gradient(135deg, #5e0c12, #7a1a22);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px;
}
.login-left h1 { font-size: 40px; font-weight: 700; margin-bottom: 14px; }
.login-left p { max-width: 400px; text-align: center; opacity: .85; }
.login-right {
  width: 50%; background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 30px;
}
.login-card {
  width: 420px; max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 36px; box-shadow: 0 10px 30px rgba(0,0,0,.07);
}
.login-card h2 { font-size: 22px; margin-bottom: 6px; }
.login-card p { color: var(--text-muted); margin-bottom: 24px; }

/* ==========================================================================
   DATATABLES (only used if the DataTables script is loaded)
   ========================================================================== */
.dataTables_wrapper { padding: 16px 20px 20px; width: 100%; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 6px 10px; font-size: 12.5px; color: var(--text); outline: none;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border: 1px solid var(--border-strong) !important; border-radius: var(--radius-sm) !important;
  background: var(--surface) !important; color: var(--text-sub) !important;
  padding: 4px 10px !important; margin-left: 4px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important;
}

/* ==========================================================================
   PAGER (includes/pager.php)
   ========================================================================== */
.pager {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 12px; padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.pager-info { font-size: 12px; color: var(--text-muted); }
.pager-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-btn, .pager-num {
  min-width: 34px; height: 34px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-sub);
  font-size: 12.5px; font-weight: 600;
  transition: border-color .15s, color .15s, background .15s;
}
a.pager-btn:hover, a.pager-num:hover { border-color: var(--primary); color: var(--primary); }
.pager-num.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager-btn.is-disabled { opacity: .45; cursor: not-allowed; }
.pager-gap { color: var(--text-muted); padding: 0 4px; }

/* Tabs used to split leads by type */
.tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 6px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  width: fit-content; max-width: 100%;
}
.tabs a {
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 600; color: var(--text-sub);
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .15s, color .15s;
}
.tabs a:hover { background: var(--primary-dim); color: var(--primary); }
.tabs a.is-active { background: var(--primary); color: #fff; }
.tabs .count {
  background: var(--primary-soft); color: var(--primary);
  font-size: 11px; padding: 1px 7px; border-radius: 999px;
}
.tabs a.is-active .count { background: rgba(255,255,255,.22); color: #fff; }

/* ==========================================================================
   NOTIFICATIONS + TOASTS
   ========================================================================== */
.notif { position: relative; }
.notif .btn-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border-strong);
  display: grid; place-items: center; cursor: pointer; color: var(--text-sub);
  transition: border-color .15s, color .15s;
}
.notif .btn-icon:hover { border-color: var(--primary); color: var(--primary); }
.notif .btn-icon svg { width: 18px; height: 18px; }
.notif-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--primary); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 19px; text-align: center;
  border: 2px solid var(--surface);
}
.notif-count[hidden] { display: none; }

.notif-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 300px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(31,20,23,.12);
  padding: 6px; z-index: 300;
}
.notif-menu[hidden] { display: none; }
.notif-hd { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); padding: 8px 10px; }
.notif-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-sub);
}
.notif-item:hover { background: var(--primary-dim); color: var(--primary); }
.notif-item strong { color: var(--text); }
.notif-dot-lg { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.notif-dot-lg.warn, .notif-dot-lg.amber { background: #d97706; }
.notif-dot-lg.blue { background: var(--blue); }
.notif-dot-lg.red { background: var(--red); }
.notif-empty { padding: 14px 10px; font-size: 13px; color: var(--text-muted); }
#notifList { max-height: 360px; overflow-y: auto; }

.toast-stack {
  position: fixed; right: 20px; bottom: 20px; z-index: 400;
  display: flex; flex-direction: column; gap: 10px; max-width: 340px;
}
.toast {
  background: var(--text); color: #fff;
  border-radius: var(--radius-sm); padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,.2);
  font-size: 13px; display: flex; gap: 10px; align-items: flex-start;
  animation: toastIn .25s ease both;
}
.toast a { color: #fca5a5; font-weight: 600; white-space: nowrap; }
.toast.leave { opacity: 0; transform: translateX(10px); transition: all .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Trial reminder pills */
.pill-warn { background: var(--amber-bg); color: var(--amber); }
.pill-danger { background: var(--red-bg); color: var(--red); }
.pill-ok { background: var(--green-bg); color: var(--green); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .sidebar { position: static; width: 100%; height: auto; }
  .nav-scroll { max-height: none; }
  .main { margin-left: 0; }
  .topbar { padding: 12px 16px; }
  .content { padding: 18px 16px 36px; }
  .row .col-md-4, .row .col-md-6, .row .col-md-8 { flex: 0 0 100%; max-width: 100%; }
  .login-page { flex-direction: column; }
  .login-left, .login-right { width: 100%; }
  .login-left { padding: 40px 24px; }
  .login-left h1 { font-size: 30px; }
}

@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-val { font-size: 22px; }
  .detail-table td:first-child { width: auto; }
  .form-actions .btn-primary, .form-actions .btn-secondary { width: 100%; }
}
