/* ============================================================
   VIHANSH AIR CONDITIONER — Premium Billing Portal
   Design System v3.0
   ============================================================ */

/* Google Font import handled in layout.php */
/* ── 1. TOKENS ─────────────────────────────────────────────── */
:root {
  /* Brand — navy wordmark + bright house blue from the logo */
  --brand-900: #041833;
  --brand-800: #062454;
  --brand-700: #0a3278;
  --brand-600: #1248b0;
  --brand-500: #1a5fe0;
  --brand-400: #4d86f0;
  --brand-300: #9ec0ff;
  --brand-100: #e7f0ff;
  --brand-50:  #f4f8ff;

  /* Neutrals */
  --gray-950: #0a0f1e;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --white:    #ffffff;

  /* Semantic */
  --success-bg: #f0fdf4;
  --success-text: #166534;
  --success-border: #bbf7d0;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  --warning-border: #fde68a;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --error-border: #fecaca;
  --info-bg: #eff6ff;
  --info-text: #1e40af;
  --info-border: #bfdbfe;

  /* Spacing */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  22px;
  --radius-2xl: 28px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.06);
}

/* ── 2. BASE RESET ──────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(900px 420px at 110% -8%, rgba(26, 95, 224, 0.10), transparent 55%),
    radial-gradient(700px 360px at -10% 0%, rgba(6, 36, 84, 0.06), transparent 50%),
    #f3f6fb;
  color: var(--gray-900);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ── 3. TYPOGRAPHY ──────────────────────────────────────────── */
h1,h2,h3,h4,h5 { line-height: 1.25; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

.text-muted { color: var(--gray-500); }
.text-sm    { font-size: 0.875rem; }
.text-xs    { font-size: 0.75rem; }
.text-right { text-align: right; }
.font-bold  { font-weight: 700; }
.font-black { font-weight: 900; }

/* ── 4. LAYOUT ──────────────────────────────────────────────── */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  width: 100%;
}

main.container {
  padding-top: 36px;
  padding-bottom: 60px;
  flex: 1;
}

/* ── 5. TOP NAVIGATION ──────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(6, 36, 84, 0.08);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  height: 46px;
  width: auto;
  display: block;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--white);
}

.brand-tagline {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--brand-300);
  text-transform: uppercase;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--gray-600);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--brand-800);
  background: var(--brand-50);
}

.nav-links a.active {
  color: var(--white);
  background: var(--brand-800);
}

/* Nav Right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── 6. BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}

.btn svg { flex-shrink: 0; }

.btn-primary {
  background: var(--brand-500);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(25,118,210,0.35);
}
.btn-primary:hover {
  background: var(--brand-600);
  box-shadow: 0 4px 14px rgba(25,118,210,0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-900);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}
.btn-ghost:hover {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-text);
}

.btn-success {
  background: #16a34a;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(22,163,74,0.3);
}
.btn-success:hover {
  background: #15803d;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 13px 26px;
  font-size: 15px;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

/* Topbar CTA */
.btn-nav-cta {
  background: var(--brand-500);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(26, 95, 224, 0.28);
  transition: all 0.18s;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(21,101,192,0.5); }

/* ── 7. CARDS & PANELS ──────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-body {
  padding: 28px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--gray-100);
}

.card-header-left { display: flex; flex-direction: column; gap: 2px; }
.card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--brand-500);
}
.card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}

/* ── 8. METRIC CARDS ─────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card:hover::before { opacity: 1; }

.stat-card-primary { border-color: var(--gray-200); }
.stat-card-primary::before { background: var(--brand-500); }

.stat-card-green::before { background: #22c55e; }
.stat-card-amber::before { background: #f59e0b; }
.stat-card-purple::before { background: #a855f7; }

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  font-size: 20px;
}

.si-blue   { background: var(--info-bg);    color: var(--info-text); }
.si-green  { background: var(--success-bg); color: var(--success-text); }
.si-amber  { background: var(--warning-bg); color: var(--warning-text); }
.si-purple { background: #f5f3ff;           color: #7c3aed; }

.stat-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 4px 9px;
  border-radius: 20px;
}
.sb-blue   { background: var(--info-bg);    color: var(--info-text); }
.sb-green  { background: var(--success-bg); color: var(--success-text); }
.sb-amber  { background: var(--warning-bg); color: var(--warning-text); }
.sb-purple { background: #f5f3ff;           color: #7c3aed; }

.stat-value {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
  color: var(--gray-900);
}

.stat-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
}

.stat-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-500);
  margin-top: auto;
  transition: gap 0.15s ease;
}
.stat-link:hover { gap: 9px; }

.stat-note {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: auto;
}

/* ── 9. DASHBOARD HERO ──────────────────────────────────────── */
.dash-hero {
  background:
    radial-gradient(420px 220px at 92% 0%, rgba(77, 134, 240, 0.45), transparent 60%),
    linear-gradient(145deg, #041833 0%, #0a3278 58%, #1a5fe0 140%);
  border-radius: var(--radius-2xl);
  padding: 40px 44px;
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(6, 36, 84, 0.22);
}

.dash-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 280px;
  height: 280px;
  border: 40px solid rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}

.hero-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-services span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
}

.dash-hero-left { flex: 1; max-width: 560px; position: relative; z-index: 1; }

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--brand-300);
  margin-bottom: 16px;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.dash-hero h1 {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.1;
}

.dash-hero p {
  font-size: 15px;
  color: rgba(186,230,253,0.9);
  line-height: 1.65;
  font-weight: 400;
}

.dash-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.hero-btn-white {
  background: var(--white);
  color: var(--brand-700);
  font-weight: 800;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transition: all 0.18s ease;
  border: 0;
  cursor: pointer;
}
.hero-btn-white:hover { background: #f0f9ff; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.2); }

.hero-btn-outline {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  transition: all 0.18s ease;
  cursor: pointer;
}
.hero-btn-outline:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }

/* ── 10. GRID PANELS ─────────────────────────────────────────── */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ── 11. DOCUMENT LIST (INVOICE LIST ITEMS) ──────────────────── */
.doc-list {
  display: flex;
  flex-direction: column;
}

.doc-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
}
.doc-item:last-child { border-bottom: none; }
.doc-item:hover { background: var(--brand-50); }

.doc-type-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  background: var(--info-bg);
  color: var(--info-text);
  white-space: nowrap;
}

.doc-item-info { display: flex; flex-direction: column; gap: 2px; }
.doc-num { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.doc-meta { font-size: 12px; color: var(--gray-500); }

.doc-item-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.doc-amount { font-size: 15px; font-weight: 800; color: #16a34a; }

/* ── 12. QUICK ACTIONS ───────────────────────────────────────── */
.action-list { display: flex; flex-direction: column; }

.action-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
}
.action-item:last-child { border-bottom: none; }
.action-item:hover { background: var(--brand-50); }
.action-item:hover .action-chevron { color: var(--brand-500); }

.action-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ai-blue   { background: var(--info-bg);    color: var(--brand-600); }
.ai-green  { background: var(--success-bg); color: var(--success-text); }
.ai-amber  { background: var(--warning-bg); color: var(--warning-text); }
.ai-purple { background: #f5f3ff;           color: #7c3aed; }
.ai-teal   { background: #ccfbf1;           color: #0f766e; }

.action-text { flex: 1; }
.action-text strong { display: block; font-size: 14px; font-weight: 600; color: var(--gray-900); }
.action-text small  { font-size: 12px; color: var(--gray-500); }

.action-chevron { color: var(--gray-300); font-size: 18px; transition: color 0.15s; line-height: 1; }

/* ── 13. PAYMENT TAGS ─────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.tag-pending  { background: var(--warning-bg);  color: var(--warning-text); }
.tag-cash     { background: var(--success-bg);  color: var(--success-text); }
.tag-upi      { background: var(--info-bg);     color: var(--info-text); }
.tag-card     { background: #f5f3ff;            color: #7c3aed; }
.tag-bank-transfer { background: var(--gray-100); color: var(--gray-700); }

/* ── 14. EMPTY STATE ──────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
}
.empty-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gray-100);
  display: grid;
  place-items: center;
  font-size: 28px;
}
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--gray-700); margin: 0; }
.empty-state p  { font-size: 14px; color: var(--gray-400); margin: 0; max-width: 280px; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head h1 { font-size: 1.85rem; margin-top: 4px; }
.page-head .text-muted { margin-top: 6px; }
.count-muted { color: var(--gray-400); font-weight: 600; }
.form-page { max-width: 860px; margin: 0 auto; }

/* ── 15. FORMS ─────────────────────────────────────────────────── */
.form-section { margin-bottom: 32px; }
.form-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--brand-500);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-100);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.form-col-2 { grid-column: span 2; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}

.field label .req { color: #ef4444; margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1.5;
}

input::placeholder, textarea::placeholder { color: var(--gray-400); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(25,118,210,0.12);
}

textarea { min-height: 88px; resize: vertical; }

.line-items-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.custom-name { margin-top: 8px; }
.custom-name[hidden] { display: none; }

.line-preview {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px dashed var(--brand-300);
  color: var(--brand-800);
  font-size: 13px;
  font-weight: 600;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 8px;
}

/* ── 16. TABLE ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

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

thead th {
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

tbody td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--brand-50); }

td.right, th.right { text-align: right; }

/* ── 17. ALERTS ─────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
}
.alert-error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}
.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}
.alert-info {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}
.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

/* ── 18. LOGIN PAGE ─────────────────────────────────────────────── */
main.container.login-main {
  padding: 0;
  margin: 0;
  max-width: none;
  min-height: 100vh;
  display: flex;
  background: #f3f6fb;
}

body:has(.login-main) .app-footer { display: none; }

.login-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  width: 100%;
  min-height: 100vh;
}

.login-aside {
  background:
    radial-gradient(480px 280px at 80% 10%, rgba(77, 134, 240, 0.4), transparent 60%),
    linear-gradient(165deg, #041833 0%, #0a3278 70%);
  color: white;
  padding: 56px 56px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-logo {
  width: min(100%, 280px);
  height: auto;
  background: white;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 28px;
}

.login-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ec0ff;
  margin-bottom: 10px;
}

.login-aside h2 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  max-width: 12ch;
  margin-bottom: 14px;
}

.login-lead {
  max-width: 38ch;
  color: rgba(226, 236, 255, 0.88);
  font-size: 15px;
  margin-bottom: 22px;
}

.login-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.login-points li {
  font-size: 14px;
  font-weight: 600;
  padding-left: 18px;
  position: relative;
}

.login-points li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4d86f0;
  position: absolute;
  left: 0;
  top: 7px;
}

.login-contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.14);
  max-width: 280px;
}

.login-contact strong { font-size: 18px; }
.login-contact span { font-size: 13px; color: rgba(226, 236, 255, 0.75); }

.login-card {
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 56px;
  max-width: 520px;
}

.login-card h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}

.login-card > p {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 24px;
}

.cred-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 22px;
}

.cred-box-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-700);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.cred-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.cred-row:last-of-type { margin-bottom: 0; }

.cred-label { width: 64px; flex-shrink: 0; font-weight: 500; }

.cred-val {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-600);
  letter-spacing: 0.3px;
}

.btn-autofill {
  width: 100%;
  margin-top: 12px;
  background: var(--white);
  color: var(--brand-600);
  border: 1px solid var(--brand-400);
  border-radius: var(--radius-md);
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-autofill:hover { background: var(--brand-500); color: var(--white); border-color: var(--brand-500); }

.login-fields { display: flex; flex-direction: column; gap: 16px; }

.btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: var(--white);
  border: 0;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(25,118,210,0.35);
  transition: all 0.18s ease;
  margin-top: 8px;
  letter-spacing: -0.2px;
}
.btn-login:hover { box-shadow: 0 8px 24px rgba(25,118,210,0.45); transform: translateY(-1px); }

/* ── 19. INVOICE VIEW PAGE ──────────────────────────────────────── */
.invoice-preview {
  max-width: 860px;
  margin: 0 auto;
}

.invoice-paper {
  background: var(--white);
  border-radius: 18px;
  padding: 0 0 0;
  border: 1px solid rgba(6, 36, 84, 0.08);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.inv-brandbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 32px 18px;
}

.inv-logo {
  width: min(100%, 240px);
  height: auto;
}

.inv-ribbon {
  margin: 0 32px 22px;
  background: var(--brand-800);
  color: white;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.invoice-paper .bill-grid,
.invoice-paper .invoice-table-wrap,
.invoice-paper .totals-row,
.invoice-paper .invoice-notes {
  margin-left: 32px;
  margin-right: 32px;
}

.invoice-paper thead th {
  background: var(--brand-800);
  color: white;
  border-bottom: none;
}

.invoice-paper tbody td { border-bottom-color: #e6eef8; }
.invoice-paper tbody tr:hover td { background: #f7faff; }

.inv-foot {
  margin-top: 28px;
  background: var(--brand-800);
  color: white;
  display: grid;
  grid-template-columns: 0.7fr 1.3fr 1fr;
  gap: 16px;
  padding: 16px 32px;
}

.inv-foot span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ec0ff;
  margin-bottom: 2px;
}

.inv-foot strong { font-size: 13px; font-weight: 700; }

.invoice-paper-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--brand-500);
  margin-bottom: 28px;
}

.invoice-company-info h2 { font-size: 22px; font-weight: 900; color: var(--brand-800); margin-bottom: 4px; }
.invoice-company-info p  { font-size: 13px; color: var(--gray-500); line-height: 1.6; }

.invoice-meta-right { text-align: right; }
.inv-doc-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--brand-500);
  margin-bottom: 6px;
}
.inv-number { font-size: 26px; font-weight: 900; letter-spacing: -0.8px; color: var(--gray-900); }
.inv-details-small { font-size: 13px; color: var(--gray-500); margin-top: 6px; line-height: 1.7; }

.bill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 20px 24px;
}

.bill-col-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--brand-500); margin-bottom: 8px; }
.bill-col-name  { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.bill-col-detail { font-size: 13px; color: var(--gray-500); line-height: 1.6; }

.invoice-table-wrap { margin-bottom: 24px; }

.totals-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.totals-box {
  width: 300px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.totals-row-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-200);
}
.totals-row-item:last-child {
  border-bottom: none;
  font-size: 16px;
  font-weight: 800;
  background: var(--brand-800);
  color: white;
}

.invoice-notes {
  padding: 16px 20px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: var(--warning-text);
  margin-top: 20px;
}

.print-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* ── 20. FOOTER ─────────────────────────────────────────────────── */
.app-footer {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 20px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--gray-500);
}

.footer-inner p { margin: 0; }

/* ── 21. MISC UTILITIES ─────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--gray-100); margin: 24px 0; }
.spacer-sm { height: 12px; }
.spacer-md { height: 24px; }
.text-green  { color: #16a34a; }
.text-red    { color: #dc2626; }
.text-center { text-align: center; }
.fw-700      { font-weight: 700; }
.fw-900      { font-weight: 900; }

/* ── 22. RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .stat-grid      { grid-template-columns: repeat(2, 1fr); }
  .dash-hero      { flex-direction: column; align-items: flex-start; padding: 36px; }
  .dash-hero-actions { width: 100%; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  main.container { padding-top: 24px; padding-bottom: 40px; }

  .topbar-inner { flex-wrap: wrap; height: auto; padding: 14px 0; gap: 12px; }
  .nav-links { flex-wrap: nowrap; overflow-x: auto; width: 100%; }
  .nav-right { width: 100%; justify-content: flex-end; }

  .stat-grid      { grid-template-columns: 1fr; }
  .two-col-grid   { grid-template-columns: 1fr; }
  .bill-grid      { grid-template-columns: 1fr; }

  .dash-hero { padding: 28px 24px; }
  .dash-hero h1 { font-size: 1.6rem; }
  .login-shell { grid-template-columns: 1fr; }
  .login-aside { padding: 32px 24px; min-height: auto; }
  .login-aside h2 { font-size: 1.8rem; }
  .login-card { padding: 28px 20px 40px; }
  .brand-logo { height: 38px; }
  .inv-foot { grid-template-columns: 1fr; }
  .inv-ribbon, .invoice-paper .bill-grid, .invoice-paper .invoice-table-wrap,
  .invoice-paper .totals-row, .invoice-paper .invoice-notes { margin-left: 16px; margin-right: 16px; }
  .inv-brandbar { padding: 20px 16px 12px; margin: 0; }

  .form-col-2     { grid-column: span 1; }
  .invoice-paper  { padding: 28px 20px; }
  .totals-box     { width: 100%; }
  .totals-row     { justify-content: stretch; }
  .footer-inner   { flex-direction: column; gap: 8px; text-align: center; }
  .print-bar      { flex-direction: column; gap: 12px; align-items: flex-start; }
}

.line-row + .line-row { margin-top: 14px; }
.remove-line { margin-top: 12px; }

/* Printed invoice — same layout as the shop PDF */
.vac-sheet {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  color: #102c55;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: 0 5px 30px rgba(0,0,0,0.12);
  overflow: hidden;
}
.vac-head { display: grid; grid-template-columns: 1.3fr 0.7fr; min-height: 180px; }
.vac-brand { padding: 30px; background: linear-gradient(135deg, #ffffff 0%, #f5faff 100%); }
.vac-brand img { display: block; width: min(100%, 430px); max-height: 105px; height: auto; object-fit: contain; object-position: left center; }
.vac-tagline {
  margin-top: 14px;
  display: inline-block;
  background: #084b91;
  color: white;
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 13px;
}
.vac-services { margin-top: 12px; font-size: 12px; color: #294c73; font-weight: 700; letter-spacing: .4px; }
.vac-banner {
  background: url("electronics image.png") center / cover no-repeat;
  min-height: 275px;
}
.vac-company {
  padding: 14px 30px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: #f1f8ff;
  border-bottom: 1px solid #d5e4f2;
  font-size: 13px;
  line-height: 1.45;
}
.vac-company strong { color: #064a91; }
.vac-billing { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 24px 30px; }
.vac-box { background: #f2f8fd; border-radius: 10px; padding: 18px; }
.vac-box h2 {
  background: #0758a7;
  color: white;
  display: inline-block;
  padding: 7px 16px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0;
}
.vac-box p { display: flex; gap: 8px; margin: 8px 0; font-size: 14px; }
.vac-box p strong { width: 125px; flex-shrink: 0; }
.vac-table-wrap { padding: 0 30px 8px; }
.vac-sheet .vac-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vac-sheet .vac-table th:nth-child(1) { width: 5%; }
.vac-sheet .vac-table th:nth-child(2) { width: 35%; }
.vac-sheet .vac-table th:nth-child(3) { width: 20%; }
.vac-sheet .vac-table th:nth-child(4) { width: 10%; }
.vac-sheet .vac-table th:nth-child(5), .vac-sheet .vac-table th:nth-child(6) { width: 15%; }
.vac-sheet .vac-table thead th {
  background: #064d96;
  color: white;
  padding: 12px 8px;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  border: none;
}
.vac-sheet .vac-table td {
  padding: 11px 8px;
  border: 1px solid #d8e2ec;
  color: #102c55;
  background: white;
}
.vac-sheet .vac-table tbody tr:nth-child(even) td { background: #f7fbff; }
.vac-sheet .vac-table tbody tr:hover td { background: #f7fbff; }
.vac-summary { display: grid; grid-template-columns: 1fr 350px; gap: 20px; padding: 25px 30px; }
.vac-includes { background: #edf7ff; border-radius: 10px; padding: 18px; }
.vac-includes h3 { margin: 0 0 8px; color: #0755a2; font-size: 16px; }
.vac-includes ul { padding-left: 18px; line-height: 1.8; font-size: 13px; }
.vac-totals { border: 1px solid #d5e1ec; border-radius: 10px; overflow: hidden; }
.vac-totals p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid #d8e2ec;
  font-size: 14px;
  margin: 0;
}
.vac-off { color: #d52c21; }
.vac-grand {
  background: #0758a7;
  color: white;
  font-size: 22px;
  font-weight: 700;
  padding: 16px !important;
  border-bottom: none;
}
.vac-notes { margin: 0 30px 8px; font-size: 13px; color: #17385f; }
.vac-terms { padding: 0 30px 25px; }
.vac-terms h3 {
  background: #0758a7;
  color: white;
  display: inline-block;
  padding: 7px 15px;
  border-radius: 5px;
  font-size: 14px;
  margin-bottom: 8px;
}
.vac-terms ol { padding-left: 20px; font-size: 12px; line-height: 1.8; }
.vac-signs { display: flex; justify-content: space-between; align-items: center; gap: 55px; margin-top: 30px; padding-right: 10px; }
.vac-sign { text-align: center; min-width: 210px; }
.vac-script {
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 26px;
  color: #064d96;
  min-height: 32px;
  transform: rotate(-3deg);
}
.vac-line { width: 200px; border-bottom: 1.5px solid #17385f; margin: 5px auto 7px; }
.vac-sign strong { font-size: 12px; color: #102c55; }
.vac-sign span { display: block; font-size: 11px; color: #555; }
.vac-qrs { display: flex; gap: 8px; }
.vac-qrs img { width: 82px; height: 82px; object-fit: contain; border: 1px solid #d2dfeb; border-radius: 5px; background: white; }
.vac-sign-stamp { display: flex; align-items: center; gap: 55px; }
.vac-stamp { width: 145px; height: 145px; object-fit: contain; transform: rotate(-8deg); }
.vac-foot {
  background: #063e78;
  color: white;
  padding: 18px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.vac-foot span { display: block; font-size: 11px; opacity: .8; margin-bottom: 4px; letter-spacing: .04em; }
.vac-foot strong { font-size: 16px; font-weight: 700; }
.vac-foot > div { border-right: 1px solid rgba(255,255,255,.3); padding-right: 15px; }
.vac-foot > div:last-child { border-right: none; }

@media (max-width: 768px) {
  .vac-head, .vac-billing, .vac-summary, .vac-foot, .vac-signs { grid-template-columns: 1fr; display: grid; }
  .vac-signs, .vac-company, .vac-sign-stamp { display: flex; flex-direction: column; align-items: flex-start; }
  .vac-banner { min-height: 140px; }
}

@media print {
  @page { size: A4; margin: 0; }
  .topbar, .app-footer, .print-bar, .nav-links, .nav-right { display: none !important; }
  body { background: white; }
  main.container { margin: 0; padding: 6mm; width: 210mm; max-width: none; }
  .invoice-preview { max-width: none; }
  .vac-sheet { width: 198mm; max-width: 198mm; margin: 0 auto; box-shadow: none; font-size: 10px; zoom: .86; page-break-inside: avoid; }
  .vac-head, .vac-banner { min-height: 55mm; }
  .vac-brand { padding: 4mm 5mm 3mm; }
  .vac-brand img { max-height: 24mm; }
  .vac-company { padding: 3mm 5mm; }
  .vac-billing { padding: 4mm 5mm; gap: 4mm; }
  .vac-box { min-height: 28mm; padding: 3mm 4mm; }
  .vac-table-wrap { padding: 0 5mm; }
  .vac-sheet .vac-table th { padding: 2.5mm 2mm; }
  .vac-sheet .vac-table td { padding: 2.5mm 2mm; height: 12mm; }
  .vac-summary { padding: 4mm 5mm; }
  .vac-includes { min-height: 27mm; padding: 3mm 4mm; }
  .vac-terms { padding: 0 5mm 3mm; page-break-inside: avoid; }
  .vac-signs { margin-top: 3mm; }
  .vac-foot { padding: 4mm 5mm; page-break-inside: avoid; }
  .card { box-shadow: none; border-radius: 0; }
}
