/* Shared company theme. Brand variables come from config/branding.php. */
:root {
    --brand-primary: #cc1246;
    --brand-sidebar: #131b2e;
    --brand-contrast: #ffffff;
    --brand-link: #b70d3d;
    --brand-soft: #cc124610;
    --brand-glow: #cc124624;
    --ink: #17243b;
    --muted: #65738a;
    --line: #e3e8f1;
}
body {
    --red: var(--brand-primary);
    background:
        radial-gradient(ellipse at 100% 0, var(--brand-soft), transparent 45%),
        #f3f5fa;
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a {
    color: var(--brand-link);
}
a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ui-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    vertical-align: middle;
}
.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 2000;
    background: white;
    color: var(--ink);
    padding: 10px 18px;
    border-radius: 8px;
}
.skip-link:focus {
    top: 12px;
}
.shell {
    width: 100%;
    grid-template-columns: 252px minmax(0, 1fr);
}
aside {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 30px 20px 22px;
    background:
        radial-gradient(
            ellipse at top left,
            var(--brand-glow),
            transparent 65%
        ),
        var(--brand-sidebar);
    border-right: 1px solid #ffffff08;
}
.brand-lockup {
    display: flex;
    align-items: center;
    gap: 13px;
    color: white;
    margin: 0 4px 37px;
    min-width: 0;
}
.brand-lockup:hover {
    color: white;
    text-decoration: none;
}
.brand-lockup strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.7px;
    overflow-wrap: anywhere;
}
.brand-lockup small {
    margin: 4px 0 0;
    font-size: 11px;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: #a7b5ce;
}
.brand-monogram {
    display: inline-grid;
    place-items: center;
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    border-radius: 13px;
    background:
        linear-gradient(140deg, #ffffff20, transparent), var(--brand-primary);
    color: var(--brand-contrast);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -1px;
    box-shadow: 0 6px 20px var(--brand-glow);
}
.brand-logo {
    max-width: 82px;
    max-height: 52px;
    object-fit: contain;
}
.nav-caption {
    margin: 0 13px 11px;
    color: #8f9db5;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}
nav a {
    display: flex;
    gap: 13px;
    align-items: center;
    margin: 5px 0;
    padding: 12px 14px;
    color: #c5cee1;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 500;
    transition:
        background 140ms,
        color 140ms;
}
nav a:hover {
    color: white;
    background: #ffffff09;
    text-decoration: none;
}
nav a.selected,
nav a.selected:hover {
    background: var(--brand-primary);
    color: var(--brand-contrast);
    border-color: #ffffff0d;
    box-shadow: 0 5px 18px var(--brand-glow);
}
nav .ui-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
}
.sidebar-footer {
    margin-top: auto;
    padding: 28px 12px 0;
    display: grid;
    justify-items: start;
    gap: 12px;
    color: #a7b5ce;
    font-size: 11px;
}
.workspace-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.status-dot {
    width: 6px;
    height: 6px;
    display: inline-block;
    flex: 0 0 6px;
    background: #35d3a1;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #35d3a115;
}
.environment-badge {
    padding: 3px 9px;
    border: 1px solid #ffffff18;
    border-radius: 5px;
    color: #a7b5ce;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-size: 9px;
}
main {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 30px clamp(22px, 2.2vw, 46px) 44px;
}
header {
    margin-bottom: 27px;
}
header .muted {
    margin-top: 3px;
    font-size: 12px;
}
h1 {
    font-size: clamp(24px, 2vw, 31px);
    letter-spacing: -1px;
    line-height: 1.25;
    font-weight: 750;
}
h2 {
    font-size: 18px;
    letter-spacing: -0.45px;
    font-weight: 750;
}
h3 {
    font-size: 15px;
    letter-spacing: -0.2px;
}
.eyebrow {
    font-size: 9px;
    line-height: 1.5;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    font-weight: 750;
    color: var(--muted);
    margin: 0 0 6px;
}
button,
.button {
    min-height: 42px;
    padding: 10px 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--brand-primary);
    color: var(--brand-contrast);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
    transition:
        box-shadow 140ms,
        filter 140ms;
}
button:hover:not(:disabled),
.button:hover {
    filter: brightness(0.97);
    box-shadow: 0 4px 12px #17243b12;
    text-decoration: none;
}
button.secondary,
.secondary-link {
    background: #fff;
    color: #46566f;
    border-color: var(--line);
}
button.danger {
    color: #ab2347;
    background: #fff0f4;
    border-color: #f7dce5;
}
:where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid var(--brand-glow);
    outline-offset: 3px;
}
.signout-button .ui-icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}
.card {
    background: #fff;
    border: 1px solid #e3e8f1;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 3px 15px #17243b04;
    min-width: 0;
}
input:not([type="checkbox"]),
select,
textarea {
    background: #fafbfe;
    border-color: #dce3ee;
    border-radius: 9px;
    min-height: 43px;
    padding: 10px 12px;
    font-size: 13px;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand-primary);
    background: white;
}
input[type="checkbox"] {
    accent-color: var(--brand-primary);
}
label {
    color: #42516a;
    font-size: 12px;
    font-weight: 650;
}
input[type="file"] {
    padding: 8px;
}
input::file-selector-button {
    background: #edf0f7;
    color: var(--ink);
    border: 0;
    padding: 5px 9px;
    margin-right: 10px;
    border-radius: 5px;
}
th {
    background: #f8f9fc;
    color: #728099;
    font-size: 10px;
    letter-spacing: 0.9px;
    font-weight: 700;
    padding: 13px 15px;
}
td {
    padding: 15px;
    font-size: 12px;
}
tbody tr:last-child td {
    border-bottom: 0;
}
tbody tr:hover {
    background: #fafbfe;
}
.badge {
    display: inline-block;
    padding: 4px 9px;
    color: #64748b;
    background: #f0f3f8;
    font-size: 10px;
    font-weight: 650;
    border-radius: 6px;
}
.badge-rush {
    background: #fff1e5;
    color: #9d500c;
}
.notice {
    border-radius: 11px;
}
.toast {
    z-index: 1100;
    box-shadow: 0 12px 40px #17243b1a;
}
.dashboard-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 235px;
    align-items: center;
    gap: 30px;
    overflow: hidden;
    padding: 30px 34px;
    margin-bottom: 22px;
    border: 1px solid #ffffff10;
    border-radius: 18px;
    background:
        radial-gradient(
            ellipse at 65% -40%,
            var(--brand-primary),
            transparent 65%
        ),
        var(--brand-sidebar);
    color: white;
    box-shadow: 0 10px 35px #17243b0c;
}
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #d2dbed;
    font-weight: 600;
}
.dashboard-hero h2 {
    font-size: clamp(24px, 2.5vw, 37px);
    margin: 14px 0 9px;
    line-height: 1.15;
    letter-spacing: -1.3px;
    color: white;
}
.dashboard-hero p {
    color: #c1cde2;
    margin: 0 0 23px;
    font-size: 12px;
}
.hero-primary {
    background: white;
    color: #15223b;
}
.hero-secondary {
    background: #ffffff0b;
    border-color: #ffffff30;
    color: white;
}
.hero-date {
    display: grid;
    justify-items: end;
    gap: 2px;
    text-align: right;
    color: #c1cde2;
    font-size: 11px;
    border-left: 1px solid #ffffff18;
    padding-left: 25px;
}
.hero-date strong {
    display: block;
    color: white;
    font-size: 25px;
    letter-spacing: -0.6px;
    margin-bottom: 7px;
}
.hero-date-icon {
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid #ffffff22;
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
    color: white;
    background: #ffffff08;
}
.metric-grid {
    gap: 20px;
}
.metric-card {
    display: block;
    padding: 21px 24px;
    color: var(--ink);
    margin-bottom: 22px;
    transition:
        border-color 140ms,
        box-shadow 140ms;
}
.metric-card:hover {
    text-decoration: none;
    border-color: var(--brand-glow);
    box-shadow: 0 8px 25px #17243b08;
}
.metric-top,
.metric-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.metric-top {
    color: #5d6b82;
    font-size: 12px;
    font-weight: 600;
}
.metric-icon,
.quick-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 37px;
    width: 37px;
    height: 37px;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand-link);
}
.metric {
    margin: 3px 0 8px;
    font-size: 36px;
    line-height: 1.2;
    letter-spacing: -1.5px;
    font-weight: 750;
}
.metric-bottom {
    color: var(--muted);
    font-size: 10px;
    border-top: 1px solid #edf0f6;
    padding-top: 12px;
}
.metric-bottom .ui-icon {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
}
.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
    gap: 22px;
    align-items: start;
}
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.section-heading h2 {
    margin-bottom: 0;
}
.section-heading > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    white-space: nowrap;
}
.order-link {
    font-weight: 700;
}
.empty-state {
    display: grid;
    justify-items: center;
    text-align: center;
    padding: 35px 15px 26px;
}
.empty-icon {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 17px;
    color: var(--brand-link);
    background: var(--brand-soft);
    margin-bottom: 8px;
}
.empty-icon .ui-icon {
    width: 27px;
    height: 27px;
}
.empty-state h3 {
    margin-bottom: 0;
}
.empty-state p {
    font-size: 12px;
    color: var(--muted);
    margin: 7px 0 20px;
}
.quick-links h2 {
    margin-bottom: 9px;
}
.quick-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 0;
    border-bottom: 1px solid #edf0f6;
    color: var(--ink);
}
.quick-link:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.quick-link:hover {
    text-decoration: none;
    color: var(--brand-link);
}
.quick-link strong,
.quick-link small {
    display: block;
}
.quick-link strong {
    font-size: 12px;
    font-weight: 700;
}
.quick-link small {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
}
.quick-link > .ui-icon {
    margin-left: auto;
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    color: #91a0b5;
}
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(
            ellipse at top right,
            var(--brand-glow),
            transparent 50%
        ),
        #eef1f8;
}
.auth-page .login {
    width: 100%;
    max-width: 460px;
    padding: 36px;
    margin: 0;
    box-shadow: 0 25px 75px #17243b0e;
    border-top: 4px solid var(--brand-primary);
    border-radius: 20px;
}
.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.login-brand .eyebrow {
    margin: 0;
    font-size: 10px;
}
.login-logo {
    max-width: 150px;
    max-height: 65px;
    object-fit: contain;
}
.login h1 {
    font-size: 27px;
}
.login > .muted {
    margin: 10px 0 25px;
    font-size: 12px;
}
.login form > button {
    width: 100%;
    margin-top: 6px;
}
.login-footer {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 11px;
}
/* Keep the existing help controls compact despite the new button styling. */
.column-help {
    min-height: 0;
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
}
.column-help:hover:not(:disabled) {
    box-shadow: none;
    filter: none;
}
@media (min-width: 1700px) {
    .dashboard-columns {
        grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    }
}
@media (max-width: 1100px) {
    .dashboard-columns {
        grid-template-columns: minmax(0, 1fr);
    }
    .dashboard-hero {
        grid-template-columns: minmax(0, 1fr) 180px;
        padding: 28px;
    }
}
@media (max-width: 800px) {
    .shell {
        grid-template-columns: minmax(0, 1fr);
    }
    aside {
        position: static;
        height: auto;
        padding: 19px 17px 13px;
    }
    .brand-lockup {
        margin: 0 0 18px;
    }
    .nav-caption,
    .sidebar-footer {
        display: none;
    }
    nav {
        gap: 5px;
    }
    nav a {
        padding: 9px 11px;
        margin: 0;
        gap: 7px;
        font-size: 11px;
    }
    main {
        padding: 22px 18px;
    }
    .dashboard-hero {
        grid-template-columns: minmax(0, 1fr);
        padding: 25px;
    }
    .hero-date {
        display: none;
    }
    .metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }
    .metric-card {
        padding: 15px;
    }
    .metric-icon,
    .metric-bottom .ui-icon {
        display: none;
    }
    .metric-top {
        font-size: 10px;
    }
    .metric {
        font-size: 29px;
        margin-top: 12px;
    }
    .card {
        padding: 20px;
    }
}
@media (max-width: 420px) {
    .metric-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .metric-icon {
        display: inline-grid;
    }
    .auth-page .login {
        padding: 25px;
    }
    .section-heading {
        align-items: flex-start;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
