:root {
    --navy: #17233b;
    --blue: #3269d8;
    --blue-soft: #edf3ff;
    --purple: #6d4bd1;
    --green: #16845b;
    --green-soft: #eaf8f2;
    --amber: #b56b05;
    --amber-soft: #fff5df;
    --red: #b42318;
    --red-soft: #fff0ee;
    --surface: #ffffff;
    --background: #f3f6fb;
    --border: #dde4ef;
    --muted: #637089;
    --shadow: 0 20px 60px rgb(23 35 59 / 10%);
}

* { box-sizing: border-box; }

button,
.primary-button,
.secondary-button,
.danger-button,
.danger-primary-button {
    white-space: nowrap;
}

.button-wrap {
    white-space: normal;
}

.topbar-actions,
.focus-actions,
.form-actions,
.modal-actions,
.dialog-actions,
.panel-heading-actions > :is(a, button, form, .inline-action-group):last-child,
.inline-action-group {
    margin-left: auto;
}

.topbar-actions,
.form-actions,
.modal-actions,
.dialog-actions,
.inline-action-group {
    justify-content: flex-end;
}

.infrastructure-table th:last-child,
.infrastructure-table td:last-child {
    text-align: right;
}

.action-spinner {
    animation: action-button-spin .75s linear infinite;
}

@keyframes action-button-spin {
    to { transform: rotate(360deg); }
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--navy);
    background:
        radial-gradient(circle at top left, #e2ebff, transparent 30rem),
        var(--background);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .65rem; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.055em; }
h2 { margin-bottom: .35rem; font-size: 1.25rem; }
p { color: var(--muted); line-height: 1.6; }

label {
    display: grid;
    gap: .45rem;
    color: var(--navy);
    font-size: .9rem;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 46px;
    padding: .7rem .85rem;
    color: var(--navy);
    background: #fff;
    border: 1px solid #cbd5e4;
    border-radius: 10px;
    font: inherit;
}

input:focus {
    border-color: var(--blue);
    outline: 3px solid rgb(50 105 216 / 13%);
}

.brand-mark {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border-radius: 18px;
    font-size: 1.55rem;
    font-weight: 800;
}

.brand-mark-small { width: 38px; height: 38px; border-radius: 11px; font-size: 1rem; }
.brand-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 2rem; }
.brand-inline { display: flex; align-items: center; gap: .75rem; }
.eyebrow { margin-bottom: .35rem; color: var(--blue); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.installer-shell, .dashboard-shell {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0 24px;
}

.installer-form { display: grid; gap: 1.25rem; }

.panel, .auth-shell, .focus-card, .dashboard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.panel { padding: clamp(22px, 4vw, 34px); }
.section-heading { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading p { margin-bottom: 0; }
.step-number { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--blue); border-radius: 10px; font-weight: 800; }

.requirement-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.requirement { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem .9rem; border-radius: 10px; font-size: .85rem; }
.requirement.pass { color: var(--green); background: var(--green-soft); }
.requirement.fail { color: var(--red); background: var(--red-soft); }

.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1.25rem; }
.choice { display: flex; align-items: center; gap: .7rem; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.choice input { width: auto; min-height: auto; }
.choice span { display: grid; gap: .2rem; }
.choice small { color: var(--muted); font-weight: 500; }

.field-group, .auth-form { display: grid; gap: 1rem; }
.field-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.field-note { margin: -.3rem 0 0; font-size: .82rem; }
.is-hidden { display: none; }

.primary-button {
    min-height: 50px;
    padding: .8rem 1.3rem;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), #285bbd);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgb(50 105 216 / 22%);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 46px;
    padding: .7rem 1.1rem;
    color: var(--navy);
    background: #fff;
    border: 1px solid #cbd5e4;
    border-radius: 10px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.compact-button { min-height: 40px; display: inline-grid; place-items: center; padding: .55rem .85rem; text-decoration: none; font-size: .85rem; }
.link-button { text-decoration: none; }
.message { margin: 0 0 1.25rem; padding: .9rem 1rem; border-radius: 10px; font-weight: 650; }
.message-error { color: var(--red); background: var(--red-soft); border: 1px solid #f5c4bf; }
.message-success { color: var(--green); background: var(--green-soft); border: 1px solid #bce7d5; }

.auth-page { display: grid; place-items: center; padding: 24px; }
.auth-shell { width: min(460px, 100%); padding: clamp(28px, 6vw, 48px); }
.auth-shell .brand-mark { margin-bottom: 1.5rem; }
.auth-form { margin-top: 1.5rem; }

.topbar {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(20px, calc((100% - 920px) / 2));
    background: rgb(255 255 255 / 88%);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.text-button { color: var(--blue); background: transparent; border: 0; font: inherit; font-weight: 750; cursor: pointer; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.status-pill { display: inline-flex; align-items: center; gap: .55rem; padding: .6rem .85rem; color: var(--green); background: var(--green-soft); border-radius: 999px; font-size: .85rem; font-weight: 800; }
.status-pill span { width: 9px; height: 9px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgb(22 132 91 / 13%); }

.focus-card { display: flex; justify-content: space-between; gap: 1.5rem; padding: clamp(24px, 4vw, 36px); margin-bottom: 1.25rem; border-left: 6px solid var(--amber); }
.focus-card p:last-child { margin-bottom: 0; }
.focus-badge { align-self: flex-start; padding: .45rem .7rem; color: var(--amber); background: var(--amber-soft); border-radius: 999px; font-size: .75rem; font-weight: 850; text-transform: uppercase; }
.focus-actions { display: flex; align-items: flex-end; justify-content: space-between; flex-direction: column; gap: 1rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.dashboard-card { position: relative; overflow: hidden; padding: 1.4rem; }
.dashboard-card p { margin-bottom: .4rem; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.dashboard-card h3 { margin-bottom: .25rem; font-size: 1.35rem; }
.dashboard-card small { color: var(--muted); }
.card-accent { position: absolute; inset: 0 auto 0 0; width: 5px; }
.accent-green { background: var(--green); }
.accent-blue { background: var(--blue); }
.accent-purple { background: var(--purple); }
.accent-orange { background: var(--amber); }

.site-footer { padding: 24px; color: var(--muted); text-align: center; font-size: .8rem; }
.security-shell { max-width: 760px; }
.security-status { padding: .55rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 800; }
.status-active { color: var(--green); background: var(--green-soft); }
.status-pending { color: var(--amber); background: var(--amber-soft); }
.success-step { background: var(--green); }
.setup-list, .permission-list { display: grid; gap: .7rem; margin: 1rem 0 1.5rem; padding-left: 1.25rem; color: var(--muted); line-height: 1.5; }
.permission-list { padding: 1rem 1rem 1rem 2.2rem; background: var(--blue-soft); border-radius: 12px; }
.consent-shell { width: min(560px, 100%); }
.consent-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: .75rem; margin-top: 1.5rem; }
.detail-list { display: grid; gap: 0; margin: 0 0 1.5rem; }
.detail-list div { display: grid; grid-template-columns: 180px 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.detail-list dt { color: var(--muted); font-weight: 700; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }

@media (max-width: 700px) {
    .requirement-grid, .choice-row, .field-grid, .card-grid { grid-template-columns: 1fr; }
    .brand-header, .dashboard-heading { align-items: flex-start; flex-direction: column; }
    .topbar { align-items: flex-start; flex-direction: column; gap: .75rem; min-height: 0; padding: 16px 20px; }
    .topbar-actions { width: 100%; flex-wrap: wrap; gap: .5rem; }
    .topbar-actions .compact-button { flex: 1 1 auto; }    .focus-card { flex-direction: column; }
    .focus-actions { align-items: flex-start; }
    .consent-actions, .detail-list div { grid-template-columns: 1fr; }
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-actions form { margin: 0; }

.dashboard-card-link {
    color: var(--navy);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.dashboard-card-link:hover,
.dashboard-card-link:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 24px 64px rgb(23 35 59 / 15%);
    outline: none;
}

.infrastructure-shell { padding-bottom: 36px; }
.infrastructure-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.infrastructure-panel { margin-top: 1.25rem; }

.infrastructure-checklist {
    display: grid;
    gap: .8rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.infrastructure-checklist li {
    position: relative;
    display: grid;
    gap: .2rem;
    min-height: 58px;
    padding: .85rem 1rem .85rem 3.6rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.infrastructure-checklist li::before {
    content: "";
    position: absolute;
    top: .8rem;
    left: 1rem;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 2px solid var(--blue);
    border-radius: 50%;
}

.infrastructure-checklist li.setup-step-complete {
    background: var(--green-soft);
    border-color: #bce7d5;
}

.infrastructure-checklist li.setup-step-complete::before {
    content: "\2713";
    color: #fff;
    background: var(--green);
    border: 0;
    font-weight: 850;
}

.infrastructure-checklist span {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.45;
}

@media (max-width: 520px) {
    .topbar-actions { gap: .4rem; }
    .topbar-actions .text-button { font-size: .82rem; }
}


.infrastructure-form {
    display: grid;
    gap: 1.25rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
}

.panel-heading-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.panel-heading-actions p {
    margin-bottom: 0;
}

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

.infrastructure-table {
    width: 100%;
    border-collapse: collapse;
}

.infrastructure-table th,
.infrastructure-table td {
    padding: .9rem .75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.infrastructure-table th {
    color: var(--muted);
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.infrastructure-table td strong,
.infrastructure-table td small {
    display: block;
}

.infrastructure-table td small {
    margin-top: .2rem;
    color: var(--muted);
}

.table-status {
    display: inline-flex;
    padding: .35rem .6rem;
    color: var(--amber);
    background: var(--amber-soft);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
    text-transform: capitalize;
}

@media (max-width: 820px) {
    .infrastructure-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .infrastructure-card-grid {
        grid-template-columns: 1fr;
    }

    .panel-heading-actions,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }
}


.inline-action-form {
    margin: 0;
}

.table-status-verified {
    color: var(--green);
    background: var(--green-soft);
}


/* Owner project summary */
.summary-shell {
    width: min(1180px, calc(100% - 32px));
    padding-bottom: 48px;
}

.summary-heading {
    align-items: flex-start;
}

.summary-lede {
    max-width: 720px;    margin-bottom: 0;
    font-size: 1.05rem;
}

.summary-meta {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: .55rem;
    padding-top: .25rem;
    color: var(--muted);
    white-space: nowrap;
}

.owner-pill {
    display: inline-flex;
    padding: .5rem .75rem;
    color: var(--purple);
    background: #f1edff;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 850;
}

.summary-focus {
    background:
        linear-gradient(110deg, rgb(255 245 223 / 55%), transparent 40%),
        var(--surface);
}

.summary-progress {
    margin-bottom: 1.25rem;
    padding: 1.35rem 1.5rem;
}

.summary-progress-copy {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.summary-progress-copy h2,
.summary-progress-copy p {
    margin-bottom: 0;
}

.summary-progress-copy > strong {
    color: var(--blue);
    font-size: 1.65rem;
}

.progress-track {
    height: 10px;
    margin-top: 1rem;    overflow: hidden;
    background: var(--blue-soft);
    border-radius: 999px;
}

.progress-track span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--purple));
    border-radius: inherit;
}

.summary-status-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1.25rem;
}

.summary-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(310px, .85fr);
    gap: 1.25rem;
    align-items: start;
}

.summary-panel {
    padding: 1.5rem;
}

.summary-side {
    display: grid;
    gap: 1.25rem;
}
.summary-key {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 750;
    white-space: nowrap;
}

.summary-key i {
    width: 8px;    height: 8px;    flex: 0 0 auto;    background: currentColor;    border-radius: 50%;}/* Login security */.security-center {    max-width: 980px;}
.security-focus {
    align-items: center;
}

.security-metrics {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 20px 0;
}

.panel-heading-row,
.passkey-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.panel-heading-row p,
.passkey-row small {
    color: var(--muted);
}

.passkey-list {
    border-bottom: 1px solid var(--border);
    margin: 18px 0 24px;
}

.passkey-row {
    border-top: 1px solid var(--border);
    padding: 16px 0;
}

.passkey-row div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.passkey-row strong {
    font-size: 1rem;
}

.passkey-row small {
    display: block;
    line-height: 1.55;
}

.passkey-meta {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem .75rem !important;
}

.passkey-meta span {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.passkey-meta span + span::before {
    width: 5px;
    height: 5px;
    margin-right: .45rem;
    content: "";
    background: #aab5c8;
    border-radius: 50%;
}

.passkey-meta b {
    color: var(--navy);
    font-weight: 750;
}

.passkey-actions {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: .55rem !important;
}

.security-metrics .dashboard-card {
    min-height: 126px;
}

.passkey-create-form .field-grid {
    align-items: end;
}

.passkey-create-form .primary-button {
    justify-self: start;
}

.passkey-create-form {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.passkey-create-form label {
    display: none;
}

.passkey-create-form .primary-button {
    margin-top: 0;
}

.danger-button {
    border-color: #f0b8b8;
    color: #a32626;
    width: auto;
}

.empty-state {
    background: #f7f9fd;
    border: 1px dashed #b9c5dc;
    border-radius: 16px;
    margin: 18px 0;
    padding: 24px;
    text-align: center;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 0;
}

.recovery-code-panel {
    margin-top: 20px;
}

.recovery-code-panel pre {
    background: #10182d;
    border-radius: 14px;
    color: #f7f9ff;
    font: 700 15px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace;
    overflow-x: auto;
    padding: 20px;
    user-select: all;
}

.auth-divider {
    align-items: center;
    color: var(--muted);
    display: flex;
    gap: 12px;
    margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
    background: var(--border);
    content: "";
    flex: 1;
    height: 1px;
}

.recovery-login {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
}

.recovery-login summary {
    color: var(--blue);
    cursor: pointer;
    font-weight: 700;
}

.recovery-login[open] summary {
    margin-bottom: 12px;
}

.recovery-login .secondary-button {
    margin-top: 10px;
}

.passkey-error {
    color: var(--red);
    font-size: 14px;
    min-height: 20px;
    margin: 0;
}

.passkey-error.is-success {
    color: var(--green);
    font-weight: 700;
}

.passkey-complete {
    text-align: center;
}

.passkey-success-mark {
    display: grid;
    width: 76px;
    height: 76px;
    margin: 1.5rem auto;
    place-items: center;
    color: #fff;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 12px 28px rgb(22 163 74 / 22%);    font-size: 2rem;
    font-weight: 900;
}

.passkey-complete .primary-button {
    margin-top: .5rem;
}

button:disabled {
    cursor: wait;
    opacity: .58;
}

@media (max-width: 760px) {
    .security-metrics {
        grid-template-columns: 1fr;
    }

    .panel-heading-row,
    .passkey-row,
    .security-focus {
        align-items: flex-start;
        flex-direction: column;
    }

    .passkey-actions {
        width: 100%;
    }

    .passkey-row .secondary-button {
        width: 100%;
    }
}


/* Password-first sign-in verification */
.auth-verification-shell {
    width: min(560px, 100%);
    text-align: center;}

.auth-verification-shell .eyebrow {
    margin-bottom: 1.25rem;
}

.auth-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: .25rem 0 1.75rem;
}

.auth-progress::before,
.auth-progress::after {
    width: 56px;
    height: 1px;
    content: "";
    background: var(--border);
}

.auth-progress span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: .82rem;
    font-weight: 800;
}

.auth-progress .is-complete {
    color: var(--navy);
}

.auth-progress .is-current {
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
    box-shadow: 0 0 0 4px #dce9ff;
}

.auth-intro {
    max-width: 420px;
    margin: .75rem auto 1.25rem;    color: var(--muted);
    line-height: 1.55;
}

.registered-passkeys {
    display: grid;
    width: 100%;
    gap: .65rem;
    margin: 0 0 1.5rem;
    padding: 0;
    text-align: left;
    list-style: none;
}

.registered-passkey-option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .85rem;
    align-items: center;
    padding: .9rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.registered-passkey-option::before {
    display: grid;
    width: 1.75rem;
    height: 1.75rem;
    place-items: center;
    color: #fff;
    background: var(--green);
    border-radius: 50%;
    content: "";
    font-size: .82rem;
    font-weight: 900;
}

.registered-passkey-option span {
    display: grid;
    gap: .15rem;
}

.registered-passkey-option strong {
    color: var(--navy);
}

.registered-passkey-option small {
    color: var(--muted);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.passkey-device-icon {
    position: relative;
    width: 54px;
    height: 82px;
    margin: .25rem auto 1.5rem;
    border: 4px solid var(--blue);
    border-radius: 9px;
}

.passkey-device-icon::before {
    position: absolute;
    top: 21px;
    left: 13px;
    width: 20px;
    height: 26px;
    content: "";
    border: 3px solid var(--blue);
    border-radius: 50% 50% 44% 44%;
}

.passkey-device-icon::after {
    position: absolute;
    right: -12px;
    bottom: 5px;
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    content: "";
    color: #fff;
    background: var(--green);
    border: 3px solid #fff;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 900;
}

.passkey-device-icon span {
    position: absolute;
    top: 5px;
    left: 50%;
    width: 15px;
    height: 3px;
    background: var(--blue);
    border-radius: 999px;
    transform: translateX(-50%);
}

.verification-window {
    margin: 0 0 1.25rem;
    padding: .9rem 1rem;
    color: var(--navy);
    background: #eef7fc;
    border-radius: 8px;
}

.auth-verification-shell > .primary-button {
    width: 100%;
    margin-bottom: .5rem;
}

.go-back-form {
    margin-bottom: 1rem;
}

.text-button {
    padding: .55rem 1rem;
    color: var(--blue);
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

.auth-verification-shell .recovery-login {
    margin-top: 1rem;
    padding: 1rem;
    text-align: left;
    background: #f7f8fb;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.auth-verification-shell .recovery-login summary {
    color: var(--navy);
    font-weight: 800;
    cursor: pointer;
}

.auth-verification-shell .recovery-login label {
    display: grid;
    gap: .45rem;
    margin: 1rem 0;
}

@media (max-width: 560px) {
    .auth-verification-shell {
        padding: 28px 22px;
    }

    .auth-progress::before,    .auth-progress::after {
        width: 38px;
    }
}

/* cPanel account discovery */
.inline-action-group {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
}

.inline-action-group .inline-action-form {
    margin: 0;
}

.primary-button i,
.secondary-button i,
.text-button i {
    margin-right: .4rem;
}

.account-discovery-table input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    min-height: auto;
    padding: 0;
    accent-color: var(--blue);
    cursor: pointer;
}
.account-discovery-table input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.infrastructure-table code {    padding: .2rem .4rem;    color: var(--navy);
    background: var(--blue-soft);    border-radius: 6px;
    font-size: .82rem;    white-space: nowrap;
}
@media (max-width: 620px) {    .inline-action-group {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-action-group > *,
    .inline-action-group .compact-button {
        width: 100%;
    }
}

.table-status-system {
    color: var(--purple);
    background: #f1edff;
}


.checkbox-label {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .9rem 1rem;
    background: var(--blue-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.checkbox-label input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: var(--blue);
}

.plain-checklist {
    display: grid;
    gap: .65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.plain-checklist li {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    color: var(--muted);
    line-height: 1.5;
}

.plain-checklist li > i {
    width: 1.15rem;
    margin-top: .22rem;
    color: var(--green);
    text-align: center;
}

.plain-checklist li strong {
    color: var(--navy);
}

.backup-storage-form {
    gap: 1.5rem;
}

.backup-form-panel {
    display: grid;
    gap: 1.1rem;
}

.backup-form-panel .section-heading,
.backup-permissions-panel .section-heading {
    margin-bottom: .25rem;
}

.backup-form-panel label {
    gap: .5rem;
}

.backup-form-panel input[type="file"] {
    min-height: 50px;
    padding: .45rem;
}

.backup-form-panel input[type="file"]::file-selector-button {
    min-height: 36px;
    margin-right: .75rem;
    padding: .45rem .8rem;
    color: var(--navy);
    background: var(--blue-soft);
    border: 1px solid #cbd5e4;
    border-radius: 8px;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.backup-form-panel .field-note {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin: -.35rem 0 .15rem;
}

.backup-form-panel .checkbox-label {
    margin-top: .1rem;
}

.backup-permissions-panel {
    display: grid;
    gap: 1.1rem;
}

.permission-checklist {
    gap: .8rem;
    padding-left: 3.15rem;
}

.backup-storage-form .form-actions {
    padding-top: .15rem;
}

@media (max-width: 560px) {
    .permission-checklist {
        padding-left: 0;
    }

    .backup-storage-form .form-actions .primary-button,
    .backup-storage-form .form-actions .secondary-button {
        width: 100%;
    }
}


.defaults-form {
    gap: 1.5rem;
}

.defaults-panel {
    display: grid;
    gap: 1.2rem;
}

.defaults-panel .section-heading {
    margin-bottom: .15rem;
}

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

.defaults-retention-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.defaults-runtime-grid {
    align-items: start;
}

.environment-defaults-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.environment-defaults-group {
    display: grid;
    align-content: start;
    gap: 1rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.environment-defaults-group--development {
    background: color-mix(in srgb, var(--blue) 2.5%, var(--surface));
    border-color: color-mix(in srgb, var(--blue) 22%, var(--border));
    box-shadow: inset 0 3px 0 var(--blue);
}

.environment-defaults-group--demo {
    background: color-mix(in srgb, var(--purple) 2.5%, var(--surface));
    border-color: color-mix(in srgb, var(--purple) 20%, var(--border));
    box-shadow: inset 0 3px 0 var(--purple);
}

.environment-defaults-group-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    min-height: 58px;
    padding: .1rem 0 .9rem;
    border-bottom: 1px solid var(--border);
}

.environment-defaults-group-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 9px;
}

.environment-defaults-group--demo .environment-defaults-group-icon {
    color: var(--purple);
    background: color-mix(in srgb, var(--purple) 10%, var(--surface));
}

.environment-defaults-group-heading > div {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.environment-defaults-group-heading strong {
    color: var(--navy);
    font-size: .98rem;
}

.environment-defaults-group-heading small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 550;
    line-height: 1.35;
}

.environment-defaults-state {
    padding: .25rem .55rem;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.environment-defaults-state--optional {
    color: var(--purple);
    background: color-mix(in srgb, var(--purple) 9%, var(--surface));
}

.environment-defaults-group label {
    align-content: start;
    min-width: 0;
}

.environment-defaults-group :disabled {
    color: color-mix(in srgb, var(--navy) 55%, var(--surface));
    background: color-mix(in srgb, var(--border) 42%, var(--surface));
    border-color: var(--border);
    cursor: not-allowed;
    opacity: 1;
}

.defaults-panel select,
.defaults-panel textarea {
    width: 100%;
    color: var(--navy);
    background: #fff;
    border: 1px solid #cbd5e4;
    border-radius: 10px;
    font: inherit;
}

.defaults-panel select {
    min-height: 46px;
    padding: .7rem 2.35rem .7rem .85rem;
}

.defaults-panel textarea {
    min-height: 150px;
    padding: .8rem .85rem;
    line-height: 1.5;
    resize: vertical;
}

.defaults-panel select:focus,
.defaults-panel textarea:focus {
    border-color: var(--blue);
    outline: 3px solid rgb(50 105 216 / 13%);
}

.defaults-panel label > small {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.45;
}

.locked-policy {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: 1rem;
    color: var(--green);
    background: var(--green-soft);
    border: 1px solid #bce7d5;
    border-radius: 12px;
}

.locked-policy > i {
    margin-top: .18rem;
}
.locked-policy div {
    display: grid;
    gap: .25rem;
}

.locked-policy span {
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.45;
}

.input-with-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid #cbd5e4;
    border-radius: 10px;
}

.input-with-unit:focus-within {
    border-color: var(--blue);
    outline: 3px solid rgb(50 105 216 / 13%);
}

.input-with-unit input {
    border: 0;
    border-radius: 0;
    outline: 0;
}

.input-with-unit input:focus {
    outline: 0;
}

.input-with-unit > span {
    padding: 0 .85rem;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .environment-defaults-groups {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .defaults-field-grid,
    .defaults-retention-grid {
        grid-template-columns: 1fr;
    }
}

/* Projects workspace */
.projects-page .projects-shell {
    padding-bottom: 2rem;
}

.projects-page .projects-panel + .projects-panel {
    margin-top: 1.25rem;
}

.projects-page .project-plan-form {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.projects-page .project-plan-form label {
    display: grid;
    gap: .5rem;
    min-width: 0;
    color: var(--navy);
    font-size: .86rem;
    font-weight: 760;
}

.projects-page .project-form-grid {
    display: grid;
    gap: 1rem 1.25rem;
    min-width: 0;
}

.projects-page .project-form-grid--identity {
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
}

.projects-page .project-form-grid--choices,
.projects-page .project-form-grid--domains {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.projects-page .project-plan-form input,
.projects-page .project-plan-form select {
    width: 100%;
    min-height: 48px;
    padding: .72rem .9rem;
    color: var(--navy);
    background-color: #fff;
    border: 1px solid #cbd5e4;
    border-radius: 11px;
    box-shadow: 0 1px 2px rgb(23 35 59 / 4%);
    font: inherit;
    font-weight: 550;
}

.projects-page .project-plan-form select {
    cursor: pointer;
}

.projects-page .project-plan-form input::placeholder {
    color: #8b96aa;
}

.projects-page .project-plan-form input:hover,
.projects-page .project-plan-form select:hover {
    border-color: #aab8cd;
}

.projects-page .project-plan-form input:focus,
.projects-page .project-plan-form select:focus {
    border-color: var(--blue);
    outline: 3px solid rgb(50 105 216 / 13%);
}

.projects-page .project-security-summary {
    display: grid;
    gap: 1rem;
    padding: 1.05rem 1.15rem 1.15rem;
    border: 1px solid #c8d8f4;
    border-radius: 14px;
    background: var(--blue-soft);
}

.projects-page .project-security-heading {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: var(--navy);
}

.projects-page .project-security-heading i {
    width: 1.1rem;
    color: var(--blue);
    text-align: center;
}

.projects-page .project-security-summary ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.projects-page .project-security-summary li {
    display: grid;
    align-content: start;
    gap: .25rem;
    min-width: 0;
    padding: .15rem 0 .15rem .8rem;
    border-left: 3px solid #aac0ed;
}

.projects-page .project-security-summary li strong {
    color: var(--muted);
    font-size: .68rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.projects-page .project-security-summary li span {
    overflow-wrap: anywhere;
    color: var(--navy);
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.35;
}

.projects-page .project-form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: .1rem;
}

.projects-page .project-form-actions--settings {
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.projects-page .project-form-actions__save {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-left: auto;
}

.projects-page .project-form-actions .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
}

.projects-page .section-description {
    margin: .35rem 0 0;
    color: var(--muted);
}

.projects-page .project-table-tools {
    display: grid;
    gap: .45rem;
    max-width: 34rem;
    margin-top: 1.25rem;
}

.projects-page .project-table-tools label {
    color: var(--navy);
    font-size: .8rem;
    font-weight: 760;
}

.projects-page .project-search-field {
    position: relative;
}

.projects-page .project-search-field i {
    position: absolute;
    top: 50%;
    left: .95rem;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.projects-page .project-search-field input {
    width: 100%;
    min-height: 2.8rem;
    padding-left: 2.75rem;
}

.projects-page .project-table-wrap {
    overflow-x: auto;
    margin-top: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.projects-page .project-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    text-align: left;
}

.projects-page .project-table th,
.projects-page .project-table td {
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.projects-page .project-table thead th {    background: var(--surface-soft);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 780;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.projects-page .project-sort-button {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin: -.4rem;
    padding: .4rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.projects-page .project-sort-button:hover,
.projects-page .project-sort-button:focus-visible {
    color: var(--blue);
}

.projects-page .project-sort-indicator::before {
    content: '\2195';
    color: var(--muted);    font-size: .9rem;
    line-height: 1;
}

.projects-page th[aria-sort="ascending"] .project-sort-indicator::before {
    content: '\2191';
    color: var(--blue);
}
.projects-page th[aria-sort="descending"] .project-sort-indicator::before {
    content: '\2193';
    color: var(--blue);
}

.projects-page .project-table tbody tr:last-child > * {
    border-bottom: 0;
}

.projects-page .project-table tbody tr:hover {
    background: rgb(47 101 216 / 4%);
}

.projects-page .project-table tbody th a {
    color: var(--navy);
    font-weight: 780;
}

.projects-page .project-table td strong,
.projects-page .project-table td small {
    display: block;
}

.projects-page .project-table td small {
    margin-top: .2rem;
    color: var(--muted);
    line-height: 1.35;
}

.projects-page .project-table-action {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    white-space: nowrap;
}

.projects-page .project-table-action .primary-button,
.projects-page .project-table-action .secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-width: 5.75rem;
}

.projects-page .project-search-empty,
.projects-page .projects-panel .empty-state {
    margin-top: 1rem;
}

.projects-page .project-search-empty {
    padding: 2.5rem 1rem;
    color: var(--muted);
    text-align: center;
}

.projects-page .project-search-empty h3 {
    margin: .65rem 0 .25rem;
    color: var(--navy);
}

.projects-page .project-search-empty p {
    margin: 0;
}

@media (max-width: 900px) {
    .projects-page .project-security-summary ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .projects-page .project-form-grid--identity,
    .projects-page .project-form-grid--choices,
    .projects-page .project-form-grid--domains,
    .projects-page .project-security-summary ul {
        grid-template-columns: 1fr;
    }

    .projects-page .project-form-actions {
        justify-content: stretch;
    }

    .projects-page .project-form-actions .primary-button {
        width: 100%;
    }
}

.projects-page .project-field-message {
    margin: 0;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 520;
    line-height: 1.4;
}

.projects-page .project-field-message.is-error {
    color: var(--red);
}

.projects-page .project-plan-form input[aria-invalid="true"]:not(:placeholder-shown) {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgb(180 35 24 / 10%);
}

.projects-page .project-form-actions .primary-button:disabled {
    cursor: not-allowed;
    box-shadow: none;
}

.projects-page .project-mode-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.projects-page .project-mode-selector legend {
    grid-column: 1 / -1;
    margin-bottom: .15rem;
    color: var(--navy);
    font-size: .86rem;
    font-weight: 760;}

.projects-page .project-mode-option {    position: relative;
    display: block;
    cursor: pointer;}

.projects-page .project-mode-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.projects-page .project-mode-option span {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: .2rem .75rem;
    min-height: 100%;
    padding: 1rem;
    border: 1px solid #cbd5e4;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(23 35 59 / 4%);
    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        background-color .16s ease;
}

.projects-page .project-mode-option i {
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--blue);
    font-size: 1.25rem;
    text-align: center;
}

.projects-page .project-mode-option strong {
    color: var(--navy);
    font-size: .92rem;
}

.projects-page .project-mode-option small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 520;
    line-height: 1.45;
}

.projects-page .project-mode-option input:checked + span {
    border-color: var(--blue);
    background: var(--blue-soft);
    box-shadow: 0 0 0 3px rgb(50 105 216 / 10%);
}

.projects-page .project-mode-option input:focus-visible + span {
    outline: 3px solid rgb(50 105 216 / 20%);
    outline-offset: 2px;
}

.projects-page .project-security-summary--reference {
    border-color: #d5c9f4;
    background: #f5f1ff;
}

.projects-page [hidden] {
    display: none !important;
}

@media (max-width: 700px) {
    .projects-page .project-mode-selector {
        grid-template-columns: 1fr;
    }
}


/* Project summary roadmap */
.summary-key .key-complete {
    color: var(--green);
}

.summary-key .key-current {
    color: var(--blue);
}

.summary-key .key-planned {    color: #94a3b8;
}

.milestone-list,
.next-action-list {
    display: grid;
    gap: .75rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.milestone {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8faff;
}

.milestone-number,
.next-action-list > li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 850;
}

.milestone > div,
.next-action-list > li > div {
    display: grid;
    gap: .3rem;
    min-width: 0;
}

.milestone strong,
.next-action-list strong {
    display: block;
    color: var(--navy);
    line-height: 1.3;
}

.milestone small,
.next-action-list small {
    display: block;
    color: var(--muted);
    line-height: 1.5;
}

.milestone-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6.25rem;
    padding: .4rem .65rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 850;
    text-align: center;
    white-space: nowrap;
}

.milestone-complete {
    border-color: #b9e5d2;
    background: #f1fbf6;
}

.milestone-complete .milestone-number,
.milestone-complete .milestone-status {
    color: #087a51;
    background: #dff5ea;
}

.milestone-current {
    border-color: #b8cef8;
    background: #f3f7ff;
}

.milestone-current .milestone-status {
    color: #245ab5;
    background: #e3edff;
}

.milestone-planned .milestone-number,
.milestone-planned .milestone-status {
    color: #64748b;
    background: #e9eef6;
}

.next-action-list > li {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: .85rem;
    align-items: start;
    padding: .85rem 0;
    border-top: 1px solid var(--border);
}

.next-action-list > li:first-child {
    padding-top: 0;
    border-top: 0;
}

.next-action-list > li > span {
    width: 2rem;
    height: 2rem;
    border-radius: 9px;
    font-size: .78rem;
}

@media (max-width: 760px) {
    .panel-heading-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .summary-key {
        flex-wrap: wrap;
        white-space: normal;
    }

    .milestone {
        grid-template-columns: 2.25rem minmax(0, 1fr);
        align-items: start;
    }

    .milestone-status {
        grid-column: 2;
        justify-self: start;
        min-width: 0;
    }
}


/* Living project record */
.summary-update-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
}

.summary-update-note > div {
    min-width: 0;
}

.summary-update-note h2 {
    margin-bottom: .4rem;
}

.summary-update-note p:last-child {
    max-width: 880px;
    margin-bottom: 0;
}

.summary-update-note .status-pill {
    flex: 0 0 auto;
}

@media (max-width: 760px) {
    .summary-update-note {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* 2026 professional interface foundation */
:root {
    --text: #17233b;
    --surface-raised: #ffffff;
    --surface-subtle: #f7f9fc;
    --surface-tint: #edf3ff;
    --border-strong: #cbd5e1;
    --focus-ring: rgb(50 105 216 / 22%);
    --shadow: 0 12px 34px rgb(23 35 59 / 8%);
    --shadow-raised: 0 18px 50px rgb(23 35 59 / 12%);
    --radius-card: 16px;
    --radius-control: 10px;
}

html[data-theme="dark"] {
    --navy: #eef4ff;
    --text: #eef4ff;
    --blue: #78a7ff;
    --blue-soft: #182b4d;
    --purple: #a98cff;
    --green: #4ed09d;
    --green-soft: #12392e;
    --amber: #f4b95e;
    --amber-soft: #3d2c12;
    --red: #ff857b;
    --red-soft: #451f22;
    --surface: #172238;
    --surface-raised: #1c2942;
    --surface-subtle: #111a2c;
    --surface-tint: #182b4d;
    --background: #0d1525;
    --border: #2c3b56;
    --border-strong: #40516e;
    --muted: #aab8cd;
    --focus-ring: rgb(120 167 255 / 32%);
    --shadow: 0 14px 38px rgb(0 0 0 / 24%);
    --shadow-raised: 0 24px 60px rgb(0 0 0 / 34%);
}

html {
    background: var(--background);
}

body {
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgb(50 105 216 / 9%), transparent 32rem),
        var(--background);
    transition: color .18s ease, background-color .18s ease;
}

h1 {
    max-width: 20ch;
    margin-bottom: .5rem;
    font-size: clamp(2rem, 3.6vw, 2.55rem);
    line-height: 1.06;
    letter-spacing: -.045em;
}

h2 {
    font-size: 1.15rem;
    letter-spacing: -.015em;
}

h3 {
    letter-spacing: -.01em;
}

p {
    line-height: 1.55;
}
a, button, input, select, textarea, summary {
    transition: border-color .16s ease, background-color .16s ease,
        color .16s ease, box-shadow .16s ease, transform .16s ease;
}

:where(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

input,
select,
textarea {
    color: var(--text);
    background: var(--surface-raised);
    border-color: var(--border-strong);
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
    opacity: .75;
}

.panel,
.auth-shell,
.focus-card,
.dashboard-card {
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
}

.panel {
    padding: clamp(1.15rem, 2vw, 1.5rem);
}

.dashboard-shell {
    padding-top: 2rem;
}

.primary-button,
.secondary-button,
.danger-button,
.danger-primary-button {
    min-height: 44px;
    border-radius: var(--radius-control);
    font-weight: 750;
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.danger-primary-button:hover {
    transform: translateY(-1px);
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

th {
    color: var(--muted);
    background: var(--surface-subtle);
}

td, th {
    border-color: var(--border);
}

code, pre {
    color: var(--text);
    background: var(--surface-subtle);
    border-color: var(--border);
}

details {
    border-color: var(--border);
    background: var(--surface);
}

html[data-theme="dark"] :where(
    .metric,
    .readiness-item,
    .milestone,
    .status-card,
    .summary-card,
    .resource-card,
    .action-card,
    .activity-key
) {
    color: var(--text);
    background: var(--surface-raised);
    border-color: var(--border);
}

html[data-theme="dark"] :where(
    .notice,
    .info-note,
    .locked-policy,
    .summary-update-note
) {
    color: var(--text);
    background: var(--surface-tint);
    border-color: var(--border-strong);
}

html[data-theme="dark"] img {
    filter: brightness(.92);
}

@media (max-width: 760px) {
    .dashboard-shell {
        width: min(100% - 24px, 920px);
        padding-top: 1.25rem;
    }

    h1 {
        font-size: clamp(1.75rem, 9vw, 2.15rem);
    }

    .panel {
        padding: 1rem;
        border-radius: 14px;
    }
}

/* Plain-language Overview */
.overview-shell {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.overview-heading {
    align-items: end;
    margin-bottom: .25rem;
}

.overview-heading h1 {
    margin-bottom: .4rem;
}

.overview-heading p:last-child {
    margin: 0;
}

.overview-focus {
    padding: clamp(1.25rem, 2.2vw, 1.75rem);
    border-left-color: var(--green);
}

.overview-focus h2 {
    font-size: clamp(1.3rem, 2vw, 1.55rem);
}

.overview-focus p:last-child {
    max-width: 62rem;
    margin-bottom: 0;
}

.overview-focus .focus-actions {
    align-items: center;
}

.overview-status {
    display: grid;
    gap: .8rem;
    margin-top: .35rem;
}

.overview-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding-inline: .15rem;
}

.overview-section-heading :where(.eyebrow, h2) {
    margin-bottom: 0;
}

.overview-page .dashboard-card {
    min-height: 130px;
    padding: 1.25rem 1.3rem;
}

.overview-page .dashboard-card p {
    margin-bottom: .45rem;
}

.overview-page .dashboard-card h3 {
    margin-bottom: .3rem;
    font-size: 1.15rem;
}

.overview-page .dashboard-card-link:hover,
.overview-page .dashboard-card-link:focus-visible {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--blue) 45%, var(--border));
    box-shadow: var(--shadow-raised);
}

.health-overview-attention {
    display: grid;
    gap: 1rem;
}

.health-overview-attention .panel-heading-actions {
    align-items: flex-start;
    margin-bottom: 0;
}

.health-overview-alerts {
    display: grid;
    gap: .75rem;
}

.health-overview-alert {
    display: grid;
    gap: .2rem;
    color: var(--text);
    text-decoration: none;
}

.health-overview-alert strong {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: .15em;
}

.health-overview-alert span {
    color: var(--muted);
}

html[data-theme="dark"] .health-overview-attention .secondary-button {
    color: #17233b;
}

.health-overview-alert:hover strong,
.health-overview-alert:focus-visible strong {
    text-decoration-thickness: .12em;
}

html[data-theme="dark"] .overview-focus,
html[data-theme="dark"] .overview-page .dashboard-card {
    color: var(--text);
    background: var(--surface-raised);
    border-color: var(--border);
}

@media (max-width: 760px) {
    .overview-heading {
        align-items: start;
        gap: .8rem;
    }

    .overview-focus {
        align-items: stretch;
        padding: 1.15rem;
    }

    .overview-focus .focus-actions,
    .overview-focus .primary-button,
    .overview-focus .secondary-button {
        width: 100%;
    }

    .overview-status .card-grid {
        grid-template-columns: 1fr;
    }
}


/* Project portfolio */
.portfolio-shell {
    max-width: 1500px;
}

.portfolio-heading {
    align-items: center;
}

.portfolio-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.portfolio-summary article {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
    padding: 1.05rem 1.15rem;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.portfolio-summary-icon,
.portfolio-project-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.65rem;
    height: 2.65rem;
    color: var(--blue);
    background: color-mix(in srgb, var(--blue) 12%, var(--surface-raised));
    border-radius: 12px;
}

.portfolio-summary-icon--green {
    color: var(--green);
    background: color-mix(in srgb, var(--green) 12%, var(--surface-raised));
}

.portfolio-summary-icon--purple {
    color: var(--purple);
    background: color-mix(in srgb, var(--purple) 12%, var(--surface-raised));
}

.portfolio-summary-icon--amber {
    color: var(--orange);
    background: color-mix(in srgb, var(--orange) 14%, var(--surface-raised));
}

.portfolio-summary strong {
    display: block;
    color: var(--text);
    font-size: 1.45rem;
    line-height: 1.05;
}

.portfolio-summary span:last-child {
    display: block;
    margin-top: .2rem;
    color: var(--muted);
    font-size: .84rem;
}

.portfolio-panel {
    padding: 1.35rem;
}

.portfolio-list {
    display: grid;
    gap: .9rem;
    margin-top: 1.15rem;
}

.portfolio-project {
    padding: 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.portfolio-project:hover {
    border-color: color-mix(in srgb, var(--blue) 38%, var(--border));
    box-shadow: var(--shadow-soft);
}

.portfolio-project-main,
.portfolio-project-title,
.portfolio-project-footer {
    display: flex;
    align-items: center;
}

.portfolio-project-main,
.portfolio-project-footer {
    justify-content: space-between;
    gap: 1rem;
}

.portfolio-project-title {
    gap: .8rem;
    min-width: 0;
}

.portfolio-project-title h3,
.portfolio-project-title p {
    margin: 0;
}

.portfolio-project-title h3 {
    color: var(--text);
    font-size: 1.05rem;
}

.portfolio-project-title p {
    margin-top: .2rem;
    color: var(--muted);
    font-size: .82rem;
}

.portfolio-status {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    flex: 0 0 auto;
    padding: .4rem .68rem;
    color: var(--muted);
    background: var(--surface-muted);
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 800;
}

.portfolio-status i {
    width: .48rem;
    height: .48rem;
    background: currentColor;
    border-radius: 50%;
}

.portfolio-status--ready { color: var(--green); }
.portfolio-status--attention { color: var(--orange); }
.portfolio-status--danger { color: var(--red); }

.portfolio-project-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1.35fr;
    gap: 1rem;
    margin: 1rem 0;
    padding: .9rem 1rem;
    background: var(--surface-muted);
    border-radius: 12px;
}

.portfolio-project-details div {
    min-width: 0;
}

.portfolio-project-details span,
.portfolio-project-details strong {
    display: block;
}

.portfolio-project-details span {
    margin-bottom: .28rem;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.portfolio-project-details strong {
    overflow: hidden;
    color: var(--text);
    font-size: .84rem;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.portfolio-project-footer {
    color: var(--muted);
}

.portfolio-empty {
    padding: 3rem 1rem;
}

@media (max-width: 980px) {
    .portfolio-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portfolio-project-details {
        grid-template-columns: 1fr 1fr;
    }

    .portfolio-project-details div:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .portfolio-heading,
    .portfolio-project-main,
    .portfolio-project-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .portfolio-heading .primary-button,
    .portfolio-project-footer .primary-button {
        width: 100%;
    }

    .portfolio-summary,
    .portfolio-project-details {
        grid-template-columns: 1fr;
    }

    .portfolio-project-details div:last-child {
        grid-column: auto;
    }

    .portfolio-status {
        align-self: flex-start;
    }
}


/* Project mode indicators */
.projects-page .project-name-cell {
    position: relative;
    min-width: 220px;
    padding-left: 1rem;
}

.projects-page .project-name-cell::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    content: "";
    background: var(--green);
}

.projects-page .project-name-cell--reference::before {
    background: var(--purple);
}

.projects-page .project-name-wrap {
    display: flex;
    align-items: center;
    gap: .72rem;
}

.projects-page .project-mode-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.15rem;    height: 2.15rem;
    color: var(--green);
    background: color-mix(in srgb, var(--green) 12%, var(--surface-raised));
    border-radius: 10px;
}

.projects-page .project-name-cell--reference .project-mode-mark {
    color: var(--purple);
    background: color-mix(in srgb, var(--purple) 12%, var(--surface-raised));
}

.projects-page .project-name-wrap strong {
    display: block;
    margin-bottom: .28rem;
}

.projects-page .project-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--green);
    font-size: .71rem;
    font-weight: 800;
    line-height: 1;
}

.projects-page .project-mode-badge i {
    width: .42rem;
    height: .42rem;
    background: currentColor;
    border-radius: 50%;
}

.projects-page .project-mode-badge--reference {
    color: var(--purple);
}

.projects-page .project-row--managed:hover {
    background: color-mix(in srgb, var(--green) 5%, var(--surface-raised));
}

.projects-page .project-row--reference:hover {
    background: color-mix(in srgb, var(--purple) 6%, var(--surface-raised));
}


.ai-access-page .dashboard-shell {
    display: grid;
    gap: 1.25rem;
}

.ai-access-page .dashboard-heading {
    margin-bottom: 0;
}

.ai-access-page .panel {
    margin: 0;
}

.ai-access-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.ai-access-summary-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface-raised);
    box-shadow: var(--shadow-sm);
}

.ai-access-summary-card i {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 11px;
}

.ai-access-summary-card strong {
    display: block;
    color: var(--text);
    font-size: 1.35rem;
}

.ai-access-summary-card span {
    color: var(--muted);
    font-size: .82rem;
}

.ai-setup-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ai-setup-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .75rem;
    align-items: start;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-subtle);
}

.ai-setup-step > span {
    display: grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    color: #fff;
    background: var(--blue);
    border-radius: 50%;
    font-weight: 800;
}

.ai-setup-step p {
    margin: .25rem 0 0;
    font-size: .9rem;
}

.ai-connection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ai-connection-card {
    display: grid;
    gap: 1rem;
    padding: 1.15rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-raised);
}

.ai-connection-card header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.ai-connection-card h3 {
    margin-bottom: .2rem;
}

.ai-connection-card code {
    padding: 0;
    color: var(--muted);
    background: transparent;
    font-size: .76rem;
    overflow-wrap: anywhere;
}

.ai-connection-meta {
    display: grid;
    gap: .65rem;
    margin: 0;
}

.ai-connection-meta div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .65rem;
    border-top: 1px solid var(--border);
}

.ai-connection-meta dt {
    color: var(--muted);
    font-weight: 700;
}

.ai-connection-meta dd {
    margin: 0;
    color: var(--text);
    text-align: right;
    font-weight: 700;
}

.ai-status-pill {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    flex: 0 0 auto;
    padding: .38rem .62rem;
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface-subtle);
    font-size: .75rem;
    font-weight: 800;
    white-space: nowrap;
}

.ai-status-pill.is-connected {
    color: var(--green);
    background: var(--green-soft);
}

.ai-status-pill.is-waiting {
    color: var(--amber);
    background: var(--amber-soft);
}

.ai-connection-card footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.ai-access-page .danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .72rem 1rem;
    border: 1px solid var(--red);
    color: #fff;
    background: var(--red);
    box-shadow: 0 1px 2px rgb(16 24 40 / 12%);
    cursor: pointer;
}

.ai-access-page .danger-button:hover {
    border-color: #912018;
    color: #fff;
    background: #912018;
}

.ai-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .65rem;
    margin-top: 1rem;
}
.ai-pagination span {
    color: var(--muted);
    font-size: .85rem;
    font-weight: 700;
}

.ai-master-control {
    border-color: color-mix(in srgb, var(--red) 32%, var(--border));
}

@media (max-width: 1000px) {
    .ai-access-summary,
    .ai-setup-steps,
    .ai-connection-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .ai-access-summary,
    .ai-setup-steps,
    .ai-connection-grid {
        grid-template-columns: 1fr;
    }

    .ai-connection-card header,
    .ai-connection-meta div {
        display: grid;
    }

    .ai-connection-meta dd {
        text-align: left;
    }
}

.ai-access-page form[data-action="oauth.access.resume"] .primary-button {
    border-color: #16845b;
    color: #ffffff;
    background: #16845b;
    box-shadow: 0 4px 12px rgb(22 132 91 / 20%);
}

.ai-access-page form[data-action="oauth.access.resume"] .primary-button:hover {
    border-color: #10704c;
    color: #ffffff;
    background: #10704c;
}

html[data-theme="dark"] .ai-access-page form[data-action="oauth.access.resume"] .primary-button {
    border-color: #32b77f;
    color: #ffffff;
    background: #16845b;
}

html[data-theme="dark"] .ai-access-page form[data-action="oauth.access.resume"] .primary-button:hover {
    border-color: #55c997;
    color: #ffffff;
    background: #10704c;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}


.field-optional {
    color: var(--muted);
    font-size: 0.82em;
    font-weight: 600;
}

.project-location-note {
    align-items: flex-start;
    background: color-mix(in srgb, var(--accent) 7%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
    border-radius: 14px;
    color: var(--text);
    display: flex;
    gap: 0.8rem;
    min-height: 100%;
    padding: 1rem;
}

.project-location-note > i {
    color: var(--accent);
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.project-location-note div {
    display: grid;
    gap: 0.3rem;
}

.project-location-note span {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.project-dns-note {
    margin-top: 1rem;
}

.project-dns-note > div {
    flex: 1;
}

.project-dns-note dl {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0.55rem 0 0;
}

.project-dns-note dl > div {
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    border: 1px solid var(--border);
    border-radius: 10px;
    gap: 0.15rem;
    padding: 0.65rem 0.75rem;
}

.project-dns-note dt {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.project-dns-note dd {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .project-dns-note dl {
        grid-template-columns: 1fr;
    }
}

