/* First-run setup pages (_SetupLayout) and Admin Console shell (_Layout):
   droppoint editorial printed-plate layout — Ink sidebar + warm Paper content area. */

.setup-body {
    margin: 0;
    background: #F2F0E7;
    color: #17180F;
}

.setup-shell {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar (Ink ground, Paper primary text, Ivory secondary) -------- */

.setup-sidebar {
    position: relative;
    width: 284px;
    flex-shrink: 0;
    background: #17180F;
    color: #F2F0E7;
    padding: 0 18px 28px;
    border-right: 1px solid #17180F;
    display: flex;
    flex-direction: column;
}

/* 4-colour droppoint colour-plate strip: Red, Ivory, Olive, Teal (fixed order). */
.dp-plate-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 5px;
    margin: 0 -18px 24px;
    flex-shrink: 0;
}

.dp-plate-bar span:nth-child(1) { background: #C2181B; }
.dp-plate-bar span:nth-child(2) { background: #D8CBA5; }
.dp-plate-bar span:nth-child(3) { background: #5F6138; }
.dp-plate-bar span:nth-child(4) { background: #0B7373; }

.dp-plate-bar-card {
    margin: -28px -32px 24px;
}

.setup-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 8px 16px;
    margin-bottom: 12px;
}

.setup-brand-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.setup-brand-name {
    font-family: "Zen Old Mincho", Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #F2F0E7;
}

.setup-brand-account {
    font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
    color: #D8CBA5;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 4px;
}

.setup-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

/* The vertical hairline joining the step dots. */
.setup-steps::before {
    content: "";
    position: absolute;
    left: 25px;
    top: 28px;
    bottom: 28px;
    width: 1px;
    background: rgba(216, 203, 165, 0.35);
}

.setup-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 12px;
    margin-bottom: 10px;
    border-radius: 2px;
    color: #D8CBA5;
    transition: background 0.15s, color 0.15s;
}

.setup-step.is-done {
    color: #F2F0E7;
}

a.setup-step {
    text-decoration: none;
}

a.setup-step:hover,
a.setup-step:focus-visible {
    background: rgba(242, 240, 231, 0.08);
    color: #F2F0E7;
}

.setup-step.is-active {
    background: rgba(242, 240, 231, 0.1);
    color: #F2F0E7;
    box-shadow: inset 3px 0 0 #C2181B;
}

.setup-step-dot {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border-radius: 50%;
    border: 1.5px solid #D8CBA5;
    background: #17180F;
    flex-shrink: 0;
}

.setup-step.is-active .setup-step-dot {
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border: 4px solid #C2181B;
    background: #F2F0E7;
}

/* A finished step: Benzol Green live dot. */
.setup-step.is-done:not(.is-active) .setup-step-dot {
    border-color: #0B7373;
    background: #0B7373;
}

.setup-step-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.setup-step-label {
    font-size: 0.94rem;
    font-weight: 500;
}

.setup-step-detail {
    display: block;
    font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
    color: #D8CBA5;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.setup-admin-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding: 18px 12px 0;
    border-top: 1px solid rgba(242, 240, 231, 0.16);
    color: #F2F0E7;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.setup-admin-link:hover {
    color: #D8CBA5;
}

.setup-admin-link svg {
    width: 20px;
    height: 20px;
    color: #C2181B;
}

/* ---- Main area -------------------------------------------------------- */

.setup-main {
    flex: 1;
    min-width: 0;
    background: #F2F0E7;
    display: flex;
    flex-direction: column;
}

.setup-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    min-height: 64px;
    padding: 12px 36px;
    background: #F2F0E7;
    border-bottom: 1px solid #CFCABA;
}

.setup-topbar-link {
    color: #075E5D;
    text-decoration: none;
}

.setup-flash {
    margin: 24px 44px 0;
}

.setup-user-button {
    width: 40px;
    height: 40px;
    border-radius: 2px;
    border: 1px solid #CFCABA;
    background: #F8F6EE;
    color: #17180F;
    padding: 8px;
}

.setup-user-button svg {
    width: 100%;
    height: 100%;
}

.setup-page-title {
    padding: 14px 44px 4px;
}

.setup-page-title h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 400;
}

.setup-welcome {
    background: #F2F0E7;
    min-height: calc(100vh - 170px);
    padding: 12px 24px 32px;
    text-align: center;
}

.setup-hero {
    width: 200px;
    max-width: 100%;
    height: auto;
}

.setup-welcome h2 {
    margin-top: 12px;
    font-size: 2rem;
    font-weight: 400;
}

.setup-subtitle {
    color: #5B5C4E;
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.setup-option-card {
    max-width: 460px;
    margin: 0 auto;
    padding: 28px 32px 34px;
    background: #F8F6EE;
    border: 1px solid #CFCABA;
    border-radius: 0;
}

.setup-option-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    padding: 16px;
    border-radius: 0;
    background: #D8CBA5;
    color: #17180F;
}

.setup-option-icon svg {
    width: 100%;
    height: 100%;
}

.setup-option-card h3 {
    font-size: 1.4rem;
    font-weight: 400;
}

.setup-option-card p {
    color: #5B5C4E;
    margin-bottom: 24px;
}

.setup-option-button {
    min-width: 220px;
    padding: 10px 24px;
    font-size: 1rem;
    background: #C2181B;
    border-color: #C2181B;
    color: #F2F0E7;
}

/* ---- Step pages --------------------------------------------------------- */

.setup-content {
    background: #F2F0E7;
    min-height: calc(100vh - 170px);
    padding: 16px 44px 40px;
}

.setup-panel {
    max-width: 900px;
    margin-bottom: 20px;
    padding: 24px 28px;
    background: #F8F6EE;
    border: 1px solid #CFCABA;
    border-radius: 0;
}

.setup-panel-narrow {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.setup-panel-success {
    border-color: #0B7373;
}

.setup-panel-title {
    font-size: 1.45rem;
    font-weight: 400;
    margin-bottom: 12px;
}

.setup-subtitle-small {
    font-size: 1.05rem;
    font-weight: 500;
    margin: 20px 0 10px;
}

.setup-domain-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setup-domain-icon {
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 0;
    background: #D8CBA5;
    color: #17180F;
}

.setup-domain-icon svg,
.setup-pencil svg {
    width: 100%;
    height: 100%;
    display: block;
}

.setup-domain-name {
    font-size: 1.2rem;
    word-break: break-all;
}

.setup-pencil {
    width: 34px;
    height: 34px;
    padding: 6px;
    color: #5B5C4E;
}

.setup-pencil:hover {
    color: #17180F;
}

.setup-rename-form {
    margin-top: 16px;
    max-width: 520px;
}

/* "Add it for me" box above manual records. */
.setup-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    margin-bottom: 8px;
    background: #EAE6D8;
    border: 1px solid #CFCABA;
    border-radius: 0;
}

.setup-choice h3 {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.setup-records {
    font-size: 0.9rem;
}

.setup-records code {
    color: #17180F;
}

.setup-record-value {
    min-width: 260px;
}

.setup-status {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 0;
    font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #EAE6D8;
    color: #5B5C4E;
}

.setup-status.is-ok {
    background: #0B7373;
    color: #F2F0E7;
}

.setup-status.is-pending {
    background: #5F6138;
    color: #F2F0E7;
}

.setup-mailbox-input {
    max-width: 460px;
}

.setup-actions {
    display: flex;
    gap: 12px;
    max-width: 900px;
    margin-top: 8px;
}

/* Existing records the Cloudflare/Spaceship preview would remove. */
.setup-conflicts {
    margin: 20px 0;
    padding: 16px 20px;
    background: #F8F6EE;
    border: 1px solid #A81216;
    border-left: 3px solid #A81216;
    border-radius: 0;
    color: #A81216;
}

.setup-conflicts .setup-records {
    margin-bottom: 0;
    --bs-table-bg: transparent;
}

.setup-done-icon {
    color: #F2F0E7;
    background: #0B7373;
}

/* ---- Centred step pages and bottom action bar --------------------------- */

.setup-hero-page {
    flex: 1;
    padding: 16px 24px 40px;
    text-align: center;
}

.setup-hero-page h2 {
    font-size: 1.75rem;
    font-weight: 400;
    margin: 20px 0 10px;
}

.setup-hero-page .setup-subtitle {
    max-width: 760px;
    margin: 0 auto 24px;
    font-size: 1rem;
}

.setup-hero-globe {
    width: 96px;
    height: 96px;
    margin: 0 auto;
    padding: 22px;
    border-radius: 0;
    background: #D8CBA5;
    color: #17180F;
}

.setup-hero-globe svg,
.setup-big-check svg {
    width: 100%;
    height: 100%;
}

.setup-big-check {
    width: 88px;
    height: 88px;
    margin: 0 auto;
    padding: 18px;
    border-radius: 0;
    background: #0B7373;
    color: #F2F0E7;
}

.setup-big-check svg circle {
    display: none;
}

.setup-big-check svg path {
    stroke-width: 2.6;
}

.setup-complete-title {
    font-size: 2.1rem !important;
}

.setup-hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.setup-manual {
    max-width: 960px;
    margin: 28px auto 0;
}

.setup-first-email {
    max-width: 520px;
    margin: 0 auto;
}

.setup-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 14px 20px;
    background: #EAE6D8;
    border-top: 1px solid #CFCABA;
    position: sticky;
    bottom: 0;
}

.setup-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 0;
    background: #D8CBA5;
    color: #17180F;
    font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
    font-weight: 600;
}

.setup-users-table th {
    background: #EAE6D8;
    font-weight: 500;
}

/* "DNS records for ..." dialog on the Domains list: Ink header + Paper text. */
.dns-records-table thead th {
    background: #17180F;
    color: #F2F0E7;
    text-align: center;
    font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
    border-color: #17180F;
}

.dns-records-table .dns-records-label {
    background: #17180F;
    color: #F2F0E7;
    text-align: center;
    width: 130px;
    font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dns-status-missing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 0;
    background: #A81216;
    color: #F2F0E7;
    font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
    font-weight: 700;
    font-size: 0.78rem;
}

/* Note box inside the delete-domain dialog. */
.delete-note {
    padding: 16px 18px;
    background: #EAE6D8;
    border: 1px solid #CFCABA;
    border-left: 3px solid #A81216;
    border-radius: 0;
}

/* ---- Admin Console and signed-out pages (_Layout) ----------------------- */

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 14px;
    border-radius: 2px;
    color: #D8CBA5;
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.app-nav-link:hover,
.app-nav-link:focus-visible {
    background: rgba(242, 240, 231, 0.08);
    color: #F2F0E7;
}

.app-nav-link.is-active {
    background: rgba(242, 240, 231, 0.11);
    color: #F2F0E7;
    box-shadow: inset 3px 0 0 #C2181B;
}

.app-content {
    min-height: calc(100vh - 69px);
    padding: 20px 44px 48px;
    background: #F2F0E7;
}

.app-content > h1:first-child,
.app-content > .alert + h1 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.auth-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: clamp(88px, 12vh, 130px) 16px 56px;
    background: #F2F0E7;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-family: "Zen Old Mincho", Georgia, "Times New Roman", serif;
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #17180F;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 28px 32px 32px;
    background: #F8F6EE;
    border: 1px solid #17180F;
    border-radius: 0;
}

.auth-card h1 {
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 18px;
}

/* ---- Narrow screens: sidebar becomes a top block ----------------------- */

@media (max-width: 768px) {
    .setup-shell {
        flex-direction: column;
    }

    .setup-sidebar {
        width: 100%;
        padding: 0 16px 18px;
        border-right: none;
        border-bottom: 1px solid #17180F;
    }

    .dp-plate-bar {
        margin: 0 -16px 16px;
    }

    .dp-plate-bar-card {
        margin: -22px -18px 18px;
    }

    .setup-brand {
        padding-bottom: 16px;
        margin-bottom: 14px;
    }

    .setup-step {
        padding: 10px 12px;
        margin-bottom: 6px;
    }

    .setup-steps::before {
        top: 20px;
        bottom: 20px;
    }

    .setup-page-title {
        padding: 12px 16px 4px;
    }

    .setup-content,
    .app-content {
        padding: 20px 16px 32px;
    }

    .auth-card {
        padding: 22px 18px;
    }

    .setup-panel {
        padding: 18px 16px;
    }

    .setup-flash {
        margin: 16px 16px 0;
    }

    .setup-choice {
        flex-direction: column;
        align-items: stretch;
    }

    .setup-welcome h2 {
        font-size: 1.8rem;
    }
}
