* {
    box-sizing: border-box;
}

:root {
    /*
     * NextRole Pilot brand colors
     */
    --nr-navy: #0b2348;
    --nr-blue: #1677d2;
    --nr-primary: #2563eb;
    --nr-primary-hover: #1d4ed8;
    --nr-orange: #f59e0b;

    /*
     * Supporting interface colors
     */
    --nr-text: #172033;
    --nr-muted: #64748b;
    --nr-border: #e2e8f0;
    --nr-surface: #ffffff;
    --nr-background: #f4f7fb;

    /*
     * Blue interface states
     */
    --nr-blue-light: #eff6ff;
    --nr-blue-border: #bfdbfe;

    /*
     * Orange brand states
     */
    --nr-orange-light: #fff7e6;
    --nr-orange-soft: #fffaf0;
    --nr-orange-border: #fcd88c;

    /*
     * Destructive / warning colors
     */
    --nr-danger: #b91c1c;
    --nr-danger-dark: #991b1b;
    --nr-danger-light: #fef2f2;
    --nr-danger-border: #fecaca;

    /*
     * Success colors
     */
    --nr-success: #15803d;
    --nr-success-light: #f0fdf4;

    /*
     * Shared layout
     */
    --nr-content-width: 1180px;
    --nr-page-width: 1100px;

    /*
     * Shared corner radii
     */
    --nr-radius-small: 8px;
    --nr-radius-medium: 10px;
    --nr-radius-large: 14px;
    --nr-radius-card: 16px;

    /*
     * Shared shadows
     */
    --nr-shadow-small:
        0 3px 10px
        rgba(15, 23, 42, 0.04);

    --nr-shadow-card:
        0 5px 18px
        rgba(15, 23, 42, 0.05);

    --nr-shadow-primary:
        0 4px 12px
        rgba(37, 99, 235, 0.18);
}


/* ==========================================================
   BASE PAGE
   ========================================================== */

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

body {
    margin: 0;
    background: var(--nr-background);
    color: var(--nr-text);
    font-family:
        "Manrope",
        Arial,
        Helvetica,
        sans-serif;
    text-align: left;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font-family:
        "Manrope",
        Arial,
        Helvetica,
        sans-serif;
}


/* ==========================================================
   SITE HEADER / BRANDING
   ========================================================== */

.site-header {
    background: var(--nr-surface);
    border-bottom: 1px solid var(--nr-border);
    box-shadow:
        0 1px 8px
        rgba(15, 23, 42, 0.04);
}

.header-inner {
    width: 92%;
    max-width: var(--nr-content-width);
    margin: 0 auto;
    padding: 17px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand-home-link {
    display: block;
    width: 100%;
    max-width: 350px;
    flex: 0 1 350px;

    text-decoration: none;
}

.brand-home-link:focus-visible {
    outline: 3px solid var(--nr-blue-border);
    outline-offset: 4px;
    border-radius: var(--nr-radius-small);
}

.brand-logo {
    display: block;
    width: 100%;
    max-width: 350px;
    height: auto;
}

.header-tagline {
    margin: 0;
    color: var(--nr-muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: left;
}


/* ==========================================================
   PAGE LAYOUT
   ========================================================== */

.page-shell {
    width: 92%;
    max-width: var(--nr-page-width);
    margin: 34px auto 60px;
}

.page-shell-narrow {
    width: 92%;
    max-width: 820px;
    margin: 38px auto 70px;
}

.page-shell-detail {
    width: 92%;
    max-width: 950px;
    margin: 38px auto 70px;
}

.page-navigation {
    margin-bottom: 18px;
}

.page-navigation-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}


/* ==========================================================
   TYPOGRAPHY
   ========================================================== */

.page-title {
    margin: 0 0 7px;
    color: var(--nr-navy);
    font-size: clamp(
        30px,
        5vw,
        40px
    );
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.page-subtitle {
    max-width: 700px;
    margin: 0;
    color: var(--nr-muted);
    font-size: 15px;
    line-height: 1.6;
}

.section-title {
    margin: 0 0 18px;
    color: var(--nr-navy);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.muted-text {
    color: var(--nr-muted);
}


/* ==========================================================
   NAVIGATION LINKS
   ========================================================== */

.back-link,
.dashboard-link,
.text-link {
    color: var(--nr-blue);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.back-link:hover,
.dashboard-link:hover,
.text-link:hover {
    text-decoration: underline;
}


/* ==========================================================
   SHARED CARDS
   ========================================================== */

.card {
    background: var(--nr-surface);
    border: 1px solid var(--nr-border);
    border-radius: var(--nr-radius-large);
    box-shadow: var(--nr-shadow-small);
}

.card-large {
    padding: 30px;
    background: var(--nr-surface);
    border: 1px solid var(--nr-border);
    border-radius: var(--nr-radius-card);
    box-shadow: var(--nr-shadow-card);
}


/* ==========================================================
   BUTTONS
   ========================================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;

    border-radius: var(--nr-radius-small);
    border: 1px solid transparent;

    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;

    cursor: pointer;

    transition:
        transform 150ms ease,
        background 150ms ease,
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.button-primary {
    background: var(--nr-primary);
    color: #ffffff;
    box-shadow: var(--nr-shadow-primary);
}

.button-primary:hover {
    transform: translateY(-1px);
    background: var(--nr-primary-hover);
    box-shadow:
        0 7px 18px
        rgba(37, 99, 235, 0.22);
}

.button-secondary {
    background: var(--nr-surface);
    border-color: var(--nr-blue-border);
    color: var(--nr-blue);
}

.button-secondary:hover {
    background: var(--nr-blue-light);
}

.button-neutral {
    background: var(--nr-surface);
    border-color: var(--nr-border);
    color: var(--nr-text);
}

.button-neutral:hover {
    background: #f8fafc;
}

.button-danger {
    background: var(--nr-danger);
    border-color: var(--nr-danger);
    color: #ffffff;
}

.button-danger:hover {
    background: var(--nr-danger-dark);
    border-color: var(--nr-danger-dark);
}

.button-danger-outline {
    background: var(--nr-surface);
    border-color: var(--nr-danger-border);
    color: var(--nr-danger);
}

.button-danger-outline:hover {
    background: var(--nr-danger-light);
}


/* ==========================================================
   STATUS PILLS
   ========================================================== */

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 6px 11px;

    background: var(--nr-blue-light);
    border: 1px solid var(--nr-blue-border);
    border-radius: 999px;

    color: var(--nr-blue);
    font-size: 12px;
    font-weight: 800;
}


/* ==========================================================
   FORMS
   ========================================================== */

.form-card {
    padding: 30px;
    background: var(--nr-surface);
    border: 1px solid var(--nr-border);
    border-radius: var(--nr-radius-card);
    box-shadow: var(--nr-shadow-card);
}

.field {
    margin-bottom: 20px;
}

.field-row {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 18px;
}

label {
    display: block;
    margin-bottom: 7px;

    color: var(--nr-navy);
    font-size: 14px;
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 13px;

    background: var(--nr-surface);
    border: 1px solid #cbd5e1;
    border-radius: var(--nr-radius-small);

    color: var(--nr-text);
    font-size: 15px;
    line-height: 1.4;

    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;

    border-color: #60a5fa;

    box-shadow:
        0 0 0 3px
        rgba(37, 99, 235, 0.10);
}

.field-help {
    margin-top: 6px;

    color: var(--nr-muted);
    font-size: 12px;
    line-height: 1.5;
}

.errorlist {
    margin: 7px 0 0;
    padding: 10px 12px;

    background: var(--nr-danger-light);
    border-radius: 7px;

    color: var(--nr-danger);
    font-size: 13px;
    line-height: 1.5;

    list-style-position: inside;
}


/* ==========================================================
   JOB DETAIL CONTENT
   ========================================================== */

.detail-grid {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 16px 26px;
}

.detail-item {
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
}

.detail-label {
    display: block;
    margin-bottom: 4px;

    color: var(--nr-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-value {
    color: var(--nr-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.text-content-box {
    padding: 14px 16px;

    background: #f8fafc;
    border: 1px solid var(--nr-border);
    border-radius: var(--nr-radius-medium);

    color: var(--nr-text);
    font-size: 14px;
    line-height: 1.7;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
    text-align: left;
}


/* ==========================================================
   UPGRADE / FEATURE CALLOUT
   ========================================================== */

.upgrade-box {
    position: relative;

    margin-top: 32px;
    padding: 21px 23px;

    background:
        linear-gradient(
            135deg,
            var(--nr-orange-light) 0%,
            var(--nr-orange-soft) 34%,
            #ffffff 62%,
            var(--nr-blue-light) 100%
        );

    border: 1px solid var(--nr-orange-border);
    border-left: 5px solid var(--nr-orange);
    border-radius: 12px;

    box-shadow:
        0 4px 14px
        rgba(245, 158, 11, 0.08);

    text-align: left;
}

.upgrade-box h3 {
    margin: 0 0 6px;

    color: var(--nr-navy);
    font-size: 17px;
    font-weight: 800;
}

.upgrade-box h3::before {
    content: "";

    display: inline-block;

    width: 10px;
    height: 10px;
    margin-right: 9px;

    background: var(--nr-orange);
    border-radius: 999px;

    box-shadow:
        0 0 0 3px
        rgba(245, 158, 11, 0.12);

    vertical-align: 1px;
}

.upgrade-box p {
    max-width: 700px;
    margin: 0;

    color: var(--nr-muted);
    font-size: 13px;
    line-height: 1.6;
}


/* ==========================================================
   WARNING BOX
   ========================================================== */

.warning-box {
    padding: 18px;

    background: var(--nr-danger-light);
    border: 1px solid var(--nr-danger-border);
    border-radius: var(--nr-radius-medium);

    color: var(--nr-text);
    line-height: 1.6;
}

.warning-box strong {
    display: block;
    margin-bottom: 6px;

    color: var(--nr-danger-dark);
    font-size: 15px;
    font-weight: 800;
}


/* ==========================================================
   BRAND ACCENT
   ========================================================== */

/*
 * Blue remains the primary interaction color.
 * Orange is reserved for brand emphasis,
 * premium intelligence, and selected callouts.
 */

.brand-accent {
    color: var(--nr-orange);
}

.brand-accent-border {
    border-color: var(--nr-orange);
}

.brand-accent-background {
    background: var(--nr-orange-light);
}


/* ==========================================================
   RESPONSIVE FOUNDATION
   ========================================================== */

@media (max-width: 700px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .brand-logo {
        max-width: 275px;
    }

    .header-tagline {
        text-align: left;
    }

    .page-shell,
    .page-shell-narrow,
    .page-shell-detail {
        margin-top: 26px;
    }

    .page-navigation-split {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .field-row,
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-card,
    .card-large {
        padding: 22px 18px;
    }

    .mobile-full-width {
        width: 100%;
    }
}