/*
    STORM :: national care records

    Plain NHS style chrome: a solid blue header, a white tab strip, and hard
    bordered form controls on a pale grey field.
*/

.ncr-root {
    background: var(--ncr-bg);
    color: #212b32;
    font-family: var(--font-ui);
}

/* -- Header ------------------------------------------------------------- */

.ncr-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 12px var(--space-6);
    background: var(--ncr-header);
    color: #fff;
    flex: none;
}

.ncr-brand { display: flex; align-items: center; gap: 14px; }

.ncr-logo {
    display: grid;
    place-items: center;
    padding: 5px 10px;
    border-radius: 3px;
    background: #fff;
    color: var(--ncr-header);
    font-size: var(--text-md);
    font-weight: 800;
    letter-spacing: .04em;
}

.ncr-title { font-size: var(--text-2xl); font-weight: 700; }

.ncr-logout {
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    font-family: inherit;
    font-size: var(--text-md);
    font-weight: 700;
    cursor: pointer;
}
.ncr-logout:hover { text-decoration: underline; }

.ncr-subbar { height: 34px; background: var(--ncr-sub); flex: none; }

/* -- Tabs --------------------------------------------------------------- */

.ncr-tabs {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid #d8dde2;
    flex: none;
}

.ncr-tab {
    padding: 15px 26px;
    border: 0;
    border-top: 3px solid transparent;
    background: none;
    color: #212b32;
    font-family: inherit;
    font-size: var(--text-md);
    cursor: pointer;
    white-space: nowrap;
}

.ncr-tab:hover { background: #f3f6f9; }

.ncr-tab.is-active {
    border-top-color: var(--ncr-tab-active);
    color: var(--ncr-tab-active);
    font-weight: 600;
}

/* -- Content ------------------------------------------------------------ */

.ncr-content { flex: 1 1 auto; }

.ncr-page {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-6);
    max-width: 1400px;
}

.ncr-heading { font-size: var(--text-2xl); font-weight: 700; }

/* -- Forms -------------------------------------------------------------- */

.ncr-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-width: 600px;
}

.ncr-field { display: flex; flex-direction: column; gap: 6px; }
.ncr-field > label { font-size: var(--text-md); }

/* Hard black borders, the way a government form renders. */
.ncr-field input[type="text"] {
    border: 2px solid #212b32;
    border-radius: 0;
    padding: 8px 10px;
    font-size: var(--text-md);
}

.ncr-field input:focus {
    border-color: var(--ncr-tab-active);
    box-shadow: 0 0 0 3px #ffeb3b;
}

.ncr-submit {
    align-self: stretch;
    padding: 11px;
    border: 0;
    border-radius: 0;
    background: var(--ncr-header);
    color: #fff;
    font-family: inherit;
    font-size: var(--text-md);
    font-weight: 600;
    cursor: pointer;
}
.ncr-submit:hover { filter: brightness(1.12); }

/* -- Cards -------------------------------------------------------------- */

.ncr-card {
    padding: 18px 20px;
    background: var(--ncr-surface);
    border: 1px solid #d8dde2;
}

.ncr-card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8ecef;
}

.ncr-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--space-4);
}

.ncr-detail-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7680;
    margin-bottom: 3px;
}

.ncr-detail-value { font-size: var(--text-base); font-weight: 600; user-select: text; }

.ncr-list { margin: 0; padding-left: 20px; line-height: 1.7; }

.ncr-entry {
    padding: 12px 14px;
    border-left: 4px solid var(--ncr-header);
    background: #f5f8fa;
    line-height: 1.55;
}

.ncr-entry-head {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--ncr-header);
    margin-bottom: 4px;
}

/* -- Records ------------------------------------------------------------ */

.ncr-record-head {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #d8dde2;
}

.ncr-record-name { font-size: var(--text-2xl); font-weight: 700; }
.ncr-record-sub { font-size: var(--text-base); color: #6b7680; margin-top: 2px; }

.ncr-record-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: var(--space-4);
    align-items: start;
}

@media (max-width: 1000px) {
    .ncr-record-grid { grid-template-columns: 1fr; }
    .ncr-tab { padding: 14px 16px; }
}
