:root {
    --kreavax-brown: #3a120a;
    --kreavax-cream: #fff9ef;
    --kreavax-ivory: #f7efe5;
    --kreavax-beige: #d6af86;
    --kreavax-muted: #725b4d;
    --kreavax-white: #ffffff;
    --kreavax-border: rgba(58, 18, 10, 0.12);
    --kreavax-shadow: 0 20px 50px rgba(58, 18, 10, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(214, 175, 134, 0.28), transparent 34%),
        linear-gradient(135deg, var(--kreavax-cream), var(--kreavax-ivory));
    color: var(--kreavax-brown);
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
}

.login-brand-panel {
    position: relative;
    overflow: hidden;
    background: var(--kreavax-brown);
    color: var(--kreavax-cream);
    padding: 72px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-brand-panel::before,
.login-brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(214, 175, 134, 0.22);
}

.login-brand-panel::before {
    width: 520px;
    height: 520px;
    top: -220px;
    right: -180px;
}

.login-brand-panel::after {
    width: 360px;
    height: 360px;
    bottom: -170px;
    left: -120px;
}

.brand-mark {
    position: relative;
    z-index: 2;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.22em;
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 590px;
}

.brand-eyebrow {
    color: var(--kreavax-beige);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 18px;
}

.brand-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(48px, 5vw, 82px);
    line-height: 0.96;
    margin: 0;
    font-weight: 500;
}

.brand-description {
    margin-top: 28px;
    max-width: 510px;
    line-height: 1.8;
    color: rgba(255, 249, 239, 0.72);
    font-size: 16px;
}

.brand-products {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.brand-product-pill {
    border: 1px solid rgba(214, 175, 134, 0.32);
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 12px;
    color: var(--kreavax-beige);
}

.brand-footer {
    position: relative;
    z-index: 2;
    color: rgba(255, 249, 239, 0.48);
    font-size: 12px;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

.login-card {
    width: 100%;
    max-width: 430px;
}

.mobile-brand {
    display: none;
}

.login-label-small {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--kreavax-muted);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
}

.login-title {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    font-weight: 500;
    letter-spacing: -0.025em;
}

.login-subtitle {
    margin: 14px 0 34px;
    line-height: 1.7;
    color: var(--kreavax-muted);
}

.form-group {
    margin-bottom: 21px;
}

.form-label {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid var(--kreavax-border);
    background: rgba(255, 255, 255, 0.75);
    color: var(--kreavax-brown);
    font-size: 15px;
    outline: none;
    transition: 0.2s ease;
}

.form-control:focus {
    border-color: var(--kreavax-beige);
    box-shadow: 0 0 0 4px rgba(214, 175, 134, 0.15);
    background: var(--kreavax-white);
}

.form-error {
    margin-bottom: 18px;
    border-radius: 12px;
    padding: 13px 15px;
    background: #f8e7e3;
    border: 1px solid #e8c1b8;
    color: #7d2417;
    font-size: 13px;
    line-height: 1.5;
}

.login-button {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 12px;
    background: var(--kreavax-brown);
    color: var(--kreavax-cream);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(58, 18, 10, 0.18);
}

.security-note {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--kreavax-border);
    display: flex;
    gap: 10px;
    color: var(--kreavax-muted);
    font-size: 12px;
    line-height: 1.6;
}

.security-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--kreavax-beige);
    margin-top: 5px;
}

@media (max-width: 900px) {
    .login-page {
        display: block;
    }

    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        min-height: 100vh;
        padding: 30px 22px;
    }

    .mobile-brand {
        display: block;
        margin-bottom: 45px;
        font-size: 21px;
        font-weight: 800;
        letter-spacing: 0.18em;
    }

    .login-title {
        font-size: 36px;
    }
}

/* =========================================================
   KREAVAX DASHBOARD
========================================================= */

.app-shell {
    min-height: 100vh;
    display: flex;
    background: var(--kreavax-cream);
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    background: var(--kreavax-brown);
    color: var(--kreavax-cream);
    padding: 30px 22px;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin-bottom: 40px;
}

.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-label {
    color: rgba(255, 249, 239, 0.42);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 10px;
}

.sidebar-link {
    display: block;
    text-decoration: none;
    color: rgba(255, 249, 239, 0.7);
    padding: 11px 12px;
    border-radius: 9px;
    font-size: 14px;
    margin-bottom: 4px;
    transition: 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--kreavax-cream);
}

.sidebar-link.active {
    background: rgba(214, 175, 134, 0.16);
    color: var(--kreavax-beige);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logout {
    width: 100%;
    border: 1px solid rgba(214, 175, 134, 0.22);
    background: transparent;
    color: var(--kreavax-beige);
    border-radius: 9px;
    padding: 11px 12px;
    cursor: pointer;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.topbar {
    min-height: 90px;
    padding: 22px 36px;
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid var(--kreavax-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-eyebrow {
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--kreavax-muted);
    font-weight: 700;
}

.topbar-title {
    margin: 5px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-weight: 500;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--kreavax-brown);
    color: var(--kreavax-cream);
    font-weight: 700;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
}

.user-role {
    font-size: 11px;
    color: var(--kreavax-muted);
    margin-top: 2px;
}

.dashboard-section {
    padding: 36px;
}

.welcome-block {
    margin-bottom: 28px;
}

.section-eyebrow {
    font-size: 10px;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: var(--kreavax-muted);
    margin-bottom: 8px;
}

.section-title {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    font-weight: 500;
}

.section-description {
    color: var(--kreavax-muted);
    max-width: 700px;
    line-height: 1.7;
    margin: 10px 0 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--kreavax-white);
    border: 1px solid var(--kreavax-border);
    border-radius: 14px;
    padding: 20px;
}

.stat-label {
    font-size: 12px;
    color: var(--kreavax-muted);
    margin-bottom: 12px;
}

.stat-value {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
}

.stat-note {
    margin-top: 7px;
    font-size: 11px;
    color: var(--kreavax-muted);
}

.content-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
}

.panel {
    background: var(--kreavax-white);
    border: 1px solid var(--kreavax-border);
    border-radius: 14px;
    padding: 22px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel-title {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 500;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--kreavax-border);
    border-radius: 12px;
}

.product-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--kreavax-ivory);
    color: var(--kreavax-brown);
    font-weight: 800;
    font-size: 12px;
}

.product-content {
    flex: 1;
}

.product-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.product-name {
    margin: 0;
    font-size: 15px;
}

.product-description {
    margin: 5px 0 0;
    font-size: 12px;
    color: var(--kreavax-muted);
}

.status-badge {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    height: fit-content;
}

.status-active {
    background: #edf5ec;
    color: #31633c;
}

.product-meta {
    display: flex;
    gap: 16px;
    margin-top: 13px;
    font-size: 11px;
    color: var(--kreavax-muted);
}

.empty-state {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.empty-state-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--kreavax-ivory);
    margin-bottom: 13px;
}

.empty-state-title {
    font-size: 14px;
    font-weight: 700;
}

.empty-state-text {
    margin-top: 7px;
    max-width: 280px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--kreavax-muted);
}

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

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

    .dashboard-section {
        padding: 24px;
    }

    .topbar {
        padding: 18px 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PRODUCTS PAGE
========================================================= */

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

.product-page-card {
    display: block;
    text-decoration: none;
    color: var(--kreavax-brown);
    background: var(--kreavax-white);
    border: 1px solid var(--kreavax-border);
    border-radius: 16px;
    padding: 22px;
    transition: 0.2s ease;
}

.product-page-card:hover {
    transform: translateY(-2px);
    border-color: rgba(214, 175, 134, 0.7);
    box-shadow: 0 16px 35px rgba(58, 18, 10, 0.08);
}

.product-page-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--kreavax-ivory);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 24px;
}

.product-page-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.product-page-title {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 500;
}

.product-page-description {
    color: var(--kreavax-muted);
    font-size: 13px;
    line-height: 1.65;
    margin: 8px 0 0;
}

.product-page-footer {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid var(--kreavax-border);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
}

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