/* Roactive Wear brand layer
   Official palette sampled from the supplied logo: slate blue #6f82a0 and white. */
:root {
    color-scheme: light;
    --bg: #edf1f6;
    --bg-accent: #d7deea;
    --bg-soft: #f5f7fa;
    --panel: #ffffff;
    --panel-strong: #ffffff;
    --panel-light: #eef2f7;
    --line: rgba(68, 86, 113, 0.16);
    --line-strong: rgba(68, 86, 113, 0.28);
    --text: #17243a;
    --muted: #5d6c83;
    --accent: #6f82a0;
    --accent-strong: #465a78;
    --accent-warm: #aebbd0;
    --danger: #a9434c;
    --success: #36705a;
    --shadow: 0 22px 58px rgba(35, 52, 78, 0.16);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 15px;
    --radius-sm: 12px;
    accent-color: var(--accent-strong);
}

::selection { color: #ffffff; background: #465a78; }
* { scrollbar-color: #8b9bb5 #e8edf4; }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: #e8edf4; }
*::-webkit-scrollbar-thumb { border: 3px solid #e8edf4; border-radius: 999px; background: #8b9bb5; }

body {
    color: var(--text);
    background: linear-gradient(145deg, #f7f9fc 0%, #edf1f6 52%, #dce3ed 100%);
}

body::before { display: none; }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #6f82a0 !important;
    outline-offset: 3px;
}

.topbar {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 0;
    box-shadow: 0 10px 28px rgba(37, 54, 80, 0.1);
}

.topbar__inner { padding-block: 12px; }

.topbar__brand { min-width: max-content; gap: 12px; }

.brand-logo {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(70, 90, 120, 0.22);
}

.brand-logo img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.brand-copy { gap: 1px; }
.brand-title { color: #243550; font-size: 1.05rem; letter-spacing: -0.015em; }
.brand-subtitle { color: #66758b; font-size: 0.75rem; }

.topbar__link { color: #56667e; }
.topbar__link:hover { color: #243550; background: #eef2f7; }
.topbar__link--active { color: #ffffff; background: #526783; }
.topbar__link--active:hover { color: #ffffff; background: #465a78; }
.topbar__link-icon { color: currentColor; }

.language-menu summary,
.topbar__menu-toggle {
    border-color: #dbe1ea;
    color: #40526e;
    background: #f6f8fb;
}

.language-menu__options { border-color: #d8e0ea; background: #ffffff; box-shadow: var(--shadow); }
.language-form .language-menu__options button { color: #243550; }
.language-form .language-menu__options button:hover { color: #ffffff; background: #526783; }

input,
select,
textarea,
.form-control {
    border-color: #ccd5e2;
    color: #17243a;
    caret-color: #465a78;
    background: #ffffff;
}

input::placeholder,
textarea::placeholder { color: #66758b; opacity: 1; }

input:focus,
select:focus,
textarea:focus,
.form-control:focus {
    border-color: #6f82a0;
    box-shadow: 0 0 0 4px rgba(111, 130, 160, 0.18);
}

label { color: #34445d; }

button,
.button-link,
.backup-create-button,
.customers-hero__action.button-link {
    border-color: #465a78;
    color: #ffffff;
    background: #465a78;
    box-shadow: 0 9px 22px rgba(70, 90, 120, 0.22);
}

button:hover,
.button-link:hover,
.backup-create-button:hover,
.customers-hero__action.button-link:hover {
    color: #ffffff;
    background: #354863;
}

.button-secondary,
.button-ghost,
.button-link.button-secondary,
.button-link.button-ghost {
    border-color: #cbd4e0;
    color: #40526e;
    background: #f7f9fc;
    box-shadow: none;
}

.button-secondary:hover,
.button-ghost:hover,
.button-link.button-secondary:hover,
.button-link.button-ghost:hover {
    border-color: #6f82a0;
    color: #273a57;
    background: #e9eef5;
}

.auth-card,
.dashboard-card,
.page-card,
.panel-card,
.metric-card,
.commercial-dashboard__header,
.commercial-quick-panel,
.commercial-activity,
.backup-list-card,
.location-form-card,
.locations-list-card {
    border-color: #d7dee8;
    color: var(--text);
    background: #ffffff;
}

.auth-shell {
    width: min(calc(100% - 32px), 960px);
    min-height: calc(100vh - 82px);
}

.auth-card {
    grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1fr);
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.auth-copy {
    display: grid;
    min-height: 470px;
    padding: 48px;
    place-items: center;
    background: #f3f5f6;
}

.auth-logo {
    width: min(305px, 100%);
    height: auto;
    max-width: 100%;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
}

.auth-form {
    padding: clamp(36px, 5vw, 58px);
    color: #17243a;
    background: #ffffff;
}

.auth-form__header { margin-bottom: 14px; }
.auth-form__title { font-size: clamp(1.65rem, 3vw, 2rem); }

.dashboard-visual--roactive {
    display: grid;
    min-height: 150px;
    place-items: center;
    overflow: hidden;
    border: 0;
    background: #526783;
    box-shadow: 0 16px 38px rgba(57, 75, 103, 0.2);
}

.dashboard-visual__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 3vw, 28px);
    width: 100%;
    padding: 18px 26px;
}

.dashboard-visual__brand .dashboard-visual__brand-logo {
    position: static;
    inset: auto;
    width: clamp(240px, 22vw, 314px);
    height: auto;
    border-radius: 14px;
    object-fit: contain;
}

.dashboard-visual__brand div { display: grid; gap: 2px; }
.dashboard-visual__brand strong { color: #ffffff; font-size: clamp(1.7rem, 3.5vw, 3rem); line-height: 1; letter-spacing: -0.035em; }
.dashboard-visual__brand span { color: #eef2f7; font-size: clamp(0.84rem, 1.4vw, 1.05rem); }

.mobile-dashboard-summary__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    height: auto;
    min-height: 92px;
    padding: 10px 14px;
    border: 0;
    background: #526783;
    box-shadow: 0 12px 28px rgba(57, 75, 103, 0.18);
}

.mobile-dashboard-summary__visual .mobile-dashboard-summary__brand-logo {
    flex: 0 1 180px;
    width: min(180px, 100%);
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    object-position: center;
}

.mobile-dashboard-summary__visual figcaption { display: grid; gap: 2px; min-width: 0; }
.mobile-dashboard-summary__visual strong { color: #ffffff; font-size: 1.22rem; line-height: 1.05; }
.mobile-dashboard-summary__visual span { color: #eef2f7; font-size: 0.76rem; }

.hero-banner,
.workflow-card,
.quote-performance,
.customers-hero,
.backup-hero,
.locations-header,
.mobile-barcode-scanner {
    border-color: #d7dee8;
    background: #ffffff;
}

.hero-banner--compact h1 { color: #263852; }
.hero-banner--compact .subcopy { color: #617087; }
.hero-search__field { border-color: #d6dee9; background: #f7f9fc; }
.hero-search__field button { background: #526783; }

.metric-card,
.daily-priorities__group,
.commercial-kpi,
.commercial-quick-grid a,
.stock-notifications summary,
.stock-notifications__panel,
.document-shortcut,
.inventory-stock-card,
.inventory-movement-card,
.mobile-dashboard-alerts a,
.mobile-dashboard-movements,
.warehouse-dashboard__alerts a,
.warehouse-dashboard__movements,
.backup-summary article {
    border-color: #d9e0ea;
    color: #17243a;
    background: #ffffff;
}

.metric-card:hover,
.commercial-kpi:hover,
.commercial-quick-grid a:hover,
.document-shortcut:hover { border-color: #7f91ad; background: #f4f7fb; }

.metric-card__value,
.hero-stat__value,
.commercial-kpi__copy b { color: #334967; }
.metric-card__label,
.eyebrow,
.action-card__eyebrow { color: #526783; }

.data-table thead,
.products-table thead,
.customers-table thead,
.suppliers-table thead { background: #526783; }
.data-table th,
.products-table th,
.customers-table th,
.suppliers-table th { border-bottom-color: #354863; color: #ffffff; }
.data-table td { color: #26354b; border-bottom-color: #e1e6ee; }
.data-table tbody tr:hover { background: #f2f5f9; }

.customers-hero__icon,
.location-code,
.mobile-barcode-scanner__heading > span { color: #ffffff; background: #526783; box-shadow: none; }
.customers-hero__copy h1,
.backup-hero h1,
.locations-header h1 { color: #23344f; }
.customers-hero__copy .subcopy,
.backup-hero p:not(.eyebrow),
.locations-header p:not(.eyebrow) { color: #627188; }
.customers-hero__count { border-color: #d3dce7; color: #465a78; background: #f2f5f9; }
.customers-hero__count strong { color: #334967; }

.documents-tab,
.documents-sidebar { border-color: #d6dee9; color: #263852; background: #ffffff; }
.documents-sidebar::backdrop { background: rgba(23, 36, 58, 0.34); }

.commercial-story { background: #526783; }
.commercial-story img { object-fit: contain; background: #526783; }
.commercial-story__copy { color: #ffffff; background: rgba(39, 55, 80, 0.94); }
.commercial-story__copy p { color: #e8edf4; }

.mobile-action-bar { border-top-color: #d6dee9; background: #ffffff; box-shadow: 0 -10px 28px rgba(37, 54, 80, 0.12); }
.mobile-action-bar a { color: #5b6b82; }
.mobile-action-bar a[aria-current="page"] { color: #334967; }

.notice-message,
.app-toast { color: #ffffff; background: #465a78; }
.notice-message--error,
.app-toast--error { background: #963f49; }

@media (max-width: 820px) {
    .topbar__inner { padding-block: 9px; }
    .brand-logo { flex-basis: 46px; width: 46px; height: 46px; border-radius: 12px; }
    .brand-title { font-size: 0.92rem; }
    .brand-subtitle { display: none; }
    .dashboard-visual--roactive { min-height: 116px; }
    .dashboard-visual__brand { gap: 14px; padding: 12px 16px; }
    .dashboard-visual__brand .dashboard-visual__brand-logo { width: 180px; height: auto; border-radius: 10px; }
    .dashboard-visual__brand strong { font-size: 1.55rem; }
    .dashboard-visual__brand span { font-size: 0.78rem; }
    .auth-shell {
        width: min(calc(100% - 24px), 560px);
        padding-block: 22px 32px;
    }
    .auth-card { grid-template-columns: minmax(0, 1fr); }
    .auth-copy {
        min-width: 0;
        min-height: auto;
        padding: 30px 22px;
    }
    .auth-logo { width: min(305px, 82vw); }
    .auth-form {
        min-width: 0;
        padding: 30px 22px 34px;
        border-top: 0;
    }
}

@media (max-width: 480px) {
    .mobile-dashboard-summary__visual { gap: 10px; padding-inline: 12px; }
    .mobile-dashboard-summary__visual .mobile-dashboard-summary__brand-logo { flex-basis: 160px; width: 160px; }
    .mobile-dashboard-summary__visual strong { font-size: 1.08rem; }
    .mobile-dashboard-summary__visual span { font-size: 0.71rem; line-height: 1.25; }
}

@media print {
    body { color: #17243a; background: #ffffff; }
    .invoice-sheet,
    .document-sheet { color: #17243a; background: #ffffff; }
}
