:root {
    --rowl-primary: #184b43;
    --rowl-secondary: #526762;
    --rowl-accent: #63b42b;
    --rowl-accent-soft: #edf6e8;
    --rowl-background: #f4f6f3;
    --rowl-border: #dce4dd;
    --rowl-radius: 18px;
    --bs-body-font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-body-color: #233d36;
    --bs-body-bg: var(--rowl-background);
    --bs-link-color: var(--rowl-primary);
}

body {
    min-height: 100vh;
}
a {
    text-underline-offset: 4px;
}
h1 {
    font-size: clamp(2rem, 4.5vw, 3.3rem);
    font-weight: 650;
    letter-spacing: -0.045em;
    line-height: 1.12;
    margin-bottom: 1.2rem;
}
h2 {
    font-size: 1.45rem;
    font-weight: 650;
    letter-spacing: -0.025em;
}
p {
    line-height: 1.7;
}
.site-header {
    background: #fff;
    border-top: 4px solid var(--rowl-accent);
    border-bottom: 1px solid var(--rowl-border);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 132px;
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.brand {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 0 1 330px;
    min-width: 0;
    text-decoration: none;
    color: var(--rowl-primary);
}
.brand-wordmark {
    display: block;
    width: 100%;
    aspect-ratio: 374 / 91;
    overflow: hidden;
}
.brand-house {
    display: block;
    flex: 0 0 auto;
    width: 116px;
    height: auto;
    aspect-ratio: 166 / 121;
    margin-left: auto;
    overflow: hidden;
}
.header-label {
    font-size: 1.2rem;
    color: var(--rowl-secondary);
    border-left: 1px solid var(--rowl-border);
    padding-left: 2rem;
}
.logout-form {
    margin-left: auto;
}
.main-shell {
    max-width: 1100px;
    padding-top: 2rem;
    padding-bottom: 4rem;
    min-height: calc(100vh - 200px);
}
.admin-shell {
    max-width: 1400px;
}
.environment-label {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: #657365;
    margin-bottom: 2rem;
}
.entry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    padding: 2rem 0 4rem;
}
.entry-intro h1 {
    font-size: clamp(2.7rem, 4.6vw, 4rem);
}
.eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    font-weight: 750;
    color: var(--rowl-secondary);
    margin-bottom: 1.5rem;
}
.lead {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--rowl-secondary);
}
.intro-note {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}
.note-mark {
    display: grid;
    place-items: center;
    background: var(--rowl-accent-soft);
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
}
.panel {
    background: white;
    border: 1px solid var(--rowl-border);
    border-radius: var(--rowl-radius);
    padding: 2rem;
    box-shadow: 0 8px 30px #23453704;
}
.login-panel {
    padding: 2.5rem;
}
.section-number {
    display: inline-block;
    background: var(--rowl-accent);
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.login-panel p {
    font-size: 0.95rem;
    color: var(--rowl-secondary);
    margin-bottom: 2rem;
}
.form-label {
    font-size: 0.9rem;
    font-weight: 600;
}
.form-control,
.form-select {
    padding: 0.8rem 0.9rem;
    border-color: #b7c6bd;
    border-radius: 9px;
    background-color: #fff;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--rowl-primary);
    box-shadow: 0 0 0 0.2rem #184b4325;
}
.code-input {
    font-family: ui-monospace, monospace;
    font-size: 1.35rem;
    letter-spacing: 0.13em;
}
.code-input::placeholder {
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: #718078;
}
.form-text {
    font-size: 0.8rem;
    color: #596b60;
}
.btn {
    border-radius: 9px;
    padding: 0.8rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 44px;
}
.btn-primary {
    --bs-btn-bg: var(--rowl-primary);
    --bs-btn-border-color: var(--rowl-primary);
    --bs-btn-hover-bg: #103b34;
    --bs-btn-hover-border-color: #103b34;
    --bs-btn-active-bg: #103b34;
    --bs-btn-active-border-color: #103b34;
}
.btn-outline-secondary {
    --bs-btn-color: #37544a;
    --bs-btn-border-color: #b7c6bd;
    --bs-btn-hover-bg: #edf2ea;
    --bs-btn-hover-color: #183c30;
    --bs-btn-hover-border-color: #6b8274;
}
.btn-link {
    color: var(--rowl-secondary);
    font-weight: 400;
}
.panel-footnote {
    border-top: 1px solid var(--rowl-border);
    margin-top: 1.7rem;
    padding-top: 1.3rem;
    color: var(--rowl-secondary);
    font-size: 0.8rem;
}
.site-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid var(--rowl-border);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    color: var(--rowl-secondary);
    font-size: 0.8rem;
}
.site-footer nav {
    display: flex;
    gap: 1.5rem;
}
.wizard-progress {
    max-width: 850px;
    margin: 0 auto 2rem;
}
.wizard-progress ol {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0;
    list-style: none;
}
.wizard-progress li {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.75rem;
    color: #657268;
}
.wizard-progress li span:first-child {
    display: grid;
    place-items: center;
    border: 1px solid #a8b8aa;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}
.wizard-progress .current {
    font-weight: 750;
    color: var(--rowl-primary);
}
.wizard-progress .current span:first-child {
    background: var(--rowl-primary);
    color: white;
    border-color: var(--rowl-primary);
}
.wizard-progress .done span:first-child {
    background: var(--rowl-accent);
    border-color: var(--rowl-accent);
    color: #17331f;
}
.wizard-panel {
    max-width: 800px;
    margin: auto;
    padding: 3rem;
}
.wizard-panel h1 {
    font-size: 2.3rem;
}
.wizard-bottom {
    max-width: 800px;
    margin: 1rem auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.info-steps {
    margin: 2rem 0;
}
.info-steps div {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rowl-border);
}
.info-steps strong {
    color: #6b8253;
    font-size: 0.8rem;
}
.data-list {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 2fr;
    gap: 1rem 2rem;
    background: #f5f7f3;
    padding: 1.7rem;
    border-radius: 12px;
    margin: 1.8rem 0;
}
.data-list dt {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--rowl-secondary);
}
.data-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.choice-box {
    padding: 1.2rem;
    border-radius: 10px;
    background: #f1f5ec;
}
.form-check-input {
    width: 1.2em;
    height: 1.2em;
}
.form-check-input:checked {
    background-color: var(--rowl-primary);
    border-color: var(--rowl-primary);
}
.form-check-label {
    padding-left: 0.3rem;
    font-size: 0.9rem;
    line-height: 1.65;
}
.marketing-box {
    border-top: 1px solid var(--rowl-border);
    padding-top: 1.5rem;
}
.marketing-box legend {
    float: none;
    width: auto;
    font-size: 1rem;
    font-weight: 650;
}
.success-mark {
    background: var(--rowl-accent);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}
.admin-login {
    max-width: 460px;
    margin: 3rem auto;
}
.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}
.page-heading h1 {
    font-size: 2.5rem;
    overflow-wrap: anywhere;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}
.stat-card {
    padding: 1.2rem;
    background: #fff;
    border: 1px solid var(--rowl-border);
    border-radius: 12px;
}
.stat-card span {
    display: block;
    color: var(--rowl-secondary);
    font-size: 0.8rem;
}
.stat-card strong {
    display: block;
    font-size: 2rem;
    margin-top: 0.5rem;
}
.search-form {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin: 1.5rem 0;
}
.table {
    font-size: 0.85rem;
    --bs-table-bg: transparent;
}
.table th {
    color: var(--rowl-secondary);
    font-size: 0.75rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.table td {
    padding-top: 1rem;
    padding-bottom: 1rem;
    max-width: 300px;
    overflow-wrap: anywhere;
}
.company-link {
    font-weight: 600;
}
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    border-radius: 20px;
    background: #edf0ed;
    white-space: nowrap;
}
.status-completed {
    background: #e2efce;
    color: #345320;
}
.status-started,
.status-reopened {
    background: #fff0cc;
    color: #745715;
}
.empty-state {
    text-align: center;
    padding: 3rem !important;
}
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}
.stacked-list dt {
    color: var(--rowl-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}
.stacked-list dd {
    margin-bottom: 1rem;
}
.code-display {
    font-family: ui-monospace, monospace;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}
.back-link {
    font-size: 0.85rem;
}
:focus-visible {
    outline: 3px solid #9f6412;
    outline-offset: 4px;
}
.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    background: white;
    padding: 1rem;
    z-index: 100;
}
.skip-link:focus {
    top: 1rem;
}
[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 96px;
        gap: 0.75rem 1.25rem;
    }
    .brand {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        max-width: 330px;
    }
    .brand-house {
        grid-column: 2;
        grid-row: 1;
        width: 96px;
    }
    .header-label {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-left: 0;
        border-left: 0;
    }
    .logout-form {
        grid-column: 1 / -1;
        grid-row: 3;
        margin-left: 0;
    }
    .entry-grid {
        gap: 2rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 76px;
        min-height: 112px;
        gap: 0.75rem 1.25rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    .header-label {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-left: 0;
        border-left: 0;
        font-size: 0.7rem;
    }
    .brand {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        max-width: 300px;
    }
    .brand-house {
        grid-column: 2;
        grid-row: 1;
        width: 76px;
    }
    .main-shell {
        padding-top: 1.3rem;
        padding-bottom: 2rem;
    }
    .environment-label {
        margin-bottom: 1.4rem;
    }
    .entry-grid {
        grid-template-columns: 1fr;
        padding: 0.5rem 0 1rem;
    }
    .entry-intro h1 {
        font-size: 2.8rem;
    }
    .intro-note {
        margin-top: 1rem;
    }
    .panel,
    .login-panel,
    .wizard-panel {
        padding: 1.4rem;
    }
    .wizard-progress li {
        flex-direction: column;
        font-size: 0.62rem;
        gap: 0.4rem;
        text-align: center;
    }
    .wizard-progress li span:first-child {
        width: 26px;
        height: 26px;
    }
    .wizard-panel h1 {
        font-size: 2rem;
    }
    .data-list {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 1rem;
    }
    .data-list dd {
        margin-bottom: 0.8rem;
    }
    .actions .btn {
        width: 100%;
    }
    .search-form {
        grid-template-columns: 1fr;
    }
    .logout-form {
        grid-column: 1 / -1;
        grid-row: 3;
        margin-left: 0;
    }
}
