/* Online company registration (Index, Wizard, PayStatus).
   Sits on top of _companyRegistrationLayout and snp.css; every selector is cr-/wizard- prefixed
   so the Roster Confirmation pages that share the layout are untouched. */

:root {
    --cr-brand: #f46b45;          /* fills, meters, accents */
    --cr-brand-strong: #cc451f;   /* button fills and links: white text passes AA */
    --cr-brand-stronger: #b33a17;
    --cr-ink: #212529;
    --cr-muted: #5f6b76;
    --cr-line: #dee2e6;
    --cr-success: #28a745;
    --cr-danger: #dc3545;
    --cr-warning: #ffc107;
}

/* ---------- Buttons ---------- */
.btn-brand {
    background-color: var(--cr-brand-strong);
    border-color: var(--cr-brand-strong);
    color: #fff;
}

.btn-brand:hover,
.btn-brand:focus {
    background-color: var(--cr-brand-stronger);
    border-color: var(--cr-brand-stronger);
    color: #fff;
}

.btn-brand:focus {
    box-shadow: 0 0 0 0.2rem rgba(244, 107, 69, .4);
}

.btn-brand:disabled,
.btn-brand.disabled {
    background-color: var(--cr-brand-strong);
    border-color: var(--cr-brand-strong);
    opacity: .55;
}

.btn-brand-outline {
    background-color: #fff;
    border-color: var(--cr-brand-strong);
    color: var(--cr-brand-strong);
}

.btn-brand-outline:hover,
.btn-brand-outline:focus {
    background-color: var(--cr-brand-strong);
    color: #fff;
}

.cr-link {
    color: var(--cr-brand-strong);
}

.cr-link:hover {
    color: var(--cr-brand-stronger);
}

/* ---------- Index: form + route ---------- */
.cr-page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 15px;
}

.cr-intro {
    max-width: 38rem;
    margin-bottom: 1.5rem;
}

.cr-intro h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--cr-ink);
    margin-bottom: .35rem;
}

.cr-intro p {
    color: var(--cr-muted);
    margin-bottom: 0;
}

.cr-form-section {
    margin-bottom: 1.5rem;
}

.cr-form-section:last-child {
    margin-bottom: 0;
}

.cr-form-section h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cr-ink);
    padding-bottom: .5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--cr-brand);
    display: inline-block;
}

.cr-required {
    color: #c0392b;
}

.cr-optional {
    color: var(--cr-muted);
    font-weight: 400;
}

.cr-form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.5rem;
}

.cr-form-footer small {
    color: var(--cr-muted);
    flex: 1 1 16rem;
}

/* What happens next: a real sequence, so it is numbered and joined by a line. */
.cr-route {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: route;
}

.cr-route li {
    position: relative;
    padding: 0 0 1.1rem 2.5rem;
    counter-increment: route;
    color: var(--cr-ink);
    line-height: 1.35;
}

.cr-route li:last-child {
    padding-bottom: 0;
}

.cr-route li::before {
    content: counter(route);
    position: absolute;
    left: 0;
    top: -.1rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--cr-brand);
    color: var(--cr-brand-strong);
    font-size: .8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.cr-route li::after {
    content: "";
    position: absolute;
    left: calc(.875rem - 1px);
    top: 1.65rem;
    bottom: -.1rem;
    width: 2px;
    background: var(--cr-line);
}

.cr-route li:last-child::after {
    display: none;
}

.cr-route small {
    display: block;
    color: var(--cr-muted);
    margin-top: .1rem;
}

.cr-form .form-control.is-valid {
    background-image: none;
    padding-right: .75rem;
}

/* ---------- Wizard shell ---------- */
.wizard-wrapper {
    display: flex;
    min-height: calc(100vh - 120px);
    margin: -2rem 0;
}

.wizard-sidebar {
    width: 20em;
    flex-shrink: 0;
    background: #000;
    color: #C2C7D0;
    min-height: calc(100vh - 120px);
    position: relative;
    box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2);
}

.wizard-sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wizard-sidebar-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 .15rem;
}

.wizard-sidebar-meta {
    color: #C2C7D0;
    font-size: .8125rem;
    margin: 0 0 .6rem;
}

.wizard-meter {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .18);
    overflow: hidden;
}

.wizard-meter > span {
    display: block;
    height: 100%;
    background: var(--cr-brand);
}

.wizard-sidebar-toggle {
    display: none;
    width: 100%;
    margin-top: .75rem;
    padding: .55rem .75rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .25rem;
    color: #fff;
    font-size: .875rem;
    text-align: left;
    align-items: center;
    justify-content: space-between;
}

.wizard-sidebar-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.wizard-sidebar-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* Steps: a connector line joins the numbered markers; its colour carries each step's state. */
.wizard-steps-nav {
    padding: .5rem 0;
    margin: 0;
    list-style: none;
}

.wizard-step-item {
    position: relative;
}

.wizard-step-item::before {
    content: "";
    position: absolute;
    left: calc(1rem + .75rem - 1px);
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, .18);
}

.wizard-step-item:first-child::before {
    top: 50%;
}

.wizard-step-item:last-child::before {
    bottom: 50%;
}

.wizard-step-item.is-done::before {
    background: var(--cr-success);
}

.wizard-step-link {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    padding: .7rem 1rem;
    color: #C2C7D0;
    text-decoration: none;
    transition: background-color .15s ease-in-out;
    font-size: .875rem;
    line-height: 1.4;
}

.wizard-step-link:hover,
.wizard-step-link:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
}

.wizard-step-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

.wizard-step-link.active {
    background-color: var(--cr-brand-strong);
    color: #fff;
}

.wizard-step-number {
    background: #495057;
    border: 2px solid #000;
    color: #fff;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 600;
    margin-right: .75rem;
    flex-shrink: 0;
}

.wizard-step-link.active .wizard-step-number {
    background: #fff;
    color: var(--cr-brand-strong);
    border-color: var(--cr-brand-strong);
}

.wizard-step-link.text-success .wizard-step-number { background: var(--cr-success); color: #fff; }
.wizard-step-link.text-danger .wizard-step-number  { background: var(--cr-danger); color: #fff; }
.wizard-step-link.text-warning .wizard-step-number { background: var(--cr-warning); color: #212529; }

.wizard-step-text {
    flex: 1;
    color: #fff;
}

.wizard-step-icon {
    margin-left: .5rem;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.wizard-step-optional {
    font-size: .75rem;
    color: #aab1b9;
    display: block;
    margin-top: .15rem;
}

/* ---------- Wizard content ---------- */
.wizard-content {
    flex: 1;
    min-width: 0;
    padding: 2rem;
    background: #f4f6f9;
}

.cr-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--cr-ink);
}

.cr-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1rem;
}

.cr-banner > i {
    flex-shrink: 0;
}

.cr-banner-text {
    flex: 1 1 18rem;
}

.cr-formlink {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    color: var(--cr-muted);
    font-size: .875rem;
}

.cr-formlink i {
    color: var(--cr-danger);
}

.cr-guide {
    margin-bottom: 1.25rem;
    padding: .85rem 1rem;
    border-left: 3px solid var(--cr-brand);
    background: #fdf3ef;
    color: var(--cr-ink);
    font-size: .9rem;
}

.cr-guide-title {
    margin: 0 0 .4rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--cr-muted);
}

.cr-guide ul {
    margin: 0;
    padding-left: 1.1rem;
}

.cr-guide li + li {
    margin-top: .3rem;
}

/* Overview */
.cr-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1.1rem 1.5rem;
    margin: 0;
}

.cr-details dt {
    font-size: .8125rem;
    font-weight: 400;
    color: var(--cr-muted);
    margin-bottom: .1rem;
}

.cr-details dd {
    margin: 0;
    color: var(--cr-ink);
    overflow-wrap: anywhere;
}

.cr-details .cr-span-2 {
    grid-column: span 2;
}

.cr-status {
    font-weight: 600;
}

.cr-status-success { color: #1e7e34; }
.cr-status-danger  { color: #b02a37; }
.cr-status-warning { color: #8a6500; }

.cr-progress {
    height: 10px;
    border-radius: 5px;
    background: #e9ecef;
    overflow: hidden;
}

.cr-progress > span {
    display: block;
    height: 100%;
    background: var(--cr-brand);
}

.cr-overview-section {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--cr-line);
}

.cr-overview-section h5 {
    font-size: 1rem;
    font-weight: 700;
}

.cr-files td,
.cr-files th {
    vertical-align: middle;
}

.cr-empty {
    color: var(--cr-muted);
    margin: 0;
}

/* PayStatus */
.cr-status-card {
    max-width: 640px;
    margin: 2rem auto;
}

.cr-status-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cr-ink);
}

.cr-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.25rem;
}

/* ---------- Small screens: rail becomes a bar with a collapsing step list ---------- */
@media (max-width: 991.98px) {
    .wizard-wrapper {
        flex-direction: column;
        margin: -2rem 0 0;
    }

    .wizard-sidebar {
        width: 100%;
        min-height: 0;
    }

    .wizard-sidebar-toggle {
        display: flex;
    }

    .wizard-content {
        padding: 1rem;
    }

    .cr-details .cr-span-2 {
        grid-column: auto;
    }
}

@media (min-width: 992px) {
    .wizard-steps-collapse {
        display: block !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wizard-step-link,
    .wizard-sidebar-toggle .fa-chevron-down {
        transition: none;
    }
}
