:root {
    --bg: #f4f3f1;
    --ink: #141517;
    --black: #141312;
    --white: #ffffff;
    --orange: #e85d04;
    --orange-hover: #cf4f00;
    --orange-light: #fff3ea;
    --green: #326a29;
    --border: #ebe5df;
    --text-muted: #555e6d;
    --font-saira: 'Saira', system-ui, -apple-system, sans-serif;
    --font-jakarta: 'Plus Jakarta Sans', system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-saira);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.drawer-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

/* ================= SHELL LAYOUT ================= */
.dash-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

/* ================= LEFT SIDEBAR ================= */
.dash-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    background: var(--ink);
    color: var(--white);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    overflow-y: auto;
    z-index: 40;
}

.dash-sidebar__top {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.dash-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 6px;
}

.dash-brand__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 23px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.4px;
}

.dash-brand__logo svg {
    width: 34px;
    height: auto;
    flex-shrink: 0;
}

.dash-sidebar__close {
    display: none;
    font-size: 30px;
    line-height: 1;
    color: #9ca3af;
}

.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-nav__item {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15.5px;
    font-weight: 500;
    color: #d1d5db;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dash-nav__item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: currentColor;
}

.dash-nav__item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.dash-nav__item.is-active {
    background: var(--orange);
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(232, 93, 4, 0.35);
}

.dash-sidebar__foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dash-foot-link {
    height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #d1d5db;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dash-foot-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.dash-foot-link--logout:hover {
    background: rgba(220, 38, 38, 0.18);
    color: #fca5a5;
}

/* ================= MAIN COLUMN & TOP PANEL HEADER ================= */
.dash-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

.dash-header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 76px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 clamp(18px, 3vw, 36px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dash-header__left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.dash-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    color: var(--ink);
    flex-shrink: 0;
}

.dash-header__title-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-header__title {
    font-size: clamp(19px, 1.8vw, 24px);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-header__crumb {
    font-size: 13px;
    color: var(--text-muted);
}

.dash-header__right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.dash-store-btn {
    height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.2s, background-color 0.2s;
}

.dash-store-btn:hover {
    border-color: var(--orange);
    background: var(--orange-light);
    color: var(--orange);
}

.dash-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 9999px;
}

.dash-user-pill__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--orange);
    color: var(--white);
    font-family: var(--font-jakarta);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-user-pill__name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
}

/* ================= CONTENT AREA ================= */
.dash-body {
    flex: 1;
    padding: clamp(20px, 3vw, 36px);
    transition: opacity 0.2s ease;
}

.dash-body.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

.dash-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ================= CARDS & STATS ================= */
.dash-welcome {
    position: relative;
    background: var(--ink);
    color: var(--white);
    border-radius: 28px;
    padding: clamp(24px, 3vw, 34px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.dash-welcome::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(232, 93, 4, 0.35) 0%, rgba(232, 93, 4, 0) 70%);
    pointer-events: none;
}

.dash-welcome__text h2 {
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 700;
    margin-bottom: 4px;
}

.dash-welcome__text h2 span {
    color: var(--orange);
}

.dash-welcome__text p {
    font-size: 15px;
    color: #d1d5db;
    max-width: 600px;
}

.dash-welcome__btn {
    position: relative;
    z-index: 1;
    height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    background: var(--orange);
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s, transform 0.15s;
}

.dash-welcome__btn:hover {
    background: var(--orange-hover);
    transform: translateY(-2px);
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.dash-stat {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.03);
}

.dash-stat__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--orange-light);
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-stat__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-stat__label {
    font-size: 13.5px;
    color: var(--text-muted);
}

.dash-stat__val {
    font-family: var(--font-jakarta);
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}

.dash-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: clamp(20px, 2.8vw, 30px);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dash-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0eae4;
}

.dash-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
}

.dash-card__title i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--orange);
    flex-shrink: 0;
}

.dash-card__action {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--orange);
}

.dash-card__action:hover {
    text-decoration: underline;
}

.dash-overview-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 20px;
    align-items: start;
}

.dash-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: 14px;
    font-size: 14.5px;
}

.dash-info-row span:first-child {
    color: var(--text-muted);
}

.dash-info-row strong {
    color: var(--ink);
    font-weight: 600;
    text-align: right;
}

/* ================= TABLES & PRODUCTS LIST ================= */
.dash-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.dash-table th,
.dash-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #f0eae4;
    font-size: 15px;
}

.dash-table th {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}

.dash-table tr:last-child td {
    border-bottom: 0;
}

.dash-prod-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-prod-cell img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg);
    flex-shrink: 0;
}

.dash-prod-cell__title {
    font-weight: 600;
    color: var(--ink);
    font-size: 15.5px;
}

.dash-prod-cell__meta {
    font-size: 13px;
    color: var(--text-muted);
}

.dash-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.dash-badge--success {
    background: rgba(50, 106, 41, 0.12);
    color: var(--green);
}

.dash-badge--warning {
    background: var(--orange-light);
    color: var(--orange);
}

.dash-badge--neutral {
    background: #f3f4f6;
    color: #4b5563;
}

.dash-price {
    font-family: var(--font-jakarta);
    font-weight: 700;
    color: #c5760d;
}

.dash-tbl-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 10px;
    background: var(--bg);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    transition: background-color 0.2s, color 0.2s;
}

.dash-tbl-link:hover {
    background: var(--orange);
    color: var(--white);
}

/* ================= PROFILE FORM ================= */
.dash-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.dash-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-field--full {
    grid-column: 1 / -1;
}

.dash-field label {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}

.dash-field input {
    width: 100%;
    height: 52px;
    background: var(--bg);
    border: 1.5px solid transparent;
    border-radius: 14px;
    padding: 0 16px;
    font-family: var(--font-saira);
    font-size: 15.5px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.dash-field input:focus {
    background: var(--white);
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.12);
}

.dash-form-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 6px;
}

.dash-submit {
    height: 52px;
    padding: 0 30px;
    border-radius: 14px;
    background: var(--orange);
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(232, 93, 4, 0.28);
    transition: background-color 0.2s, transform 0.15s;
}

.dash-submit:hover {
    background: var(--orange-hover);
    transform: translateY(-2px);
}

.dash-form-msg {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--green);
}

/* ================= OVERLAY ================= */
.dash-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    z-index: 35;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.dash-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1280px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .dash-shell {
        grid-template-columns: 1fr;
    }

    .dash-menu-btn {
        display: inline-flex;
    }

    .dash-sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        transition: left 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .dash-sidebar.open {
        left: 0;
    }

    .dash-sidebar__close {
        display: block;
    }
}

@media (max-width: 640px) {
    .dash-stats,
    .dash-form-grid {
        grid-template-columns: 1fr;
    }

    .dash-store-btn span {
        display: none;
    }

    .dash-user-pill__name {
        display: none;
    }

    .dash-user-pill {
        padding: 4px;
    }
}