/* =========================================================
   dashboard.css — shared styling for status.php, admin/*, doctor/*
   Palette matches the main Psychidoc site (common.css tokens).
   ========================================================= */

:root{
  --bg-deep:#0D1B2C;
  --bg-deep-2:#132840;
  --teal:#2FA98C;
  --teal-dim:#1F7A65;
  --teal-light:#7FBFAE;
  --red:#D64550;
  --amber:#C98A2C;
  --paper:#F6F8F7;
  --paper-line:#E1E7E4;
  --paper-line-strong:#CBD5D1;
  --ink:#152230;
  --muted:#5B6B75;
  --muted-soft:#8695A0;
  --radius:9px;
  --radius-lg:16px;
  --shadow-card:0 10px 30px rgba(13,27,44,0.08);
  --sidebar-w:220px;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
.pd-body{
  font-family:'IBM Plex Sans', system-ui, sans-serif;
  background:var(--paper);
  color:var(--ink);
  line-height:1.5;
}
h1,h2,h3{ font-family:'Space Grotesk', system-ui, sans-serif; margin:0 0 .4em; color:var(--ink); }
a{ color:inherit; }
table{ border-collapse:collapse; width:100%; }

/* ---------- brand / topbar ---------- */
.pd-brand{ display:flex; align-items:center; gap:8px; font-weight:700; font-size:18px; text-decoration:none; color:#EAF1F6; }
.pd-brand-center{ justify-content:center; margin-bottom:18px; color:var(--ink); }
.pd-dot{ width:9px; height:9px; border-radius:50%; background:var(--teal); box-shadow:0 0 0 4px rgba(47,169,140,.18); flex:none; }

.pd-topbar{
  background:var(--bg-deep); color:#EAF1F6;
  padding:14px 24px; display:flex; align-items:center; justify-content:space-between;
}
.pd-topbar-right{ display:flex; align-items:center; gap:14px; font-size:13.5px; color:#B9C7D0; }
.pd-topbar-right a{ color:#7FBFAE; text-decoration:none; font-weight:600; }

/* ---------- generic shell / card ---------- */
.pd-shell{ max-width:1180px; margin:0 auto; padding:28px 24px 60px; }
.pd-shell-narrow{ max-width:640px; }
.pd-body-center{ min-height:100vh; display:flex; align-items:center; justify-content:center; }
.pd-body-center .pd-shell{ padding:24px; width:100%; }

.pd-card{
  background:#fff; border:1px solid var(--paper-line); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-card); padding:28px 30px; margin-bottom:22px;
}
.pd-login-card{ max-width:380px; margin:0 auto; }
.pd-sub{ color:var(--muted); font-size:14px; margin-bottom:18px; }

/* ---------- buttons ---------- */
.pd-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  font-family:'Space Grotesk', sans-serif; font-weight:600; font-size:13.5px;
  padding:10px 18px; border-radius:20px; border:1.5px solid transparent;
  cursor:pointer; background:#EEF3F1; color:var(--ink);
  transition:background .15s ease, border-color .15s ease;
}
.pd-btn:active{ transform:scale(.97); }
.pd-btn-primary{ background:var(--teal); border-color:var(--teal); color:#fff; }
.pd-btn-primary:hover{ background:#38BC9E; }
.pd-btn-outline{ background:transparent; border-color:var(--paper-line-strong); }
.pd-btn-outline:hover{ border-color:var(--teal); color:var(--teal-dim); }
.pd-btn-sm{ padding:7px 14px; font-size:12.5px; }
.pd-btn-block{ width:100%; }
.pd-btn[disabled]{ opacity:.5; cursor:not-allowed; }

/* ---------- forms ---------- */
.pd-field{ margin-bottom:16px; }
.pd-field label{ display:block; font-size:13px; font-weight:700; margin-bottom:6px; }
.pd-field .hint{ font-size:12px; color:var(--muted-soft); margin-top:4px; }
.pd-field input, .pd-field select, .pd-field textarea{
  width:100%; font-family:inherit; font-size:14px; padding:10px 12px;
  border-radius:8px; border:1.5px solid var(--paper-line-strong); background:var(--paper);
}
.pd-field input:focus, .pd-field select:focus, .pd-field textarea:focus{
  outline:none; border-color:var(--teal); background:#fff; box-shadow:0 0 0 3px rgba(47,169,140,.14);
}
.pd-field textarea{ resize:vertical; min-height:80px; }
.pd-inline-form{ display:flex; gap:10px; margin-bottom:10px; }
.pd-inline-form input{ flex:1; }
.pd-checkbox{ display:flex; align-items:center; gap:8px; font-size:13.5px; margin-bottom:14px; }
.pd-checkbox input{ width:auto; }
.pd-row2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }

/* ---------- alerts ---------- */
.pd-alert{ padding:12px 16px; border-radius:8px; font-size:13.5px; margin-bottom:16px; }
.pd-alert-success{ background:rgba(47,169,140,.12); color:#1F7A65; border:1px solid rgba(47,169,140,.35); }
.pd-alert-error{ background:rgba(214,69,80,.1); color:#B93A44; border:1px solid rgba(214,69,80,.3); }

/* ---------- badges ---------- */
.pd-badge{ display:inline-block; padding:3px 10px; border-radius:20px; font-size:11.5px; font-weight:700; letter-spacing:.02em; text-transform:uppercase; }
.pd-badge-new{ background:rgba(201,138,44,.14); color:var(--amber); }
.pd-badge-assigned{ background:rgba(47,169,140,.12); color:var(--teal-dim); }
.pd-badge-scheduled{ background:rgba(47,105,169,.12); color:#2A5FA0; }
.pd-badge-completed{ background:rgba(90,90,90,.12); color:#5B6B75; }
.pd-badge-done{ background:rgba(47,169,140,.18); color:var(--teal-dim); }
.pd-badge-cancelled{ background:rgba(214,69,80,.1); color:var(--red); }

/* ---------- app shell: sidebar + content (admin/doctor) ---------- */
.pd-app{ display:flex; min-height:100vh; }
.pd-sidebar{
  width:var(--sidebar-w); flex:none; background:var(--bg-deep); color:#EAF1F6;
  padding:20px 16px; display:flex; flex-direction:column; gap:4px;
}
.pd-sidebar .pd-brand{ margin-bottom:22px; padding:0 6px; }
.pd-nav-link{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:10px 12px; border-radius:8px; font-size:13.5px; font-weight:500;
  color:#B9C7D0; text-decoration:none;
}
.pd-nav-link:hover{ background:rgba(255,255,255,.06); color:#fff; }
.pd-nav-link.active{ background:var(--teal); color:#fff; }
.pd-nav-count{ font-size:11px; background:rgba(255,255,255,.12); padding:1px 7px; border-radius:10px; }
.pd-nav-link.active .pd-nav-count{ background:rgba(255,255,255,.25); }
.pd-sidebar-footer{ margin-top:auto; padding:12px 6px 0; border-top:1px solid rgba(255,255,255,.08); font-size:12.5px; color:#8695A0; }
.pd-sidebar-footer a{ color:#F0A6AB; text-decoration:none; }
.pd-content{ flex:1; min-width:0; }
.pd-content-inner{ padding:26px 30px 60px; max-width:1000px; }
.pd-page-title{ display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; flex-wrap:wrap; gap:10px; }

@media (max-width:820px){
  .pd-app{ flex-direction:column; }
  .pd-sidebar{ width:100%; flex-direction:row; flex-wrap:wrap; padding:14px; }
  .pd-sidebar-footer{ display:none; }
  .pd-content-inner{ padding:20px; }
}

/* ---------- submission cards (list rows) ---------- */
.pd-item{
  background:#fff; border:1px solid var(--paper-line); border-radius:var(--radius-lg);
  padding:20px 22px; margin-bottom:16px; box-shadow:var(--shadow-card);
}
.pd-item-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; flex-wrap:wrap; }
.pd-item-name{ font-weight:700; font-size:15.5px; }
.pd-item-meta{ font-size:12.5px; color:var(--muted); margin-top:2px; }
.pd-item-body{ font-size:13.5px; color:var(--ink); }
.pd-kv{ display:grid; grid-template-columns:repeat(auto-fill, minmax(160px,1fr)); gap:8px 18px; margin:12px 0; font-size:13px; }
.pd-kv div span{ display:block; color:var(--muted-soft); font-size:11.5px; text-transform:uppercase; letter-spacing:.03em; margin-bottom:2px; }
.pd-msg{ background:var(--paper); border-radius:8px; padding:10px 14px; font-size:13.5px; margin:10px 0; white-space:pre-wrap; }
.pd-item-actions{ margin-top:14px; padding-top:14px; border-top:1px dashed var(--paper-line-strong); }
.pd-empty{ color:var(--muted); font-size:14px; padding:30px 0; text-align:center; }

/* ---------- timeline (status.php) ---------- */
.pd-timeline{ display:flex; gap:0; margin:22px 0; }
.pd-tl-step{ flex:1; text-align:center; position:relative; }
.pd-tl-step::before{
  content:''; position:absolute; top:6px; left:-50%; width:100%; height:2px; background:var(--paper-line-strong); z-index:0;
}
.pd-tl-step:first-child::before{ display:none; }
.pd-tl-step.done::before{ background:var(--teal); }
.pd-tl-dot{ width:14px; height:14px; border-radius:50%; background:var(--paper-line-strong); margin:0 auto 8px; position:relative; z-index:1; }
.pd-tl-step.done .pd-tl-dot{ background:var(--teal); }
.pd-tl-step.current .pd-tl-dot{ box-shadow:0 0 0 4px rgba(47,169,140,.2); }
.pd-tl-label{ font-size:11px; color:var(--muted); max-width:100px; margin:0 auto; }
.pd-tl-step.done .pd-tl-label{ color:var(--teal-dim); font-weight:600; }
@media (max-width:560px){ .pd-tl-label{ font-size:9.5px; } }

.pd-detail-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px 18px; margin:18px 0; }
.pd-detail span{ display:block; font-size:11px; text-transform:uppercase; color:var(--muted-soft); margin-bottom:2px; }
.pd-detail strong{ font-size:14px; }
.pd-link{ color:var(--teal-dim); word-break:break-all; }

.pd-rx-box{ margin-top:20px; padding-top:18px; border-top:1px solid var(--paper-line); }
.pd-table th, .pd-table td{ text-align:left; padding:8px 10px; font-size:13px; border-bottom:1px solid var(--paper-line); }
.pd-table th{ color:var(--muted-soft); text-transform:uppercase; font-size:11px; letter-spacing:.03em; }

/* ---------- stat overview cards (admin dashboard) ---------- */
.pd-stats{ display:grid; grid-template-columns:repeat(auto-fit, minmax(150px,1fr)); gap:14px; margin-bottom:24px; }
.pd-stat{
  background:#fff; border:1px solid var(--paper-line); border-radius:var(--radius-lg);
  padding:16px 18px; box-shadow:var(--shadow-card);
}
.pd-stat-num{ font-family:'Space Grotesk',sans-serif; font-size:26px; font-weight:700; line-height:1; margin-bottom:6px; }
.pd-stat-label{ font-size:12px; color:var(--muted-soft); text-transform:uppercase; letter-spacing:.03em; }
.pd-stat-accent .pd-stat-num{ color:var(--teal-dim); }

/* ---------- prescription form (doctor) ---------- */
.pd-med-table th, .pd-med-table td{ padding:6px; }
.pd-med-table input{ width:100%; padding:8px 10px; font-size:13px; border-radius:6px; border:1.5px solid var(--paper-line-strong); }
.pd-row-del{ background:none; border:none; color:var(--red); font-size:18px; cursor:pointer; line-height:1; }
