/* Clinical Patient Care Dashboard - Dr. Prashant Jayant (Mamta Hospital) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --primary: #0f172a;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-light: #ccfbf1;
  --gold: #d97706;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.08);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
}

/* Security Auth Overlay */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.auth-card {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.auth-header p {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 2px;
}

.auth-field {
  margin-bottom: 18px;
}

.auth-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.btn-auth-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #0f766e);
  color: #ffffff;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25);
  transition: transform 0.2s ease;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
}

/* Top App Bar */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}

.app-subtitle {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-sync {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-sync:hover {
  background: #bae6fd;
}

.btn-intake {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-intake:hover {
  background: var(--accent-hover);
}

/* Main Layout */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px;
}

/* Stats Summary Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.stat-val {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: var(--primary);
  line-height: 1;
}

.stat-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
}

.stat-icon {
  height: 48px;
  width: 48px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

/* Controls Bar */
.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 280px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: 0.9rem;
  outline: none;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn.active, .pill-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* 3-Stage Pipeline Board */
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .pipeline-board {
    grid-template-columns: 1fr;
  }
}

.column {
  background: #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 16px;
  min-height: 550px;
  border: 1px solid var(--border);
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #cbd5e1;
}

.column-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.patient-count-badge {
  background: #e0f2fe;
  color: #0284c7;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 12px;
}

/* Patient Card */
.patient-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.patient-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.patient-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.patient-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
}

.patient-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.condition-tag {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  margin: 6px 0;
}

.vas-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: #fee2e2;
  color: #991b1b;
  padding: 2px 8px;
  border-radius: 10px;
}

.vas-badge.reduced {
  background: #dcfce7;
  color: #166534;
}

.procedure-summary {
  font-size: 0.82rem;
  margin-top: 8px;
  padding: 8px;
  background: #fafafa;
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-move {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}

.btn-move:hover {
  text-decoration: underline;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-container {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  padding: 28px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.form-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}

.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  outline: none;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
