:root {
    --color-primary: #009b4d;
    --color-primary-dark: #007d3e;
    --color-primary-light: #eaf8f0;
    --color-primary-soft: #f4fbf7;

    --color-success: #168a4a;
    --color-warning: #d88b1f;
    --color-danger: #c53030;

    --color-text: #17212b;
    --color-text-muted: #66717d;
    --color-text-soft: #8a949e;

    --color-background: #f5f7f6;
    --color-surface: #ffffff;
    --color-surface-muted: #f8faf9;
    --color-border: #dfe5e1;
    --color-border-strong: #cbd5cf;

    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 16px;

    --shadow-small: 0 4px 14px rgba(20, 35, 27, 0.06);
    --shadow-medium: 0 10px 30px rgba(20, 35, 27, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: var(--color-background);
    color: var(--color-text);
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
}

a {
    color: inherit;
}

.site-header {
    background:
        linear-gradient(
            135deg,
            var(--color-primary-dark),
            var(--color-primary)
        );
    color: #fff;
    box-shadow: 0 4px 18px rgba(0, 80, 40, 0.18);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    max-width: 1380px;
    min-height: 76px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

.site-logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    font-weight: 800;
}

.site-logo__text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.site-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-navigation__link {
    padding: 10px 13px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.site-navigation__logout {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

.site-navigation__link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.configurator-page {
    min-height: calc(100vh - 76px);
    padding: 34px 20px 50px;
}

.configurator-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

.configurator-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.configurator-header__content {
    min-width: 0;
}

.configurator-header__back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: var(--color-primary-dark);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.configurator-header__back:hover {
    text-decoration: underline;
}

.configurator-header__eyebrow {
    margin: 0 0 7px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.configurator-header__title {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.configurator-header__description {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--color-text-muted);
    font-size: 16px;
    line-height: 1.65;
}

.configurator-header__status {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid #cfe7d9;
    border-radius: 999px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.configurator-progress {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.configurator-progress__item {
    position: relative;
    min-height: 78px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: var(--color-surface);
    box-shadow: var(--shadow-small);
    overflow: hidden;
}

.configurator-progress__item::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -30px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 155, 77, 0.04);
}

.configurator-progress__item--active {
    border-color: var(--color-primary);
    background:
        linear-gradient(
            135deg,
            var(--color-primary-light),
            #ffffff
        );
}

.configurator-progress__item--completed {
    border-color: #b9dec9;
    background: #f1faf5;
}

.configurator-progress__number {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    margin-bottom: 9px;
    border-radius: 50%;
    background: #eef1ef;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 800;
}

.configurator-progress__item--active .configurator-progress__number {
    background: var(--color-primary);
    color: #fff;
}

.configurator-progress__item--completed .configurator-progress__number {
    background: var(--color-success);
    color: #fff;
}

.configurator-progress__label {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.configurator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.configurator-main,
.configurator-summary {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    background: var(--color-surface);
    box-shadow: var(--shadow-medium);
}

.configurator-main {
    overflow: hidden;
}

.configurator-main__header {
    padding: 26px 30px 22px;
    border-bottom: 1px solid var(--color-border);
    background:
        linear-gradient(
            180deg,
            var(--color-primary-soft),
            #ffffff
        );
}

.configurator-main__step {
    margin: 0 0 8px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.configurator-main__title {
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.configurator-main__description {
    margin: 10px 0 0;
    color: var(--color-text-muted);
    line-height: 1.65;
}

.configurator-main__content {
    padding: 30px;
}

.configurator-main__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 30px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-muted);
}

.configurator-summary {
    position: sticky;
    top: 20px;
    overflow: hidden;
}

.configurator-summary__header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--color-border);
    background:
        linear-gradient(
            180deg,
            #fbfdfc,
            #ffffff
        );
}

.configurator-summary__title {
    margin: 0;
    font-size: 20px;
}

.configurator-summary__description {
    margin: 6px 0 0;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.configurator-summary__content {
    padding: 10px 24px 24px;
}

.configurator-summary__row {
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.configurator-summary__row:last-child {
    border-bottom: 0;
}

.configurator-summary__label {
    display: block;
    margin-bottom: 5px;
    color: var(--color-text-muted);
    font-size: 13px;
}

.configurator-summary__value {
    display: block;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.configurator-summary__code {
    display: inline-flex;
    color: var(--color-danger);
    font-size: 14px;
}

.configurator-summary__value--empty {
    color: var(--color-text-soft);
    font-weight: 500;
}

.form-section {
    margin-bottom: 38px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section__header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.form-section__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 5px 14px rgba(0, 155, 77, 0.2);
}

.form-section__title {
    margin: 2px 0 5px;
    font-size: 20px;
    letter-spacing: -0.01em;
}

.form-section__description {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.55;
}

.form-group {
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 800;
}

.form-help {
    margin: 7px 0 0;
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.form-error {
    margin: 7px 0 0;
    color: var(--color-danger);
    font-size: 13px;
    font-weight: 800;
}

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-small);
    background: #fff;
    color: var(--color-text);
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

textarea.form-control {
    min-height: 130px;
    resize: vertical;
}

.form-control:hover {
    border-color: #aebbb3;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(0, 155, 77, 0.11);
}

.form-control--invalid {
    border-color: var(--color-danger);
}

.form-control--invalid:focus {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 4px rgba(197, 48, 48, 0.11);
}

.selection-tree-fields,
.dimension-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.selection-tree-level {
    margin-bottom: 0;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.option-card {
    display: block;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: #fff;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.option-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 9px 22px rgba(20, 35, 27, 0.08);
}

.option-card--radio {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.option-card--radio input {
    margin-top: 4px;
    accent-color: var(--color-primary);
}

.option-card--radio:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    box-shadow: 0 0 0 2px rgba(0, 155, 77, 0.08);
}

.option-card--disabled {
    position: relative;
    cursor: not-allowed;
    opacity: 0.55;
}

.option-card--disabled:hover {
    transform: none;
    border-color: var(--color-border);
    box-shadow: none;
}

.option-card__badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf1ee;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.option-card__title {
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
}

.option-card__description {
    display: block;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.placeholder-box {
    padding: 22px;
    border: 1px dashed #b8c6bd;
    border-radius: var(--radius-medium);
    background: #fafcfb;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.selection-complete {
    margin-top: 16px;
    padding: 13px 15px;
    border: 1px solid #b8dec8;
    border-radius: var(--radius-small);
    background: #f0faf4;
    color: var(--color-success);
    font-size: 14px;
    font-weight: 700;
}

.input-with-unit {
    display: flex;
}

.input-with-unit .form-control {
    border-radius: var(--radius-small) 0 0 var(--radius-small);
}

.input-with-unit__unit {
    display: flex;
    align-items: center;
    padding: 0 16px;
    border: 1px solid var(--color-border-strong);
    border-left: 0;
    border-radius: 0 var(--radius-small) var(--radius-small) 0;
    background: #f1f4f2;
    color: var(--color-text-muted);
    font-weight: 800;
}

.tray-selection {
    display: grid;
    gap: 20px;
}

.tray-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.tray-option-card {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    width: 100%;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: #fff;
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.tray-option-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 9px 22px rgba(20, 35, 27, 0.08);
}

.tray-option-card--selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    box-shadow: 0 0 0 2px rgba(0, 155, 77, 0.08);
}

.tray-option-card__name {
    font-size: 16px;
    font-weight: 800;
}

.tray-option-card__dimensions {
    color: var(--color-primary-dark);
    font-size: 18px;
    font-weight: 800;
}

.tray-option-card__meta {
    color: var(--color-text-muted);
    font-size: 13px;
}

.selected-side-height {
    padding: 13px 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
    font-size: 14px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    background:
        linear-gradient(
            135deg,
            var(--color-primary),
            var(--color-primary-dark)
        );
    color: #fff;
    box-shadow: 0 6px 15px rgba(0, 123, 61, 0.2);
}

.button--primary:hover {
    box-shadow: 0 8px 20px rgba(0, 123, 61, 0.25);
}

.button--secondary {
    border-color: var(--color-border-strong);
    background: #fff;
    color: var(--color-primary-dark);
}

.button--secondary:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.button--disabled {
    pointer-events: none;
    opacity: 0.45;
    box-shadow: none;
}

.site-footer {
    margin-top: 42px;
    padding: 22px 0 0;
    border-top: 1px solid var(--color-border);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--color-text-muted);
    font-size: 13px;
}

.site-footer__links {
    display: flex;
    gap: 18px;
}

.tile-selection-tree {
    display: grid;
    gap: 18px;
}

.site-footer__link {
    color: var(--color-text-muted);
    text-decoration: none;
}

.site-footer__link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.tile-selection-tree {
    display: grid;
    gap: 18px;
}

.tile-selection-level {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.tile-selection-level__header {
    padding: 15px 18px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-muted);
}

.tile-selection-level__title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
}

.selection-tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 18px;
}

.selection-tile {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: 155px;
    padding: 22px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text);
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.selection-tile:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 8px 22px rgba(20, 35, 27, 0.08);
}

.selection-tile--selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    box-shadow: 0 0 0 2px rgba(0, 155, 77, 0.1);
}

.selection-tile__title {
    display: block;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.4;
}

.selection-tile__description {
    display: block;
    max-width: 360px;
    margin-top: 8px;
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.selection-tile__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin-top: 16px;
    padding: 8px 16px;
    border-radius: 7px;
    background: var(--color-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.selection-tile--selected .selection-tile__action {
    background: var(--color-primary-dark);
}

.tile-selection-level--collapsed {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.selected-level-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 58px;
    padding: 13px 16px;
}

.selected-level-row__content {
    min-width: 0;
}

.selected-level-row__label {
    margin-right: 5px;
    color: var(--color-text);
    font-weight: 800;
}

.selected-level-row__value {
    color: var(--color-text-muted);
    font-weight: 500;
}

.selected-level-row__edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    background: #fff;
    color: var(--color-primary-dark);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.selected-level-row__edit:hover {
    background: var(--color-primary-light);
}

.selection-tile--disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.selection-tile--disabled:hover {
    transform: none;
    border-color: var(--color-border);
    box-shadow: none;
}

.selection-tile__badge {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #edf1ee;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.selection-tile__dimensions {
    display: block;
    margin-top: 8px;
    color: var(--color-primary-dark);
    font-size: 18px;
    font-weight: 800;
}

.tray-product-list {
    display: grid;
}

.tray-product-list__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 20px;
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 600;
}

.tray-product-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 150px 110px;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
    transition:
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.tray-product-row:last-child {
    border-bottom: 0;
}

.tray-product-row:hover {
    background: var(--color-primary-soft);
}

.tray-product-row__image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 76px;
    padding: 6px;
    border-radius: 8px;
    background: #f1f4f8;
    overflow: hidden;
}

.tray-product-row__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tray-product-row__content {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tray-product-row__name {
    color: var(--color-text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.tray-product-row__description {
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.tray-product-row__dimensions {
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.tray-product-row__price {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.tray-product-row__price-label {
    display: none;
    color: var(--color-text-soft);
    font-size: 11px;
    text-transform: uppercase;
}

.tray-product-row__price-value {
    color: var(--color-text-muted);
    font-size: 14px;
}

.tray-product-row__action {
    display: flex;
    justify-content: flex-end;
}

.tray-product-row__button {
    min-height: 40px;
    padding: 9px 16px;
}

.tray-product-row--selected {
    background: var(--color-primary-light);
    box-shadow: inset 4px 0 0 var(--color-primary);
}

.configurator-summary__detail {
    display: block;
    margin-top: 6px;
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 820px) {
    .tray-product-list__header {
        display: none;
    }

    .tray-product-row {
        grid-template-columns: 80px minmax(0, 1fr) auto;
    }

    .tray-product-row__image-wrap {
        width: 80px;
        height: 66px;
    }

    .tray-product-row__price {
        grid-column: 2;
        align-items: flex-start;
        text-align: left;
    }

    .tray-product-row__price-label {
        display: inline;
    }

    .tray-product-row__action {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

@media (max-width: 600px) {
    .tray-product-row {
        grid-template-columns: 70px minmax(0, 1fr);
        gap: 12px;
    }

    .tray-product-row__image-wrap {
        width: 70px;
        height: 60px;
    }

    .tray-product-row__price,
    .tray-product-row__action {
        grid-column: 1 / -1;
    }

    .tray-product-row__action {
        grid-row: auto;
    }

    .tray-product-row__button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .selected-level-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .selected-level-row__edit {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .selection-tile-grid {
        grid-template-columns: 1fr;
    }

    .selection-tile {
        min-height: 130px;
    }
}

@media (max-width: 1080px) {
    .configurator-layout {
        grid-template-columns: 1fr;
    }

    .configurator-summary {
        position: static;
    }

    .configurator-progress {
        display: flex;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .configurator-progress__item {
        flex: 0 0 185px;
    }
}

@media (max-width: 760px) {
    .site-header__inner {
        min-height: 68px;
    }

    .site-logo__text {
        font-size: 20px;
    }

    .site-navigation {
        display: none;
    }

    .configurator-page {
        padding: 24px 12px 38px;
    }

    .configurator-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .configurator-header__status {
        align-self: flex-start;
    }

    .selection-tree-fields,
    .dimension-grid,
    .option-grid,
    .tray-option-grid {
        grid-template-columns: 1fr;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .configurator-main__header,
    .configurator-main__content,
    .configurator-main__footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .configurator-main__footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .configurator-main__footer .button {
        width: 100%;
    }

    .configurator-summary__header,
    .configurator-summary__content {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* =========================================================
   Obecný obsah stránky
   ========================================================= */

.app-page {
    min-height: calc(100vh - 76px);
    padding: 34px 20px 50px;
}

.app-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.page-header__content {
    min-width: 0;
}

.page-header__eyebrow {
    margin: 0 0 7px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-header__title {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.page-header__description {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--color-text-muted);
    font-size: 16px;
    line-height: 1.65;
}

/* =========================================================
   Obecná karta
   ========================================================= */

.panel {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    background: var(--color-surface);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
}

.panel__header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--color-border);
    background:
        linear-gradient(
            180deg,
            var(--color-primary-soft),
            #ffffff
        );
}

.panel__title {
    margin: 0;
    font-size: 21px;
    letter-spacing: -0.02em;
}

.panel__description {
    margin: 7px 0 0;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.55;
}

.panel__content {
    padding: 24px;
}

/* =========================================================
   Přehled tras
   ========================================================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-stat {
    padding: 20px 22px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: var(--color-surface);
    box-shadow: var(--shadow-small);
}

.dashboard-stat--primary {
    border-color: #b9dec9;
    background: var(--color-primary-soft);
}

.dashboard-stat__label {
    display: block;
    margin-bottom: 7px;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 700;
}

.dashboard-stat__value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.dashboard-stat--primary .dashboard-stat__value {
    color: var(--color-primary-dark);
}

.routes-section {
    margin-top: 24px;
}

.routes-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.routes-section__title {
    margin: 0;
    font-size: 21px;
    letter-spacing: -0.02em;
}

.routes-section__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e9efeb;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 800;
}

.routes-list {
    display: grid;
    gap: 14px;
}

.route-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px 170px;
    align-items: center;
    gap: 24px;
    padding: 20px 22px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: var(--color-surface);
    box-shadow: var(--shadow-small);
    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.route-card:hover {
    transform: translateY(-2px);
    border-color: #bad8c6;
    box-shadow: var(--shadow-medium);
}

.route-card__name {
    margin: 0 0 7px;
    font-size: 18px;
    line-height: 1.35;
}

.route-card__description {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.route-card__meta {
    display: grid;
    gap: 8px;
}

.route-card__meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--color-text-muted);
    font-size: 12px;
}

.route-card__step {
    font-weight: 800;
}

.route-card__progress {
    height: 7px;
    border-radius: 999px;
    background: #e8edea;
    overflow: hidden;
}

.route-card__progress-value {
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            var(--color-primary),
            var(--color-primary-dark)
        );
}

.route-card__action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
}

.route-card__action .button {
    min-width: 110px;
}

.route-card__action > .button {
    min-width: auto;
    min-height: 40px;
    padding: 8px 16px;
}

.route-actions-menu__toggle {
    width: 40px;
    height: 40px;
}

.empty-state {
    padding: 44px 24px;
    border: 1px dashed #b8c6bd;
    border-radius: var(--radius-medium);
    background: #fafcfb;
    text-align: center;
}

.empty-state__title {
    margin: 0 0 7px;
    font-size: 18px;
}

.empty-state__text {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .route-card {
        grid-template-columns: 1fr 180px;
    }

    .route-card__action {
        grid-column: 1 / -1;
    }

    .route-card__action .button {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .app-page {
        padding: 24px 12px 38px;
    }

    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .page-header form,
    .page-header .button {
        width: 100%;
    }

    .route-card {
        grid-template-columns: 1fr;
    }

    .route-card__action {
        grid-column: auto;
    }
}

/* =========================================================
   LOGIN
   ========================================================= */

.login-body {
    min-height: 100vh;
    margin: 0;

    background: #f5f7f6;

    color: #141b24;
}


/* ---------------------------------------------------------
   TOP BAR
   --------------------------------------------------------- */

.login-topbar {
    height: 70px;

    background: linear-gradient(
        90deg,
        #008d45 0%,
        #00a653 100%
    );

    box-shadow: 0 2px 12px rgba(0, 80, 40, .10);
}


/* ---------------------------------------------------------
   PAGE
   --------------------------------------------------------- */

.login-page {
    width: min(1180px, calc(100% - 40px));

    margin: 0 auto;
    padding: 34px 0 22px;
}


/* ---------------------------------------------------------
   MAIN SHELL
   --------------------------------------------------------- */

.login-shell {
    display: grid;

    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(420px, .85fr);

    min-height: 700px;

    overflow: hidden;

    border: 1px solid #dde5e0;
    border-radius: 16px;

    background: #fff;

    box-shadow:
        0 18px 45px rgba(30, 50, 40, .07);
}


/* =========================================================
   LEFT SIDE
   ========================================================= */

.login-intro {
    position: relative;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    padding: 0 70px 55px;

    background:
        radial-gradient(
            circle at 50% 15%,
            rgba(255, 255, 255, .92),
            rgba(242, 251, 246, .88) 40%,
            rgba(245, 251, 247, 1) 72%
        );
}


/* ---------------------------------------------------------
   TECHNICAL DRAWING
   --------------------------------------------------------- */

.login-intro__drawing {
    height: 335px;

    margin:
        0 -70px
        -12px;

    overflow: hidden;

    color: rgba(0, 153, 75, .18);
}

.login-intro__drawing svg {
    width: 100%;
    height: 100%;

    transform:
        translateX(-8%)
        scale(1.12);

    transform-origin: center top;
}


/* ---------------------------------------------------------
   INTRO CONTENT
   --------------------------------------------------------- */

.login-intro__content {
    position: relative;

    z-index: 2;

    max-width: 470px;
}

.login-eyebrow {
    margin-bottom: 13px;

    color: #00964a;

    font-size: 12px;
    font-weight: 900;
    letter-spacing: .085em;

    text-transform: uppercase;
}

.login-intro h1 {
    margin: 0;

    color: #111923;

    font-size: 34px;
    font-weight: 850;
    letter-spacing: -.035em;
    line-height: 1.12;
}

.login-intro__lead {
    max-width: 410px;

    margin: 15px 0 0;

    color: #65717e;

    font-size: 15px;
    line-height: 1.75;
}


/* ---------------------------------------------------------
   FEATURES
   --------------------------------------------------------- */

.login-features {
    display: grid;

    gap: 24px;

    margin-top: 34px;
}

.login-feature {
    display: grid;

    grid-template-columns: 48px minmax(0, 1fr);

    align-items: start;

    gap: 16px;
}

.login-feature__icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: #dff4e7;

    color: #00a350;
}

.login-feature__icon svg {
    width: 22px;
    height: 22px;
}

.login-feature strong {
    display: block;

    margin: 3px 0 4px;

    color: #131b24;

    font-size: 14px;
    font-weight: 800;
}

.login-feature p {
    margin: 0;

    color: #687581;

    font-size: 13px;
    line-height: 1.55;
}


/* =========================================================
   RIGHT PANEL
   ========================================================= */

.login-panel {
    display: flex;

    align-items: center;
    justify-content: center;

    padding: 48px 54px;

    background:
        linear-gradient(
            135deg,
            rgba(250, 252, 251, .85),
            rgba(243, 248, 245, .85)
        );
}


/* ---------------------------------------------------------
   CARD
   --------------------------------------------------------- */

.login-card {
    width: 100%;
    max-width: 450px;

    padding: 52px 48px 40px;

    border: 1px solid #e7ece9;
    border-radius: 18px;

    background: #fff;

    box-shadow:
        0 18px 45px rgba(24, 45, 35, .11);
}

.login-card__header {
    margin-bottom: 34px;

    text-align: center;
}

.login-card__header h2 {
    margin: 0;

    color: #17202a;

    font-size: 31px;
    font-weight: 850;
    letter-spacing: -.025em;
}

.login-card__header p {
    max-width: 330px;

    margin:
        12px auto
        0;

    color: #697582;

    font-size: 14px;
    line-height: 1.65;
}


/* =========================================================
   FORM
   ========================================================= */

.login-form {
    display: grid;

    gap: 22px;
}

.login-field label {
    display: block;

    margin-bottom: 8px;

    color: #17202a;

    font-size: 13px;
    font-weight: 800;
}


/* ---------------------------------------------------------
   INPUT
   --------------------------------------------------------- */

.login-input {
    display: flex;

    align-items: center;

    min-height: 52px;

    border: 1px solid #d5ddd8;
    border-radius: 9px;

    background: #fff;

    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.login-input:focus-within {
    border-color: #00a350;

    box-shadow:
        0 0 0 3px rgba(0, 163, 80, .10);
}

.login-input__icon {
    display: flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 48px;

    color: #8a969f;
}

.login-input:focus-within
.login-input__icon {
    color: #00a350;
}

.login-input__icon svg {
    width: 20px;
    height: 20px;
}

.login-input input {
    width: 100%;
    min-width: 0;

    padding:
        14px 8px
        14px 0;

    border: 0;
    outline: 0;

    background: transparent;

    color: #17202a;

    font: inherit;
    font-size: 14px;
}

.login-input input::placeholder {
    color: #9aa4ac;
}

.login-input--error {
    border-color: #d94c4c;
}

.login-field__error {
    margin:
        7px 0
        0;

    color: #c83d3d;

    font-size: 12px;
}


/* ---------------------------------------------------------
   PASSWORD TOGGLE
   --------------------------------------------------------- */

.login-password-toggle {
    display: flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 48px;

    height: 50px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #87939d;

    cursor: pointer;
}

.login-password-toggle:hover,
.login-password-toggle--active {
    color: #00a350;
}

.login-password-toggle svg {
    width: 19px;
    height: 19px;
}


/* ---------------------------------------------------------
   OPTIONS
   --------------------------------------------------------- */

.login-form__options {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 18px;

    margin-top: -2px;

    font-size: 12px;
}

.login-checkbox {
    display: inline-flex !important;

    align-items: center;

    gap: 9px;

    margin: 0 !important;

    color: #59656f !important;

    font-weight: 500 !important;

    cursor: pointer;
}

.login-checkbox input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}

.login-checkbox__box {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    border: 1px solid #cbd5cf;
    border-radius: 4px;

    background: #fff;

    color: transparent;

    transition:
        background .15s ease,
        border-color .15s ease;
}

.login-checkbox__box svg {
    width: 11px;
    height: 9px;
}

.login-checkbox
input:checked
+ .login-checkbox__box {
    border-color: #00a350;

    background: #00a350;

    color: #fff;
}

.login-future-link {
    color: #00a350;

    font-weight: 650;
}


/* ---------------------------------------------------------
   PRIMARY BUTTON
   --------------------------------------------------------- */

.login-submit {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 13px;

    width: 100%;
    min-height: 54px;

    margin-top: 3px;

    padding: 0 22px;

    border: 0;
    border-radius: 9px;

    background:
        linear-gradient(
            90deg,
            #009348,
            #00a954
        );

    box-shadow:
        0 7px 18px rgba(0, 150, 73, .18);

    color: #fff;

    font: inherit;
    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    transition:
        transform .12s ease,
        box-shadow .12s ease,
        filter .12s ease;
}

.login-submit:hover {
    transform: translateY(-1px);

    box-shadow:
        0 9px 22px rgba(0, 150, 73, .24);

    filter: brightness(1.025);
}

.login-submit:active {
    transform: translateY(0);
}

.login-submit svg {
    width: 18px;
    height: 18px;
}


/* =========================================================
   DIVIDER
   ========================================================= */

.login-divider {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 31px 0 25px;

    color: #87919a;

    font-size: 12px;
}

.login-divider::before {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    top: 50%;

    height: 1px;

    background: #e3e8e5;
}

.login-divider span {
    position: relative;

    z-index: 1;

    padding: 0 14px;

    background: #fff;
}


/* =========================================================
   REGISTER BUTTON
   ========================================================= */

.login-register {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 11px;

    width: 100%;
    min-height: 52px;

    padding: 0 20px;

    border: 1px solid #b9dcca;
    border-radius: 9px;

    background: #f8fcfa;

    color: #00984b;

    font: inherit;
    font-size: 14px;
    font-weight: 800;

    opacity: .65;
}

.login-register svg {
    width: 19px;
    height: 19px;
}

.login-register-note {
    margin:
        10px 0
        0;

    color: #98a19a;

    font-size: 11px;

    text-align: center;
}


/* =========================================================
   FOOTER
   ========================================================= */

.login-footer {
    padding: 24px 0 5px;

    color: #84908a;

    font-size: 12px;

    text-align: center;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {

    .login-shell {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(390px, .9fr);
    }

    .login-intro {
        padding:
            0 42px
            45px;
    }

    .login-intro__drawing {
        margin:
            0 -42px
            -12px;
    }

    .login-panel {
        padding: 38px;
    }

    .login-card {
        padding:
            45px 36px
            36px;
    }

}


@media (max-width: 850px) {

    .login-topbar {
        height: 54px;
    }

    .login-page {
        width: min(
            620px,
            calc(100% - 28px)
        );

        padding-top: 24px;
    }

    .login-shell {
        display: block;
    }

    .login-intro {
        display: none;
    }

    .login-panel {
        padding: 30px;
    }

    .login-card {
        max-width: none;
    }

}


@media (max-width: 520px) {

    .login-page {
        width: calc(100% - 20px);
    }

    .login-panel {
        padding: 16px;

        background: #f7f9f8;
    }

    .login-card {
        padding:
            35px 24px
            30px;

        border-radius: 14px;
    }

    .login-card__header h2 {
        font-size: 27px;
    }

    .login-form__options {
        align-items: flex-start;
        flex-direction: column;
    }

}

.login-alert {
    margin-bottom: 20px;
    padding: 13px 15px;

    border-radius: 8px;

    font-size: 13px;
    line-height: 1.5;
}

.login-alert--success {
    border: 1px solid #b9dfc7;

    background: #edf8f1;

    color: #267443;
}

/* =========================================
   PROJECTS
   ========================================= */

.projects-list {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

.project-card {
    overflow: hidden;
}

.project-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.project-card__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.project-card__summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);

    background: var(--color-surface-muted);
}

.project-card__summary > div {
    padding: 14px 18px;

    border-right: 1px solid var(--color-border);
}

.project-card__summary > div:last-child {
    border-right: 0;
}

.project-card__summary-label {
    display: block;

    margin-bottom: 4px;

    color: var(--color-text-muted);

    font-size: 11px;
}

.project-card__summary strong {
    color: var(--color-text);

    font-size: 14px;
}

.empty-state--small {
    padding: 28px;
}

@media (max-width: 850px) {

    .project-card__header {
        flex-direction: column;
    }

    .project-card__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-card__summary > div:nth-child(2) {
        border-right: 0;
    }

}

@media (max-width: 520px) {

    .project-card__actions {
        width: 100%;
    }

    .project-card__actions form,
    .project-card__actions .button {
        width: 100%;
    }

    .project-card__summary {
        grid-template-columns: 1fr;
    }

    .project-card__summary > div {
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .project-card__summary > div:last-child {
        border-bottom: 0;
    }

}

.project-form-panel {
    max-width: 760px;
    margin: 0 auto;
}

.project-form {
    display: grid;
    gap: 24px;
}

.project-form__textarea {
    min-height: 130px;
    resize: vertical;
}

.project-form__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;

    padding-top: 8px;
}

@media (max-width: 600px) {
    .project-form__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .project-form__actions .button {
        width: 100%;
    }
}

.project-form__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.project-form__actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.button--danger {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

.button--danger:hover {
    border-color: #b91c1c;
    background: #b91c1c;
}

.route-card__action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.route-card__action form {
    margin: 0;
}

.route-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 36px;
    padding: 0 11px;

    border: 1px solid var(--color-border);
    border-radius: 7px;

    background: #fff;
    color: var(--color-text-muted);

    font: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.route-action-button:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.route-action-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.route-action-button--danger {
    border-color: #f1c7c7;
    color: #c83d3d;
}

.route-action-button--danger:hover {
    border-color: #dc2626;
    background: #fff5f5;
    color: #b91c1c;
}

/* =========================================
   ROUTE ACTIONS
   ========================================= */

.route-card__action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}


/* =========================================
   ACTION MENU
   ========================================= */

.route-actions-menu {
    position: relative;
}

.route-actions-menu__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;

    width: 38px;
    height: 38px;

    padding: 0;

    border: 1px solid var(--color-border);
    border-radius: 8px;

    background: #fff;

    cursor: pointer;

    transition:
        border-color .15s ease,
        background .15s ease;
}

.route-actions-menu__toggle:hover {
    border-color: var(--color-primary);
    background: var(--color-surface-muted);
}

.route-actions-menu__toggle span {
    display: block;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: var(--color-text-muted);
}

.route-actions-menu__toggle:hover span {
    background: var(--color-primary);
}


/* =========================================
   DROPDOWN
   ========================================= */

.route-actions-menu__dropdown {
    position: absolute;
    z-index: 50;

    top: calc(100% + 8px);
    right: 0;

    width: 210px;

    padding: 6px;

    border: 1px solid var(--color-border);
    border-radius: 10px;

    background: #fff;

    box-shadow:
        0 12px 30px rgba(20, 30, 25, .12);
}

.route-actions-menu__dropdown form {
    margin: 0;
}


/* =========================================
   ITEMS
   ========================================= */

.route-actions-menu__item {
    display: flex;
    align-items: center;

    width: 100%;

    padding: 10px 12px;

    border: 0;
    border-radius: 7px;

    background: transparent;

    color: var(--color-text);

    font: inherit;
    font-size: 13px;
    font-weight: 600;

    text-align: left;

    cursor: pointer;
}

.route-actions-menu__item:hover:not(:disabled) {
    background: var(--color-surface-muted);
}

.route-actions-menu__item:disabled {
    color: var(--color-text-muted);

    opacity: .5;

    cursor: not-allowed;
}

.route-actions-menu__separator {
    height: 1px;

    margin: 5px 6px;

    background: var(--color-border);
}

.route-actions-menu__item--danger {
    color: #c83d3d;
}

.route-actions-menu__item--danger:hover {
    background: #fff3f3 !important;

    color: #b42323;
}

/* =========================================================
   ADMINISTRATION
   ========================================================= */

.admin-body {
    min-height: 100vh;
    background: #f4f6f5;
}

.admin-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh;
}


/* ---------------------------------------------------------
   SIDEBAR
   --------------------------------------------------------- */

.admin-sidebar {
    position: fixed;
    z-index: 100;
    top: 0;
    bottom: 0;
    left: 0;

    display: flex;
    flex-direction: column;

    width: 250px;

    background:
        linear-gradient(
            180deg,
            #17231d 0%,
            #111a16 100%
        );

    color: #fff;
}

.admin-sidebar__header {
    display: flex;
    align-items: center;

    min-height: 76px;
    padding: 0 22px;

    border-bottom: 1px solid rgba(255, 255, 255, .08);
}


/* ---------------------------------------------------------
   LOGO
   --------------------------------------------------------- */

.admin-logo {
    display: flex;
    align-items: center;
    gap: 12px;

    color: #fff;
    text-decoration: none;
}

.admin-logo__mark {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            var(--color-primary),
            var(--color-primary-dark)
        );

    font-size: 17px;
    font-weight: 900;
}

.admin-logo__content {
    display: flex;
    flex-direction: column;
}

.admin-logo__content strong {
    font-size: 15px;
    line-height: 1.2;
}

.admin-logo__content small {
    margin-top: 3px;

    color: rgba(255, 255, 255, .5);

    font-size: 11px;
    font-weight: 600;
}


/* ---------------------------------------------------------
   NAVIGATION
   --------------------------------------------------------- */

.admin-navigation {
    flex: 1;

    padding: 18px 12px;
}

.admin-navigation__section {
    margin: 22px 11px 8px;

    color: rgba(255, 255, 255, .38);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;

    text-transform: uppercase;
}

.admin-navigation__section:first-child {
    margin-top: 4px;
}

.admin-navigation__link {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 43px;
    padding: 0 13px;

    border-radius: 8px;

    color: rgba(255, 255, 255, .72);

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    transition:
        background .15s ease,
        color .15s ease;
}

.admin-navigation__link:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.admin-navigation__link.is-active {
    background: rgba(0, 155, 77, .17);
    color: #72dfa5;
}

.admin-navigation__link.is-active::before {
    content: "";

    position: absolute;

    top: 10px;
    bottom: 10px;
    left: 0;

    width: 3px;

    border-radius: 0 3px 3px 0;

    background: var(--color-primary);
}


/* ---------------------------------------------------------
   SIDEBAR USER
   --------------------------------------------------------- */

.admin-sidebar__footer {
    padding: 18px 22px;

    border-top: 1px solid rgba(255, 255, 255, .08);
}

.admin-sidebar__user-label {
    display: block;

    margin-bottom: 4px;

    color: rgba(255, 255, 255, .4);

    font-size: 10px;
}

.admin-sidebar__user-name {
    display: block;

    overflow: hidden;

    color: rgba(255, 255, 255, .82);

    font-size: 12px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ---------------------------------------------------------
   MAIN
   --------------------------------------------------------- */

.admin-main {
    grid-column: 2;

    min-width: 0;
    min-height: 100vh;
}


/* ---------------------------------------------------------
   TOP BAR
   --------------------------------------------------------- */

.admin-topbar {
    position: sticky;
    z-index: 50;
    top: 0;

    display: flex;
    align-items: center;

    min-height: 64px;
    padding: 0 30px;

    border-bottom: 1px solid var(--color-border);

    background: rgba(255, 255, 255, .94);

    backdrop-filter: blur(10px);
}

.admin-topbar__spacer {
    flex: 1;
}

.admin-logout {
    padding: 9px 13px;

    border-radius: 7px;

    background: transparent;

    color: var(--color-text-muted);

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.admin-logout:hover {
    background: #f1f4f2;
    color: var(--color-danger);
}


/* ---------------------------------------------------------
   CONTENT
   --------------------------------------------------------- */

.admin-content {
    width: 100%;
    max-width: 1450px;

    margin: 0 auto;
    padding: 34px 34px 50px;
}


/* ---------------------------------------------------------
   ALERTS
   --------------------------------------------------------- */

.admin-alert {
    margin-bottom: 24px;
    padding: 13px 16px;

    border: 1px solid;
    border-radius: var(--radius-small);

    font-size: 13px;
    font-weight: 600;
}

.admin-alert--success {
    border-color: #b9dfc7;
    background: #edf8f1;
    color: #267443;
}

.admin-alert--error {
    border-color: #efcaca;
    background: #fff3f3;
    color: #b42323;
}


/* ---------------------------------------------------------
   MOBILE MENU
   --------------------------------------------------------- */

.admin-menu-toggle {
    display: none;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;

    width: 40px;
    height: 40px;

    border-radius: 8px;

    background: transparent;

    cursor: pointer;
}

.admin-menu-toggle:hover {
    background: var(--color-surface-muted);
}

.admin-menu-toggle span {
    display: block;

    width: 19px;
    height: 2px;

    border-radius: 2px;

    background: var(--color-text);
}

.admin-overlay {
    display: none;
}


/* =========================================================
   ADMIN RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .admin-layout {
        display: block;
    }

    .admin-sidebar {
        transform: translateX(-100%);

        box-shadow: 10px 0 35px rgba(0, 0, 0, .15);

        transition: transform .2s ease;
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }

    .admin-main {
        min-height: 100vh;
    }

    .admin-menu-toggle {
        display: flex;
    }

    .admin-overlay {
        position: fixed;
        z-index: 90;
        inset: 0;

        background: rgba(10, 18, 14, .4);
    }

    .admin-overlay.is-open {
        display: block;
    }

    .admin-content {
        padding: 28px 20px 40px;
    }

}

@media (max-width: 600px) {

    .admin-topbar {
        min-height: 58px;
        padding: 0 14px;
    }

    .admin-content {
        padding: 22px 12px 35px;
    }

}

/* =========================================================
   ADMIN TABLE
   ========================================================= */

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    padding: 14px 20px;

    border-bottom: 1px solid var(--color-border);

    background: var(--color-surface-muted);

    color: var(--color-text-muted);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;

    text-align: left;
    text-transform: uppercase;

    white-space: nowrap;
}

.admin-table td {
    padding: 16px 20px;

    border-bottom: 1px solid var(--color-border);

    color: var(--color-text);

    font-size: 13px;

    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr {
    transition: background .15s ease;
}

.admin-table tbody tr:hover {
    background: var(--color-primary-soft);
}

.admin-table__actions-heading {
    text-align: right !important;
}

.admin-table__muted {
    color: var(--color-text-muted) !important;
}

.admin-table__email {
    color: var(--color-text-muted);

    text-decoration: none;
}

.admin-table__email:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}


/* ---------------------------------------------------------
   USER CELL
   --------------------------------------------------------- */

.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;

    min-width: 180px;
}

.admin-user-cell__avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;

    width: 38px;
    height: 38px;

    border-radius: 10px;

    background: var(--color-primary-light);

    color: var(--color-primary-dark);

    font-size: 14px;
    font-weight: 900;
}

.admin-user-cell__content {
    display: flex;
    flex-direction: column;
    gap: 3px;

    min-width: 0;
}

.admin-user-cell__content strong {
    overflow: hidden;

    font-size: 13px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-cell__content span {
    color: var(--color-text-muted);

    font-size: 11px;
}


/* ---------------------------------------------------------
   STATUS
   --------------------------------------------------------- */

.admin-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    min-height: 28px;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;
}

.admin-status__dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;
}

.admin-status--active {
    background: #edf8f1;
    color: var(--color-success);
}

.admin-status--active .admin-status__dot {
    background: var(--color-success);
}

.admin-status--inactive {
    background: #fff1f1;
    color: var(--color-danger);
}

.admin-status--inactive .admin-status__dot {
    background: var(--color-danger);
}


/* ---------------------------------------------------------
   ACTIONS
   --------------------------------------------------------- */

.admin-table__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;

    white-space: nowrap;
}

.admin-table__actions form {
    margin: 0;
}

.admin-table__button {
    min-height: 36px;
    padding: 7px 12px;

    font-size: 12px;
}

.admin-table__action-button {
    min-height: 36px;

    padding: 7px 12px;

    border: 1px solid var(--color-border);
    border-radius: 7px;

    background: #fff;

    font: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition:
        border-color .15s ease,
        background .15s ease,
        color .15s ease;
}

.admin-table__action-button--danger {
    border-color: #efcaca;
    color: var(--color-danger);
}

.admin-table__action-button--danger:hover {
    border-color: var(--color-danger);
    background: #fff3f3;
}

.admin-table__action-button--success {
    border-color: #b9dfc7;
    color: var(--color-success);
}

.admin-table__action-button--success:hover {
    border-color: var(--color-success);
    background: #edf8f1;
}


/* =========================================================
   ADMIN TABLE RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {

    .admin-table {
        min-width: 760px;
    }

}

/* =========================================================
   ADMIN FORMS
   ========================================================= */

.admin-form-panel {
    max-width: 820px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 20px;
}

.admin-form-grid__full {
    grid-column: 1 / -1;
}

.admin-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-top: 30px;
    padding-top: 22px;

    border-top: 1px solid var(--color-border);
}


/* ---------------------------------------------------------
   CHECKBOX
   --------------------------------------------------------- */

.admin-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    padding: 15px 16px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);

    background: var(--color-surface-muted);

    cursor: pointer;

    transition:
        border-color .15s ease,
        background .15s ease;
}

.admin-checkbox:hover {
    border-color: #b7c6bd;
}

.admin-checkbox input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
    pointer-events: none;
}

.admin-checkbox__box {
    position: relative;

    flex: 0 0 20px;

    width: 20px;
    height: 20px;
    margin-top: 1px;

    border: 1px solid var(--color-border-strong);
    border-radius: 5px;

    background: #fff;
}

.admin-checkbox input:checked + .admin-checkbox__box {
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.admin-checkbox input:checked + .admin-checkbox__box::after {
    content: "";

    position: absolute;

    top: 3px;
    left: 6px;

    width: 5px;
    height: 9px;

    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;

    transform: rotate(45deg);
}

.admin-checkbox__content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.admin-checkbox__content strong {
    font-size: 13px;
}

.admin-checkbox__content small {
    color: var(--color-text-muted);

    font-size: 12px;
    line-height: 1.45;
}


/* =========================================================
   ADMIN FORM RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-form-grid__full {
        grid-column: auto;
    }

    .admin-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .admin-form-actions .button {
        width: 100%;
    }

}