/**
 * Thirumurugan Metals ERP - Global Theme & Enterprise Design System
 * Inspired by modern enterprise SaaS (Linear, Stripe, Retool, SAP Retail)
 */

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

:root {
  /* Brand Palette */
  --primary-navy: #0b1329;
  --secondary-navy: #0f172a;
  --surface-navy: #1e293b;
  --border-navy: #334155;
  
  /* Metallic Gold Accents */
  --gold-50: #fffbeb;
  --gold-100: #fef3c7;
  --gold-200: #fde68a;
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-600: #d97706;
  --gold-700: #b45309;
  --gold-glow: 0 0 20px rgba(245, 158, 11, 0.25);
  --gold-border: rgba(245, 158, 11, 0.35);

  /* Surfaces */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-muted: #f1f5f9;
  --border-light: #e2e8f0;
  --border-subtle: #edf2f7;

  /* Typography */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* Status Colors */
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --rose-500: #ef4444;
  --rose-600: #dc2626;
  --amber-500: #f59e0b;
  --blue-600: #2563eb;
  
  /* Elevation */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-elevated: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* Lucide Icons Dimensions Safety */
svg.lucide, i[data-lucide] {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.w-3 { width: 12px; height: 12px; }
.w-3\.5 { width: 14px; height: 14px; }
.w-4 { width: 16px; height: 16px; }
.w-5 { width: 20px; height: 20px; }
.w-6 { width: 24px; height: 24px; }
.w-8 { width: 32px; height: 32px; }
.w-10 { width: 40px; height: 40px; }
.h-64 { height: 256px; }

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Base Card */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-elevated);
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  white-space: nowrap;
  user-select: none;
}

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

.btn-xs { padding: 4px 9px; font-size: 11px; }
.btn-sm { padding: 6px 13px; font-size: 12px; }
.btn-md { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 14px; }

.btn-primary {
  background: linear-gradient(180deg, #0f172a 0%, #070d1d 100%);
  color: #ffffff;
  border-color: #0b1329;
  box-shadow: 0 2px 4px rgba(11, 19, 41, 0.15);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-color: #1e293b;
  box-shadow: 0 4px 12px rgba(11, 19, 41, 0.25);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #070d1d;
  font-weight: 700;
  border-color: #b45309;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.btn-gold:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #334155;
  border-color: #e2e8f0;
}
.btn-secondary:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.btn-outline {
  background-color: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}
.btn-outline:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-danger {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border-color: #b91c1c;
}
.btn-danger:hover {
  background: #b91c1c;
}

/* Form Controls */
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: all 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 5px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.badge-primary { background: #e0f2fe; color: #0284c7; }
.badge-secondary { background: #f1f5f9; color: #475569; }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #dc2626; }

/* Filter Pills */
.filter-pills {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.filter-pill {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill.active {
  background: #ffffff;
  color: var(--primary-navy);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.filter-pill:hover:not(.active) {
  color: var(--primary-navy);
}
