:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #18211b;
    background: #f5f7f5;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    background: #f5f7f5;
}

.system-status {
    width: min(36rem, calc(100% - 2rem));
    padding: 2rem 0;
    border-top: 4px solid #18794e;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0 2.5rem;
    color: #18794e;
    font-family: RobotoVar, Helvetica, Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 0.75rem;
    font-size: 3rem;
    line-height: 1.05;
    letter-spacing: 0;
}

.system-status > p:last-child {
    margin: 0;
    color: #526057;
    font-size: 1rem;
}

.primary-button,
.secondary-button {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.7rem 1rem;
    border: 1px solid #18794e;
    border-radius: 0.35rem;
    color: #fff;
    background: #18794e;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.secondary-button {
    margin: 0;
    color: #18794e;
    background: transparent;
}

.message-error {
    margin: 1.25rem 0 0;
    color: #9d1c1c;
}

.app-page {
    width: min(68rem, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #d5ddd7;
}

.app-header .brand {
    margin: 0 0 1rem;
}

.dashboard-intro {
    max-width: 44rem;
    padding-top: 4rem;
}

.dashboard-intro h1 {
    font-size: 2.5rem;
}

.dashboard-intro p:last-child,
.eyebrow {
    color: #526057;
}

.form-page,
.transfer-list {
    max-width: 52rem;
    margin-top: 3rem;
}

.transfer-form {
    display: grid;
    gap: 1.25rem;
    margin-top: 2rem;
}

label {
    display: grid;
    gap: 0.45rem;
    color: #344039;
    font-weight: 650;
}

input,
select,
textarea {
    width: 100%;
    min-height: 2.6rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid #aab8af;
    border-radius: 0.35rem;
    color: #18211b;
    background: #fff;
    font: inherit;
    font-weight: 400;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #f0503c;
    outline-offset: 2px;
}

textarea {
    min-height: 7rem;
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.check-row {
    display: flex;
    align-items: start;
    gap: 0.6rem;
    font-weight: 400;
}

.check-row input {
    width: auto;
    min-height: auto;
    margin-top: 0.25rem;
}

.download-consent {
    margin-top: 1.5rem;
    color: #344039;
    font-size: 0.9rem;
    line-height: 1.45;
}

.download-consent a { color: #12633d; }

.field-help,
.status-note {
    color: #526057;
    font-size: 0.875rem;
    line-height: 1.4;
}

.resource-summary,
.message-note,
.message-success {
    padding: 1rem;
    border-left: 3px solid #18794e;
    background: #eaf5ee;
}

.resource-summary {
    display: grid;
    gap: 0.25rem;
}

.message-success { color: #135b39; }
.message-note { color: #355142; }

.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th,
td {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid #d5ddd7;
    vertical-align: top;
}

th { color: #526057; font-size: 0.8rem; text-transform: uppercase; }

.status {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    color: #355142;
    background: #e1e9e4;
    font-size: 0.85rem;
    font-weight: 700;
}

.status-queued { color: #694b00; background: #fff0c2; }
.status-active { color: #135b39; background: #d8f0df; }
.status-failed, .status-revoked, .status-expired { color: #8a1c1c; background: #fde2e2; }

.details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.8rem 1.5rem;
}

.details dt { color: #526057; }
.details dd { margin: 0; }

.transfer-actions {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #d5ddd7;
}

.transfer-downloads {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #d5ddd7;
}

.transfer-actions form { display: grid; gap: 0.75rem; }

.danger-button {
    width: fit-content;
    padding: 0.7rem 1rem;
    border: 1px solid #9d1c1c;
    border-radius: 0.35rem;
    color: #fff;
    background: #9d1c1c;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
}

@media (max-width: 36rem) {
    h1 {
        font-size: 2rem;
    }

    .form-grid { grid-template-columns: 1fr; }
}

.brand .mad {
    color: #18211b;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
}

.brand .app {
    margin: 0;
    color: #f0503c;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    text-transform: none;
}
