/* Getellaam BizLedger - Django SaaS Design System */

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

:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --bg-glass: rgba(30, 41, 59, 0.75);
  
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --primary-light: rgba(245, 158, 11, 0.15);
  
  --brand-espresso: #78350f;
  --brand-chai: #b45309;
  
  --accent-green: #10b981;
  --accent-green-bg: rgba(16, 185, 129, 0.15);
  
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-light: rgba(255, 255, 255, 0.1);
  --border-active: rgba(245, 158, 11, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.25);
  
  --font-main: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
}

.brand-badge {
  background: linear-gradient(135deg, var(--primary), var(--brand-chai));
  color: #000;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.role-badge {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.role-badge.superadmin { background: rgba(139, 92, 246, 0.2); color: #c084fc; border: 1px solid #8b5cf6; }
.role-badge.owner { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid #f59e0b; }
.role-badge.manager { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid #3b82f6; }
.role-badge.staff { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid #10b981; }
.role-badge.guest { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid #94a3b8; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--brand-chai));
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

.btn-success { background: var(--accent-green); color: #0f172a; }
.btn-danger { background: var(--accent-red); color: #ffffff; }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.82rem; }
.btn-lg { padding: 0.9rem 1.8rem; font-size: 1.05rem; font-weight: 700; }

.demo-bar {
  background: linear-gradient(90deg, #1e1b4b, #31103f);
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.6rem 2rem;
  display: flex;
  align-items: center;
  justify-space-between;
  font-size: 0.85rem;
  color: #ddd6fe;
}
.demo-buttons { display: flex; gap: 0.5rem; align-items: center; }
.demo-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: none;
}
.demo-btn:hover { background: var(--primary); color: #0f172a; }

.app-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-subtitle { color: var(--text-muted); font-size: 0.95rem; }

.math-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.math-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.math-card:hover { border-color: var(--border-active); transform: translateY(-2px); }
.math-card-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.math-card-val {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
}
.math-card-sub { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.4rem; }

.math-card.accent-sales { border-left: 4px solid var(--primary); }
.math-card.accent-expense { border-left: 4px solid var(--accent-red); }
.math-card.accent-balance { border-left: 4px solid var(--accent-blue); }
.math-card.accent-net { border-left: 4px solid var(--accent-green); }
.math-card.accent-cum { border-left: 4px solid var(--accent-purple); }

.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
}
.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}
.custom-table th {
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-muted);
  padding: 0.85rem 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}
.custom-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  vertical-align: middle;
}
.custom-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}
.status-pill.pending { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.status-pill.verified { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.status-pill.paid { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-pill.approved { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }

.staff-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.touch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.touch-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group { margin-bottom: 1.2rem; position: relative; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #0f172a;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.autocomplete-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: #1e293b;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.autocomplete-item {
  padding: 0.65rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}
.autocomplete-item:hover { background: var(--primary-light); color: var(--primary); }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.modal-title { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.modal-close:hover { color: #fff; }

.filter-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--bg-card);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.hero-section {
  padding: 5rem 1.5rem;
  text-align: center;
  background: radial-gradient(circle at top, rgba(245, 158, 11, 0.15) 0%, transparent 60%);
}
.hero-title {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #ffffff 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); max-width: 760px; margin: 0 auto 2.5rem; }

.business-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin: 3rem 0;
}
.biz-type-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform 0.2s ease;
}
.biz-type-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.biz-type-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  position: relative;
}
.step-number {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: #1e293b;
  border: 1px solid var(--primary);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media print {
  .top-header, .demo-bar, .filter-bar, .btn, .role-badge { display: none !important; }
  body { background: #fff; color: #000; }
  .math-card, .glass-panel { border: 1px solid #ccc; background: #fff; color: #000; box-shadow: none; }
  .math-card-val, .section-title { color: #000 !important; }
}
/* ===== MOBILE / RESPONSIVE ===== */
html { -webkit-text-size-adjust: 100%; }
img, svg { max-width: 100%; }

@media (max-width: 800px) {
  .top-header { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.6rem; }
  .header-right { flex-wrap: wrap; gap: 0.5rem; }
  .demo-bar { padding: 0.6rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .app-container { padding: 1.25rem 1rem; }

  [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: minmax(0, 1fr) !important; }
  [style*="display: grid"] > *, .staff-card-grid > * { min-width: 0; }
  [style*="grid-column: span 2"] { grid-column: auto !important; }
}

@media (max-width: 640px) {
  .top-header { position: static; }
  .brand-logo { font-size: 1.2rem; gap: 0.5rem; }
  .brand-badge { font-size: 0.65rem; padding: 0.15rem 0.45rem; }
  .header-right { width: 100%; }
  .role-badge { font-size: 0.7rem; padding: 0.25rem 0.6rem; }
  .demo-bar { font-size: 0.75rem; padding: 0.5rem 0.75rem; }
  .demo-bar > div:first-child { display: none; }
  .demo-buttons { flex-wrap: wrap; }

  .app-container { padding: 1rem 0.75rem; }
  .section-title { font-size: 1.25rem; flex-wrap: wrap; }
  .section-subtitle { font-size: 0.85rem; }
  .section-header > div { width: 100%; }
  .section-header > div .btn { flex: 1 1 auto; }

  .math-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
  .math-card { padding: 0.9rem; }
  .math-card:has(form) { grid-column: 1 / -1; }
  .math-card-label { font-size: 0.7rem; }
  .math-card-val { font-size: 1.25rem; word-break: break-word; }
  .math-card-sub { font-size: 0.7rem; }

  .filter-bar { flex-direction: column; align-items: stretch; padding: 0.85rem; gap: 0.75rem; }
  .filter-bar > div { width: 100%; margin-left: 0 !important; flex-wrap: wrap; }
  .filter-bar select, .filter-bar input { width: 100% !important; flex: 1 1 100%; }

  .glass-panel { padding: 1rem !important; }
  .touch-card { padding: 1rem; }
  .staff-card-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  h3[style*="justify-content: space-between"],
  h2[style*="justify-content: space-between"] { flex-wrap: wrap; gap: 0.4rem; }
  [style*="justify-content: space-between"][style*="flex-wrap: wrap"] > form { width: 100%; }

  .table-container { -webkit-overflow-scrolling: touch; }
  .custom-table { font-size: 0.85rem; min-width: 540px; }
  .custom-table th { white-space: nowrap; padding: 0.65rem 0.75rem; font-size: 0.7rem; }
  .custom-table td { padding: 0.7rem 0.75rem; }
  .custom-table th:first-child,
  .custom-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg-card); }
  .custom-table th:first-child { background: #162033; }
  .custom-table td[style*="white-space: nowrap"] { white-space: normal !important; min-width: 210px; }
  .custom-table td .btn { margin: 2px 0; }

  input, select, textarea { font-size: 16px !important; }
  .form-control { padding: 0.7rem 0.85rem; }
  .btn { min-height: 42px; }
  .btn-sm { min-height: 36px; }
  .btn-lg { width: 100%; white-space: normal; text-align: center; padding: 0.85rem 1rem; }

  .modal-overlay { padding: 0.75rem; align-items: flex-start; }
  .modal-card { padding: 1.25rem; max-height: 94vh; margin-top: 0.5rem; }
  .modal-title { font-size: 1.15rem; }

  .toast-container { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; }

  .hero-section { padding: 2.5rem 0.75rem; }
  .hero-title { font-size: 1.9rem; }
  .hero-subtitle { font-size: 1rem; margin-bottom: 1.5rem; }
  .business-types-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 2rem 0; }
  .biz-type-card { padding: 1rem; }
  .workflow-steps { grid-template-columns: 1fr; margin: 2rem 0; }
  h2[style*="font-size: 2rem"] { font-size: 1.4rem !important; }
}

@media (max-width: 380px) {
  .math-grid { grid-template-columns: 1fr; }
  .business-types-grid { grid-template-columns: 1fr; }
}
.role-badge.partner { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid #ec4899; }

/* number boxes: plain typing field, no up/down arrows */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }