:root {
    --bg: #f3f0e8;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --surface-muted: #f7f4ee;
    --line: rgba(31, 41, 55, 0.12);
    --line-strong: rgba(31, 41, 55, 0.18);
    --text: #1f2937;
    --text-soft: #5b6470;
    --brand: #0f766e;
    --brand-strong: #115e59;
    --accent: #c26b1e;
    --danger: #b42318;
    --success: #15803d;
    --shadow: 0 18px 40px rgba(24, 39, 55, 0.08);
    --radius: 22px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 32%),
        radial-gradient(circle at top right, rgba(194, 107, 30, 0.16), transparent 26%),
        linear-gradient(180deg, #f7f2e9 0%, #f0ece4 48%, #e8ece8 100%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.page-shell {
    width: min(1440px, calc(100% - 40px));
    margin: 24px auto 32px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
}

.sidebar {
    background: rgba(18, 28, 36, 0.9);
    color: #eef2f1;
    border-radius: 28px;
    padding: 24px 22px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 18px;
    height: fit-content;
}

.brand {
    margin-bottom: 24px;
}

.brand__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(238, 242, 241, 0.72);
}

.brand__eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f3b26d, transparent);
}

.brand h1,
.page-title {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    margin: 10px 0 8px;
    letter-spacing: -0.03em;
}

.brand h1 {
    font-size: 30px;
}

.brand p {
    margin: 0;
    color: rgba(238, 242, 241, 0.74);
    line-height: 1.5;
}

.nav-group {
    margin-top: 22px;
}

.nav-group__title {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(238, 242, 241, 0.54);
    margin-bottom: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 16px;
    color: rgba(245, 248, 248, 0.84);
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link--active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(2px);
}

.sidebar-user {
    margin-top: 22px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-user__name {
    font-weight: 700;
}

.sidebar-user__meta {
    margin-top: 4px;
    color: rgba(238, 242, 241, 0.72);
    font-size: 14px;
}

.sidebar-user form {
    margin-top: 14px;
}

.content {
    min-width: 0;
}

.topbar {
    background: var(--surface);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 24px 28px;
    margin-bottom: 22px;
}

.topbar p {
    margin: 0;
    color: var(--text-soft);
}

.topbar-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.content-grid {
    display: grid;
    gap: 22px;
}

.card {
    background: var(--surface);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 24px;
}

.card--soft {
    background: rgba(255, 255, 255, 0.76);
}

.card__header,
.section-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.section-title {
    margin: 0;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.section-subtitle {
    margin: 6px 0 0;
    color: var(--text-soft);
    line-height: 1.5;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-tile {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: 24px;
    padding: 20px;
    display: flex;
    align-items: end;
    background-color: #10242f;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(24, 39, 55, 0.14);
}

.dashboard-tile--placeholder {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 234, 224, 0.88)),
        linear-gradient(180deg, rgba(194, 107, 30, 0.06), rgba(15, 118, 110, 0.06));
    border: 1px solid rgba(31, 41, 55, 0.08);
}

.dashboard-tile__content {
    position: relative;
    z-index: 1;
}

.dashboard-tile__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.94);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-tile__title {
    margin: 14px 0 0;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 32px;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: #fff;
}

.dashboard-tile__meta {
    margin: 12px 0 0;
    max-width: 240px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.5;
}

.dashboard-tile--placeholder .dashboard-tile__eyebrow {
    background: rgba(15, 118, 110, 0.1);
    color: var(--brand-strong);
}

.dashboard-tile--placeholder .dashboard-tile__title {
    color: var(--text);
}

.dashboard-tile--placeholder .dashboard-tile__meta {
    color: var(--text-soft);
}

.metric {
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 247, 0.88));
    border: 1px solid var(--line);
}

.metric__label {
    color: var(--text-soft);
    font-size: 14px;
}

.metric__value {
    margin-top: 10px;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 34px;
    line-height: 1;
}

.metric__hint {
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 13px;
}

.catalog-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.catalog-tile {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 24px;
    min-height: 260px;
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalog-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(24, 39, 55, 0.14);
}

.catalog-tile::after {
    content: "";
    position: absolute;
    inset: auto -20% -28% auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.catalog-tile--amber {
    background: linear-gradient(145deg, #9a3412, #d97706);
}

.catalog-tile--blue {
    background: linear-gradient(145deg, #1d4ed8, #0f766e);
}

.catalog-tile--green {
    background: linear-gradient(145deg, #166534, #0f766e);
}

.catalog-tile__eyebrow {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.catalog-tile__title {
    position: relative;
    z-index: 1;
    margin: 14px 0 10px;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.catalog-tile__description {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
}

.catalog-tile__stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.catalog-tile__stat-value {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 28px;
    line-height: 1;
}

.catalog-tile__stat-label {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.76);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.catalog-tile__link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    font-weight: 800;
}

.catalog-tile__link::after {
    content: "->";
}

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

.subcategory-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.subcategory-tile {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    border-radius: 26px;
    padding: 22px;
    display: flex;
    align-items: end;
    background-color: #11242f;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: var(--shadow);
}

.subcategory-tile--link {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.subcategory-tile--link:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(24, 39, 55, 0.14);
}

.subcategory-tile__content {
    position: relative;
    z-index: 1;
}

.subcategory-tile__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.94);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.subcategory-tile__title {
    margin: 16px 0 0;
    color: #fff;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 34px;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.subcategory-tile__description {
    margin: 12px 0 0;
    max-width: 320px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
}

.subcategory-tile__link {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.96);
    font-weight: 800;
}

.subcategory-tile__link::after {
    content: "->";
}

.warehouse-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.warehouse-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 700;
}

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

.form-grid--single {
    grid-template-columns: 1fr;
}

.field {
    display: grid;
    gap: 8px;
}

.field--span-2 {
    grid-column: span 2;
}

.field label,
.field__label {
    font-size: 14px;
    font-weight: 700;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 12px 14px;
    background: #fffdf9;
    color: var(--text);
    outline: none;
    transition: 0.18s ease;
}

.textarea {
    min-height: 94px;
    resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    padding: 11px 18px;
    cursor: pointer;
    transition: 0.2s ease;
    font-weight: 700;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn--primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: white;
}

.btn--secondary {
    background: rgba(15, 118, 110, 0.1);
    color: var(--brand-strong);
}

.btn--accent {
    background: rgba(194, 107, 30, 0.12);
    color: #9a5418;
}

.btn--danger {
    background: rgba(180, 35, 24, 0.12);
    color: var(--danger);
}

.btn--ghost {
    background: rgba(31, 41, 55, 0.06);
    color: var(--text);
}

.stack {
    display: grid;
    gap: 16px;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.table th,
.table td {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(31, 41, 55, 0.08);
    vertical-align: top;
    text-align: left;
}

.table th {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.table td strong {
    display: block;
}

.table-input,
.table-select,
.table-textarea {
    width: 100%;
    border: 1px solid rgba(31, 41, 55, 0.14);
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
}

.table-textarea {
    min-height: 72px;
    resize: vertical;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge--slate { background: rgba(71, 85, 105, 0.12); color: #334155; }
.badge--blue { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.badge--amber { background: rgba(217, 119, 6, 0.14); color: #b45309; }
.badge--green { background: rgba(21, 128, 61, 0.14); color: #166534; }
.badge--red { background: rgba(185, 28, 28, 0.14); color: #b91c1c; }
.badge--purple { background: rgba(126, 34, 206, 0.13); color: #7e22ce; }

.flash {
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-weight: 600;
}

.flash--success {
    background: rgba(21, 128, 61, 0.12);
    color: var(--success);
}

.flash--error {
    background: rgba(185, 28, 28, 0.1);
    color: var(--danger);
}

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

.tiny {
    font-size: 12px;
}

.empty-state {
    padding: 24px;
    border-radius: 18px;
    border: 1px dashed rgba(31, 41, 55, 0.18);
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.6);
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.divider {
    height: 1px;
    background: rgba(31, 41, 55, 0.08);
    margin: 4px 0 16px;
}

.login-shell {
    width: min(1120px, calc(100% - 40px));
    margin: 34px auto;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    align-items: stretch;
}

.hero-panel,
.login-panel {
    border-radius: 32px;
    box-shadow: var(--shadow);
}

.hero-panel {
    background:
        linear-gradient(140deg, rgba(16, 36, 47, 0.92), rgba(7, 92, 84, 0.84)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
    color: #f3f7f6;
    padding: 34px;
    display: grid;
    align-content: space-between;
    min-height: 640px;
}

.hero-panel h1 {
    font-size: clamp(40px, 5vw, 62px);
    margin: 0 0 16px;
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-panel p {
    color: rgba(243, 247, 246, 0.84);
    line-height: 1.7;
    max-width: 560px;
}

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

.hero-card {
    border-radius: 20px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.login-panel {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    padding: 32px;
}

@media (max-width: 1180px) {
    .page-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .subcategory-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 840px) {
    .dashboard-tiles,
    .catalog-tiles,
    .catalog-summary,
    .subcategory-tiles,
    .grid--2,
    .grid--3,
    .grid--4,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .field--span-2 {
        grid-column: span 1;
    }

    .page-shell {
        width: min(100% - 24px, 1440px);
        margin: 12px auto 24px;
        gap: 14px;
    }

    .topbar,
    .card,
    .login-panel,
    .hero-panel,
    .sidebar {
        border-radius: 22px;
        padding: 18px;
    }
}
