/* PragatiPath 360 — Global Design System */

:root {
  --primary:       #38bdf8;
  --primary-dark:  #0ea5e9;
  --accent:        #fbbf24;
  --success:       #4ade80;
  --danger:        #ef4444;
  --warning:       #fbbf24;
  --info:          #a78bfa;

  --bg:            #020617;
  --surface:       rgba(15, 23, 42, 0.75);
  --surface-solid: #0f172a;
  --border:        rgba(56, 189, 248, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.07);

  --text:          #f8fafc;
  --text-dim:      #94a3b8;
  --text-muted:    #475569;

  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     18px;
  --radius-xl:     24px;

  --shadow-sm:     0 1px 3px rgba(0,0,0,0.3);
  --shadow:        0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg:     0 20px 50px rgba(0,0,0,0.5);

  --transition:    0.2s ease;
  --font:          'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

body {
  font-family: var(--font);
  background: var(--bg);
  background-image: radial-gradient(circle at 50% 0%, #0f172a, var(--bg) 60%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ─── TYPOGRAPHY ──────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }
p  { color: var(--text-dim); line-height: 1.7; }
small { font-size: 0.8rem; color: var(--text-dim); }

/* ─── LOGO ───────────────────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}
.logo img {
  height: 32px;
  width: auto;
  background: white;
  border-radius: 6px;
  padding: 2px;
  flex-shrink: 0;
}
.logo span {
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary);
  letter-spacing: 0.5px;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}
.btn:hover  { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: translateY(0); filter: brightness(0.95); }
.btn:disabled { opacity: 0.5; pointer-events: none; }

.btn-primary  { background: var(--primary); color: #020617; }
.btn-accent   { background: var(--accent); color: #020617; }
.btn-success  { background: rgba(74,222,128,0.15); color: var(--success); border-color: rgba(74,222,128,0.3); }
.btn-danger   { background: rgba(239,68,68,0.12); color: var(--danger); border-color: rgba(239,68,68,0.3); }
.btn-outline  { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-outline:hover { background: rgba(56,189,248,0.08); }
.btn-ghost    { background: rgba(255,255,255,0.05); color: var(--text-dim); border-color: var(--border-subtle); }
.btn-ghost:hover { background: rgba(255,255,255,0.09); color: var(--text); }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-full { width: 100%; }

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.card-hover:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 32px rgba(56,189,248,0.12);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* ─── FORM ELEMENTS ──────────────────────────────────────── */
input, select, textarea {
  width: 100%;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--text);
  padding: 13px 16px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.12);
}
input:disabled, select:disabled, textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
select option { background: #0f172a; color: white; }
label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}
.field { margin-bottom: 16px; }
.field input, .field select, .field textarea { margin-bottom: 0; }
.field-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; }

/* ─── BADGES / PILLS ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-success { background: rgba(74,222,128,0.12); color: var(--success); border-color: rgba(74,222,128,0.25); }
.badge-danger  { background: rgba(239,68,68,0.12); color: var(--danger); border-color: rgba(239,68,68,0.25); }
.badge-warning { background: rgba(251,191,36,0.12); color: var(--warning); border-color: rgba(251,191,36,0.25); }
.badge-info    { background: rgba(167,139,250,0.12); color: var(--info); border-color: rgba(167,139,250,0.25); }
.badge-primary { background: rgba(56,189,248,0.12); color: var(--primary); border-color: rgba(56,189,248,0.25); }
.badge-dim     { background: rgba(148,163,184,0.1); color: var(--text-dim); border-color: rgba(148,163,184,0.2); }

/* ─── STATUS DOTS ────────────────────────────────────────── */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-success { background: var(--success); box-shadow: 0 0 8px var(--success); }
.dot-danger  { background: var(--danger);  box-shadow: 0 0 8px var(--danger); }
.dot-warning { background: var(--warning); box-shadow: 0 0 8px var(--warning); }
.dot-primary { background: var(--primary); box-shadow: 0 0 8px var(--primary); }

/* ─── DIVIDER ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; border: none; }

/* ─── SECTION LABEL ──────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 900;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: rgba(251,191,36,0.2); }

/* ─── GRIDS ──────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─── NAVBAR (shared) ────────────────────────────────────── */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  height: 64px;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* ─── TABLES ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
thead { background: rgba(255,255,255,0.03); }
th {
  padding: 11px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 13px 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(56,189,248,0.03); }

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 14px; opacity: 0.6; }
.empty-state p { font-size: 14px; max-width: 300px; margin: 0 auto; }

/* ─── SPINNER ────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(56,189,248,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── SKELETON ───────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, rgba(30,41,59,0.8) 25%, rgba(51,65,85,0.6) 50%, rgba(30,41,59,0.8) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── UTILITY ────────────────────────────────────────────── */
.hidden   { display: none !important; }
.flex     { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.wrap   { flex-wrap: wrap; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.font-mono   { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
