/* ============================================================
   FILE: embrotrack-superadmin/styles.css
   Responsive Executive Control Center (Mobile + Laptop)
   ============================================================ */
:root {
  --dark: #0f172a;
  --dark-2: #1e293b;
  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --accent-light: #eef2ff;
  --green: #10b981;
  --green-dark: #059669;
  --green-light: #d1fae5;
  --red: #ef4444;
  --red-light: #fee2e2;
  --orange: #f59e0b;
  --orange-light: #fef3c7;
  --blue: #2563eb;
  --blue-light: #dbeafe;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Noto Sans Devanagari', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}

.hidden { display: none !important; }

/* Splash & Auth */
.splash {
  min-height: 100vh;
  background: linear-gradient(155deg, var(--dark), var(--dark-2));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.splash-icon {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  background: rgba(99, 102, 241, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}

.auth-page {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-box {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 26px 22px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}
.auth-head {
  text-align: center;
  margin-bottom: 20px;
}
.auth-head .shield {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--dark);
  color: #fff;
  font-size: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.auth-head h1 { font-size: 20px; font-weight: 800; }
.auth-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* Top Navbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--dark);
  color: #fff;
  padding: 13px 16px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.25);
}
.topbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-brand h1 { font-size: 17px; font-weight: 800; }
.topbar-brand small { font-size: 11.5px; color: #94a3b8; display: block; }
.topbar-actions { display: flex; gap: 8px; }

/* Sub-Nav Tabs */
.tabbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 30;
}
.tabbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  overflow-x: auto;
}
.tab-btn {
  padding: 9px 15px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.tab-btn.active {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-color: var(--accent);
}

/* Main Container */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 14px 48px;
}

/* Cards & Grids */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 15.5px;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
@media (min-width: 680px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(6, 1fr); }
}
.kpi-card {
  background: #fff;
  border-radius: 14px;
  padding: 13px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.kpi-card .label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.kpi-card .val { font-size: 22px; font-weight: 800; margin-top: 4px; }
.kpi-card.green { background: #ecfdf5; border-color: #a7f3d0; }
.kpi-card.green .val { color: var(--green-dark); }
.kpi-card.red { background: #fef2f2; border-color: #fecaca; }
.kpi-card.red .val { color: var(--red); }
.kpi-card.orange { background: #fffbeb; border-color: #fde68a; }
.kpi-card.orange .val { color: #b45309; }
.kpi-card.indigo { background: var(--accent-light); border-color: #c7d2fe; }
.kpi-card.indigo .val { color: var(--accent-dark); }
.kpi-card.blue { background: #eff6ff; border-color: #bfdbfe; }
.kpi-card.blue .val { color: var(--blue); }

/* Filters Bar */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filter-bar .form-control {
  flex: 1;
  min-width: 180px;
}

/* Company Cards Grid */
.company-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 760px) {
  .company-grid { grid-template-columns: repeat(2, 1fr); }
}
.company-card {
  background: #fff;
  border-radius: 15px;
  padding: 15px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.company-card.is-expired { border-color: #fca5a5; background: #fffafa; }
.company-card.is-suspended { border-color: #94a3b8; background: #f8fafc; opacity: 0.92; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: #f8fafc;
  padding: 10px;
  border-radius: 10px;
  font-size: 12.5px;
}
.meta-grid small { display: block; color: var(--muted); font-size: 11px; }
.meta-grid strong { font-weight: 800; }

/* Forms */
.form-group { margin-bottom: 13px; }
.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
}
.form-control:focus { border-color: var(--accent); }
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 520px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.2s;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 11px; font-size: 12px; border-radius: 8px; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-light { background: #f1f5f9; color: var(--text); border: 1px solid var(--border); }
.btn-ghost { background: rgba(255, 255, 255, 0.14); color: #fff; }

.action-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}
.badge-green { background: var(--green-light); color: #065f46; }
.badge-red { background: var(--red-light); color: #991b1b; }
.badge-orange { background: var(--orange-light); color: #92400e; }
.badge-blue { background: var(--blue-light); color: #1e40af; }
.badge-gray { background: #e2e8f0; color: #475569; }
.badge-indigo { background: var(--accent-light); color: var(--accent-dark); }

/* Alert Banner */
.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.alert-warning { background: var(--orange-light); color: #92400e; border: 1px solid #fcd34d; }
.alert-danger { background: var(--red-light); color: #991b1b; border: 1px solid #fca5a5; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.modal-box {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.modal-close {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
}

/* Loader & Toasts */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader-box {
  background: #fff;
  padding: 20px 26px;
  border-radius: 14px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
}
.spinner {
  width: 34px;
  height: 34px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  max-width: 360px;
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 11px 14px;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.toast.success { background: var(--green-dark); }
.toast.error { background: var(--red); }
.toast.info { background: var(--dark); }