/* =====================================================
   INVOXAK - Universal Design System
   Primary Color: #4a74b7 | Font: Roboto
   ===================================================== */

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

:root {
  --primary:       #4a74b7;
  --primary-dark:  #3a5d9f;
  --primary-light: #6a94d7;
  --primary-bg:    #eef3fb;
  --accent:        #f0a500;
  --success:       #28a745;
  --danger:        #dc3545;
  --warning:       #ffc107;
  --info:          #17a2b8;

  /* Light mode */
  --bg:            #f4f7fc;
  --surface:       #ffffff;
  --surface-2:     #f8f9fa;
  --text:          #1e2a3a;
  --text-muted:    #6c757d;
  --border:        #dee2e6;
  --shadow:        0 2px 12px rgba(74,116,183,.12);
  --sidebar-bg:    #1a2540;
  --sidebar-text:  #b8c8e8;
  --sidebar-active:#4a74b7;
  --header-bg:     #ffffff;
}

[data-theme="dark"] {
  --bg:          #0f1623;
  --surface:     #1a2540;
  --surface-2:   #243050;
  --text:        #e8edf5;
  --text-muted:  #8899bb;
  --border:      #2d3d5a;
  --shadow:      0 2px 12px rgba(0,0,0,.4);
  --sidebar-bg:  #0d1428;
  --header-bg:   #1a2540;
  --primary-bg:  #1e2f50;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  transition: background .3s, color .3s;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

img { max-width: 100%; }

/* ─── LAYOUT ─────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .3s;
}

.main-content.sidebar-collapsed { margin-left: 70px; }

.page-body {
  padding: 24px;
  flex: 1;
}

/* ─── HEADER ─────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.header-logo span { color: var(--accent); }

.header-spacer { flex: 1; }

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

.btn-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: background .2s;
}
.btn-icon:hover { background: var(--primary-bg); color: var(--primary); }

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.badge-notif {
  position: relative;
}
.badge-notif::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--header-bg);
}

/* ─── SIDEBAR ────────────────────────────────────── */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .3s;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.sidebar.collapsed { width: 70px; }

.sidebar-brand {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  min-height: 64px;
}

.sidebar-brand-logo {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.sidebar-brand-logo span { color: var(--accent); }

.sidebar-toggle {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--sidebar-text);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  border-radius: 4px;
}
.sidebar-toggle:hover { color: #fff; }

.sidebar-section {
  padding: 16px 0 8px;
}

.sidebar-section-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 0 20px 8px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-nav { list-style: none; }

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 400;
  border-left: 3px solid transparent;
  transition: all .2s;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-nav li a:hover {
  background: rgba(74,116,183,.15);
  color: #fff;
  text-decoration: none;
}

.sidebar-nav li.active > a {
  background: rgba(74,116,183,.25);
  color: #fff;
  border-left-color: var(--primary);
  font-weight: 500;
}

.sidebar-nav li a i {
  font-size: 16px;
  min-width: 20px;
  text-align: center;
  color: var(--primary-light);
}

.sidebar-nav li.active > a i { color: var(--accent); }

.sidebar-user {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user-info { overflow: hidden; }
.sidebar-user-name { font-size: 13px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: var(--sidebar-text); }

/* ─── CARDS ──────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

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

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.card-body { padding: 20px; }

/* Stat Cards */
.stat-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(74,116,183,.18); }

.stat-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.stat-icon.blue   { background: #eef3fb; color: #4a74b7; }
.stat-icon.green  { background: #e8f5e9; color: #28a745; }
.stat-icon.orange { background: #fff3e0; color: #f0a500; }
.stat-icon.red    { background: #fde8ea; color: #dc3545; }
.stat-icon.purple { background: #f3e8fd; color: #7c3aed; }

.stat-info { flex: 1; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-trend { font-size: 12px; margin-top: 6px; }
.stat-trend.up   { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ─── GRID ───────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ─── BUTTONS ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #218838; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c82333; }
.btn-warning   { background: var(--warning); color: #212529; }
.btn-outline   { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-ghost     { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); }
.btn-sm        { padding: 6px 14px; font-size: 12px; }
.btn-lg        { padding: 12px 28px; font-size: 16px; }
.btn-block     { width: 100%; justify-content: center; }
.btn:disabled  { opacity: .6; cursor: not-allowed; }

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,116,183,.15);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { resize: vertical; min-height: 90px; }

.form-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

.input-group { position: relative; display: flex; }
.input-group .form-control { border-radius: 8px 0 0 8px; flex: 1; }
.input-group-append .btn { border-radius: 0 8px 8px 0; }
.input-prefix {
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: var(--text-muted);
  font-size: 14px;
  white-space: nowrap;
}
.input-prefix + .form-control { border-radius: 0 8px 8px 0; }

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

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

.table th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.table tbody tr:hover { background: var(--primary-bg); }
.table tbody tr:last-child td { border-bottom: none; }

/* ─── BADGES ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
}
.badge-active, .badge-paid, .badge-accepted { background: #d4edda; color: #155724; }
.badge-pending, .badge-draft, .badge-sent   { background: #fff3cd; color: #856404; }
.badge-inactive, .badge-expired, .badge-cancelled { background: #f8d7da; color: #721c24; }
.badge-info, .badge-invoiced  { background: #d1ecf1; color: #0c5460; }
.badge-rejected               { background: #f8d7da; color: #721c24; }
.badge-free    { background: #e9ecef; color: #495057; }
.badge-starter { background: #cce5ff; color: #004085; }
.badge-enterprise { background: #d4edda; color: #155724; }
.badge-premium { background: #e2d5f8; color: #4a1f8a; }

/* ─── ALERTS ─────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ─── PAGE HEADER ────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  list-style: none;
  margin-bottom: 8px;
}
.breadcrumb li + li::before { content: '/'; }
.breadcrumb li:last-child { color: var(--text); font-weight: 500; }

/* ─── INVOICE / QUOTE / RECEIPT PRINT ───────────── */
.doc-preview {
  background: #fff;
  color: #1e2a3a;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid #4a74b7;
}

.doc-company-logo { max-height: 70px; }
.doc-title { font-size: 28px; font-weight: 700; color: #4a74b7; text-align: right; }
.doc-number { font-size: 14px; color: #6c757d; text-align: right; margin-top: 4px; }

.doc-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.doc-party-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #4a74b7;
  margin-bottom: 6px;
}

.doc-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.doc-table th {
  background: #4a74b7;
  color: #fff;
  padding: 10px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: left;
}
.doc-table td { padding: 10px 12px; border-bottom: 1px solid #dee2e6; font-size: 13px; }
.doc-table tbody tr:nth-child(even) { background: #f8f9fa; }
.doc-table tfoot td { font-weight: 600; background: #f8f9fa; }
.doc-table .total-row td { background: #4a74b7; color: #fff; font-weight: 700; font-size: 15px; }

.doc-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
  font-size: 12px;
  color: #6c757d;
}

.doc-signature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 32px;
}
.doc-signature-box { text-align: center; }
.doc-signature-line {
  border-bottom: 1px solid #aaa;
  margin: 40px 0 8px;
}

@media print {
  .sidebar, .app-header, .page-header .btn, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  body { background: #fff !important; }
  .doc-preview { box-shadow: none !important; padding: 20px !important; }
}

/* ─── LINE ITEMS TABLE (FORM) ────────────────────── */
.line-items-table { width: 100%; border-collapse: collapse; }
.line-items-table th {
  background: var(--primary-bg);
  padding: 10px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  text-align: left;
}
.line-items-table td { padding: 6px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.line-items-table .form-control { font-size: 13px; padding: 7px 10px; }
.line-items-table .btn-sm { padding: 5px 10px; }

/* ─── MODAL ──────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-lg { max-width: 800px; }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 17px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); line-height: 1; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ─── TABS ───────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover { color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── SUBSCRIPTIONS / PRICING ───────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  padding: 40px 0;
}

.pricing-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 32px 28px;
  border: 2px solid var(--border);
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(74,116,183,.15); }
.pricing-card.popular { border-color: var(--primary); }
.pricing-card .popular-badge {
  position: absolute;
  top: 16px; right: -30px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 40px;
  transform: rotate(45deg);
}

.pricing-plan-name { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; }
.pricing-price { font-size: 36px; font-weight: 700; color: var(--text); line-height: 1; }
.pricing-price small { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.pricing-duration { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.pricing-features { list-style: none; margin: 24px 0; }
.pricing-features li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li i { color: var(--success); font-size: 14px; }

/* ─── HOME PAGE ──────────────────────────────────── */
.home-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 20px rgba(74,116,183,.1);
  padding: 0 5%;
  height: 72px;
  display: flex; align-items: center; gap: 24px;
}
[data-theme="dark"] .home-header { background: rgba(26,37,64,.95); }
.home-nav-links { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.home-nav-links a { font-size: 14px; font-weight: 500; color: var(--text); }
.home-nav-links a:hover { color: var(--primary); text-decoration: none; }

.hero-section {
  min-height: 88vh;
  display: flex; align-items: center;
  background: linear-gradient(135deg, #eef3fb 0%, #f4f7fc 50%, #e8f0fc 100%);
  padding: 60px 5%;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .hero-section { background: linear-gradient(135deg, #0f1623 0%, #1a2540 100%); }
.hero-section::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(74,116,183,.07);
  pointer-events: none;
}

.hero-content { max-width: 580px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
}
.hero-title span { color: var(--primary); }
.hero-subtitle { font-size: 17px; color: var(--text-muted); line-height: 1.7; margin-bottom: 36px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.section { padding: 80px 5%; }
.section-alt { background: var(--surface); }
.section-title { font-size: 32px; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-subtitle { text-align: center; color: var(--text-muted); font-size: 16px; margin-bottom: 48px; }

/* ─── DARK MODE TOGGLE ───────────────────────────── */
.theme-toggle {
  width: 48px; height: 26px;
  border-radius: 13px;
  background: var(--border);
  border: none;
  cursor: pointer;
  position: relative;
  transition: background .2s;
}
.theme-toggle.active { background: var(--primary); }
.theme-toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: left .2s;
}
.theme-toggle.active::after { left: 25px; }

/* ─── SEARCH ─────────────────────────────────────── */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box input {
  width: 280px;
  padding: 9px 14px 9px 40px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-family: 'Roboto', sans-serif;
  outline: none;
  transition: all .2s;
}
.search-box input:focus { width: 320px; border-color: var(--primary); background: var(--surface); }
.search-box i { position: absolute; left: 14px; color: var(--text-muted); font-size: 14px; }

/* ─── LOADING / SPINNER ──────────────────────────── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── EMPTY STATE ────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 56px; opacity: .3; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }

/* ─── PAGINATION ─────────────────────────────────── */
.pagination { display: flex; gap: 6px; align-items: center; }
.page-item {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.page-item:hover, .page-item.active { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }

/* ─── PROGRESS BAR ───────────────────────────────── */
.progress { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 4px; transition: width .4s; }

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-body { padding: 16px; }
  .doc-parties { grid-template-columns: 1fr; }
  .doc-preview { padding: 20px; }
  .section { padding: 50px 5%; }
  .hero-title { font-size: 28px; }
  .doc-signature-row { grid-template-columns: 1fr; }
}

/* ─── UTILITIES ──────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-primary{ color: var(--primary); }
.text-success{ color: var(--success); }
.text-danger { color: var(--danger); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-0 { padding: 0; }
.gap-2 { gap: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
