﻿/* Dial In Doctor — patient portal.
   Calmer and roomier than the staff dashboard: a patient visits occasionally,
   often on a phone, sometimes while unwell. Larger type, fewer things per
   screen, and every action reachable with one thumb. */

:root {
    --p-brand: #2B8ECA;
    --p-brand-dark: #1F6E9E;
    --p-ink: #16202C;
    --p-soft: #5A6675;
    --p-line: #E3E8EF;
    --p-surface: #FFFFFF;
    --p-canvas: #F5F8FC;
    --p-ok: #12805C;
    --p-warn: #B45309;
    --p-danger: #C2413B;
    --p-radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--p-canvas);
    color: var(--p-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

a { color: var(--p-brand-dark); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--p-brand); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid var(--p-brand); outline-offset: 2px;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pmuted { color: var(--p-soft); font-size: 14px; }

/* ------------------------------------------------------------------ chrome */

.ptop {
    display: flex; align-items: center; gap: 14px;
    background: var(--p-surface); border-bottom: 1px solid var(--p-line);
    padding: 12px 18px; position: sticky; top: 0; z-index: 20;
}
.pbrand { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pbrand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--p-brand); }
.ptop-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pwho { font-size: 14px; color: var(--p-soft); }
.pform-inline { display: inline; }

.pnav-toggle {
    display: none; flex-direction: column; gap: 4px; background: none;
    border: 1px solid var(--p-line); border-radius: 8px; padding: 8px 10px; cursor: pointer;
}
.pnav-toggle span { display: block; width: 18px; height: 2px; background: var(--p-ink); }

.pshell { display: grid; grid-template-columns: 230px 1fr; gap: 0; min-height: calc(100vh - 58px); }

/* No navigation to place, so no column to reserve for it. Applied to the
   anonymous pages - sign in, activation, password reset - where the grid would
   otherwise hand the content the 230px navigation track and leave the rest of
   the screen empty. The content block then centres instead of hugging the edge. */
.pshell--bare { grid-template-columns: 1fr; }
.pshell--bare .pmain { margin-inline: auto; width: 100%; }

.pnav {
    background: var(--p-surface); border-right: 1px solid var(--p-line);
    padding: 18px 12px; display: flex; flex-direction: column; gap: 2px;
}
.pnav-item {
    display: block; padding: 10px 12px; border-radius: 8px;
    text-decoration: none; color: var(--p-ink); font-size: 15px;
}
.pnav-item:hover { background: var(--p-canvas); }
.pnav-item.active { background: var(--p-brand); color: #fff; font-weight: 600; }

.pmain { padding: 24px 22px 56px; max-width: 1080px; }

h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 22px 0 10px; }
.psub { color: var(--p-soft); margin: 0 0 20px; }

.pflash { padding: 12px 14px; border-radius: var(--p-radius); margin-bottom: 16px; border: 1px solid var(--p-line); background: var(--p-surface); }
.pflash.ok { border-color: #B9E2D4; background: #E7F5F0; color: var(--p-ok); }
.pflash.err { border-color: #F0C4C2; background: #FBEDEC; color: var(--p-danger); }
.pflash.warn { border-color: #F0D6A8; background: #FDF3E4; color: var(--p-warn); }

/* ------------------------------------------------------------------ pieces */

.pcard {
    background: var(--p-surface); border: 1px solid var(--p-line);
    border-radius: var(--p-radius); padding: 20px; margin-bottom: 18px;
}
.pcard label { display: block; font-size: 14px; color: var(--p-soft); margin: 12px 0 4px; }
.pcard input, .pcard select {
    width: 100%; padding: 11px 12px; font: inherit;
    border: 1px solid var(--p-line); border-radius: 8px; background: var(--p-surface);
}

.pbtn {
    display: inline-block; padding: 11px 18px; border-radius: 8px; font: inherit;
    font-weight: 600; text-decoration: none; cursor: pointer;
    border: 1px solid var(--p-brand); background: var(--p-brand); color: #fff;
    /* Comfortably tappable on a phone. */
    min-height: 44px; line-height: 1.4;
}
.pbtn-primary { background: var(--p-brand); }
.pbtn-primary:hover { background: var(--p-brand-dark); border-color: var(--p-brand-dark); }
.pbtn-ghost { background: var(--p-surface); color: var(--p-ink); border-color: var(--p-line); }
.pbtn-ghost:hover { background: var(--p-canvas); }
.pbtn[disabled] { opacity: .5; cursor: not-allowed; }

.pcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 26px; }
.pcard-stat {
    background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-radius);
    padding: 16px; text-decoration: none; color: var(--p-ink); display: block;
}
.pcard-stat:hover { border-color: var(--p-brand); }
.pcard-stat.highlight { border-color: var(--p-brand); background: #EFF7FD; }
.pstat-n { display: block; font-size: 28px; font-weight: 700; }
.pstat-l { display: block; font-size: 13px; color: var(--p-soft); }

.psection { margin-bottom: 30px; }
.pempty { background: var(--p-surface); border: 1px dashed var(--p-line); border-radius: var(--p-radius); padding: 22px; color: var(--p-soft); }

.plist { display: flex; flex-direction: column; gap: 10px; }
.pitem {
    display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: center;
    background: var(--p-surface); border: 1px solid var(--p-line);
    border-radius: var(--p-radius); padding: 16px;
}
.pitem-when { display: flex; flex-direction: column; font-size: 14px; }
.pitem-when strong { font-size: 15px; }
.pitem-title { font-weight: 600; }
.pitem-action { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }

.pchips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pchip {
    display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px;
    background: var(--p-canvas); border: 1px solid var(--p-line); color: var(--p-soft);
}
.pchip-video { background: #EFF7FD; border-color: #BFDCF1; color: var(--p-brand-dark); }

.pfacts { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0; }
.pfacts dt { color: var(--p-soft); font-size: 14px; }
.pfacts dd { margin: 0; }

.pactions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.pchecklist { margin: 0; padding-left: 20px; color: var(--p-soft); font-size: 14px; }

.pnote h2 { font-size: 15px; margin: 18px 0 4px; color: var(--p-brand-dark); }
.pnote h2:first-child { margin-top: 0; }
.pnote p { margin: 0 0 6px; white-space: pre-wrap; }

.ptable-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 15px; }
.ptable th, .ptable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--p-line); }
.ptable th { font-size: 13px; color: var(--p-soft); font-weight: 600; }
.pnote-row td { color: var(--p-soft); font-size: 14px; padding-top: 0; }

.plogin { max-width: 460px; margin: 40px auto; }
.plogin h1 { font-size: 28px; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 760px) {
    .pshell { grid-template-columns: 1fr; }
    .pnav-toggle { display: flex; }
    .pnav {
        display: none; border-right: 0; border-bottom: 1px solid var(--p-line);
        flex-direction: row; flex-wrap: wrap; gap: 6px;
    }
    .pnav.open { display: flex; }
    .pnav-item { font-size: 14px; padding: 8px 10px; }
    .pmain { padding: 18px 14px 48px; }
    h1 { font-size: 22px; }

    .pitem { grid-template-columns: 1fr; gap: 10px; }
    .pitem-action { justify-content: flex-start; }
    .pfacts { grid-template-columns: 1fr; gap: 2px 0; }
    .pfacts dt { margin-top: 8px; }

}

