/* ============================================================
   RAINBOW HOSPITAL COMMUNITY - GLOBAL DESIGN SYSTEM
   Elite, Professional, Modern UI
   ============================================================ */

:root {
  /* Core Colors */
  --bg: #f6f7fb;
  --surface: rgba(255, 255, 255, 0.78);
  --panel: rgba(255, 255, 255, 0.92);
  --panel2: rgba(255, 255, 255, 0.70);
  --text: #0f172a;
  --muted: #5b6476;
  --muted2: #7b869b;
  --border: #e7eaf2;

  /* Rainbow Brand Colors (from logo) */
  --brand: #7c3aed;     /* Primary Orange */
  --brand2: #0ea5e9;    /* Sky Blue */
  --brand3: #7c3aed;    /* Violet */
  --good: #16a34a;      /* Success Green */
  --warn: #f59e0b;      /* Warning Amber */
  --bad: #ef4444;       /* Error Red */

  /* Radius & Shadows */
  --r12: 12px;
  --r16: 16px;
  --r20: 20px;
  --r24: 24px;
  --r28: 28px;

  --shadow1: 0 10px 30px rgba(16, 24, 40, 0.06);
  --shadow2: 0 16px 40px rgba(16, 24, 40, 0.10);
  --shadow3: 0 24px 60px rgba(16, 24, 40, 0.14);
  --shadow4: 0 32px 80px rgba(16, 24, 40, 0.18);

  /* Layout */
  --max: 1240px;
  --gap: 16px;

  /* Typography */
  --t-xs: 12px;
  --t-sm: 13px;
  --t-md: 14px;
  --t-lg: 16px;
  --t-xl: 20px;
  --t-2xl: 24px;
  --t-3xl: 32px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #070a12;
  --surface: rgba(11, 18, 32, 0.72);
  --panel: rgba(12, 20, 38, 0.88);
  --panel2: rgba(12, 20, 38, 0.70);
  --text: #eaf0ff;
  --muted: #a8b3cc;
  --muted2: #8793ac;
  --border: #1a2742;

  --shadow1: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow2: 0 18px 42px rgba(0, 0, 0, 0.40);
  --shadow3: 0 26px 70px rgba(0, 0, 0, 0.50);
  --shadow4: 0 36px 90px rgba(0, 0, 0, 0.60);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(1000px 600px at 10% -10%, rgba(240, 90, 40, 0.18), transparent 55%),
    radial-gradient(900px 600px at 90% -5%, rgba(14, 165, 233, 0.18), transparent 55%),
    radial-gradient(900px 600px at 75% 105%, rgba(124, 58, 237, 0.14), transparent 55%),
    var(--bg);
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.5;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

[data-theme="dark"] body {
  background:
    radial-gradient(1000px 600px at 10% -10%, rgba(240, 90, 40, 0.12), transparent 55%),
    radial-gradient(900px 600px at 90% -5%, rgba(14, 165, 233, 0.12), transparent 55%),
    radial-gradient(900px 600px at 75% 105%, rgba(124, 58, 237, 0.10), transparent 55%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px;
}

/* Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r20);
  box-shadow: var(--shadow1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card.soft {
  background: var(--panel2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.70);
  color: var(--text);
  font-weight: 800;
  font-size: var(--t-sm);
  cursor: pointer;
  transition: transform 0.12s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
  user-select: none;
  line-height: 1;
  white-space: nowrap;
  outline: none;
}

[data-theme="dark"] .btn {
  background: rgba(255, 255, 255, 0.06);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow2);
}

.btn:active {
  transform: translateY(0px);
  box-shadow: var(--shadow1);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  border-color: rgba(240, 90, 40, 0.35);
  background: linear-gradient(135deg, rgba(240, 90, 40, 0.16), rgba(14, 165, 233, 0.10), rgba(124, 58, 237, 0.08));
}

.btn.solid {
  border-color: rgba(240, 90, 40, 0.55);
  background: linear-gradient(135deg, rgba(240, 90, 40, 0.98), rgba(240, 90, 40, 0.72));
  color: white;
  box-shadow: 0 18px 40px rgba(240, 90, 40, 0.18);
}

.btn.solid:hover {
  box-shadow: 0 24px 60px rgba(240, 90, 40, 0.28);
}

.btn.small {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
}

.btn.ghost {
  background: transparent;
}

.btn.iconbtn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 14px;
}

/* Inputs */
.input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.70);
  color: var(--text);
  font-weight: 750;
  font-size: var(--t-md);
  outline: none;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
  font-family: inherit;
}

[data-theme="dark"] .input {
  background: rgba(255, 255, 255, 0.06);
}

.input:focus {
  border-color: rgba(14, 165, 233, 0.55);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.label {
  margin: 8px 0 6px;
  font-weight: 900;
  font-size: var(--t-xs);
  color: var(--muted2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
}

/* Pills / Tags */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.70);
  font-weight: 800;
  font-size: var(--t-xs);
  color: var(--muted);
}

[data-theme="dark"] .pill {
  background: rgba(255, 255, 255, 0.06);
}

/* Utility Classes */
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.sr {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Toast Notifications */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow2);
  font-weight: 950;
  font-size: var(--t-sm);
  z-index: 9999;
  animation: toastSlideIn 0.3s var(--ease);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Loading Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .wrap {
    padding: 12px;
  }
  
  .btn {
    padding: 10px 14px;
    font-size: var(--t-xs);
  }
}

