:root {
    --primary: #AF101A;
    --primary-dark: #8C0F19;
    --bg: #F4F6F5;
    --surface: #FFFFFF;
    --surface-2: #F1E9E4;
    --ink: #1A1D1E;
    --ink-soft: #5B6366;
    --border: #E2E6E4;
    --critical: #C0152F;
    --warning: #E0902C;
    --success: #2E9E5B;
    --pink: #F6DDE1;
    --gold: #C89550;
    --sidebar: #1A1D1E;
    --sidebar-text: #B8BEC0;
  }* { box-sizing: border-box; margin: 0; padding: 0; }body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--ink);
  }h1, h2, h3, .display-font { font-family: 'Fraunces', serif; font-weight: 600; }.mono { font-family: 'IBM Plex Mono', monospace; }button { font-family: inherit; cursor: pointer; }input, select, textarea { font-family: inherit; font-size: 14px; }/* ---------- Login ---------- */
  #login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 24px;
    position: relative;
    overflow: hidden;
  }.cell-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }.blood-cell {
    position: absolute;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: inset 0 0 0 3px rgba(0,0,0,0.18), 0 0 24px rgba(212,32,43,0.25);
    opacity: 0.5;
    animation: drift linear infinite;
  }.blood-cell::after {
    content: '';
    position: absolute; inset: 28%;
    border-radius: 50%;
    background: rgba(0,0,0,0.22);
    filter: blur(1px);
  }@keyframes drift {
    0% { transform: translateY(110vh) translateX(0) rotate(0deg); }
    100% { transform: translateY(-15vh) translateX(var(--drift-x, 40px)) rotate(200deg); }
  }.login-card {
    position: relative; z-index: 2;
    width: 100%; max-width: 380px; text-align: center;
    background: rgba(29,10,13,0.6);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 32px;
    backdrop-filter: blur(14px);
    box-shadow: 0 30px 70px rgba(0,0,0,0.5);
  }.login-logo {
    width: 60px; height: 60px;
    border-radius: 16px;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(212,32,43,0.35);
  }.login-card h1 { font-size: 23px; font-weight: 600; letter-spacing: -0.01em; }.login-card .sub { color: var(--ink-soft); font-size: 13.5px; margin-top: 6px; margin-bottom: 30px; }.field { text-align: left; margin-bottom: 14px; }.field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }.field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(32,20,21,0.02);
    color: var(--ink);
  }.field input::placeholder { color: rgba(185,155,150,0.5); }.field input:focus { outline: none; border-color: var(--primary); background: rgba(32,20,21,0.03); }.btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 13.5px;
    letter-spacing: 0.02em;
    margin-top: 10px;
    box-shadow: 0 8px 20px rgba(212,32,43,0.28);
  }.btn:hover { background: var(--primary-dark); }.btn:disabled { opacity: 0.6; cursor: default; }.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--ink);
  }.btn-outline.danger { border-color: var(--critical); color: var(--critical); }.btn-outline.success { border-color: var(--success); color: var(--success); }.btn-sm { padding: 8px 14px; font-size: 12px; font-weight: 700; border-radius: 8px; }.error-box {
    background: var(--pink);
    color: var(--critical);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    text-align: left;
    margin-top: 12px;
    display: none;
  }.hint { font-size: 11.5px; color: var(--ink-soft); margin-top: 20px; line-height: 1.6; }/* ---------- App shell ---------- */
  #app-screen { display: none; min-height: 100vh; }.shell { display: flex; min-height: 100vh; }.sidebar {
    width: 240px;
    background: var(--sidebar);
    color: var(--sidebar-text);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
  }.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 0 20px 28px;
    color: white; font-weight: 700; font-size: 17px;
  }.sidebar-brand .mark {
    width: 32px; height: 32px; border-radius: 9px;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
  }.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-left: 3px solid transparent;
  }.nav-item:hover { color: white; }.nav-item.active {
    color: white;
    background: rgba(175,16,26,0.18);
    border-left-color: var(--primary);
    font-weight: 600;
  }.sidebar-footer { margin-top: auto; padding: 0 20px; }.main { flex: 1; padding: 32px 36px; overflow-x: hidden; }.page-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }.page-sub { color: var(--ink-soft); font-size: 13px; margin-bottom: 24px; }.chart-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }.dashboard-charts-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
  }.kpi-card {
    background: var(--surface);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }.kpi-icon {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: var(--pink);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    margin-bottom: 14px;
  }.kpi-value { font-size: 22px; font-weight: 700; color: var(--primary); }.kpi-label { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }.card {
    background: var(--surface);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-bottom: 12px;
  }.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }.badge.open, .badge.active { background: rgba(46,158,91,0.12); color: var(--success); }.badge.fulfilled { background: rgba(46,158,91,0.12); color: var(--success); }.badge.cancelled, .badge.closed { background: rgba(91,99,102,0.12); color: var(--ink-soft); }.badge.emergency { background: rgba(192,21,47,0.12); color: var(--critical); }.badge.urgent { background: rgba(224,144,44,0.12); color: var(--warning); }.badge.normal { background: rgba(46,158,91,0.12); color: var(--success); }.filter-chip {
    padding: 7px 14px;
    border-radius: 100px;
    border: 1px solid var(--border);
    font-size: 12.5px;
    font-weight: 600;
    background: var(--surface);
    margin-right: 8px;
  }.filter-chip.active { background: var(--primary); color: white; border-color: var(--primary); }.fab {
    position: fixed;
    bottom: 28px; right: 36px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 22px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 14px rgba(175,16,26,0.35);
  }.empty-state {
    text-align: center;
    color: var(--ink-soft);
    padding: 60px 20px;
    font-size: 14px;
  }.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(32,20,21,0.4);
    align-items: center; justify-content: center;
    z-index: 100;
    padding: 20px;
  }.modal {
    background: var(--surface);
    border-radius: 16px;
    padding: 26px;
    width: 100%; max-width: 440px;
    max-height: 85vh;
    overflow-y: auto;
  }.modal h3 { font-size: 18px; margin-bottom: 18px; }.modal .field { margin-bottom: 14px; }.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }.modal-actions button { width: auto; margin-top: 0; padding: 10px 18px; }.donor-result {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 13.5px;
  }.donor-result:hover { border-color: var(--primary); }.chip-select {
    display: flex; flex-wrap: wrap; gap: 8px;
  }.chip-option {
    padding: 7px 14px;
    border-radius: 100px;
    border: 1px solid var(--border);
    font-size: 12.5px;
    font-weight: 600;
    background: var(--surface);
  }.chip-option.selected { background: var(--primary); color: white; border-color: var(--primary); }select.role-select {
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
  }.mobile-topbar { display: none; }@media (max-width: 860px) {.sidebar { display: none; }.mobile-topbar {
      display: flex; align-items: center; justify-content: space-between;
      background: var(--sidebar); color: white; padding: 14px 18px;
    }.mobile-nav {
      display: flex; overflow-x: auto; gap: 6px;
      padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border);
    }.mobile-nav .nav-item { border-left: none; border-radius: 100px; padding: 8px 14px; color: var(--ink-soft); white-space: nowrap; }.mobile-nav .nav-item.active { background: var(--primary); color: white; }.main { padding: 20px 16px; }.shell { flex-direction: column; }.dashboard-charts-grid { grid-template-columns: 1fr; }}

/* ---------- Media section ---------- */
.media-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.media-tab {
  padding: 9px 18px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-soft); font-size: 13px; font-weight: 600;
}
.media-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.upload-dropzone {
  border: 2px dashed var(--border); border-radius: 14px; padding: 32px; text-align: center;
  color: var(--ink-soft); margin-bottom: 20px; cursor: pointer; transition: border-color .15s ease;
}
.upload-dropzone:hover { border-color: var(--primary); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.photo-card { background: var(--surface); border-radius: 12px; overflow: hidden; }
.photo-card img { width: 100%; height: 120px; object-fit: cover; display: block; }
.photo-card-body { padding: 10px 12px; }
.photo-caption { font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; min-height: 16px; }
.photo-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.toggle-label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-soft); cursor: pointer; }
.article-row {
  background: var(--surface); border-radius: 12px; padding: 16px 18px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 14px;
}
.article-cover { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.article-row h3 { font-family: 'Inter', sans-serif; font-size: 14.5px; font-weight: 600; }
.status-pill { font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 100px; text-transform: uppercase; }
.status-pill.published { background: rgba(74,222,128,0.15); color: var(--success); }
.status-pill.draft { background: rgba(240,166,76,0.15); color: var(--warning); }

/* Editor modal (wider than the standard modal) */
.editor-modal { max-width: 720px; width: 92vw; }
.cover-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cover-pick-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; cursor: pointer; border: 2px solid transparent; opacity: 0.7; }
.cover-pick-thumb.selected { border-color: var(--primary); opacity: 1; }
.ql-toolbar.ql-snow { border-color: var(--border); background: var(--surface); border-radius: 10px 10px 0 0; }
.ql-container.ql-snow { border-color: var(--border); border-radius: 0 0 10px 10px; background: rgba(32,20,21,0.015); min-height: 200px; }
.ql-editor { color: var(--ink); min-height: 200px; }
.ql-snow .ql-stroke { stroke: var(--ink-soft); }
.ql-snow .ql-picker { color: var(--ink-soft); }
.ql-editor.ql-blank::before { color: rgba(32,20,21,0.35); }
