/* ===================================================
   FREIGHT CRM PRO – DESIGN SYSTEM & CORE STYLES
   =================================================== */

:root {
  --primary: #00c896;
  --primary-dark: #00a87e;
  --primary-light: rgba(0, 200, 150, 0.12);
  --accent: #0ea5e9;
  --accent-dark: #0284c7;
  --danger: #ef4444;
  --warning: #f59e0b;
  --purple: #8b5cf6;
  --navy: #0f172a;
  --nav-bg: #111827;
  --nav-border: rgba(255, 255, 255, 0.08);
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

body.login-page {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: var(--font);
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}

/* ===== LOGIN ===== */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f2327 0%, #121417 50%, #1f2327 100%);
  z-index: 9999;
}

.login-bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 200, 150, 0.15), transparent 70%);
  animation: float 8s ease-in-out infinite;
}

.shape-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.shape-2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  right: -100px;
  animation-delay: 3s;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12), transparent 70%);
}

.shape-3 {
  width: 300px;
  height: 300px;
  top: 50%;
  left: 60%;
  animation-delay: 1.5s;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent 70%);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

.login-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 420px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.login-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.login-title span {
  color: var(--primary);
}

.login-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  margin-top: 4px;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}

.login-form input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #ffffff !important;
  caret-color: var(--primary);
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
}

.login-form input:not([type="submit"]) {
  background-color: rgba(21, 23, 26, 0.8) !important;
}

#toggle-password:hover {
  color: #ffffff !important;
}

/* Force white text even when browser autofills the field */
.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(0, 200, 150, 0.08) inset !important;
  box-shadow: 0 0 0 1000px rgba(0, 200, 150, 0.08) inset !important;
  border-color: var(--primary) !important;
  transition: background-color 9999s ease;
}

.login-form input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.login-form input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 200, 150, 0.08);
  box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.15);
}

.login-demo-accounts {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  flex-wrap: wrap;
}

.demo-btn {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  transition: var(--transition);
}

.demo-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 200, 150, 0.3);
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(0, 200, 150, 0.4);
}

.login-error {
  color: #fc8181;
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  min-height: 20px;
}

/* Login card button overrides (dark background context) */
.login-form .btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 99px;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 200, 150, 0.35), 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.login-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 200, 150, 0.5), 0 4px 10px rgba(0, 0, 0, 0.3);
  filter: brightness(1.05);
}

.login-form .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 200, 150, 0.3);
}

.login-form .btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.login-form .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
  transform: translateY(-1px);
}

.login-form .btn-secondary:active {
  transform: translateY(0);
}

/* ===== TOP NAV ===== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  gap: 16px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.nav-logo {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-logo span {
  color: var(--primary);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 12px;
  width: 160px;
}

.nav-search input {
  background: none;
  border: none;
  color: #fff;
  font-size: 13px;
  width: 100%;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.nav-search input:focus {
  outline: none;
}

.search-icon {
  font-size: 13px;
  opacity: 0.5;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  justify-content: center;
}

.nav-center::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.nav-link.active {
  background: rgba(0, 200, 150, 0.15);
  color: var(--primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-add-record {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-add-record:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 200, 150, 0.3);
}

.nav-notifications {
  position: relative;
  cursor: pointer;
  padding: 6px;
}

.nav-notifications span:first-child {
  font-size: 18px;
}

.notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 320px;
  z-index: 1001;
  overflow: hidden;
}

.notif-item {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: var(--transition);
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notif-item .notif-time {
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  margin-top: 2px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  padding: 6px 8px;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-user:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}

.nav-user span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.user-role-badge {
  background: rgba(0, 200, 150, 0.2) !important;
  color: var(--primary) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 2px 8px;
  border-radius: 99px;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: 1001;
  overflow: hidden;
}

.user-dropdown a {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.user-dropdown a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--danger);
}

/* ===== MAIN CONTENT ===== */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  margin-top: 60px;
  padding: 24px;
  min-height: calc(100vh - 60px);
}

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 18px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== PAGE HEADERS ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

.page-title span {
  color: var(--primary);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-green {
  background: rgba(0, 200, 150, 0.12);
  color: #00a87e;
}

.badge-blue {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
}

.badge-yellow {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.badge-purple {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}

.badge-gray {
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
}

.badge-orange {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
}

.badge-teal {
  background: rgba(20, 184, 166, 0.12);
  color: #0d9488;
}

.badge-navy {
  background: rgba(15, 23, 42, 0.08);
  color: var(--navy);
}

/* ===== TABLES ===== */
.data-table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  background: var(--surface-2);
  transition: var(--transition);
}

.data-table th:hover {
  color: var(--primary);
}

.data-table th .sort-icon {
  margin-left: 4px;
  opacity: 0.5;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
  transition: var(--transition);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--surface-2);
}

.data-table .link-cell {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.data-table .link-cell:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== FILTERS BAR ===== */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  min-width: 220px;
}

.filter-search input {
  border: none;
  background: none;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}

.filter-search input:focus {
  outline: none;
}

.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ===== FORM STYLES ===== */
.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.form-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}

.modal-lg {
  max-width: 860px;
}

.modal-xl {
  max-width: 1100px;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  color: var(--text-3);
  font-size: 18px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--danger);
}

.modal-body {
  padding: 24px;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--navy);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease;
  min-width: 280px;
  max-width: 380px;
  border-left: 4px solid var(--primary);
}

.toast.toast-error {
  border-left-color: var(--danger);
}

.toast.toast-warning {
  border-left-color: var(--warning);
}

@keyframes toastIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
}

.tab:hover {
  color: var(--text-2);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon svg {
  flex-shrink: 0;
}

.stat-icon.green {
  background: rgba(0, 200, 150, 0.12);
  color: #00c896;
}

.stat-icon.blue {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
}

.stat-icon.purple {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.stat-icon.orange {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}

.stat-icon.yellow {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.stat-info {
  flex: 1;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.stat-change.up {
  color: var(--primary);
}

.stat-change.down {
  color: var(--danger);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 14px;
  color: var(--text-3);
  max-width: 320px;
}

/* ===== PIPELINE FUNNEL ===== */
.funnel-container {
  padding: 16px 0;
}

.funnel-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.funnel-bar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.funnel-bar {
  height: 32px;
  border-radius: 0 6px 6px 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.6s ease;
  min-width: 4px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.funnel-label {
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 600;
  white-space: nowrap;
  min-width: 110px;
}

.funnel-count {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
}

.funnel-stage:hover .funnel-bar {
  filter: brightness(1.1);
}

/* ===== KANBAN ===== */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-col {
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-width: 260px;
  max-width: 260px;
}

.kanban-col-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--surface-2);
  border-radius: var(--radius) var(--radius) 0 0;
}

.kanban-col-title {
  font-size: 13.5px;
  font-weight: 700;
}

.kanban-col-count {
  background: var(--border);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

.kanban-cards {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
}

.kanban-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 12px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.kanban-card-title {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.kanban-card-meta {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kanban-card-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 6px;
}

/* ===== PROFILE DETAIL ===== */
.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
}

.profile-name {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.profile-sub {
  font-size: 13px;
  color: var(--text-3);
}

.profile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.detail-section {
  margin-bottom: 0;
}

.detail-section-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13.5px;
}

.detail-label {
  color: var(--text-3);
  font-weight: 500;
}

.detail-value {
  color: var(--text);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

/* ===== ACTIVITY TIMELINE ===== */
.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}

.timeline-icon.call {
  background: rgba(0, 200, 150, 0.12);
}

.timeline-icon.email {
  background: rgba(14, 165, 233, 0.12);
}

.timeline-icon.meeting {
  background: rgba(139, 92, 246, 0.12);
}

.timeline-icon.note {
  background: rgba(245, 158, 11, 0.12);
}

.timeline-icon.text {
  background: rgba(249, 115, 22, 0.12);
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 13.5px;
  font-weight: 700;
}

.timeline-time {
  font-size: 11.5px;
  color: var(--text-3);
}

.timeline-desc {
  font-size: 13px;
  color: var(--text-2);
}

.timeline-result {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== PROGRESS BARS ===== */
.progress-bar-wrap {
  background: var(--border);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.6s ease;
}

/* ===== MAP PLACEHOLDER ===== */
.map-container {
  background: linear-gradient(135deg, #e0f2fe, #f0fdf4);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-3);
  gap: 8px;
}

.map-container.has-data {
  background: url('https://maps.googleapis.com/maps/api/staticmap?...');
  border-style: solid;
  border-color: var(--primary);
}

/* CALENDAR */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  min-height: 90px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  transition: var(--transition);
}

.cal-day:hover {
  border-color: var(--primary);
}

.cal-day.today {
  border-color: var(--primary);
  background: var(--primary-light);
}

.cal-day.other-month {
  opacity: 0.4;
}

.cal-day-num {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cal-event {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .nav-center {
    display: none;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }
}

/* ===== STATUS SELECT DROPDOWNS ===== */
.status-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 99px;
  padding: 4px 24px 4px 12px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 8px auto;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
}

.status-select:hover {
  filter: brightness(0.95);
}

/* SOLID - For Leads */
.status-solid-orange {
  background-color: #f97316;
  color: #fff;
}

.status-solid-green {
  background-color: #10b981;
  color: #fff;
}

.status-solid-blue {
  background-color: #3b82f6;
  color: #fff;
}

.status-solid-purple {
  background-color: #a855f7;
  color: #fff;
}

.status-solid-red {
  background-color: #ef4444;
  color: #fff;
}

.status-solid-teal {
  background-color: #14b8a6;
  color: #fff;
}

.status-solid-amber {
  background-color: #f59e0b;
  color: #fff;
}

.status-solid-gray {
  background-color: #94a3b8;
  color: #fff;
}

/* SOFT - For Drivers */
.status-soft-green {
  background-color: rgba(0, 200, 150, 0.12);
  color: #00a87e;
}

.status-soft-yellow {
  background-color: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.status-soft-orange {
  background-color: rgba(249, 115, 22, 0.12);
  color: #ea580c;
}

.status-soft-gray {
  background-color: rgba(148, 163, 184, 0.12);
  color: #64748b;
}

.status-soft-blue {
  background-color: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.status-soft-purple {
  background-color: rgba(168, 85, 247, 0.12);
  color: #9333ea;
}

.status-soft-red {
  background-color: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.status-soft-teal {
  background-color: rgba(20, 184, 166, 0.12);
  color: #0d9488;
}

.status-soft-amber {
  background-color: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

@media (max-width: 768px) {
  .main-content {
    padding: 16px;
  }

  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =====================================================
   DARK MODE VARIABLES
   ===================================================== */

body[data-theme="dark-default"], body.dark:not([data-theme]) {
  --bg: #0B0F14;
  --surface: #121821;
  --surface-2: #1a222e;
  --border: #2a3441;
  --text: #E6EDF3;
  --text-2: #9AA4B2;
  --text-3: #6b7785;
  --primary: #00C896;
  --primary-dark: #00a87e;
  --primary-light: rgba(0, 200, 150, 0.15);
  --nav-bg: #0B0F14;
  --nav-border: rgba(255, 255, 255, 0.06);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.5);
  
  --card-bg: var(--surface);
  --bg-primary: var(--bg);
  --bg-secondary: var(--surface-2);
  --text-primary: var(--text);
  --text-secondary: var(--text-2);
  --accent: var(--primary);
  --border-color: var(--border);
}

/* =====================================================
   PREMIUM DARK THEME (Corporate Blue 4K)
   ===================================================== */

body[data-theme="premium-dark"] {
  --bg: #06090E;
  --surface: #0E131A;
  --surface-2: #141A23;
  --border: #1E2734;
  --text: #F1F5F9;
  --text-2: #94A3B8;
  --text-3: #64748B;
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --primary-light: rgba(14, 165, 233, 0.12);
  --nav-bg: #030508;
  --nav-border: #131A23;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.8);
  
  --card-bg: var(--surface);
  --bg-primary: var(--bg);
  --bg-secondary: var(--surface-2);
  --text-primary: var(--text);
  --text-secondary: var(--text-2);
  --accent: var(--primary);
  --border-color: var(--border);
}

/* Premium Typography Overrides */
body[data-theme="premium-dark"] .page-title {
  font-size: 32px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}
body[data-theme="premium-dark"] .card-title,
body[data-theme="premium-dark"] .detail-section-title {
  font-size: 20px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}
body[data-theme="premium-dark"] .perf-metric-value {
  font-size: 36px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}
body[data-theme="premium-dark"] .nav-link,
body[data-theme="premium-dark"] .btn,
body[data-theme="premium-dark"] .settings-nav-item {
  font-size: 13px;
  font-weight: 600;
}

/* Premium Tables */
body[data-theme="premium-dark"] .data-table th {
  font-size: 11px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  background: var(--surface-2);
  color: var(--text-2);
  border-bottom: 2px solid var(--border);
}
body[data-theme="premium-dark"] .data-table td {
  font-size: 13px !important;
  font-weight: 500;
  color: var(--text);
}

/* Modern Border Highlighting for Active Navigation */
body[data-theme="premium-dark"] .nav-link.active {
  background: transparent !important;
  color: var(--text) !important;
  box-shadow: inset 0 -2px 0 var(--primary);
  border-radius: 0;
}
body[data-theme="premium-dark"] .settings-nav-item.active {
  background: transparent !important;
  color: var(--text) !important;
  box-shadow: inset 2px 0 0 var(--primary);
  border-radius: 0;
}

/* Refined Inputs Focus */
body[data-theme="premium-dark"] input:focus,
body[data-theme="premium-dark"] select:focus,
body[data-theme="premium-dark"] textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 1px var(--primary) !important;
}


/* Smooth global transition when switching themes */
body,
body *:not(.theme-selector):not(.theme-selector *) {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Dark mode specific overrides */
body.dark .notif-dropdown,
body.dark .user-dropdown {
  background: #161b22;
  border-color: #30363d;
}

body.dark .modal {
  background: #161b22;
  border-color: #30363d;
}

/* Dark inputs/selects – exclude colored status dropdowns */
body.dark input,
body.dark textarea {
  background: #1c2330;
  border-color: #30363d;
  color: #e6edf3;
}

/* Plain selects only (not the colored status/action pills) */
body.dark select:not([class*="status-soft"]):not([class*="status-solid"]):not([style*="background"]) {
  background: #1c2330;
  border-color: #30363d;
  color: #e6edf3;
}

/* Keep status-soft colors vivid in dark mode by boosting their opacity */
body.dark .status-soft-green {
  background-color: rgba(0, 200, 150, 0.22);
  color: #00e0a3;
}

body.dark .status-soft-blue {
  background-color: rgba(59, 130, 246, 0.22);
  color: #60a5fa;
}

body.dark .status-soft-orange {
  background-color: rgba(249, 115, 22, 0.22);
  color: #fb923c;
}

body.dark .status-soft-purple {
  background-color: rgba(168, 85, 247, 0.22);
  color: #c084fc;
}

body.dark .status-soft-red {
  background-color: rgba(239, 68, 68, 0.22);
  color: #f87171;
}

body.dark .status-soft-teal {
  background-color: rgba(20, 184, 166, 0.22);
  color: #2dd4bf;
}

body.dark .status-soft-amber {
  background-color: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
}

body.dark .status-soft-yellow {
  background-color: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
}

body.dark .status-soft-gray {
  background-color: rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}

body.dark input::placeholder,
body.dark textarea::placeholder {
  color: #484f58;
}

body.dark ::-webkit-scrollbar-thumb {
  background: #30363d;
}

/* =====================================================
   THEME TOGGLE BUTTON  –  animated sun / moon pill
   ===================================================== */

.theme-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  z-index: 1001;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  transition: var(--transition);
  border: 1px solid transparent;
}

.theme-option:hover {
  background: var(--surface-2);
}

.theme-option.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), 0.2);
}

.theme-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
}

/* ===================================================
   MOBILE RESPONSIVE – HAMBURGER + DRAWER
   =================================================== */

/* --- Hamburger Button --- */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-btn.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Mobile Drawer Overlay --- */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1100;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.is-open {
  display: block;
  opacity: 1;
}

/* --- Mobile Drawer --- */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: #111827;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4);
}

.mobile-nav-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 60px;
}

.mobile-drawer-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  flex: 1;
  overflow-y: auto;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  border-left: 3px solid transparent;
}

.mobile-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.mobile-nav-link.active {
  background: rgba(0, 200, 150, 0.1);
  color: var(--primary);
  border-left-color: var(--primary);
}

/* ===================================================
   MEDIA QUERIES
   =================================================== */
@media (max-width: 768px) {

  /* Show hamburger, hide desktop nav */
  .hamburger-btn {
    display: flex;
  }

  .nav-center {
    display: none;
  }

  .nav-search {
    display: none;
  }

  /* Collapse user info in top-nav */
  #user-name-display {
    display: none;
  }

  .user-role-badge {
    display: none;
  }

  .nav-user button.btn {
    display: none;
  }

  /* hide log out button in top nav */

  /* Nav adjustments */
  .top-nav {
    padding: 0 12px;
    gap: 8px;
  }

  .nav-logo span {
    display: none;
  }

  /* hide text, keep icon */
  .nav-right {
    gap: 8px;
  }

  /* Main content padding */
  .main-content {
    padding: 16px 12px;
  }

  /* Page headers stack vertically */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-actions {
    width: 100%;
  }

  .page-title {
    font-size: 20px;
  }

  /* Cards */
  .card-body {
    padding: 14px;
  }

  /* Filters bar wraps */
  .filters-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .filter-search {
    width: 100%;
  }

  /* Tables: allow horizontal scroll */
  .data-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Dashboard grid: single column */
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Form grids: single column */
  .form-grid-2 {
    grid-template-columns: 1fr !important;
  }

  .form-grid-3 {
    grid-template-columns: 1fr !important;
  }

  /* Modal: full width on mobile */
  .modal {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 90vh;
    margin: auto;
  }

  /* Client profile grid: single column */
  .client-profile-grid {
    grid-template-columns: 1fr !important;
  }

  /* Login card on small screens */
  .login-card {
    width: 92vw;
    padding: 32px 24px;
  }

  /* Notif dropdown max width */
  .notif-dropdown {
    min-width: 260px;
    right: -60px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .page-title {
    font-size: 18px;
  }

  .main-content {
    padding: 12px 10px;
  }

  .btn {
    padding: 7px 12px;
    font-size: 12px;
  }

  .btn-sm {
    padding: 4px 8px;
    font-size: 11px;
  }
}