/* LOVE-U Admin Foundation */

:root {
    --admin-bg: #f7f1e9;
    --admin-card: #ffffff;
    --admin-card-soft: #fffaf4;
    --admin-border: #e7ded2;
    --admin-border-dark: rgba(139, 111, 78, 0.18);
    --admin-text: #171717;
    --admin-muted: #6f6258;
    --admin-soft-text: #8b7a69;
    --admin-accent: #8b6f4e;
    --admin-dark: #171717;
    --admin-cream: #f4e3cc;
    --admin-success-bg: #effaf1;
    --admin-success-text: #176d2e;
    --admin-error-bg: #fff0f0;
    --admin-error-text: #a00000;
    --admin-radius: 20px;
    --admin-shadow: 0 18px 48px rgba(94, 67, 37, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at 18% 0%, rgba(255,255,255,0.9), transparent 28%),
        linear-gradient(135deg, #fffaf4 0%, #f2e6d7 100%);
    color: var(--admin-text);
    overflow-x: hidden;
}

a {
    color: inherit;
}

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

.admin-layout {
    min-height: 100vh;
}

.admin-main {
    min-height: 100vh;
    margin-left: 292px;
    padding: 34px;
}

.admin-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
    padding: 24px;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,250,244,0.78));
    border: 1px solid var(--admin-border-dark);
    box-shadow: var(--admin-shadow);
}

.admin-topbar h1 {
    margin: 0;
    color: var(--admin-text);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1;
    letter-spacing: -1.6px;
}

.admin-user {
    color: var(--admin-muted);
    font-size: 14px;
    font-weight: 800;
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.admin-card,
.admin-panel {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,250,244,0.86));
    border: 1px solid var(--admin-border-dark);
    border-radius: 26px;
    padding: 24px;
    box-shadow: var(--admin-shadow);
}

.admin-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--admin-accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.admin-card strong {
    display: block;
    color: var(--admin-text);
    font-size: 34px;
    line-height: 1;
    letter-spacing: -1px;
}

.admin-card p {
    margin: 10px 0 0;
    color: var(--admin-muted);
    font-size: 13px;
    line-height: 1.55;
}

.admin-panel {
    margin-bottom: 24px;
}

.admin-panel h2 {
    margin: 0 0 18px;
    color: var(--admin-text);
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: -0.6px;
}

.admin-panel h3 {
    color: var(--admin-text);
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 20px;
    border: 1px solid var(--admin-border);
    background: #ffffff;
}

.admin-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #ffffff;
}

.admin-table th,
.admin-table td {
    text-align: left;
    border-bottom: 1px solid #eee8df;
    padding: 14px 13px;
    font-size: 14px;
    vertical-align: middle;
}

.admin-table th {
    color: var(--admin-soft-text);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: #fffaf4;
}

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

.admin-table td {
    color: var(--admin-text);
}

.admin-table img {
    max-width: 64px;
    height: auto;
    border-radius: 12px;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--admin-dark);
    background: var(--admin-dark);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 900;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.admin-btn:hover {
    transform: translateY(-1px);
    background: #2a241f;
    border-color: #2a241f;
}

.admin-btn-light {
    background: #ffffff;
    color: var(--admin-text) !important;
    border: 1px solid #ddd4ca;
}

.admin-btn-light:hover {
    background: #fffaf4;
    border-color: #cdbca8;
}

.admin-btn-danger {
    background: #9a3f2f;
    border-color: #9a3f2f;
    color: #ffffff !important;
}

.admin-btn-danger:hover {
    background: #7f3023;
    border-color: #7f3023;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-field {
    margin-bottom: 18px;
}

.admin-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 900;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #ddd4ca;
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    background: #ffffff;
    color: var(--admin-text);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.admin-field textarea {
    min-height: 124px;
    resize: vertical;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
    border-color: #b79670;
    background: #fffaf4;
    box-shadow: 0 0 0 4px rgba(183,150,112,0.14);
}

.admin-field small {
    display: block;
    margin-top: 7px;
    color: var(--admin-muted);
    font-size: 12px;
    line-height: 1.5;
}

.admin-alert {
    padding: 14px 16px;
    border-radius: 18px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 800;
}

.admin-alert-success {
    background: var(--admin-success-bg);
    color: var(--admin-success-text);
    border: 1px solid #ccefd4;
}

.admin-alert-error {
    background: var(--admin-error-bg);
    color: var(--admin-error-text);
    border: 1px solid #ffd0d0;
}

.admin-actions,
.admin-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.admin-filter-bar,
.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--admin-border);
    box-shadow: 0 12px 34px rgba(94,67,37,0.05);
}

.admin-filter-bar form,
.admin-toolbar form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-filter-bar input,
.admin-filter-bar select,
.admin-toolbar input,
.admin-toolbar select {
    min-height: 42px;
    border: 1px solid #ddd4ca;
    border-radius: 999px;
    padding: 0 14px;
    background: #fffaf4;
    outline: none;
}

.badge,
.admin-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f7efe5;
    color: #6b5845;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.status-active,
.badge-success {
    background: #effaf1;
    color: #176d2e;
}

.status-pending,
.badge-warning {
    background: #fff8e5;
    color: #8a6200;
}

.status-inactive,
.status-cancelled,
.badge-danger {
    background: #fff0f0;
    color: #a00000;
}
/* LOVE-U Admin Sidebar */

.admin-mobile-menu-btn {
    display: none;
}

.lue-admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 292px;
    height: 100vh;
    overflow-y: auto;
    padding: 18px;
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.12), transparent 32%),
        linear-gradient(180deg, #1d1712 0%, #120f0c 100%);
    border-right: 1px solid rgba(255,255,255,0.08);
    box-shadow: 18px 0 60px rgba(0,0,0,0.18);
    z-index: 999;
}

.lue-admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.lue-admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(244,227,204,0.26);
    border-radius: 999px;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px 18px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-sidebar-logo {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #f4e3cc;
    color: #171717;
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 12px 34px rgba(0,0,0,0.18);
}

.admin-sidebar-brand h2 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.1;
    letter-spacing: -0.4px;
}

.admin-sidebar-brand p {
    margin: 5px 0 0;
    color: rgba(244,227,204,0.66);
    font-size: 12px;
    font-weight: 700;
}

.admin-sidebar-close {
    display: none;
    margin-left: auto;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}

.admin-sidebar-nav {
    display: grid;
    gap: 14px;
}

.admin-menu-group {
    display: grid;
    gap: 6px;
}

.admin-menu-title {
    display: block;
    padding: 8px 12px 4px;
    color: rgba(244,227,204,0.48);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.admin-menu-link {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 16px;
    color: rgba(255,255,255,0.76) !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 800;
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.admin-menu-link:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff !important;
    transform: translateX(2px);
}

.admin-menu-link.active {
    background: #f4e3cc;
    color: #171717 !important;
    box-shadow: 0 12px 34px rgba(0,0,0,0.18);
}

.admin-menu-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: inherit;
    font-size: 13px;
    font-weight: 900;
}

.admin-menu-link.active .admin-menu-icon {
    background: #171717;
    color: #f4e3cc;
}

.admin-sidebar-footer {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.admin-view-site {
    background: rgba(244,227,204,0.10);
}

.admin-logout-link {
    color: #ffd3ca !important;
}

.admin-logout-link:hover {
    background: rgba(255,120,95,0.12);
}

.admin-sidebar-overlay {
    display: none;
}

/* Adjust main admin content beside fixed sidebar */
.admin-main {
    margin-left: 292px;
}
@media (max-width: 1180px) {
    .admin-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .admin-main {
        margin-left: 0;
        padding: 82px 18px 28px;
    }

    .admin-mobile-menu-btn {
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 1001;
        width: 46px;
        height: 46px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: none;
        border-radius: 16px;
        background: #171717;
        box-shadow: 0 16px 44px rgba(0,0,0,0.18);
        cursor: pointer;
    }

    .admin-mobile-menu-btn span {
        width: 20px;
        height: 2px;
        border-radius: 999px;
        background: #f4e3cc;
    }

    .lue-admin-sidebar {
        transform: translateX(-105%);
        transition: transform 0.28s ease;
    }

    body.admin-sidebar-open .lue-admin-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .admin-sidebar-overlay {
        position: fixed;
        inset: 0;
        display: block;
        background: rgba(0,0,0,0.48);
        backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.24s ease;
        z-index: 998;
    }

    body.admin-sidebar-open .admin-sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 24px;
    }

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

    .admin-filter-bar,
    .admin-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-filter-bar form,
    .admin-toolbar form {
        width: 100%;
        flex-direction: column;
    }

    .admin-filter-bar input,
    .admin-filter-bar select,
    .admin-toolbar input,
    .admin-toolbar select,
    .admin-filter-bar .admin-btn,
    .admin-toolbar .admin-btn {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .admin-main {
        padding-left: 14px;
        padding-right: 14px;
    }

    .admin-cards {
        grid-template-columns: 1fr;
    }

    .admin-card,
    .admin-panel {
        padding: 18px;
        border-radius: 22px;
    }

    .admin-card strong {
        font-size: 30px;
    }

    .admin-table {
        min-width: 680px;
    }

    .admin-actions,
    .admin-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-actions .admin-btn,
    .admin-action-row .admin-btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .lue-admin-sidebar {
        width: min(292px, 88vw);
        padding: 14px;
    }

    .admin-sidebar-brand {
        padding-left: 8px;
        padding-right: 8px;
    }

    .admin-menu-link {
        min-height: 42px;
        border-radius: 14px;
        font-size: 13px;
    }
}

/* Admin page polish + mobile safety */

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 20px;
    border: 1px solid #e7ded2;
    background: #ffffff;
}

.admin-table-wrap .admin-table {
    min-width: 760px;
}

.admin-table td .admin-btn,
.admin-table td .admin-btn-light {
    margin: 3px;
}

.admin-table small {
    color: #6f6258;
    line-height: 1.5;
}

.admin-table strong {
    color: #171717;
}

.admin-panel > form > .admin-btn,
.admin-panel > form > .admin-btn-light {
    margin-top: 6px;
}

.admin-panel img {
    max-width: 100%;
}

.admin-field input[type="file"] {
    padding: 12px;
    background: #fffaf4;
}

.admin-file-note {
    display: inline-flex !important;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f7efe5;
    color: #6b5845;
    font-weight: 900;
}

.admin-panel [style*="display:flex"] {
    max-width: 100%;
}

.admin-panel [style*="width:90px"],
.admin-panel [style*="width:56px"],
.admin-panel [style*="width:54px"] {
    flex-shrink: 0;
}

.admin-panel [style*="grid-template-columns: 1fr 360px"],
.admin-panel [style*="grid-template-columns:1fr 360px"] {
    gap: 24px !important;
}

.admin-panel p {
    color: #5f554c;
    line-height: 1.7;
}

.admin-panel h3 {
    margin: 0 0 10px;
    color: #171717;
    font-size: 17px;
    letter-spacing: -0.2px;
}

.admin-panel form[method="POST"] select,
.admin-panel form[method="POST"] input,
.admin-panel form[method="POST"] textarea {
    max-width: 100%;
}

.admin-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f7efe5;
    color: #6b5845;
    font-size: 12px;
    font-weight: 900;
}

.admin-mini-thumb {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    object-fit: cover;
    background: #fffaf4;
    border: 1px solid #e7ded2;
}

.admin-danger-link,
.admin-table a.admin-btn:not(.admin-btn-light) {
    background: #9a3f2f;
    border-color: #9a3f2f;
}

.admin-danger-link:hover,
.admin-table a.admin-btn:not(.admin-btn-light):hover {
    background: #7f3023;
    border-color: #7f3023;
}

@media (max-width: 980px) {
    .admin-panel [style*="grid-template-columns: 1fr 360px"],
    .admin-panel [style*="grid-template-columns:1fr 360px"],
    .admin-main > div[style*="grid-template-columns: 1fr 360px"],
    .admin-main > div[style*="grid-template-columns:1fr 360px"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .admin-topbar .admin-btn {
        width: 100%;
    }

    .admin-table-wrap {
        margin: 0 -2px;
    }

    .admin-table td {
        white-space: normal;
    }
}

@media (max-width: 620px) {
    .admin-table-wrap .admin-table {
        min-width: 700px;
    }

    .admin-panel {
        overflow: hidden;
    }

    .admin-panel h2 {
        font-size: 22px;
    }

    .admin-form-grid {
        gap: 10px;
    }

    .admin-btn {
        width: 100%;
    }

    .admin-table td .admin-btn,
    .admin-table td .admin-btn-light {
        width: auto;
        min-width: 82px;
    }
}

/* Admin Orders Page */

.admin-order-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 24px;
    align-items: start;
}

.admin-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-panel-head h2 {
    margin-bottom: 6px;
}

.admin-panel-head p {
    margin: 0;
    color: #6f6258;
    font-size: 14px;
    line-height: 1.6;
}

.admin-order-items-list {
    display: grid;
    gap: 14px;
}

.admin-order-item-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e7ded2;
    box-shadow: 0 12px 34px rgba(94, 67, 37, 0.05);
}

.admin-order-item-image {
    overflow: hidden;
    width: 92px;
    height: 92px;
    border-radius: 18px;
    background: #fffaf4;
    border: 1px solid #eadfce;
}

.admin-order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-order-item-image span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b6f4e;
    font-size: 28px;
    font-weight: 900;
}

.admin-order-item-info {
    min-width: 0;
}

.admin-order-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.admin-order-item-top h3 {
    margin: 0 0 7px;
    color: #171717;
    font-size: 17px;
    line-height: 1.3;
}

.admin-order-item-top h3 a {
    color: inherit;
    text-decoration: none;
}

.admin-order-item-top h3 a:hover {
    text-decoration: underline;
}

.admin-order-variation {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #6f6258;
    font-size: 13px;
    font-weight: 800;
}

.admin-order-color-dot {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border-radius: 999px;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(23,23,23,0.15);
}

.admin-order-line-total {
    color: #171717;
    font-size: 17px;
    white-space: nowrap;
}

.admin-order-item-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.admin-order-item-meta span {
    display: grid;
    gap: 4px;
    padding: 10px;
    border-radius: 16px;
    background: #fffaf4;
    color: #8b7a69;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.admin-order-item-meta strong {
    color: #171717;
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
    word-break: break-word;
}

.admin-order-address-panel,
.admin-order-items-panel {
    margin-bottom: 24px;
}

.admin-address-text {
    white-space: pre-line;
    color: #5f554c;
    line-height: 1.7;
    padding: 16px;
    border-radius: 18px;
    background: #fffaf4;
    border: 1px solid #eadfce;
}

.admin-order-update-card {
    position: sticky;
    top: 24px;
}

.admin-order-update-card .admin-btn {
    width: 100%;
}

.admin-order-summary-lines {
    display: grid;
    gap: 12px;
}

.admin-order-summary-lines > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #6f6258;
    font-size: 14px;
}

.admin-order-summary-lines strong {
    color: #171717;
}

.admin-order-summary-total {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid #eee8df;
    font-size: 20px !important;
}

.admin-order-summary-total span,
.admin-order-summary-total strong {
    color: #171717;
    font-size: 22px;
}

.status-paid,
.status-completed,
.status-delivered,
.status-shipped {
    background: #effaf1;
    color: #176d2e;
}

.status-pending,
.status-processing,
.status-packed,
.status-not_shipped {
    background: #fff8e5;
    color: #8a6200;
}

.status-failed,
.status-refunded,
.status-cancelled {
    background: #fff0f0;
    color: #a00000;
}

@media (max-width: 1080px) {
    .admin-order-detail-layout {
        grid-template-columns: 1fr;
    }

    .admin-order-update-card {
        position: static;
    }
}

@media (max-width: 720px) {
    .admin-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-order-item-card {
        grid-template-columns: 76px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .admin-order-item-image {
        width: 76px;
        height: 76px;
        border-radius: 16px;
    }

    .admin-order-item-top {
        flex-direction: column;
        gap: 8px;
    }

    .admin-order-line-total {
        font-size: 16px;
    }

    .admin-order-item-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .admin-order-item-card {
        grid-template-columns: 1fr;
    }

    .admin-order-item-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 0.75;
    }

    .admin-order-item-meta {
        grid-template-columns: 1fr;
    }
}

/* Admin Products Page */

.admin-product-editor-panel,
.admin-variation-editor-panel,
.admin-variation-list-panel {
    margin-bottom: 24px;
}

.admin-product-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-product-flags label {
    position: relative;
    display: inline-flex;
    margin: 0;
    cursor: pointer;
}

.admin-product-flags input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-product-flags span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #ddd4ca;
    background: #ffffff;
    color: #6f6258;
    font-size: 13px;
    font-weight: 900;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.admin-product-flags input:checked + span {
    background: #171717;
    border-color: #171717;
    color: #f4e3cc;
}

.admin-product-flags span:hover {
    transform: translateY(-1px);
}

.admin-product-image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 22px;
}

.admin-product-image-card {
    position: relative;
    overflow: hidden;
    width: 96px;
    height: 96px;
    border-radius: 18px;
    background: #fffaf4;
    border: 1px solid #e7ded2;
    box-shadow: 0 10px 24px rgba(94, 67, 37, 0.06);
}

.admin-product-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-product-image-card span {
    position: absolute;
    left: 7px;
    bottom: 7px;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(23,23,23,0.82);
    color: #f4e3cc;
    font-size: 10px;
    font-weight: 900;
}

.admin-variation-current-image {
    display: inline-grid;
    gap: 7px;
    margin-top: 10px;
}

.admin-variation-current-image img {
    width: 86px;
    height: 86px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid #e7ded2;
    background: #fffaf4;
}

.admin-variation-current-image span {
    color: #6f6258;
    font-size: 12px;
    font-weight: 800;
}

.admin-product-swatch {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(23,23,23,0.18), 0 8px 18px rgba(0,0,0,0.08);
}

.admin-product-flag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-product-flag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f7efe5;
    color: #6b5845;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.admin-products-list-panel .admin-table td:nth-child(2) strong {
    display: inline-block;
    max-width: 260px;
    line-height: 1.35;
}

.admin-products-list-panel .admin-table td:nth-child(8),
.admin-variation-list-panel .admin-table td:nth-child(8) {
    min-width: 164px;
}

.admin-products-list-panel .admin-table td:nth-child(8) .admin-btn,
.admin-variation-list-panel .admin-table td:nth-child(8) .admin-btn {
    margin: 3px;
}

.status-draft {
    background: #eef2ff;
    color: #32428a;
}

.status-active {
    background: #effaf1;
    color: #176d2e;
}

.status-inactive {
    background: #fff0f0;
    color: #a00000;
}

@media (max-width: 980px) {
    .admin-product-flags {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-product-flags span {
        width: 100%;
    }

    .admin-product-image-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }

    .admin-product-image-card {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 520px) {
    .admin-product-image-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-products-list-panel .admin-table-wrap .admin-table,
    .admin-variation-list-panel .admin-table-wrap .admin-table {
        min-width: 900px;
    }
}