﻿/* ==========================================================================
   GMC Kozhikode â€” Service Registration Portal
   Shared Design System
   Palette intent: ~70% white/soft surfaces, ~20% teal/blue (trust),
   ~10% muted terracotta accent (calls to action).
   ========================================================================== */

:root {
  /* ---- Surfaces (the ~70%) ---- */
  --white: #ffffff;
  --surface: #f6faf9;          /* page background, faint teal-white */
  --surface-alt: #eef5f4;      /* alternating section background */
  --surface-raised: #ffffff;   /* cards sitting on top of surface */

  /* ---- Borders / lines ---- */
  --border: #dde9e7;
  --border-strong: #c7d9d6;

  /* ---- Teal / blue brand (the ~20%, trust) ---- */
  --teal-900: #0b3a39;
  --teal-800: #0f4c4a;
  --teal-700: #15625f;
  --teal-600: #1c7a76;
  --teal-500: #2c948f;
  --teal-100: #dcefed;
  --blue-600: #2f6f93;
  --blue-100: #dfeaf0;

  /* ---- Muted accent (the ~10%, calls to action) ---- */
  --accent: #c97a4a;
  --accent-dark: #ab6238;
  --accent-light: #f2ded0;
  --accent-100: #fbf0e8;

  /* ---- Text ---- */
  --text-900: #17282a;
  --text-700: #324a4c;
  --text-600: #51696b;
  --text-400: #88a09f;
  --text-on-brand: #ffffff;

  /* ---- Status ---- */
  --success: #2f8f6b;
  --success-bg: #e6f4ed;
  --warning: #c8923f;
  --warning-bg: #fbf1e1;
  --danger: #c75b52;
  --danger-bg: #fbeae8;
  --info: var(--teal-600);
  --info-bg: var(--teal-100);

  /* ---- Elevation ---- */
  --shadow-sm: 0 1px 2px rgba(15, 40, 39, 0.05), 0 1px 1px rgba(15, 40, 39, 0.04);
  --shadow-md: 0 6px 16px rgba(15, 40, 39, 0.07), 0 2px 4px rgba(15, 40, 39, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 40, 39, 0.12), 0 4px 10px rgba(15, 40, 39, 0.05);
  --shadow-focus: 0 0 0 4px rgba(28, 122, 118, 0.18);

  /* ---- Radius ---- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-full: 999px;

  /* ---- Type ---- */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text-900);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-700); }
:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--r-sm); }

/* ---- Icons ---- */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  vertical-align: -4px;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 36px; height: 36px; }

/* ---- Layout helpers ---- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--font); color: var(--text-900); letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 13px 24px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

/* Primary = the muted accent, reserved for the main action */
.btn-primary {
  background: var(--accent);
  color: var(--text-on-brand);
  box-shadow: 0 6px 18px rgba(201, 122, 74, 0.28);
}
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 10px 24px rgba(201, 122, 74, 0.34); transform: translateY(-1px); color: var(--text-on-brand); }

/* Secondary = teal, trust-toned, for navigation/secondary actions */
.btn-secondary {
  background: var(--teal-700);
  color: var(--text-on-brand);
}
.btn-secondary:hover { background: var(--teal-800); transform: translateY(-1px); color: var(--text-on-brand); }

/* Ghost / outline */
.btn-ghost {
  background: var(--white);
  color: var(--teal-800);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-alt); border-color: var(--teal-600); color: var(--teal-800); }

/* Quiet text-style button */
.btn-text {
  background: transparent;
  color: var(--teal-700);
  padding: 8px 4px;
}
.btn-text:hover { color: var(--teal-900); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b04a42; color: #fff; }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-lg { padding: 16px 30px; font-size: 16px; }
.btn[disabled], .btn.disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ==========================================================================
   Cards & surfaces
   ========================================================================== */
.card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 28px; }
.card-hover { transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease; }
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }

/* Icon tile used inside feature/stat cards */
.icon-tile {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-100);
  color: var(--teal-700);
  flex-shrink: 0;
}
.icon-tile.accent { background: var(--accent-100); color: var(--accent-dark); }
.icon-tile.blue { background: var(--blue-100); color: var(--blue-600); }
.icon-tile.success { background: var(--success-bg); color: var(--success); }
.icon-tile.warning { background: var(--warning-bg); color: var(--warning); }
.icon-tile.danger { background: var(--danger-bg); color: var(--danger); }
.icon-tile.sm { width: 36px; height: 36px; border-radius: var(--r-sm); }
/* Service symbol tile: a polished replacement for loose emoji labels. */
.service-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--teal-100);
  color: var(--teal-800);
  border: 1px solid rgba(28, 122, 118, 0.16);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
}
.service-symbol.lg {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--r-sm);
  font-size: 12px;
}

/* ==========================================================================
   Badges / status pills
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--r-full);
  line-height: 1.3;
  white-space: nowrap;
}
.badge .icon { width: 14px; height: 14px; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-neutral { background: var(--surface-alt); color: var(--text-600); }
.badge-accent  { background: var(--accent-100); color: var(--accent-dark); }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { margin-bottom: 18px; }
.field label, .field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-700);
  margin-bottom: 7px;
}
.field-hint { font-size: 12.5px; color: var(--text-400); margin-top: 6px; }
.field-error { font-size: 12.5px; color: var(--danger); margin-top: 6px; font-weight: 500; }

.input, .form-control, input[type="text"].fld, input[type="email"].fld,
input[type="password"].fld, input[type="tel"].fld, input[type="number"].fld,
select.fld, textarea.fld {
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text-900);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .form-control:focus, .fld:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: var(--shadow-focus);
}
.input::placeholder, .fld::placeholder { color: var(--text-400); }
textarea.fld { resize: vertical; min-height: 90px; }

.input-icon-wrap { position: relative; }
.input-icon-wrap .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-400);
}
.input-icon-wrap .fld { padding-left: 42px; }

/* ==========================================================================
   Alerts / banners
   ========================================================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  border: 1px solid transparent;
  margin-bottom: 16px;
}
.alert .icon { margin-top: 1px; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: rgba(47,143,107,0.18); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(200,146,63,0.2); }
.alert-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: rgba(199,91,82,0.2); }
.alert-info    { background: var(--info-bg);    color: var(--teal-800); border-color: rgba(28,122,118,0.15); }

/* ==========================================================================
   Empty states
   ========================================================================== */
.empty-state { text-align: center; padding: 64px 24px; color: var(--text-600); }
.empty-state .icon-tile { margin: 0 auto 18px; width: 60px; height: 60px; border-radius: var(--r-md); }
.empty-state .icon-tile .icon { width: 28px; height: 28px; }
.empty-state h3 { font-size: 17px; margin-bottom: 6px; color: var(--text-900); }
.empty-state p { font-size: 14px; color: var(--text-400); }

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); }
table.data-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-600);
  background: var(--surface-alt);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
table.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border-light, var(--border)); color: var(--text-700); }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--surface); }

/* ==========================================================================
   Scrollbar (subtle, Apple-ish)
   ========================================================================== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-400); }

/* ==========================================================================
   Utility
   ========================================================================== */
.text-muted { color: var(--text-400); }
.text-secondary { color: var(--text-600); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }


/* Medical college logo image used in nav/admin branding. */
.logo-img,
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.nav-logo.has-image,
.brand-logo.has-image {
  background: #050505 !important;
  color: var(--teal-700);
  padding: 3px;
  border: 1px solid rgba(221, 233, 231, 0.9);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
