/* ============================================================
   NMC – Nomad Medical Camp  |  Frontend Stylesheet
   Strato-hosted WordPress  |  Mobile-first, high-contrast
   ============================================================ */

:root {
    --nmc-primary:   #1a6b4a;   /* forest green – Bhutan */
    --nmc-accent:    #d4a017;   /* gold */
    --nmc-danger:    #c0392b;
    --nmc-warn:      #e67e22;
    --nmc-ok:        #27ae60;
    --nmc-bg:        #f4f7f4;
    --nmc-card:      #ffffff;
    --nmc-border:    #dde8dd;
    --nmc-text:      #222;
    --nmc-muted:     #666;
    --nmc-radius:    8px;
    --nmc-shadow:    0 2px 12px rgba(0,0,0,.08);
}

/* ── Base ── */
.nmc-dashboard,
.nmc-login-wrap,
.nmc-video-grid { font-family: 'Segoe UI', Arial, sans-serif; color: var(--nmc-text); }

/* ── Buttons ── */
.nmc-btn {
    display: inline-block;
    background: var(--nmc-primary);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: var(--nmc-radius);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}
.nmc-btn:hover { background: #145537; }
.nmc-btn-secondary { background: transparent; color: var(--nmc-primary) !important; border: 2px solid var(--nmc-primary); }
.nmc-btn-secondary:hover { background: var(--nmc-primary); color: #fff !important; }
.nmc-btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── Notices ── */
.nmc-notice { background: #fffbea; border-left: 4px solid var(--nmc-accent); padding: 14px 18px; border-radius: 4px; }
.nmc-error  { background: #fff0f0; border-left: 4px solid var(--nmc-danger); padding: 14px 18px; border-radius: 4px; }

/* ── Login wrap ── */
.nmc-login-wrap { max-width: 440px; margin: 40px auto; padding: 32px; background: var(--nmc-card); border-radius: var(--nmc-radius); box-shadow: var(--nmc-shadow); }
.nmc-login-wrap h2 { color: var(--nmc-primary); margin-top: 0; }
.nmc-subtitle { color: var(--nmc-muted); margin-bottom: 20px; }
.nmc-forgot { margin-top: 12px; text-align: center; font-size: 13px; }
.nmc-forgot a { color: var(--nmc-primary); }

/* ── Dashboard ── */
.nmc-dashboard { max-width: 1100px; margin: 0 auto; padding: 20px; }
.nmc-dashboard h2 { color: var(--nmc-primary); border-bottom: 2px solid var(--nmc-border); padding-bottom: 10px; }
.nmc-admin-actions { margin: 24px 0; display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Patient Card ── */
.nmc-patient-card {
    background: var(--nmc-card);
    border: 1px solid var(--nmc-border);
    border-radius: var(--nmc-radius);
    box-shadow: var(--nmc-shadow);
    margin-bottom: 28px;
    overflow: hidden;
}
.nmc-patient-header {
    background: var(--nmc-primary);
    color: #fff;
    padding: 18px 24px;
    position: relative;
}
.nmc-patient-header h3 { margin: 4px 0; font-size: 20px; }
.nmc-patient-id {
    position: absolute; top: 16px; right: 20px;
    background: rgba(255,255,255,.2);
    padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700;
}
.nmc-patient-meta { font-size: 13px; opacity: .85; margin-top: 4px; }
.nmc-patient-meta span { margin-right: 18px; }

/* ── Vitals strip ── */
.nmc-vitals {
    display: flex;
    gap: 1px;
    background: var(--nmc-border);
    border-bottom: 1px solid var(--nmc-border);
}
.nmc-vital {
    flex: 1;
    background: #f9fbf9;
    padding: 12px 16px;
    text-align: center;
}
.nmc-vital-label { display: block; font-size: 11px; color: var(--nmc-muted); text-transform: uppercase; letter-spacing: .5px; }
.nmc-vital-value { display: block; font-size: 18px; font-weight: 700; color: var(--nmc-primary); margin-top: 2px; }

/* ── Medications ── */
.nmc-medications { padding: 20px 24px; }
.nmc-medications h4 { margin: 0 0 14px; color: var(--nmc-primary); font-size: 15px; text-transform: uppercase; letter-spacing: .5px; }
.nmc-none { color: var(--nmc-muted); font-style: italic; }

.nmc-med-row {
    border: 1px solid var(--nmc-border);
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 12px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    transition: border-color .2s;
}
.nmc-med-row.nmc-med-complete { border-color: var(--nmc-ok); background: #f0fff5; }

.nmc-med-info { flex: 1; min-width: 200px; }
.nmc-drug-name { font-size: 16px; color: var(--nmc-text); }
.nmc-dosage { font-size: 14px; color: var(--nmc-muted); margin-left: 6px; }
.nmc-freq { font-size: 13px; color: var(--nmc-muted); margin-top: 4px; }
.nmc-tag {
    display: inline-block;
    margin-top: 6px;
    background: #e8f4ee;
    color: var(--nmc-primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.nmc-med-logs { flex: 2; min-width: 240px; }
.nmc-dose-slot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}
.nmc-dose-slot:last-child { border-bottom: none; }
.nmc-dose-time { font-size: 13px; font-weight: 600; min-width: 55px; }
.nmc-dose-status { font-size: 12px; min-width: 60px; }

.nmc-dose-taken   .nmc-dose-status { color: var(--nmc-ok); font-weight: 700; }
.nmc-dose-missed  .nmc-dose-status { color: var(--nmc-danger); font-weight: 700; }
.nmc-dose-pending .nmc-dose-status { color: var(--nmc-warn); }

.nmc-dose-taken  { opacity: .75; }
.nmc-dose-missed { background: #fff5f5; border-radius: 4px; padding: 6px 8px; margin: 2px 0; }

/* ── Observations ── */
.nmc-observations { padding: 20px 24px; border-top: 1px solid var(--nmc-border); background: #fafcfa; }
.nmc-observations h4 { margin: 0 0 12px; color: var(--nmc-primary); }

.nmc-obs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nmc-obs-table th { background: var(--nmc-primary); color: #fff; padding: 8px 10px; text-align: left; }
.nmc-obs-table td { padding: 6px 10px; border-bottom: 1px solid var(--nmc-border); }
.nmc-obs-table tr:hover td { background: #f5faf5; }

.nmc-add-obs { margin-top: 16px; padding: 16px; background: #fff; border: 1px solid var(--nmc-border); border-radius: 6px; }
.nmc-add-obs h5 { margin: 0 0 10px; }
.nmc-add-obs select,
.nmc-add-obs input,
.nmc-add-obs textarea {
    display: block;
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}
.nmc-add-obs textarea { height: 70px; resize: vertical; }

/* ── Video Grid ── */
.nmc-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px 0;
}
.nmc-video-card {
    background: var(--nmc-card);
    border-radius: var(--nmc-radius);
    box-shadow: var(--nmc-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.nmc-video-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,.12); }

.nmc-video-embed { position: relative; padding-top: 56.25%; background: #000; }
.nmc-video-embed iframe,
.nmc-video-embed video {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border: 0;
}
.nmc-video-thumb img { width: 100%; height: 200px; object-fit: cover; }

.nmc-video-meta { padding: 16px; flex: 1; }
.nmc-video-meta h3 { margin: 8px 0 6px; font-size: 16px; }
.nmc-video-excerpt { font-size: 13px; color: var(--nmc-muted); }

.nmc-lang-badge {
    background: var(--nmc-accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nmc-transcript { margin-top: 10px; }
.nmc-transcript summary { cursor: pointer; font-size: 12px; color: var(--nmc-primary); font-weight: 600; }
.nmc-transcript-body { font-size: 13px; color: var(--nmc-muted); margin-top: 8px; padding: 10px; background: #f5f5f5; border-radius: 4px; max-height: 200px; overflow-y: auto; }

/* ── Toast notification ── */
#nmc-toast {
    position: fixed; bottom: 24px; right: 24px;
    background: var(--nmc-primary); color: #fff;
    padding: 12px 20px; border-radius: 6px;
    font-size: 14px; font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    display: none; z-index: 9999;
    animation: nmcSlideIn .3s ease;
}
@keyframes nmcSlideIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Responsive ── */
@media (max-width: 640px) {
    .nmc-vitals { flex-direction: column; gap: 0; }
    .nmc-vital { text-align: left; display: flex; align-items: center; gap: 12px; }
    .nmc-vital-value { font-size: 15px; }
    .nmc-med-row { flex-direction: column; }
    .nmc-video-grid { grid-template-columns: 1fr; }
    .nmc-patient-id { position: static; margin-bottom: 4px; display: inline-block; }
}
