/* Zapinho SaaS theme - visual language based on the supplied HTML reference. */
:root {
    --primitive-brand-dark: #063b2f;
    --primitive-brand-accent: #f05a41;
    --primitive-brand-light: #f3f4f6;
    --primitive-brand-gray: #8c98a4;
    --primitive-white: #ffffff;
    --primitive-ink: #17221f;
    --primitive-green: #15956a;
    --primitive-line: #e5e9e7;

    --brand-dark: var(--primitive-brand-dark);
    --brand-accent: var(--primitive-brand-accent);
    --bg: var(--primitive-brand-light);
    --deep: #f8faf9;
    --low: #eef2f0;
    --surface: var(--primitive-white);
    --high: #f0f3f2;
    --highest: #e2e8e5;
    --text: var(--primitive-ink);
    --muted: #6f7d79;
    --line: var(--primitive-line);
    --blue: var(--brand-dark);
    --blue-soft: #4f7168;
    --green: var(--primitive-green);
    --green-deep: #08754f;
    --gold: #bd7b22;
    --red: #c94f40;
    --coral-soft: #fff0ec;
    --shadow: 0 12px 36px rgba(6, 59, 47, .08);
    --shadow-lg: 0 24px 60px rgba(6, 59, 47, .14);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --sidebar-icon-size: clamp(17px, 1.15vw, 19px);
    --sidebar-chevron-size: 15px;
}

/* Telegram product catalog UX */
.products-page {
    max-width: 1440px;
    margin: 0 auto;
}

.products-header {
    align-items: flex-end;
    margin-bottom: 24px;
}

.products-header-copy {
    max-width: 760px;
}

.products-header-copy h1 {
    margin: 12px 0 8px;
}

.products-header-copy p {
    max-width: 650px;
    margin: 0;
    font-size: 15px;
}

.products-header-actions {
    flex-shrink: 0;
}

.products-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 34px;
}

.products-kpi {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 116px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.products-kpi-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 14px;
    background: var(--coral-soft);
    color: var(--brand-accent);
}

.products-kpi-icon.is-success {
    background: rgba(22, 163, 74, .12);
    color: #15803d;
}

.products-kpi-icon.is-warning {
    background: rgba(217, 119, 6, .14);
    color: #b45309;
}

.products-kpi-icon.is-blue {
    background: rgba(37, 99, 235, .11);
    color: #2563eb;
}

.products-kpi-icon svg {
    width: 21px;
    height: 21px;
}

.products-kpi div {
    min-width: 0;
}

.products-kpi small,
.products-kpi span {
    display: block;
}

.products-kpi small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.products-kpi strong {
    display: block;
    margin: 2px 0 1px;
    color: var(--brand-dark);
    font-size: 27px;
    line-height: 1;
}

.products-kpi span:last-child {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.products-editor-section,
.products-catalog-section {
    margin-bottom: 34px;
}

.products-section-heading-large {
    margin-bottom: 16px;
}

.products-section-heading-large h2 {
    margin-top: 8px;
    font-size: 24px;
}

.products-section-heading-large p,
.products-section-heading > div > p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.section-mark {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border: 1px solid rgba(240, 90, 65, .24);
    border-radius: 14px;
    background: var(--coral-soft);
    color: var(--brand-accent);
}

.section-mark svg {
    width: 20px;
    height: 20px;
}

.products-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 20px;
    align-items: stretch;
}

.products-form-card {
    padding: 28px;
}

.products-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .72fr);
    gap: 24px;
}

.products-form-main {
    display: grid;
    gap: 17px;
}

.products-form-card .field {
    margin: 0;
}

.products-form-card textarea {
    min-height: 124px;
    resize: vertical;
}

.field-optional {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.field-required {
    color: var(--brand-accent);
    font-size: 11px;
    font-weight: 800;
}

.price-input {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    transition: border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.price-input:focus-within {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(240, 90, 65, .12);
}

.price-input > span {
    padding-left: 14px;
    color: var(--muted);
    font-weight: 800;
}

.price-input input {
    min-width: 0;
    border: 0;
    box-shadow: none;
}

.price-input input:focus {
    box-shadow: none;
}

.products-media-panel {
    min-width: 0;
}

.media-upload-box {
    display: flex;
    min-height: 185px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 20px;
    border: 1px dashed rgba(6, 59, 47, .28);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(250, 247, 243, .88), rgba(255, 255, 255, .9));
    color: var(--brand-dark);
    cursor: pointer;
    text-align: center;
    transition: border-color 180ms ease-out, background 180ms ease-out, transform 180ms ease-out;
}

.media-upload-box:hover,
.media-upload-box:focus-within {
    border-color: var(--brand-accent);
    background: var(--coral-soft);
}

.media-upload-box:active {
    transform: scale(.99);
}

.media-upload-box input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.media-upload-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    background: var(--coral-soft);
    color: var(--brand-accent);
}

.media-upload-box strong {
    font-size: 13px;
}

.media-upload-box small {
    color: var(--muted);
    font-size: 11px;
}

.current-media {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 12px;
}

.current-media img {
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 10px;
    object-fit: cover;
}

.products-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.products-form-actions > div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
}

.products-form-actions > div:first-child svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: #15803d;
}

.products-howto {
    padding: 24px;
}

.products-howto-icon {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 13px;
    background: var(--brand-dark);
    color: #fff;
}

.products-howto-icon svg {
    width: 20px;
    height: 20px;
}

.products-howto h3 {
    margin: 10px 0 20px;
    font-size: 19px;
}

.products-howto ol {
    display: grid;
    gap: 16px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.products-howto li {
    display: flex;
    gap: 11px;
    align-items: flex-start;
}

.products-howto li > span {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border-radius: 8px;
    background: var(--coral-soft);
    color: var(--brand-accent);
    font-size: 11px;
    font-weight: 800;
}

.products-howto li p {
    margin: 1px 0 0;
}

.products-howto li strong,
.products-howto li small {
    display: block;
}

.products-howto li strong {
    color: var(--brand-dark);
    font-size: 12px;
}

.products-howto li small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--brand-accent);
    font-size: 12px;
    font-weight: 800;
}

.text-link svg {
    width: 14px;
    height: 14px;
}

.products-catalog-section {
    padding: 26px;
    border: 1px solid rgba(6, 59, 47, .08);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .46);
}

.products-section-heading {
    align-items: center;
    margin-bottom: 18px;
}

.products-section-heading h2 {
    margin-top: 7px;
    font-size: 22px;
}

.products-catalog-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.products-search {
    position: relative;
    display: block;
    min-width: 190px;
}

.products-search svg {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.products-search input,
.products-catalog-tools select {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--brand-dark);
    font-size: 12px;
}

.products-search input {
    width: 100%;
    padding: 0 12px 0 36px;
}

.products-catalog-tools select {
    min-width: 108px;
    padding: 0 30px 0 11px;
}

.products-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.product-card {
    display: flex;
    height: 100%;
    min-width: 0;
    padding: 0;
    flex-direction: column;
    overflow: hidden;
}

.product-card[hidden],
.products-filter-empty[hidden] {
    display: none;
}

.product-card-media {
    position: relative;
    display: grid;
    min-height: 148px;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(250, 247, 243, .96), rgba(229, 243, 237, .9));
}

.product-card-media img {
    display: block;
    width: 100%;
    height: 148px;
    object-fit: cover;
}

.product-placeholder {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 17px;
    background: rgba(255, 255, 255, .78);
    color: var(--brand-accent);
}

.product-placeholder svg {
    width: 24px;
    height: 24px;
}

.product-status {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: var(--brand-dark);
    font-size: 10px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.product-status .status-dot {
    width: 7px;
    height: 7px;
    margin: 0;
}

.product-status.is-active .status-dot {
    background: #16a34a;
}

.product-status.is-paused .status-dot {
    background: #d97706;
}

.product-card-body {
    display: flex;
    min-width: 0;
    padding: 18px;
    flex: 1;
    flex-direction: column;
}

.product-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.product-card-heading h3 {
    overflow: hidden;
    margin: 0;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    flex-shrink: 0;
    color: var(--brand-accent);
    font-size: 15px;
    font-weight: 800;
}

.product-description {
    display: -webkit-box;
    min-height: 38px;
    margin: 8px 0 15px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-card-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 11px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.product-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.product-card-meta svg {
    width: 14px;
    height: 14px;
    color: var(--brand-accent);
}

.product-card-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 16px;
}

.product-card-actions form {
    margin: 0;
}

.product-card-actions .btn {
    min-height: 38px;
    padding: 0 10px;
    font-size: 11px;
    white-space: nowrap;
}

.product-card-actions .btn-danger {
    display: grid;
    width: 38px;
    padding: 0;
    place-items: center;
}

.product-card-actions .btn-danger svg {
    width: 16px;
    height: 16px;
}

.products-empty,
.products-filter-empty {
    display: grid;
    min-height: 220px;
    place-items: center;
    align-content: center;
    text-align: center;
}

.products-empty-icon {
    display: grid;
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    place-items: center;
    border-radius: 15px;
    background: var(--coral-soft);
    color: var(--brand-accent);
}

.products-empty h3,
.products-filter-empty strong {
    margin: 0;
    color: var(--brand-dark);
}

.products-empty p,
.products-filter-empty span {
    margin: 7px 0 16px;
    color: var(--muted);
    font-size: 13px;
}

.products-filter-empty {
    gap: 5px;
    margin-top: 16px;
    padding: 34px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .72);
}

.products-filter-empty svg {
    width: 28px;
    height: 28px;
    margin-bottom: 5px;
    color: var(--brand-accent);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1120px) {
    .products-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 860px) {
    .products-editor-layout,
    .products-form-grid {
        grid-template-columns: 1fr;
    }

    .products-media-panel {
        max-width: 360px;
    }

    .products-howto {
        display: none;
    }

    .products-section-heading,
    .products-form-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .products-catalog-tools {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .products-header-actions,
    .products-header-actions .btn,
    .products-form-actions .quick-actions,
    .products-form-actions .quick-actions .btn {
        width: 100%;
    }

    .products-header-actions,
    .products-form-actions .quick-actions {
        flex-direction: column;
    }

    .products-overview,
    .products-card-grid {
        grid-template-columns: 1fr;
    }

    .products-form-card,
    .products-catalog-section {
        padding: 18px;
    }

    .products-catalog-tools,
    .products-search,
    .products-catalog-tools select {
        width: 100%;
    }

    .products-catalog-tools .badge {
        width: 100%;
        text-align: center;
    }

    .product-card-actions .btn:not(.btn-danger) {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .price-input,
    .media-upload-box {
        transition: none;
    }
}

html,
body {
    background: var(--bg);
    color: var(--text);
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

body::selection {
    background: rgba(240, 90, 65, .22);
    color: var(--brand-dark);
}

a {
    color: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(240, 90, 65, .32);
    outline-offset: 2px;
}

/* Authenticated application shell */
.app-main {
    min-height: 100vh;
    margin-left: 256px;
    max-width: none;
    padding: 104px 44px 64px;
    background: var(--bg);
}

.topbar {
    left: 256px;
    height: 72px;
    padding: 0 36px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 18px rgba(6, 59, 47, .04);
    color: var(--text);
}

.topbar .brand {
    color: var(--brand-dark);
    display: inline-flex;
    align-items: center;
    background: var(--green);
    padding: 6px 14px;
    border-radius: 10px;
}

.topbar .top-actions {
    color: var(--muted);
}

.topbar-leading {
    display: flex;
    align-items: center;
    gap: 28px;
}

.topbar-context {
    display: grid;
    gap: 1px;
    border-left: 1px solid var(--line);
    padding-left: 24px;
}

.topbar-context small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.topbar-context strong {
    color: var(--brand-dark);
    font-size: 13px;
}

.sidebar {
    width: 256px;
    padding: 26px 14px 18px;
    background: var(--brand-dark);
    border-right: 0;
    box-shadow: 12px 0 32px rgba(6, 59, 47, .1);
    color: #fff;
}

.sidebar-close,
.sidebar-backdrop {
    display: none;
}

.sidebar-brand {
    padding: 2px 12px 24px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.sidebar-brand strong {
    color: #fff;
    letter-spacing: -.04em;
}

.sidebar-brand small {
    color: #f7a18f;
    font-weight: 700;
}

.brand-mark {
    background: var(--brand-accent);
    color: #fff;
    box-shadow: 0 8px 22px rgba(240, 90, 65, .26);
}

.sidebar > nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: 0;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 5px;
    padding-bottom: 12px;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-color: rgba(255, 255, 255, .3) transparent;
    scrollbar-width: thin;
}

.sidebar > nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar > nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar > nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .3);
    border-radius: 999px;
}

.nav-section-label {
    flex: 0 0 auto;
    padding: 16px 14px 5px;
    color: rgba(255, 255, 255, .42);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.nav-section-label:first-child {
    padding-top: 2px;
}

.nav-item {
    min-height: 42px;
    gap: 11px;
    color: rgba(255, 255, 255, .68);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.nav-item.active {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .08);
    box-shadow: inset 3px 0 0 var(--brand-accent);
    color: #fff;
}

.nav-item.active i,
.nav-group[open] > .nav-group-summary {
    color: #ff9b88;
}

.nav-item > .nav-icon,
.nav-group-heading > .nav-icon {
    display: inline-grid;
    flex: 0 0 var(--sidebar-icon-size);
    width: var(--sidebar-icon-size);
    height: var(--sidebar-icon-size);
    place-items: center;
}

.nav-item > .nav-icon > i[data-lucide],
.nav-group-heading > .nav-icon > i[data-lucide] {
    width: 100% !important;
    height: 100% !important;
    flex: 0 0 auto;
    stroke-width: 2;
}

.nav-item > span:last-child,
.nav-group-heading > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-item.danger {
    color: #ffaaa0;
}

.nav-divider {
    background: rgba(255, 255, 255, .12);
}

.nav-group {
    flex: 0 0 auto;
    margin: 6px 0;
}

.nav-group-summary {
    min-height: 42px;
    color: rgba(255, 255, 255, .52);
    border-radius: 10px;
}

.nav-group-heading {
    min-width: 0;
    gap: 11px;
}

.nav-group-chevron {
    width: var(--sidebar-chevron-size) !important;
    height: var(--sidebar-chevron-size) !important;
    flex: 0 0 var(--sidebar-chevron-size);
}

.nav-group-summary:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.nav-group-items {
    border-left: 1px solid rgba(255, 255, 255, .12);
    margin-left: 13px;
}

.system-status {
    border-color: rgba(121, 221, 177, .28);
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .72);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 8px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .82);
}

.sidebar-profile:hover {
    color: #fff;
}

.sidebar-profile > span:nth-child(2) {
    display: grid;
    min-width: 0;
    flex: 1;
}

.sidebar-profile strong,
.sidebar-profile small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-profile strong {
    font-size: 12px;
}

.sidebar-profile small {
    color: rgba(255, 255, 255, .5);
    font-size: 10px;
}

.sidebar-profile > i {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, .42);
}

.sidebar-avatar {
    display: grid;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.mobile-nav {
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(6, 59, 47, .08);
}

.mobile-nav .nav-item {
    color: var(--muted);
}

.mobile-nav .nav-item.active {
    background: var(--coral-soft);
    box-shadow: none;
    color: var(--brand-dark);
}

/* Public landing and shared page composition */
.public-main {
    min-height: 100vh;
    background: var(--bg);
}

.landing-nav {
    position: absolute;
    inset: 0 0 auto 0;
    left: 0;
    z-index: 50;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    color: #fff;
}

.landing-nav .brand,
.landing-nav .nav-link {
    color: #fff;
}

.landing-nav .nav-link {
    opacity: .78;
    font-size: 13px;
    font-weight: 600;
}

.landing-nav .nav-link:hover {
    opacity: 1;
}

.hero {
    min-height: 690px;
    padding: 172px 24px 108px;
    background: var(--brand-dark);
    color: #fff;
    text-align: left;
    isolation: isolate;
}

.hero::after {
    position: absolute;
    inset: auto -180px -240px auto;
    width: 620px;
    height: 620px;
    border-radius: 50%;
    background: var(--brand-accent);
    content: "";
    filter: blur(150px);
    opacity: .18;
    pointer-events: none;
    z-index: -1;
}

.hero h1 {
    max-width: 920px;
    margin: 22px 0 18px;
    color: #fff;
    font-size: clamp(42px, 6vw, 72px);
    letter-spacing: -.065em;
}

.hero h1 span {
    color: transparent;
    background: linear-gradient(100deg, var(--brand-accent), #ffb48d);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.hero p {
    max-width: 700px;
    color: rgba(255, 255, 255, .7);
}

.hero .muted {
    color: rgba(255, 255, 255, .58);
}

.hero-art {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .07);
    box-shadow: var(--shadow-lg);
}

.mockup {
    background: linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
}

.mockup-panel {
    background: rgba(0, 0, 0, .15);
    border-color: rgba(255, 255, 255, .14);
}

.section {
    padding: 96px 24px;
}

.section:not(.dark) {
    background: #fff;
}

.section.dark {
    background: var(--brand-dark);
    color: #fff;
}

.section.dark .section-heading h2,
.section.dark .card h3 {
    color: #fff;
}

.section.dark .section-heading p,
.section.dark .muted {
    color: rgba(255, 255, 255, .68);
}

.section.dark .card {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .12);
}

.section.dark .card:hover {
    border-color: rgba(240, 90, 65, .58);
}

.footer {
    background: var(--brand-dark);
    border-top-color: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .62);
}

.container {
    max-width: 1180px;
}

.eyebrow {
    border-color: rgba(240, 90, 65, .32);
    background: var(--coral-soft);
    color: var(--brand-accent);
}

.hero .eyebrow {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .18);
    color: #fff;
}

/* Shared atoms and data views */
.page-header {
    align-items: flex-end;
    margin-bottom: 32px;
}

.page-header h1 {
    color: var(--brand-dark);
    font-size: clamp(30px, 4vw, 40px);
    letter-spacing: -.055em;
}

.page-header p {
    color: var(--muted);
}

.grid {
    gap: 20px;
}

.card,
.stat-card,
.table-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.card {
    padding: 26px;
}

.card:hover {
    border-color: rgba(6, 59, 47, .2);
    box-shadow: 0 16px 40px rgba(6, 59, 47, .1);
}

.card h2,
.card h3 {
    color: var(--brand-dark);
}

.products-page-stack {
    display: grid;
    gap: 26px;
}

.products-page-stack > #product-form {
    max-width: 920px;
}

.products-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.products-section-heading h2 {
    margin: 4px 0 0;
    color: var(--brand-dark);
    font-size: 20px;
}

.products-section-heading .eyebrow {
    padding: 4px 9px;
    font-size: 9px;
}

.products-catalog .grid {
    align-items: stretch;
}

.products-catalog .card {
    height: 100%;
}

.feature-icon {
    background: var(--coral-soft);
    color: var(--brand-accent);
}

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

.stat-grid {
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    min-height: 154px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    position: absolute;
    right: -22px;
    top: -28px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--coral-soft);
    content: "";
    opacity: .8;
}

.stat-card .stat-icon {
    position: relative;
    z-index: 1;
    color: var(--brand-accent);
}

.stat-card small {
    position: relative;
    z-index: 1;
    color: var(--muted);
    font-weight: 700;
}

.stat-card strong {
    position: relative;
    z-index: 1;
    color: var(--brand-dark);
    font-size: 32px;
}

.stat-card em {
    position: relative;
    z-index: 1;
    color: var(--green);
}

.pricing-card {
    overflow: hidden;
}

.pricing-card.featured {
    border-color: var(--brand-accent);
    box-shadow: 0 20px 50px rgba(240, 90, 65, .16);
}

.price {
    color: var(--brand-dark);
}

.price small {
    color: var(--muted);
}

.btn {
    min-height: 44px;
    border-radius: 12px;
    padding: 12px 18px;
}

.btn-primary {
    background: var(--brand-accent);
    color: #fff;
    box-shadow: 0 10px 24px rgba(240, 90, 65, .2);
}

.btn-primary:hover {
    background: #dc4935;
}

.btn-secondary {
    background: #fff;
    border-color: var(--line);
    color: var(--brand-dark);
}

.btn-secondary:hover {
    background: var(--low);
    border-color: #cbd7d2;
}

.btn-success {
    background: var(--brand-dark);
    color: #fff;
    box-shadow: 0 10px 24px rgba(6, 59, 47, .16);
}

.btn-danger {
    background: #fff1ef;
    color: var(--red);
    border: 1px solid #f4cbc5;
}

.badge-success {
    background: #e9f8f0;
    color: var(--green-deep);
}

.badge-warning {
    background: #fff5e5;
    color: var(--gold);
}

.badge-danger {
    background: #fff0ed;
    color: var(--red);
}

.field {
    gap: 8px;
    margin: 16px 0;
}

.field label {
    color: var(--brand-dark);
    font-size: 12px;
    letter-spacing: .01em;
}

.field input,
.field select,
.field textarea {
    background: #f8faf9;
    border: 1px solid #dfe7e3;
    border-radius: 12px;
    color: var(--text);
    padding: 13px 14px;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #a0aaa7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--brand-dark);
    box-shadow: 0 0 0 3px rgba(6, 59, 47, .1);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--brand-accent);
}

.table-card {
    overflow: auto;
}

.table-card th,
.table-card td {
    border-bottom-color: #edf1ef;
    color: var(--text);
}

.table-card th {
    background: #f7f9f8;
    color: var(--muted);
}

.table-card tr:hover td {
    background: #fbfcfc;
}

.kpi {
    background: #f8faf9;
    border-color: #edf1ef;
}

.notice {
    border: 1px solid var(--line);
    background: #f7f9f8;
    color: var(--text);
}

.notice-success {
    background: #eaf8f0;
    border-color: #bfe8d0;
    color: var(--green-deep);
}

.notice-error {
    background: #fff0ed;
    border-color: #f2c9c2;
    color: #a63e32;
}

.modal-backdrop {
    background: rgba(6, 59, 47, .34);
}

.modal {
    background: #fff;
    border-color: var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.toast {
    top: 88px;
    background: #fff;
    border-color: var(--brand-accent);
    color: var(--brand-dark);
}

.empty {
    color: var(--muted);
}

/* Login and registration follow the split-panel reference view. */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
    align-items: stretch;
    padding: 0;
    background: #fff;
}

.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    padding: 72px clamp(42px, 8vw, 120px);
    background: var(--brand-dark);
    color: #fff;
    isolation: isolate;
}

.auth-visual::before,
.auth-visual::after {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    content: "";
    filter: blur(100px);
    opacity: .25;
    z-index: -1;
}

.auth-visual::before {
    right: -120px;
    top: -120px;
    background: var(--brand-accent);
}

.auth-visual::after {
    bottom: -160px;
    left: -130px;
    background: #1aa875;
}

.auth-visual .brand {
    margin-bottom: 42px;
    color: #fff;
    font-size: 34px;
}

.auth-visual h2 {
    max-width: 600px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(34px, 4vw, 56px);
    letter-spacing: -.06em;
    line-height: 1.08;
}

.auth-visual p {
    max-width: 540px;
    color: rgba(255, 255, 255, .7);
    font-size: 18px;
}

.auth-visual .auth-proof {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 36px;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
}

.auth-card {
    align-self: center;
    width: min(100%, 420px);
    margin: 40px auto;
    padding: 12px 34px;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.auth-card > .brand {
    display: none;
}

.auth-card h1 {
    color: var(--brand-dark);
    font-size: 32px;
    letter-spacing: -.05em;
}

.auth-card form {
    margin-top: 30px;
}

.auth-card a:not(.brand) {
    color: var(--brand-accent) !important;
}

/* Responsive layout */
@media (max-width: 1100px) {
    .app-main {
        padding-right: 28px;
        padding-left: 28px;
    }

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

@media (max-width: 1020px) {
    .app-main {
        margin-left: 0;
        padding: 96px 22px 88px;
    }

    .topbar {
        left: 0;
        padding: 0 22px;
    }

    .sidebar {
        width: min(360px, 92vw);
    }

    .sidebar-close {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: absolute !important;
        z-index: 99 !important;
        top: 15px !important;
        right: 14px !important;
        width: 36px !important;
        height: 36px !important;
        border: 1px solid rgba(255, 255, 255, .18) !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, .08) !important;
        color: #fff !important;
        cursor: pointer !important;
        padding: 0 !important;
    }

    .sidebar-close:hover {
        background: rgba(255, 255, 255, .16) !important;
    }

    .sidebar-close i,
    .sidebar-close svg {
        width: 20px !important;
        height: 20px !important;
        display: block !important;
        margin: auto !important;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        z-index: 39;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        background: rgba(15, 23, 42, .36);
    }

    .sidebar-backdrop.open {
        display: block;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

@media (max-width: 760px) {
    .sidebar {
        width: 100%;
    }

    .landing-nav {
        padding-right: 20px;
        padding-left: 20px;
    }

    .landing-nav .nav-link {
        display: none;
    }

    .landing-nav .top-actions {
        gap: 8px;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-header .quick-actions,
    .page-header .btn {
        width: 100%;
    }

    .page-header .quick-actions .btn {
        flex: 1;
    }

    .split,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

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

    .hero {
        min-height: 620px;
        padding: 140px 20px 80px;
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .auth-shell {
        display: block;
    }

    .auth-visual {
        display: block;
        min-height: auto;
        padding: 36px 24px 42px;
    }

    .auth-visual .brand {
        margin-bottom: 28px;
        font-size: 28px;
    }

    .auth-visual h2 {
        font-size: 36px;
    }

    .auth-visual p {
        font-size: 15px;
    }

    .auth-card {
        width: min(100%, 520px);
        margin: 0 auto;
        padding: 38px 24px 56px;
    }
}

/* Product catalog late overrides: keep the dedicated layout above shared atoms. */
.products-page .products-section-heading {
    align-items: center;
}

.products-page .products-section-heading h2 {
    margin-top: 7px;
    font-size: 22px;
}

.products-page .products-form-card {
    padding: 28px;
}

@media (max-width: 860px) {
    .products-page .products-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .products-page .products-form-card,
    .products-page .products-catalog-section {
        padding: 18px;
    }
}

.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: auto;
}

.toggle-switch input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    margin: 0;
    border-radius: 999px;
    background: var(--line);
    position: relative;
    cursor: pointer;
    transition: background .2s;
}

.toggle-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .2s;
}

.toggle-switch input[type="checkbox"]:checked {
    background: var(--green);
}

.toggle-switch input[type="checkbox"]:checked::before {
    transform: translateX(18px);
}

.toggle-switch .toggle-slider {
    display: none;
}

.toggle-switch .toggle-label {
    font-size: 14px;
    color: var(--text);
}
