/* ═══════════════════════════════════════════════════════════════════════
   SentraHealth Global Styles
   © 2026 Sentradesk Ltd. All rights reserved.
═══════════════════════════════════════════════════════════════════════ */

:root {
  --sh-primary:      #0d9488;   /* Teal primary */
  --sh-primary-dark: #0f766e;
  --sh-primary-light:#99f6e4;
  --sh-primary-bg:   #f0fdfa;
  --sh-green:        #16a34a;
  --sh-amber:        #d97706;
  --sh-danger:       #dc2626;
  --sh-blue:         #0891b2;
  --sh-purple:       #7c3aed;
  --sh-surface:      #f8fafc;
  --sh-card:         #ffffff;
  --sh-border:       #e2e8f0;
  --sh-text:         #0f172a;
  --sh-muted:        #64748b;
  --sh-radius:       12px;
  --sh-shadow:       0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.sh-body { font-family: "Inter", system-ui, -apple-system, sans-serif; background: var(--sh-surface); color: var(--sh-text); min-height: 100vh; }

/* ── NAVBAR ── */
.sh-nav { background: #0f172a; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.sh-nav-doctor { background: #0f2419; }
.sh-nav-nurse  { background: #064e3b; }
.sh-nav-lab    { background: #1e1b4b; }
.sh-nav-brand  { display: flex; align-items: center; gap: 10px; color: white; font-size: 18px; font-weight: 700; }
.sh-logo       { font-size: 22px; }
.sh-tagline    { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 20px; }
.sh-nav-actions { display: flex; align-items: center; gap: 10px; }

/* ── HERO BANNER ── */
.sh-hero-banner { background: linear-gradient(135deg, #0d9488, #0f766e, #064e3b); padding: 32px 24px; color: white; }
.sh-hero-inner  { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.sh-hero-title  { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.sh-hero-sub    { font-size: 14px; opacity: 0.8; }
.sh-hero-stats  { display: flex; gap: 16px; }
.sh-stat-pill   { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; padding: 10px 18px; text-align: center; }
.sh-stat-num    { font-size: 26px; font-weight: 800; display: block; }
.sh-stat-lbl    { font-size: 11px; opacity: 0.8; }

/* ── PAGE CONTAINER ── */
.sh-page-container { max-width: 1100px; margin: 0 auto; padding: 24px; }

/* ── CARDS ── */
.sh-card { background: var(--sh-card); border: 1px solid var(--sh-border); border-radius: var(--sh-radius); padding: 20px; box-shadow: var(--sh-shadow); }
.sh-card-gradient { background: linear-gradient(135deg, #f0fdfa, #ccfbf1); border-color: var(--sh-primary-light); }
.sh-card-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.sh-card-title   { font-size: 17px; font-weight: 700; color: var(--sh-text); }
.sh-card-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.sh-card-body    { padding: 4px 0; }
.sh-card-list    { display: flex; flex-direction: column; gap: 10px; }

/* ── STATS GRID ── */
.sh-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media(max-width:768px){ .sh-stats-grid { grid-template-columns: repeat(2,1fr); } }
.sh-stat-card { background: var(--sh-card); border-radius: var(--sh-radius); padding: 18px; border: 1px solid var(--sh-border); display: flex; align-items: center; gap: 14px; box-shadow: var(--sh-shadow); }
.sh-stat-icon  { font-size: 28px; }
.sh-stat-number{ font-size: 30px; font-weight: 800; }
.sh-stat-label { font-size: 12px; color: var(--sh-muted); margin-top: 2px; }
.sh-stat-amber .sh-stat-number  { color: var(--sh-amber); }
.sh-stat-teal  .sh-stat-number  { color: var(--sh-primary); }
.sh-stat-blue  .sh-stat-number  { color: var(--sh-blue); }

/* ── TABLE ── */
.sh-table-wrap { overflow-x: auto; border-radius: var(--sh-radius); border: 1px solid var(--sh-border); }
.sh-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sh-table thead th { background: var(--sh-primary); color: white; padding: 12px 14px; text-align: left; font-weight: 600; font-size: 12px; letter-spacing: 0.3px; }
.sh-table tbody tr { border-bottom: 1px solid var(--sh-border); transition: background 0.12s; }
.sh-table tbody tr:hover { background: #f0fdfa; }
.sh-table tbody td { padding: 12px 14px; }
.sh-row-emergency { background: #fee2e2 !important; }
.sh-row-urgent    { background: #fef3c7 !important; }

/* ── BADGES & STATUS ── */
.sh-status { padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.sh-status-draft          { background: #f1f5f9; color: #475569; }
.sh-status-under-review   { background: #fef3c7; color: #92400e; }
.sh-status-doctor-verified{ background: #dcfce7; color: #166534; }
.sh-status-issued         { background: #dbeafe; color: #1e40af; }
.sh-status-dispensed      { background: #dcfce7; color: #166534; }
.sh-status-doctor-rejected{ background: #fee2e2; color: #991b1b; }
.sh-status-pending        { background: #fef3c7; color: #92400e; }
.sh-status-done           { background: #dcfce7; color: #166534; }
.sh-status-result-available{ background: #dbeafe; color: #1e40af; }
.sh-badge-teal  { background: #ccfbf1; color: #0f766e; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.sh-badge-sm    { background: #f1f5f9; color: #475569; padding: 1px 6px; border-radius: 8px; font-size: 11px; margin-left: 4px; }
.sh-badge-danger{ background: #fee2e2; color: #dc2626; padding: 1px 6px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.sh-badge-green { background: #dcfce7; color: #16a34a; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.sh-badge-purple{ background: #ede9fe; color: #7c3aed; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.sh-urgency-emergency { color: #dc2626; font-weight: 700; }
.sh-urgency-urgent    { color: var(--sh-amber); font-weight: 600; }
.sh-urgency-routine, .sh-urgency-gp_\(routine\) { color: var(--sh-muted); }
.sh-urgency-stat { color: #dc2626; font-weight: 700; }
.sh-user-badge  { background: rgba(255,255,255,0.12); color: white; padding: 4px 12px; border-radius: 20px; font-size: 12.5px; }

/* ── BUTTONS ── */
.sh-btn-primary    { background: var(--sh-primary); color: white; border: none; border-radius: 10px; padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.sh-btn-primary:hover { background: var(--sh-primary-dark); }
.sh-btn-outline    { background: transparent; color: var(--sh-primary); border: 1.5px solid var(--sh-primary); border-radius: 10px; padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.sh-btn-outline:hover { background: var(--sh-primary-bg); }
.sh-btn-outline-sm { background: transparent; color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.3); border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; text-decoration: none; }
.sh-btn-sm         { background: #f1f5f9; color: var(--sh-text); border: 1px solid var(--sh-border); border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; font-weight: 500; }
.sh-btn-sm:hover   { background: #e2e8f0; }
.sh-btn-success-sm { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; font-weight: 600; }
.sh-btn-danger-sm  { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; font-weight: 600; }
.sh-btn-danger     { background: #dc2626; color: white; border: none; border-radius: 10px; padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* ── INPUTS ── */
.sh-input { width: 100%; border: 1.5px solid var(--sh-border); border-radius: 10px; padding: 10px 14px; font-size: 14px; background: white; outline: none; font-family: inherit; color: var(--sh-text); transition: border-color 0.15s; }
.sh-input:focus { border-color: var(--sh-primary); box-shadow: 0 0 0 3px rgba(13,148,136,0.08); }
.sh-select { border: 1.5px solid var(--sh-border); border-radius: 8px; padding: 8px 12px; font-size: 13px; background: white; outline: none; color: var(--sh-text); cursor: pointer; }
.sh-textarea { width: 100%; border: 1.5px solid var(--sh-border); border-radius: 10px; padding: 10px 14px; font-size: 14px; background: white; font-family: inherit; outline: none; resize: vertical; }
.sh-textarea:focus { border-color: var(--sh-primary); }

/* ── MODALS ── */
.sh-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.sh-modal-box { background: white; border-radius: 18px; max-height: 90vh; overflow-y: auto; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.sh-modal-lg { max-width: 660px; }
.sh-modal-xl { max-width: 1000px; }
.sh-modal-header { padding: 20px 24px 16px; border-bottom: 1px solid var(--sh-border); display: flex; align-items: center; justify-content: space-between; }
.sh-modal-header h3 { font-size: 18px; font-weight: 700; }
.sh-modal-close { background: #f1f5f9; border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 16px; }
.sh-modal-body { padding: 20px 24px; }
.sh-modal-footer { padding: 16px 24px; border-top: 1px solid var(--sh-border); display: flex; gap: 10px; justify-content: flex-end; }
.sh-modal-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ── QUICK ACTIONS ── */
.sh-quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
@media(max-width:600px){ .sh-quick-actions { grid-template-columns: repeat(2,1fr); } }
.sh-action-card { background: white; border: 1.5px solid var(--sh-border); border-radius: 14px; padding: 18px 14px; text-align: center; cursor: pointer; text-decoration: none; color: var(--sh-text); display: flex; flex-direction: column; gap: 6px; transition: all 0.15s; }
.sh-action-card:hover { border-color: var(--sh-primary); box-shadow: 0 4px 16px rgba(13,148,136,0.12); transform: translateY(-2px); }
.sh-action-icon  { font-size: 26px; }
.sh-action-label { font-weight: 700; font-size: 13px; }
.sh-action-sub   { font-size: 11px; color: var(--sh-muted); }

/* ── ARIA CHAT WIDGET ── */
.sh-aria-fab { position: fixed; bottom: 24px; right: 24px; background: linear-gradient(135deg, #0d9488, #0f766e); color: white; border: none; border-radius: 50px; padding: 14px 22px; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 20px rgba(13,148,136,0.4); z-index: 200; }
.sh-aria-widget { position: fixed; bottom: 90px; right: 24px; width: 360px; height: 520px; background: white; border-radius: 18px; box-shadow: 0 12px 40px rgba(0,0,0,0.18); display: flex; flex-direction: column; z-index: 201; overflow: hidden; }
.sh-aria-header { background: linear-gradient(135deg, #0d9488, #064e3b); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.sh-aria-avatar { width: 40px; height: 40px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.sh-aria-name   { color: white; font-weight: 700; font-size: 14px; }
.sh-aria-status { color: rgba(255,255,255,0.7); font-size: 12px; display: flex; align-items: center; gap: 5px; }
.sh-online-dot  { width: 7px; height: 7px; background: #4ade80; border-radius: 50%; }
.sh-aria-close  { margin-left: auto; background: rgba(255,255,255,0.15); border: none; color: white; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; }
.sh-aria-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #f8fafc; }
.sh-msg-system  { background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 12px; padding: 10px 14px; font-size: 13px; color: #0f766e; }
.sh-msg-user    { background: var(--sh-primary); color: white; border-radius: 12px 2px 12px 12px; padding: 10px 14px; font-size: 13.5px; align-self: flex-end; max-width: 80%; }
.sh-msg-aria    { background: white; border: 1px solid var(--sh-border); border-radius: 2px 12px 12px 12px; padding: 10px 14px; font-size: 13.5px; max-width: 85%; }
.sh-msg-thinking{ background: #f1f5f9; border-radius: 12px; padding: 8px 14px; font-size: 12px; color: var(--sh-muted); font-style: italic; }
.sh-aria-input-bar { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--sh-border); background: white; }
.sh-aria-input  { flex: 1; border: 1.5px solid var(--sh-border); border-radius: 20px; padding: 8px 14px; font-size: 13.5px; outline: none; }
.sh-aria-send   { background: var(--sh-primary); color: white; border: none; border-radius: 20px; padding: 8px 16px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.sh-aria-disclaimer { padding: 6px 14px 10px; font-size: 10px; color: var(--sh-muted); text-align: center; border-top: 1px solid var(--sh-border); }

/* ── PATIENT CARD (Nurse) ── */
.sh-patient-card { background: white; border: 1px solid var(--sh-border); border-radius: 14px; padding: 16px; display: flex; align-items: center; gap: 14px; box-shadow: var(--sh-shadow); }
.sh-patient-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sh-patient-cell { display: flex; flex-direction: column; gap: 2px; }
.sh-patient-banner { background: var(--sh-primary-bg); border: 1px solid var(--sh-primary-light); border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; }

/* ── VITALS ── */
.sh-vitals-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.sh-vital-field label { font-size: 12.5px; font-weight: 600; color: var(--sh-muted); display: block; margin-bottom: 5px; }
.sh-bp-row { display: flex; align-items: center; gap: 6px; }
.sh-input-half { flex: 1; }
.sh-alerts-box { background: #fee2e2; border: 1.5px solid #fca5a5; border-radius: 10px; padding: 12px 16px; margin-top: 14px; font-size: 13px; color: #991b1b; font-weight: 600; }

/* ── TABS ── */
.sh-tab-row { display: flex; border-bottom: 2px solid var(--sh-border); margin-bottom: 20px; }
.sh-tab { background: none; border: none; padding: 10px 20px; font-size: 14px; font-weight: 500; color: var(--sh-muted); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -2px; }
.sh-tab-active { color: var(--sh-primary); border-bottom-color: var(--sh-primary); font-weight: 700; }

/* ── SECTION HEADERS ── */
.sh-section-title { font-size: 17px; font-weight: 800; margin: 24px 0 14px; color: var(--sh-text); }
.sh-page-title    { font-size: 22px; font-weight: 800; margin-bottom: 20px; }

/* ── INFO GRID ── */
.sh-grid-3  { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.sh-info-item { display: flex; flex-direction: column; gap: 2px; }
.sh-info-label { font-size: 11px; color: var(--sh-muted); font-weight: 500; }
.sh-info-value { font-size: 14px; font-weight: 600; }

/* ── ACTION CELL ── */
.sh-action-cell { display: flex; gap: 5px; flex-wrap: wrap; }

/* ── EMPTY STATE ── */
.sh-empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px; color: var(--sh-muted); text-align: center; }
.sh-empty-state span { font-size: 36px; opacity: 0.5; }
.sh-empty-state p { font-size: 14px; }
.sh-empty-center { min-height: 300px; justify-content: center; }
.sh-empty-icon { font-size: 52px; margin-bottom: 6px; }
.sh-loading-state { padding: 32px; text-align: center; color: var(--sh-muted); font-size: 14px; }

/* ── FOOTER ── */
.sh-footer { background: #0f172a; color: rgba(255,255,255,0.5); text-align: center; padding: 24px; font-size: 12px; line-height: 1.8; margin-top: 60px; }

/* ── UTILITIES ── */
.hidden { display: none !important; }
.mt-10  { margin-top: 10px; }
.mt-14  { margin-top: 14px; }
.mt-16  { margin-top: 16px; }
.mt-30  { margin-top: 30px; }
.mb-20  { margin-bottom: 20px; }
.mb-24  { margin-bottom: 24px; }
.sh-text-muted  { color: var(--sh-muted); font-size: 12px; }
.sh-text-danger { color: var(--sh-danger); }

/* ── TOAST NOTIFICATIONS ── */
#sh-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #0f172a; color: white; padding: 12px 24px; border-radius: 12px; font-size: 14px; font-weight: 500; z-index: 9999; box-shadow: 0 8px 24px rgba(0,0,0,0.2); transition: all 0.3s; }
#sh-toast.sh-toast-error   { background: var(--sh-danger); }
#sh-toast.sh-toast-warning { background: var(--sh-amber); }
#sh-toast.sh-toast-hidden  { opacity: 0; pointer-events: none; }
