/* 
 * Shri GuruMaharaj Sansthan - Pure CSS Design System
 * 100% Native CSS (No framework, No Node, No React)
 */

:root {
  --primary-gold: #b45309;
  --primary-gold-dark: #78350f;
  --primary-gold-light: #fef3c7;
  --accent-gold: #d97706;
  --accent-saffron: #ea580c;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --success-green: #059669;
  --danger-red: #dc2626;
  --font-marathi: 'Mukta', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Cinzel', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: var(--font-marathi);
  background-color: #f3f4f6;
  color: var(--slate-800);
  line-height: 1.5;
  font-size: 14px;
}

/* Header & Top Navigation */
.header-sansthan {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--accent-gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-symbol {
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, #f59e0b 0%, #b45309 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.brand-title h1 {
  font-size: 17px;
  font-weight: 800;
  color: #fef3c7;
  letter-spacing: 0.5px;
}

.brand-title p {
  font-size: 11px;
  color: #cbd5e1;
}

.user-status-bar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.badge-counter {
  background: rgba(217, 119, 6, 0.2);
  border: 1px solid var(--accent-gold);
  color: #fef3c7;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

/* Layout Grid */
.app-container {
  display: flex;
  min-height: calc(100vh - 70px);
}

.sidebar {
  width: 280px;
  background: #ffffff;
  border-right: 1px solid var(--slate-200);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-category-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-left: 8px;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--slate-700);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-item a:hover {
  background-color: var(--slate-100);
  color: var(--primary-gold-dark);
}

.nav-item.active a {
  background-color: var(--primary-gold-light);
  color: var(--primary-gold-dark);
  font-weight: 700;
  border-left: 3px solid var(--accent-gold);
}

.main-content {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Cards & Panels */
.card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.card-header h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--slate-900);
}

/* Forms & Input Elements */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-weight: 700;
  font-size: 12px;
  color: var(--slate-700);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="tel"],
select,
textarea {
  font-family: var(--font-marathi);
  font-size: 13px;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--slate-900);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-marathi);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--accent-gold);
  color: #ffffff;
}

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

.btn-success {
  background-color: var(--success-green);
  color: #ffffff;
}

.btn-success:hover {
  background-color: #047857;
}

.btn-dark {
  background-color: var(--slate-900);
  color: #ffffff;
}

.btn-dark:hover {
  background-color: var(--slate-800);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid #cbd5e1;
  color: var(--slate-700);
}

.btn-outline:hover {
  background-color: var(--slate-100);
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-sansthan {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.table-sansthan th {
  background-color: var(--slate-100);
  color: var(--slate-700);
  font-weight: 800;
  padding: 10px 12px;
  border-bottom: 2px solid var(--slate-200);
  text-transform: uppercase;
}

.table-sansthan td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--slate-200);
  color: var(--slate-800);
}

.table-sansthan tr:hover {
  background-color: #fdfaf3;
}

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

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

.font-bold {
  font-weight: 700;
}

/* Financial Metric Banners */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px;
  border-left: 4px solid var(--accent-gold);
  box-shadow: var(--shadow-sm);
}

.metric-box.green {
  border-left-color: var(--success-green);
  background-color: #f0fdf4;
}

.metric-box.red {
  border-left-color: var(--danger-red);
  background-color: #fef2f2;
}

.metric-box.amber {
  border-left-color: var(--accent-gold);
  background-color: #fffbeb;
}

.metric-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--slate-600);
  text-transform: uppercase;
}

.metric-value {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--slate-900);
  margin-top: 4px;
}

/* Thermal Print Receipt (58mm / 80mm) */
.thermal-receipt-container {
  max-width: 320px;
  margin: 0 auto;
  background: #ffffff;
  padding: 16px;
  border: 1px dashed #94a3b8;
  font-family: monospace;
  font-size: 12px;
  color: #000000;
}

.thermal-header {
  text-align: center;
  border-bottom: 1px dashed #000;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.thermal-header h3 {
  font-size: 14px;
  font-weight: bold;
}

.thermal-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.thermal-divider {
  border-top: 1px dashed #000;
  margin: 8px 0;
}

.thermal-footer {
  text-align: center;
  margin-top: 12px;
  font-size: 11px;
}

@media print {
  body * {
    visibility: hidden;
  }
  .printable-area, .printable-area * {
    visibility: visible;
  }
  .printable-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .no-print {
    display: none !important;
  }
}
