/**
 * BOSS ERP - Premium Dark Theme with Gold Accents
 */

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

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

/* ============================================================================
   CSS VARIABLES - Dark Theme with Gold
   ============================================================================ */

:root {
  /* Core Colors - Dark */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a24;
  --bg-elevated: #22222e;
  --bg-hover: #2a2a38;
  
  /* Surface Colors */
  --surface-1: #16161e;
  --surface-2: #1e1e28;
  --surface-3: #262632;
  
  /* Text Colors */
  --text-primary: #f8f8fc;
  --text-secondary: #a8a8b8;
  --text-tertiary: #6b6b7b;
  --text-muted: #4a4a5a;
  
  /* Opal Pointe Orange-Gold Accent */
  --gold: #FF6B00;
  --gold-l: #FF8C3A;
  --gold-d: #E05F00;
  --gold-muted: rgba(255, 107, 0, 0.15);
  
  /* Semantic Colors */
  --success: #10b981;
  --success-muted: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-muted: rgba(245, 158, 11, 0.15);
  --error: #ef4444;
  --error-muted: rgba(239, 68, 68, 0.15);
  
  /* Primary = Gold */
  --primary: var(--gold);
  --primary-d: var(--gold-d);
  --primary-l: var(--gold-l);
  --accent-glow: rgba(212, 165, 66, 0.15);
  
  /* Border Colors */
  --border: rgba(255, 255, 255, 0.08);
  --border-l: rgba(255, 255, 255, 0.05);
  --border-emphasis: rgba(255, 255, 255, 0.12);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Monaco', monospace;
  
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-lg: 1rem;
  --text-xl: 1.125rem;
  --text-2xl: 1.375rem;
  --text-3xl: 1.75rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --radius-full: 9999px;
  
  /* Layout */
  --sidebar-width: 250px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--gold-l);
  text-decoration: none;
}

a:hover {
  color: var(--gold);
}

/* ============================================================================
   LAYOUT
   ============================================================================ */

.app-container {
  display: flex;
  min-height: 100vh;
}

/* ============================================================================
   SIDEBAR
   ============================================================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  padding: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sidebar-logo svg {
  width: 36px;
  height: 36px;
}

.sidebar-logo-text {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-4);
  overflow-y: auto;
}

.nav-section {
  margin-bottom: var(--space-5);
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  margin-bottom: 2px;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--gold-muted);
  color: var(--gold);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--border);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
}

.user-menu:hover {
  background: var(--bg-hover);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--text-sm);
  color: #0a0a0f;
}

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

.user-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-company {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  background: var(--bg-primary);
  min-height: 100vh;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.page-content {
  padding: var(--space-6);
  max-width: 1400px;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

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

.card-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: var(--space-5);
}

/* ============================================================================
   KPI CARDS
   ============================================================================ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

.kpi-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.kpi-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-2);
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--space-1);
}

.kpi-value.positive { color: var(--success); }
.kpi-value.negative { color: var(--error); }

.kpi-change {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ============================================================================
   TABLES
   ============================================================================ */

.table-container {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th {
  background: var(--surface-2);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-l);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover td {
  background: var(--bg-hover);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  background: var(--gold);
  color: #0a0a0f;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
}

.btn:hover {
  background: var(--gold-l);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gold);
  color: #0a0a0f;
}

.btn-primary:hover {
  background: var(--gold-l);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-emphasis);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--error);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--text-sm);
  min-height: 36px;
}

/* ============================================================================
   FORMS
   ============================================================================ */

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.form-label.required::after {
  content: ' *';
  color: var(--error);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 13px;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border-emphasis);
  border-radius: var(--radius-md);
  transition: border-color 0.15s;
  min-height: 44px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-muted);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b6b7b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

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

.form-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

.form-input.invalid,
.form-select.invalid {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px var(--error-muted) !important;
}

.form-error {
  font-size: 11px;
  color: var(--error);
  margin-top: 4px;
  display: none;
}

.form-error.visible {
  display: block;
}

.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-check-input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}

.form-check-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ============================================================================
   BADGES
   ============================================================================ */

.badge {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-draft {
  background: var(--surface-3);
  color: var(--text-tertiary);
}

.badge-posted {
  background: var(--success-muted);
  color: var(--success);
}

.badge-pending {
  background: var(--warning-muted);
  color: var(--warning);
}

.badge-void {
  background: var(--error-muted);
  color: var(--error);
}

/* Account Type Badges */
.badge-asset {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-liability {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.badge-equity {
  background: rgba(212, 165, 66, 0.15);
  color: var(--gold);
}

.badge-revenue {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-expense {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Contra Account Types */
.badge-contra-asset,
.badge-contra-liability,
.badge-contra-equity,
.badge-contra-revenue {
  background: rgba(234, 179, 8, 0.15);
  color: #f59e0b;
}

.contra-account-row {
  background: rgba(234, 179, 8, 0.06) !important;
}
.contra-account-row:hover td {
  background: rgba(234, 179, 8, 0.10) !important;
}
.badge-contra {
  background: rgba(234, 179, 8, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(234, 179, 8, 0.3);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  letter-spacing: 0.05em;
}

/* ============================================================================
   TABS
   ============================================================================ */

.tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius-md);
}

.tab {
  padding: 8px 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.tab.active {
  background: var(--gold);
  color: #0a0a0f;
}

/* ============================================================================
   MODALS
   ============================================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  background: var(--surface-1);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.modal-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: var(--surface-3);
  border: none;
  font-size: 16px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--surface-2);
}

.modal-lg {
  max-width: 900px;
}

/* ============================================================================
   JOURNAL ENTRY LINES
   ============================================================================ */

.je-lines {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.je-line {
  display: grid;
  grid-template-columns: 2fr 1.5fr 120px 120px 40px;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  align-items: center;
  border-bottom: 1px solid var(--border-l);
}

.je-line:last-child {
  border-bottom: none;
}

.je-line-header {
  background: var(--surface-3);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-2) var(--space-4);
}

.je-line .form-select,
.je-line .form-input {
  min-height: 38px;
  padding: 8px 10px;
  font-size: var(--text-sm);
}

.je-line .form-input.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.je-totals {
  display: grid;
  grid-template-columns: 2fr 1.5fr 120px 120px 40px;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-3);
  font-weight: 600;
  font-size: var(--text-sm);
  border-top: 2px solid var(--border);
}

.je-totals span:nth-child(3),
.je-totals span:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.je-out-of-balance span:nth-child(3),
.je-out-of-balance span:nth-child(4) {
  color: var(--error);
}

.mt-4 {
  margin-top: var(--space-4);
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

.font-mono {
  font-family: var(--font-mono);
}

.text-muted {
  color: var(--text-tertiary);
}

.text-center {
  text-align: center;
}

.positive {
  color: var(--success) !important;
}

.negative {
  color: var(--error) !important;
}

.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* Account Numbers - Match text style */
.account-number {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-primary) !important;
  font-weight: 500;
}

code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* ============================================================================
   LOADING & EMPTY STATES
   ============================================================================ */

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-tertiary);
}

/* Skeleton loading shimmer */
.skeleton {
  background: var(--surface-2);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 10px;
  width: 100%;
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-row {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-l);
}

.skeleton-row .skeleton {
  height: 18px;
  flex: 1;
}

.skeleton-row .skeleton:first-child {
  max-width: 100px;
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

.boss-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.boss-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  color: var(--text-primary);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 400px;
}

.boss-toast.visible {
  transform: translateX(0);
  opacity: 1;
}

.boss-toast.removing {
  transform: translateX(120%);
  opacity: 0;
}

.boss-toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.boss-toast-success { border-left: 3px solid var(--success); }
.boss-toast-success .boss-toast-icon { background: var(--success-muted); color: var(--success); }

.boss-toast-error { border-left: 3px solid var(--error); }
.boss-toast-error .boss-toast-icon { background: var(--error-muted); color: var(--error); }

.boss-toast-warning { border-left: 3px solid var(--warning); }
.boss-toast-warning .boss-toast-icon { background: var(--warning-muted); color: var(--warning); }

.boss-toast-info { border-left: 3px solid #6366f1; }
.boss-toast-info .boss-toast-icon { background: rgba(99,102,241,0.15); color: #6366f1; }

/* ============================================================================
   MOBILE MENU TOGGLE
   ============================================================================ */

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  width: 40px;
  height: 40px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.mobile-menu-btn:hover {
  background: var(--bg-hover);
  border-color: var(--gold);
}

.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

.sidebar-overlay.active {
  display: block;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .header {
    padding-left: 60px;
  }

  .page-content {
    padding: var(--space-4);
  }

  /* Modal responsive */
  .modal {
    max-width: 95vw;
    max-height: 95vh;
    margin: 10px;
  }

  .modal-lg {
    max-width: 95vw;
  }

  /* Table responsive */
  .table td, .table th {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }

  /* Form responsive */
  .dim-form {
    flex-direction: column;
  }

  /* JE lines responsive */
  .je-line {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
  }

  .je-totals {
    grid-template-columns: 1fr 1fr;
  }

  /* Tabs scroll */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Toast responsive */
  .boss-toast-container {
    left: 12px;
    right: 12px;
  }

  .boss-toast {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }

  .header-title {
    font-size: var(--text-base);
  }

  .header-actions {
    gap: var(--space-2);
  }

  .btn {
    padding: 8px 14px;
    font-size: var(--text-sm);
    min-height: 38px;
  }

  .btn-sm {
    padding: 6px 12px;
    font-size: var(--text-xs);
    min-height: 32px;
  }

  .page-content {
    padding: var(--space-3);
  }
}

/* ============================================================================
   SCROLLBAR
   ============================================================================ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================================================
   PAGE TRANSITIONS
   ============================================================================ */

.page-content {
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
