/* SOVA XR brand layer: palette and type from the SOVA logo sheet / one-pager.
   Load this after every other stylesheet so it wins over the page styles. */
:root {
    --sova-navy: #03203e;
    --sova-teal: #078181;
    --sova-green: #4eba6f;
    --sova-purple: #955ba5;
    --sova-silver: #bdc3c7;
    --sova-ink: #231f20;

    --sova-navy-dark: #021629;
    --sova-teal-dark: #056666;
    --sova-green-dark: #2f8a4c;
    --sova-purple-dark: #7a4889;
    --sova-teal-tint: #e6f3f3;
    --sova-purple-tint: #f3ecf5;
    --sova-green-tint: #eaf6ee;
    --sova-silver-tint: #f3f5f6;

    /* the names the page stylesheets already use */
    --primary-color: var(--sova-navy);
    --secondary-color: var(--sova-purple);
    --accent-color: var(--sova-teal);
    --background-color: var(--sova-silver-tint);
    --text-color: var(--sova-ink);
    --light-text-color: #ffffff;
    --border-color: var(--sova-silver);
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    /* room for the fixed footer so it never covers the end of the page */
    padding-bottom: 64px;
}

/* Header: white bar with the colour logo */
.header {
    background-color: #ffffff;
    color: var(--sova-navy);
    border-bottom: 3px solid var(--sova-teal);
    padding: 0.6em 0;
}

.logo {
    font-size: 1em;
    line-height: 0;
}

.logo img {
    height: 44px;
    width: auto;
    display: block;
}

.nav a {
    color: var(--sova-navy);
    font-weight: 500;
}

.nav a:hover {
    color: var(--sova-teal);
    opacity: 1;
}

/* Hero: navy into teal, as in the one-pager bands */
.hero {
    background: linear-gradient(135deg, var(--sova-navy) 0%, var(--sova-navy) 35%, var(--sova-teal) 100%);
}

.hero .hero-logo {
    width: 220px;
    max-width: 60%;
    height: auto;
    margin: 0 auto 1.5em;
    display: block;
}

h1, h2 {
    color: var(--sova-navy);
}

.hero h1 {
    color: #ffffff;
}

.feature-item {
    border-top: 4px solid var(--sova-teal);
}

.feature-item:nth-child(even) {
    border-top-color: var(--sova-green);
}

.feature-item h3 {
    color: var(--sova-purple);
}

/* Buttons: teal, darker teal on hover; the CTA uses mint green with navy text */
button {
    background-color: var(--sova-teal);
}

button:hover {
    background-color: var(--sova-teal-dark);
}

.cta-button {
    background-color: var(--sova-green);
    color: var(--sova-navy);
}

.cta-button:hover {
    background-color: var(--sova-green-dark);
    color: #ffffff;
}

a {
    color: var(--sova-teal);
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--sova-teal);
    outline-offset: 1px;
}

.footer {
    background-color: var(--sova-navy);
    border-top: 3px solid var(--sova-green);
}

/* Narrow single-column pages (verification, provider application status) */
.container.narrow {
    max-width: 720px;
}

.status-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--sova-teal);
}

.status-card.pending {
    border-top-color: var(--sova-purple);
}

.status-card.rejected {
    border-top-color: #c62828;
}

.details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 4px 16px;
    margin: 12px 0;
}

.details dt {
    font-weight: bold;
    color: var(--sova-navy);
}

.details dd {
    margin: 0;
}

/* Admin page */
.admin-section {
    margin-bottom: 36px;
}

.admin-list {
    display: grid;
    gap: 14px;
}

.admin-card {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    background: #fff;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--sova-teal);
}

.admin-card h3 {
    color: var(--sova-purple);
    margin-bottom: 4px;
}

.admin-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}

.admin-card-actions button {
    margin: 0;
}

.btn-reject {
    background-color: #fff;
    color: #c62828;
    border: 2px solid #c62828;
}

.btn-reject:hover {
    background-color: #c62828;
    color: #fff;
}

.muted {
    color: #6b7378;
    font-style: italic;
}

@media (max-width: 700px) {
    .admin-card {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .logo img {
        height: 36px;
    }
}

[hidden] {
    display: none !important;
}

/* Tasks a provider assigns (profile page and provider dashboard) */
.task-status.done {
    background: var(--sova-green-tint);
    color: var(--sova-green-dark);
}

.task-status.overdue {
    background: #fdecea;
    color: #c62828;
}

.task-card.is-done {
    border-color: var(--sova-green);
}

.task-card .task-note {
    font-style: italic;
    color: #6b7378;
}

.task-bar {
    height: 8px;
    background: var(--sova-silver-tint);
    border-radius: 4px;
    overflow: hidden;
}

.task-bar span {
    display: block;
    height: 100%;
    background: var(--sova-teal);
    border-radius: 4px;
}

.task-card.is-done .task-bar span {
    background: var(--sova-green);
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    margin-top: 10px;
    color: #c62828;
    font-size: 0.9em;
    cursor: pointer;
    text-decoration: underline;
}

.task-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
    margin-top: 10px;
}

.task-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9em;
    color: var(--sova-navy);
}

.task-form input,
.task-form select {
    padding: 8px;
    border: 1px solid var(--sova-silver);
    border-radius: 4px;
    font: inherit;
}

.task-form .task-form-note {
    grid-column: 1 / -1;
}

.task-form button {
    margin: 0;
}

.task-card .task-footer {
    gap: 12px;
}

/* Back pain questionnaires */
.q-panel {
    margin-bottom: 24px;
}

.q-progress {
    margin-bottom: 20px;
}

.q-progress p {
    margin: 0 0 6px;
    color: var(--sova-navy);
    font-weight: bold;
}

.q-section h2 {
    color: var(--sova-navy);
}

.q-item {
    border: 1px solid var(--sova-silver);
    border-radius: 8px;
    padding: 14px 16px;
    margin: 0 0 16px;
    background: #fff;
}

.q-item legend {
    font-weight: bold;
    color: var(--sova-ink);
    padding: 0 6px;
    line-height: 1.4;
}

.q-item.q-missing {
    border-color: #c62828;
    box-shadow: 0 0 0 2px #fdecea;
}

.q-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.q-options.compact {
    flex-direction: row;
    flex-wrap: wrap;
}

.q-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--sova-silver);
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.35;
}

.q-options.compact .q-option {
    min-width: 56px;
    justify-content: center;
}

.q-option:hover {
    background: var(--sova-teal-tint);
}

.q-option:has(input:checked) {
    border-color: var(--sova-teal);
    background: var(--sova-teal-tint);
    font-weight: bold;
}

.q-option input {
    accent-color: var(--sova-teal);
    margin: 0;
    flex: none;
}

.q-form select,
.q-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--sova-silver);
    border-radius: 4px;
    font: inherit;
    box-sizing: border-box;
}

.q-alert {
    border-left: 4px solid #e8a020;
    background: #fff7e6;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.q-alert.urgent {
    border-left-color: #c62828;
    background: #fdecea;
}

.q-alert h3 {
    margin-top: 0;
}

/* Questionnaire results on the provider dashboard */
.q-trend {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 16px;
    font-size: 0.92em;
}

.q-trend th,
.q-trend td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--sova-silver);
    text-align: left;
}

.q-trend th {
    color: var(--sova-navy);
    background: var(--sova-silver-tint);
}

.q-trend td.q-high {
    color: #c62828;
    font-weight: bold;
}

.q-details {
    border: 1px solid var(--sova-silver);
    border-radius: 6px;
    padding: 8px 12px;
    margin: 8px 0;
    background: #fff;
}

.q-details summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--sova-navy);
}

.q-details .info-grid {
    margin-top: 8px;
}

/* Links that act as buttons (questionnaire prompts) */
a.btn.btn-primary {
    display: inline-block;
    background-color: var(--sova-teal);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
}

a.btn.btn-primary:hover {
    background-color: var(--sova-teal-dark);
}
