:root {
    /* Theme Colors - Can be overridden by admin settings */
    --primary: #001F3F;
    --secondary: #DAE64B;
    --accent: #2563eb;
    --success: #047857;
    --danger: #b91c1c;
    --background: #F2F2F2;
    --surface: #FFFFFF;
    --text: #4A4A4A;
    --text-heading: #001F3F;
    --text-primary: #001F3F;
    --text-secondary: #4A4A4A;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05);

    --topbar-height: 72px;
    --button-primary-bg: #DAE64B;
    --button-primary-hover-bg: #BFCB37;
    --button-secondary-bg: #001F3F;
    --button-secondary-hover-bg: #02162A;
    --button-primary-text: #001F3F;
    --button-secondary-text: #FFFFFF;
    --menu-hover-bg: #575757;
    --auth-page-bg: #001F3F;
    --auth-heading-color: #DAE64B;
    --auth-paragraph-color: #FFFFFF;
    --auth-form-bg: #DAE64B;
    --auth-input-bg: #EFF4B3;
    --auth-input-border: #808080;
    --auth-input-text: #000000;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
}

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

body.menu-open {
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2.5rem);
}

@media (min-width: 1800px) {
    .container {
        max-width: 1600px;
    }

    .app-shell.has-sidebar .app-content > .container {
        max-width: 1600px;
    }
}



.app-menu {
    width: 280px;
    background: var(--primary);
    color: var(--surface);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: var(--spacing-lg);
    z-index: 100;
    transform: translateX(0);
    transition: all 0.3s ease-in-out;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.app-menu .brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.app-menu .brand img {
    max-height: 40px;
    width: auto;
}

.app-menu .brand h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--surface);
}

.app-menu h1 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #fff;
}

.app-menu nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.app-menu nav ul li {
    margin-bottom: 12px;
}

.app-menu nav ul li a, 
.app-menu nav ul li.user {
    display: flex;
    align-items: center;
    color: var(--surface);
    text-decoration: none;
    font-size: 0.9375rem;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    opacity: 0.85;
}

.app-menu nav ul li a.active {
    background: var(--secondary);
    color: var(--surface);
    opacity: 1;
    font-weight: 500;
}

.app-menu nav ul li a:hover,
.app-menu nav ul li a:focus {
    background: var(--menu-hover-bg);
    opacity: 1;
}

.app-menu nav ul li i {
    margin-right: 10px;
    font-size: 18px;
    width: 25px; /* keeps icons aligned */
    text-align: center;
}

.app-menu nav ul li.has-submenu {
    margin-bottom: 18px;
}

.app-menu nav ul li.has-submenu .submenu-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--surface);
    font-size: 0.9375rem;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    opacity: 0.9;
    cursor: pointer;
    width: 100%;
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    text-align: left;
    transition: background 0.2s ease, opacity 0.2s ease;
    appearance: none;
}

.app-menu nav ul li.has-submenu .submenu-title i:first-of-type {
    margin-right: 10px;
}

.app-menu nav ul li.has-submenu .submenu-title:hover,
.app-menu nav ul li.has-submenu .submenu-title:focus {
    background: var(--menu-hover-bg);
    opacity: 1;
}

.app-menu nav ul li.has-submenu .submenu {
    list-style: none;
    margin: 0;
    padding: var(--spacing-xs) 0 0 calc(var(--spacing-md) + 16px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}

.app-menu nav ul li.has-submenu .submenu li {
    margin: 0;
}

.app-menu nav ul li.has-submenu .submenu li a {
    font-size: 0.875rem;
    padding: var(--spacing-xs) var(--spacing-md);
    background: transparent;
    opacity: 0.9;
    display: flex;
    align-items: center;
    border-radius: var(--radius-md);
}

.app-menu nav ul li.has-submenu .submenu li a:hover,
.app-menu nav ul li.has-submenu .submenu li a:focus {
    background: var(--menu-hover-bg);
    opacity: 1;
}

.app-menu nav ul li.has-submenu .submenu li a i {
    font-size: 16px;
    width: 20px;
}

.app-menu nav ul li.has-submenu .submenu-title .submenu-arrow {
    margin-left: auto;
    margin-right: 0;
    transition: transform 0.2s ease;
}

.app-menu nav ul li.has-submenu.is-open .submenu-title {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}

.app-menu nav ul li.has-submenu .submenu-title:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

.app-menu nav ul li.has-submenu.is-open .submenu {
    opacity: 1;
    pointer-events: auto;
}

.app-menu nav ul li.has-submenu.is-open .submenu-title .submenu-arrow {
    transform: rotate(90deg);
}

.user-name {
    text-transform: capitalize;
}

.menu-avatar {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    background: #fff;
}

.menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    min-height: 48px;
}

.brand img {
    max-height: 48px;
    width: auto;
    display: block;
}

.brand__text {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--surface);
    letter-spacing: -0.01em;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.app-content {
    flex: 1;
    margin-left: 0;
    padding: 0 0 var(--spacing-xl);
    transition: margin-left 0.3s ease-in-out;
    width: 100%;
}

.app-shell.has-sidebar .app-content {
    margin-left: 280px;
}

.app-content > .container {
    width: 100%;
}

.app-shell.has-sidebar .app-content > .container {
    margin-left: 20px;
    margin-right: 20px;
}

.app-shell.has-sidebar .top-bar__inner.container {
    margin-left: 20px;
    margin-right: 20px;
}

.app-shell.no-sidebar .app-content > .container {
    margin-top: var(--spacing-xl);
}

.app-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    z-index: 90;
}

.app-shell.menu-open .app-overlay {
    opacity: 1;
    pointer-events: auto;
}

.menu-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: var(--surface);
    color: var(--text-heading, var(--primary));
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.menu-toggle i {
    font-size: 1rem;
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 95;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.top-bar + .container {
    margin-top: var(--spacing-xl);
}

.top-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    padding: 0.75rem 0;
}

.top-bar__left {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex: 1;
    min-width: 0;
}

.top-bar__right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.topbar-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 520px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-lg);
    padding: 0.55rem 0.85rem;
    gap: 0.6rem;
}

.topbar-search__icon {
    font-size: 1rem;
    color: rgba(15, 23, 42, 0.35);
}

.topbar-search__input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text-heading, var(--primary));
}

.topbar-search__input:focus {
    outline: none;
}

.topbar-search__tags {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.2rem 0.25rem;
}

.topbar-search__tags[hidden] {
    display: none;
}

.topbar-search__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8rem;
    box-shadow: var(--shadow-sm);
}

.topbar-search__tag button {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-search__results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.65rem);
    z-index: 25;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0.75rem;
    max-height: 420px;
    overflow-y: auto;
}

.topbar-search__results[hidden] {
    display: none;
}

.topbar-search__group + .topbar-search__group {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.topbar-search__group-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.65);
    margin-bottom: 0.35rem;
}

.topbar-search__group-empty {
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.4);
}

.topbar-search__result {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.55rem 0.4rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.topbar-search__result:hover,
.topbar-search__result:focus {
    background: rgba(37, 99, 235, 0.08);
    outline: none;
}

.topbar-search__result-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.topbar-search__result-label {
    font-weight: 600;
    color: var(--text-heading, var(--primary));
}

.topbar-search__result-sub {
    font-size: 0.82rem;
    color: rgba(15, 23, 42, 0.6);
}

.topbar-search__empty {
    padding: 0.75rem;
    text-align: center;
    color: rgba(15, 23, 42, 0.45);
}

.topbar-icon-wrapper,
.topbar-profile-wrapper {
    position: relative;
}

.topbar-icon {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-heading, var(--primary));
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.topbar-icon:hover,
.topbar-icon:focus {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.topbar-icon__badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.topbar-profile {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--surface);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: var(--radius-lg);
    padding: 0.3rem 0.75rem 0.3rem 0.3rem;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}

.topbar-profile:hover,
.topbar-profile:focus {
    box-shadow: var(--shadow-md);
}

.topbar-profile__avatar {
    width: 41px;
    height: 41px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.topbar-profile__avatar--fallback {
    background: var(--avatar-bg, var(--primary));
}

.topbar-profile__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topbar-profile__name {
    font-weight: 600;
    color: var(--text-heading, var(--primary));
    font-size: 0.95rem;
    text-transform: capitalize;
}

.topbar-dropdown {
    position: absolute;
    top: calc(100% + 0.65rem);
    right: 0;
    background: var(--surface);
    z-index: 30;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0.75rem;
    min-width: 260px;
    display: none;
    max-width: min(320px, 80vw);
}

.topbar-dropdown.open {
    display: block;
}

.topbar-dropdown__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-heading, var(--primary));
}

.topbar-dropdown__muted {
    font-size: 0.8rem;
    color: var(--text, rgba(15, 23, 42, 0.5));
}

.topbar-dropdown__body {
    max-height: 320px;
    overflow-y: auto;
}

.topbar-dropdown__empty {
    text-align: center;
    color: rgba(15, 23, 42, 0.45);
    font-size: 0.9rem;
    margin: 0;
}

.topbar-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.topbar-dropdown__item {
    display: grid;
    gap: 0.35rem;
}

.topbar-dropdown__item-title {
    font-weight: 600;
    color: var(--text-heading, var(--primary));
}

.topbar-dropdown__item-body {
    font-size: 0.85rem;
    color: var(--text, rgba(15, 23, 42, 0.65));
}

.topbar-dropdown__item-time {
    font-size: 0.75rem;
    color: rgba(15, 23, 42, 0.45);
}

.topbar-dropdown__list li.unread .topbar-dropdown__item-title {
    color: var(--accent);
}

.topbar-dropdown--profile ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.4rem;
}

.topbar-dropdown--profile a {
    display: block;
    padding: 0.45rem 0.35rem;
    border-radius: var(--radius-md);
    color: var(--text-heading, var(--primary));
    text-decoration: none;
    font-size: 0.95rem;
}

.topbar-dropdown--profile a:hover,
.topbar-dropdown--profile a:focus {
    background: rgba(37, 99, 235, 0.08);
}



.app-footer {
    padding: 2rem 0;
    text-align: center;
    color: #4b5563;
}


main {
    padding: 0;
}

@media (max-width: 1280px) {
    .app-shell.has-sidebar .app-menu {
        width: 260px;
    }

    .app-shell.has-sidebar .app-content {
        margin-left: 260px;
    }
}

@media (max-width: 1024px) {
    .app-shell {
        flex-direction: column;
    }

    .app-shell.has-sidebar .app-menu {
        width: min(85vw, 320px);
    }

    .app-menu {
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }

    .app-shell.menu-open .app-menu {
        transform: translateX(0);
    }

    .app-shell {
        position: relative;
    }

    .app-shell.menu-open {
        overflow: hidden;
    }

    .app-shell.has-sidebar .app-content {
        margin-left: 0;
    }

    .app-shell.has-sidebar .app-content > .container {
        margin-left: 0;
        margin-right: 0;
    }

    .app-shell.has-sidebar .top-bar__inner.container {
        margin-left: 0;
        margin-right: 0;
    }

    .top-bar__inner {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }

    .top-bar__left {
        width: 100%;
    }

    .topbar-search {
        max-width: 100%;
    }

    .top-bar__right {
        width: 100%;
        justify-content: space-between;
    }

    .top-bar + .container {
        margin-top: var(--spacing-lg);
    }

    .app-content {
        padding: var(--spacing-md) 0 var(--spacing-xl);
    }

    .menu-toggle {
        display: inline-flex;
    }
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th, td {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: left;
    font-size: 0.875rem;
}

td {
    color: var(--text);
}

th {
    background: var(--background);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(0, 0, 0, 0.01);
}

tr:last-child td {
    border-bottom: none;
}

@media (max-width: 900px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    th,
    td {
        min-width: 140px;
    }
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover,
.button:focus {
    background: var(--button-primary-hover-bg);
    color: var(--button-primary-text);
    outline: none;
}

.button.secondary {
    background: var(--button-secondary-bg);
    color: var(--button-secondary-text);
}

.button.secondary:hover,
.button.secondary:focus {
    background: var(--button-secondary-hover-bg);
    color: var(--button-secondary-text);
}

.button.danger {
    background: var(--danger);
    color: #fff;
}

.button.danger:hover,
.button.danger:focus {
    background: var(--danger);
    color: #fff;
    filter: brightness(0.95);
}

form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

form input[type="text"],
form input[type="number"],
form input[type="password"],
form textarea,
form select {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid #cbd5f5;
    border-radius: 0.4rem;
    font-size: 1rem;
    margin-bottom: 1rem;
    background: #fff;
}

form select {
    background: #EBE7E7;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #333333;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3e%3cpath fill='%23333333' d='M1.41.59 6 5.17l4.59-4.58L12 1.59 6 7.59 0 1.59z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

form select:hover {
    background-color: #F5F5F5;
}

form select:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.25);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: #F5F5F5;
}

form select option {
    background: #EBE7E7;
    color: #333333;
}

form select option:checked,
form select option:focus,
form select option:hover {
    background: #F5F5F5;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid.two {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
    background: var(--surface);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.page-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-heading, var(--primary));
}

.page-subtitle {
    margin: var(--spacing-xs) 0 0;
    color: var(--text, rgba(15, 23, 42, 0.7));
    max-width: 640px;
}

.theme-color-grid {
    display: grid;
    gap: var(--spacing-lg);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stats-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.08;
    pointer-events: none;
    background: linear-gradient(135deg, currentColor, transparent 60%);
}

.stat-card__icon {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.stat-card__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.stat-card__value {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card__label {
    font-size: 0.9375rem;
    color: rgba(15, 23, 42, 0.7);
}

.stat-card--primary {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 31, 63, 0.12), rgba(0, 31, 63, 0.05));
}

.stat-card--success {
    color: var(--success);
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.12), rgba(4, 120, 87, 0.05));
}

.stat-card--accent {
    color: var(--accent);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.05));
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.table-actions form {
    margin: 0;
    display: flex;
}

.table-actions .inline-form {
    padding: 0;
}

.product-list-card {
    padding: var(--spacing-lg);
}

.product-list-toolbar {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
}

.product-filters .filter-group {
    flex: 1 1 160px;
    min-width: 160px;
}

.product-filters .filter-group:first-child {
    flex: 2 1 240px;
    min-width: 220px;
}

.filter-input,
.filter-select {
    width: 100%;
}

.product-bulk-form {
    margin-top: var(--spacing-md);
}

.bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.03);
}

.bulk-toolbar__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.875rem;
}

.bulk-toolbar__count {
    font-weight: 600;
    color: var(--text-heading);
}

.bulk-toolbar__hint {
    color: var(--text-secondary);
}

.bulk-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.button.ghost {
    background: transparent;
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--danger, #dc2626);
}

.button.ghost:hover,
.button.ghost:focus {
    background: rgba(220, 38, 38, 0.08);
}

.product-table {
    table-layout: auto;
}

.product-table th,
.product-table td {
    vertical-align: middle;
}

.product-table .table-checkbox {
    width: 48px;
    text-align: center;
    padding: var(--spacing-sm);
}

.product-table .table-checkbox input {
    width: 18px;
    height: 18px;
}

.product-table .table-actions-column,
.product-table td.actions {
    text-align: right;
    white-space: nowrap;
}

.product-table td.actions {
    padding-right: var(--spacing-lg);
}

.product-table .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
}

.product-table .product-name-cell {
    min-width: 220px;
}

.product-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.product-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumb__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.product-info__text a {
    font-weight: 600;
    color: var(--text-heading);
}

.product-info__text a:hover,
.product-info__text a:focus {
    color: var(--primary);
}

.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.empty-state .muted {
    margin-top: var(--spacing-sm);
}

.bulk-panel[hidden] {
    display: none !important;
}

.bulk-panel {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    z-index: 1200;
}

.bulk-panel__dialog {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: min(480px, 100%);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.bulk-panel__header,
.bulk-panel__footer {
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.bulk-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bulk-panel__footer {
    border-bottom: none;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

.bulk-panel__body {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.bulk-panel__close {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
}

.bulk-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.bulk-field__toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 500;
}

.bulk-field__control {
    flex: 1 1 auto;
}

.pagination-summary {
    margin-top: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(15, 23, 42, 0.15);
    color: var(--text-secondary);
    background: var(--surface);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pagination__link:hover,
.pagination__link:focus {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-heading);
}

.pagination__link.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination__link.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.shop-page {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.shop-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--surface);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.shop-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.shop-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.shop-summary {
    margin: var(--spacing-xs) 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.shop-search {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    padding: 0.4rem 0.6rem;
}

.shop-search i {
    color: rgba(15, 23, 42, 0.35);
}

.shop-search input[type="search"] {
    border: none;
    background: transparent;
    width: 220px;
    font-size: 0.95rem;
    color: var(--text-heading);
}

.shop-search input[type="search"]:focus {
    outline: none;
}

.shop-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) 1fr;
    gap: var(--spacing-lg);
}

.shop-sidebar {
    position: sticky;
    top: calc(var(--topbar-height) + var(--spacing-lg));
    align-self: start;
}

.shop-filter-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: var(--spacing-lg);
}

.shop-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: var(--spacing-md);
}

.shop-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

.shop-category-list a {
    display: block;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.shop-category-list a:hover,
.shop-category-list a:focus {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-heading);
}

.shop-category-list a.is-active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.shop-results {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
}

.shop-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-card:hover,
.shop-card:focus-within {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.shop-card__image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-card__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.shop-card__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.35);
    font-size: 1.6rem;
}

.shop-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: var(--spacing-lg);
    flex: 1;
}

.shop-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
}

.shop-card__meta {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.shop-card__price {
    margin: var(--spacing-xs) 0 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.shop-card__footer {
    padding: var(--spacing-lg);
    padding-top: 0;
    display: flex;
    justify-content: flex-start;
}

.shop-card__footer .button {
    width: 100%;
    justify-content: center;
}

@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        position: static;
        order: 2;
    }

    .shop-results {
        order: 1;
    }
}

@media (max-width: 640px) {
    .shop-header {
        padding: var(--spacing-md);
    }

    .shop-search {
        width: 100%;
        justify-content: space-between;
    }

    .shop-search input[type="search"] {
        width: 100%;
    }
}
@media (max-width: 900px) {
    .product-list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .product-filters {
        width: 100%;
    }

    .bulk-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .bulk-toolbar__actions {
        width: 100%;
    }

    .bulk-toolbar__actions .button {
        flex: 1 1 auto;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .signup-grid.two {
        grid-template-columns: 1fr;
    }
}

.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    aspect-ratio: 1 / 1;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid transparent;
    background: rgba(15, 23, 42, 0.05);
    color: var(--primary);
    line-height: 0;
    opacity: 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    text-decoration: none;
}

.action-icon:hover,
.action-icon:focus {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.action-icon i,
.action-icon svg {
    pointer-events: none;
    font-size: 1rem;
    fill: currentColor;
    stroke: currentColor;
    width: 1em;
    height: 1em;
}

.action-icon--edit {
    background: #DEECFF;
    border-color: #317CDE;
    color: #317CDE;
}

.action-icon--view {
    background: #F0FDF4;
    border-color: #9CDFBB;
    color: #54A974;
}

.action-icon--delete {
    background: #FEF2F2;
    border-color: #F5B2BB;
    color: #D43459;
}

.flash {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.flash.success { background: rgba(4, 120, 87, 0.12); color: var(--success); }
.flash.error { background: rgba(185, 28, 28, 0.12); color: var(--danger); }
.flash.info { background: rgba(37, 99, 235, 0.12); color: var(--accent); }

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.active { background: rgba(37, 99, 235, 0.15); color: #1d4ed8; }
.badge.draft { background: rgba(107, 114, 128, 0.15); color: #374151; }
.badge.archived { background: rgba(185, 28, 28, 0.15); color: var(--danger); }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Auth Pages Styles */
body.auth-page {
    background: var(--auth-page-bg);
    color: var(--auth-paragraph-color);
}

body.auth-page .app-shell {
    background: transparent;
}

body.auth-page .app-content {
    padding: 0;
    display: flex;
    background: transparent;
}

body.auth-page .app-content > * {
    width: 100%;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
    min-height: 100vh;
    padding: clamp(2rem, 8vw, 6rem);
}

.auth-layout--compact {
    grid-template-columns: minmax(320px, 520px);
    justify-content: center;
    text-align: left;
    padding: clamp(2rem, 6vw, 4rem);
}

.auth-info {
    max-width: 640px;
}

.auth-info__title {
    margin: 0 0 clamp(1rem, 3vh, 1.5rem);
    font-size: clamp(2.5rem, 7vw, 5.875rem);
    line-height: 1.05;
    color: var(--auth-heading-color);
}

.auth-info__description {
    margin: 0;
    font-size: clamp(1.125rem, 2.4vw, 1.625rem);
    line-height: 1.5;
    color: var(--auth-paragraph-color);
    max-width: 40rem;
}

.auth-panel {
    justify-self: center;
    width: min(100%, 480px);
}

.auth-layout--compact .auth-panel {
    width: min(100%, 520px);
}

.auth-card {
    width: 100%;
    background: var(--auth-form-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--auth-input-text);
    overflow: hidden;
}

.auth-card--compact {
    margin: 0 auto;
    max-width: 520px;
}

.retailer-signup.auth-layout--compact {
    grid-template-columns: minmax(320px, 900px);
}

.retailer-signup.auth-layout--compact .auth-panel {
    width: min(100%, 900px);
}

.retailer-signup .auth-card--compact {
    max-width: 900px;
}

.auth-header {
    padding: clamp(1.75rem, 4vw, 2.5rem) clamp(2rem, 5vw, 2.75rem) clamp(1.25rem, 3vw, 2rem);
    text-align: center;
}

.auth-logo {
    margin-bottom: var(--spacing-md);
}

.auth-logo img {
    height: 48px;
    width: auto;
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--auth-input-text);
    margin: 0;
}

.auth-body {
    padding: 0 clamp(2rem, 5vw, 2.75rem) clamp(2rem, 5vw, 3rem);
}

.auth-body h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--auth-input-text);
    margin: 0 0 var(--spacing-xs);
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--auth-input-text);
    opacity: 0.85;
    margin: 0 0 clamp(1.5rem, 3vw, 2rem);
    font-size: 1rem;
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    font-size: 0.9375rem;
    background: rgba(0, 0, 0, 0.08);
    color: var(--auth-input-text);
}

.auth-alert.error {
    background: rgba(220, 38, 38, 0.15);
    color: #721c24;
}

.auth-alert.success {
    background: rgba(22, 163, 74, 0.15);
    color: #166534;
}

.auth-form .form-group {
    margin-bottom: clamp(1rem, 2.2vw, 1.35rem);
}

.signup-form {
    margin-top: var(--spacing-sm);
}

.signup-grid {
    display: grid;
    gap: var(--spacing-sm);
}

.signup-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-sm);
}

.form-actions {
    margin-top: clamp(1.5rem, 3vw, 2rem);
}

.form-actions--center {
    display: flex;
    justify-content: center;
}

.form-actions--center .auth-button {
    min-width: 220px;
}

.auth-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-input-text);
    margin-bottom: var(--spacing-xs);
}

.auth-form .input-group {
    position: relative;
}

.auth-form .input-group i {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-input-text);
    font-size: 1rem;
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-form input {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--auth-input-border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: var(--auth-input-bg);
    color: var(--auth-input-text);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 31, 63, 0.18);
}

.auth-form input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"],
.auth-form input[type="tel"] {
    background: var(--auth-input-bg);
    border: 2px solid var(--auth-input-border);
    color: var(--auth-input-text);
}

.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="tel"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 31, 63, 0.18);
}

.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--auth-input-border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    background: var(--auth-input-bg);
    color: var(--auth-input-text);
    transition: all 0.2s ease;
}

.auth-form .input-group--icon input,
.auth-form .input-group--icon select,
.auth-form .input-group--icon textarea {
    padding-left: calc(var(--spacing-xl) + var(--spacing-sm));
}

.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 31, 63, 0.18);
}

.auth-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    background: var(--primary);
    color: white;
    border: none;
    padding: var(--spacing-md);
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-button:hover {
    background: var(--primary);
    filter: brightness(110%);
}

.auth-footer {
    padding: clamp(1.5rem, 3vw, 2rem) clamp(2rem, 4vw, 2.5rem);
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.2);
    color: var(--auth-input-text);
}

.auth-footer p {
    margin: 0;
    font-size: 0.9375rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .auth-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: clamp(2rem, 8vw, 3.5rem);
    }

    .auth-info {
        justify-self: center;
    }

    .auth-info__description {
        margin-left: auto;
        margin-right: auto;
    }

    .auth-panel {
        width: min(100%, 520px);
    }
}

@media (max-width: 640px) {
    .auth-layout {
        padding: clamp(1.5rem, 6vw, 2.5rem);
    }

    .auth-info__title {
        font-size: clamp(2rem, 9vw, 3.75rem);
    }

    .auth-info__description {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }

    .auth-header {
        padding: clamp(1.25rem, 8vw, 2rem) clamp(1.25rem, 7vw, 2.25rem) clamp(1rem, 5vw, 1.75rem);
    }

    .auth-body {
        padding: 0 clamp(1.25rem, 7vw, 2rem) clamp(1.5rem, 8vw, 2.5rem);
    }
}

@media (max-width: 720px) {
    .app-header nav ul {
        gap: 0.6rem;
    }
    th, td {
        padding: 0.65rem 0.6rem;
    }
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.inline-form select,
.inline-form input[type="password"] {
    margin-bottom: 0;
    min-width: 140px;
}

.inline-form .button {
    margin-bottom: 0;
}

.muted {
    color: #6b7280;
}

.featured-image-field {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.featured-image-field .image-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 600px;
}

.image-frame {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 3 / 2;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.02);
}

.image-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-option {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
    color: #b45309;
    font-size: 0.9rem;
}

.gallery-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: start;
}

.gallery-list li {
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.gallery-list .image-frame {
    max-width: 100%;
}

.gallery-list .gallery-fields {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.gallery-list .gallery-fields label {
    font-weight: 500;
}

.gallery-list .gallery-fields input[type="text"] {
    margin-bottom: 0;
}

.image-grid-example {
    max-width: 640px;
    margin: 0 0 1.25rem;
}

.image-grid-example img {
    width: 100%;
    display: block;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.gallery-upload {
    margin-bottom: 2rem;
    position: relative;
}

.gallery-upload input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.gallery-upload input[type="file"]:focus-visible + .gallery-dropzone {
    border-color: rgba(37, 99, 235, 0.8);
    background: rgba(37, 99, 235, 0.1);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 4px;
}

.gallery-upload:hover .gallery-dropzone {
    border-color: rgba(37, 99, 235, 0.8);
    background: rgba(37, 99, 235, 0.1);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.gallery-dropzone {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    min-height: 150px;
    padding: 1.6rem;
    border-radius: 1rem;
    border: 2px dashed rgba(37, 99, 235, 0.45);
    background: rgba(37, 99, 235, 0.05);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.gallery-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(37, 99, 235, 0.12);
}

.gallery-icon svg {
    width: 48px;
    height: 48px;
}

.gallery-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: #1f2933;
}

.gallery-copy strong {
    font-size: 1.2rem;
}

.gallery-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.gallery-hint {
    color: #4b5563;
    font-size: 0.95rem;
}

.gallery-note {
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 500;
}

.variant-image {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.variant-image .thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.3rem;
    border: 1px solid #d1d5db;
}

.variant-image .remove-option {
    font-size: 0.85rem;
}





@media (max-width: 640px) {
    .gallery-dropzone {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .gallery-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }
}

/* Theme Customizer */
.theme-settings-page {
    display: grid;
    gap: var(--spacing-xl);
}

.theme-customizer {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: var(--spacing-xl);
    max-width: 720px;
    margin: 0 auto;
}

.theme-customizer__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.theme-customizer__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.theme-customizer__subtitle {
    margin: 0;
    color: var(--text);
    font-size: 0.95rem;
}

.theme-customizer__content {
    display: grid;
    gap: var(--spacing-lg);
}

.theme-customizer__group {
    display: grid;
    gap: var(--spacing-md);
}

.theme-customizer__group-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.color-picker-group {
    margin-bottom: var(--spacing-lg);
}

.color-picker-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.color-picker-input {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.color-picker-input input[type="color"] {
    appearance: none;
    -webkit-appearance: none;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0;
    cursor: pointer;
}

.color-picker-input input[type="text"] {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.logo-upload {
    margin-bottom: var(--spacing-lg);
}

.logo-preview {
    width: 100%;
    min-height: 120px;
    border: 2px dashed rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    background: var(--background);
}

.logo-preview img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.theme-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .theme-customizer {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    .theme-customizer {
        padding: var(--spacing-lg);
    }
    
    .theme-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .top-bar__inner {
        gap: var(--spacing-md);
    }

    .top-bar__left {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-sm);
    }

    .top-bar__right {
        justify-content: flex-end;
        gap: var(--spacing-sm);
    }

    .topbar-icon {
        width: 40px;
        height: 40px;
    }

    .topbar-profile__name {
        display: none;
    }

    .top-bar + .container {
        margin-top: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .theme-customizer {
        padding: var(--spacing-md);
    }
}

/* Modern Product View Styles */
.product-view {
    margin-bottom: 4rem;
    background: #fff;
}

.product-view__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .product-view__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Gallery Styles */
.product-gallery {
    position: relative;
}

.product-gallery__main {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f8f8;
    border: 1px solid #eee;
}

.product-gallery__image {
    position: relative;
    padding-top: 100%;
}

.product-gallery__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-gallery__image[data-zoom]:hover img {
    transform: scale(1.5);
    cursor: zoom-in;
}

.product-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
}

.product-gallery__thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    transition: border-color 0.2s;
}

.product-gallery__thumb.active {
    border-color: var(--accent);
}

.product-gallery__thumb img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

/* Product Summary Styles */
.product-summary {
    padding: 2rem 0;
}

.product-title {
    font-size: 2.5rem;
    margin: 0 0 1.5rem;
    line-height: 1.2;
    color: var(--primary);
}

.product-pricing {
    margin-bottom: 2rem;
}

.product-pricing__main {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.product-pricing__price {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
}

.product-pricing__compare {
    font-size: 1.25rem;
    color: #666;
    text-decoration: line-through;
}

.product-pricing__discount {
    background: var(--danger);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.product-stock {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.product-stock i {
    margin-right: 0.5rem;
}

.product-stock.in-stock {
    color: var(--success);
}

.product-stock.out-of-stock {
    color: var(--danger);
}

.product-description {
    color: #4b5563;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.product-options {
    margin-bottom: 2rem;
}

.product-options label {
    display: block;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.form-select {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-select:focus {
    border-color: var(--accent);
    outline: none;
}

.product-quantity {
    margin-bottom: 2rem;
}

.product-quantity label {
    display: block;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.quantity-input {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-input button {
    padding: 0.75rem 1.25rem;
    background: #f8f8f8;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.quantity-input button:hover {
    background: #eee;
}

.quantity-input input {
    width: 80px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    padding: 0.75rem;
    font-size: 1rem;
    appearance: textfield;
    -moz-appearance: textfield;
}

.quantity-input input::-webkit-outer-spin-button,
.quantity-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.button--primary {
    flex: 1;
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.button--primary:hover,
.button--primary:focus {
    background: var(--button-primary-hover-bg);
    color: var(--button-primary-text);
    outline: none;
}

.button--secondary {
    background: var(--button-secondary-bg);
    color: var(--button-secondary-text);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.button--secondary:hover,
.button--secondary:focus {
    background: var(--button-secondary-hover-bg);
    color: var(--button-secondary-text);
    outline: none;
}

/* Product Info Tabs */
.product-tabs {
    background: #f8f8f8;
    padding: 3rem 0;
    margin-top: 3rem;
}

.tabs {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #ddd;
}

.tab {
    padding: 1rem 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tab-content.active {
    display: block;
}

/* Tables */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.specs-table th {
    background: #f8f8f8;
    font-weight: 600;
    color: var(--primary);
}

.stock-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.stock-badge.in-stock {
    background: #dcfce7;
    color: var(--success);
}

.stock-badge.out-of-stock {
    background: #fee2e2;
    color: var(--danger);
}

/* Attributes Grid */
.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.attribute {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #eee;
}

.attribute__key {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.attribute__value {
    color: #4b5563;
    line-height: 1.6;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    padding: 1rem 0;
    background: white;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.breadcrumb-nav a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-nav a:hover {
    color: var(--accent);
}

.breadcrumb-nav i {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0.75rem;
}

/* Product Status Banner */
.product-status-banner {
    text-align: center;
    padding: 0.75rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    font-weight: 500;
}

.product-status-banner.draft {
    background: #f3f4f6;
    color: #374151;
}

.product-status-banner.active {
    background: #dcfce7;
    color: var(--success);
}

.product-status-banner.archived {
    background: #fee2e2;
    color: var(--danger);
}

.profile-card {
    padding: 2rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: flex-start;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.profile-avatar-wrapper {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 4rem;
    color: #9ca3af;
}

.profile-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    color: #4b5563;
}

.profile-meta li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.profile-content .form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.profile-content fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-content fieldset legend {
    font-weight: 600;
    padding: 0 0.5rem;
}

.inline-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.inline-checkbox input {
    width: auto;
}

.profile-details {
    margin: 0;
}

.profile-details dt {
    font-weight: 600;
    color: var(--primary);
    margin-top: 1.25rem;
}

.profile-details dd {
    margin: 0.25rem 0 0;
    color: #4b5563;
}

.profile-details dt:first-of-type {
    margin-top: 0;
}

@media (max-width: 768px) {
    .container {
        padding: 0 clamp(0.75rem, 6vw, 1.25rem);
    }

    .app-content {
        padding: var(--spacing-md) 0 var(--spacing-lg);
    }

    .menu-toggle {
        width: 100%;
        justify-content: center;
    }

    .card {
        padding: var(--spacing-lg);
    }

    .stats-card {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    table {
        margin-bottom: var(--spacing-lg);
    }

    .product-view__grid {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .tabs {
        overflow-x: auto;
        padding-bottom: 1px;
    }

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

    .profile-sidebar {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .profile-avatar-wrapper {
        width: 160px;
        height: 160px;
    }
}
