/* =========================================================
   VJoraShop - Professional Admin Panel
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #071a33;
    --navy-2: #0d2a4d;
    --yellow: #ffd21f;
    --white: #ffffff;
    --light: #f5f7fb;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --green: #16a34a;
    --red: #dc2626;
    --orange: #f59e0b;
    --blue: #2563eb;
    --shadow: 0 10px 30px rgba(7, 26, 51, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--light);
    color: var(--text);
    min-height: 100vh;
}

/* =========================================================
   COMMON
   ========================================================= */

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* =========================================================
   HEADER
   ========================================================= */

.admin-header {
    width: 100%;
    min-height: 76px;

    background:
        linear-gradient(
            135deg,
            var(--navy),
            var(--navy-2)
        );

    color: var(--white);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 32px;

    position: sticky;
    top: 0;
    z-index: 1000;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Brand */

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-logo {
    width: 48px;
    height: 48px;

    border-radius: 14px;

    background: var(--white);

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.15);
}

.admin-logo span {
    font-size: 20px;
    font-weight: 900;

    color: var(--navy);

    letter-spacing: -1px;
}

.admin-brand h1 {
    font-size: 23px;
    font-weight: 800;
    line-height: 1.1;
}

.admin-brand h1 span {
    color: var(--yellow);
}

.admin-brand small {
    display: block;

    margin-top: 3px;

    font-size: 9px;
    letter-spacing: 2px;

    color: rgba(255, 255, 255, 0.7);

    font-weight: 700;
}

/* Header Right */

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-avatar {
    width: 42px;
    height: 42px;

    border-radius: 50%;

    background: var(--yellow);
    color: var(--navy);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 17px;
    font-weight: 900;
}

.admin-user-info {
    display: flex;
    flex-direction: column;
}

.admin-user-info strong {
    font-size: 14px;
}

.admin-user-info small {
    margin-top: 2px;

    color: rgba(255, 255, 255, 0.65);

    font-size: 11px;

    max-width: 230px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);

    background: rgba(255, 255, 255, 0.08);

    color: var(--white);

    padding: 10px 15px;

    border-radius: 10px;

    font-weight: 700;

    transition: 0.2s;
}

.logout-btn:hover {
    background: var(--yellow);
    color: var(--navy);
}

/* =========================================================
   MAIN CONTAINER
   ========================================================= */

.admin-container {
    width: 100%;
    max-width: 1500px;

    margin: auto;

    padding: 30px;
}

/* =========================================================
   LOADING
   ========================================================= */

.admin-loading {
    min-height: 60vh;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 15px;

    color: var(--muted);
}

.loading-spinner {
    width: 42px;
    height: 42px;

    border-radius: 50%;

    border: 4px solid #e5e7eb;
    border-top-color: var(--navy);

    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   SECTION
   ========================================================= */

.admin-panel {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.dashboard-section,
.admin-section {
    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 18px;

    padding: 24px;

    box-shadow: var(--shadow);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.section-heading h2 {
    font-size: 22px;
    font-weight: 800;

    color: var(--navy);
}

.section-heading p {
    margin-top: 4px;

    font-size: 13px;

    color: var(--muted);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.primary-btn,
.secondary-btn,
.small-btn {
    border: none;

    border-radius: 10px;

    font-weight: 750;

    transition:
        transform 0.15s,
        box-shadow 0.15s,
        background 0.15s;
}

.primary-btn {
    background: var(--yellow);
    color: var(--navy);

    padding: 11px 18px;

    box-shadow:
        0 5px 15px rgba(255, 210, 31, 0.2);
}

.primary-btn:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 20px rgba(255, 210, 31, 0.3);
}

.secondary-btn {
    background: #eef2f7;
    color: var(--navy);

    padding: 10px 16px;
}

.secondary-btn:hover {
    background: #e2e8f0;
}

.small-btn {
    padding: 7px 11px;

    background: var(--navy);
    color: var(--white);

    font-size: 12px;
}

.small-btn:hover {
    background: var(--navy-2);
}

/* =========================================================
   DASHBOARD CARDS
   ========================================================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;
}

.stat-card {
    border: 1px solid var(--border);

    border-radius: 15px;

    padding: 20px;

    display: flex;
    align-items: center;

    gap: 15px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #fafcff
        );

    transition: 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 25px rgba(7, 26, 51, 0.08);
}

.stat-icon {
    width: 50px;
    height: 50px;

    border-radius: 13px;

    background: #f0f4f9;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 23px;
}

.stat-card span {
    display: block;

    color: var(--muted);

    font-size: 12px;

    margin-bottom: 5px;
}

.stat-card strong {
    font-size: 23px;

    color: var(--navy);
}

/* =========================================================
   TOOLBAR
   ========================================================= */

.toolbar {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 20px;
}

.search-box {
    flex: 1;

    max-width: 520px;

    height: 44px;

    display: flex;
    align-items: center;

    gap: 9px;

    border: 1px solid var(--border);

    background: var(--white);

    border-radius: 10px;

    padding: 0 13px;
}

.search-box span {
    color: var(--muted);

    font-size: 22px;
}

.search-box input {
    width: 100%;

    border: none;
    outline: none;

    background: transparent;

    color: var(--text);

    font-size: 14px;
}

.toolbar select {
    min-width: 180px;

    height: 44px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: var(--white);

    color: var(--text);

    padding: 0 12px;

    outline: none;
}

.toolbar select:focus,
.search-box:focus-within {
    border-color: var(--navy);

    box-shadow:
        0 0 0 3px rgba(7, 26, 51, 0.07);
}

/* =========================================================
   TABLE
   ========================================================= */

.table-wrapper {
    width: 100%;

    overflow-x: auto;

    border: 1px solid var(--border);

    border-radius: 13px;
}

.admin-table {
    width: 100%;

    border-collapse: collapse;

    min-width: 950px;
}

.admin-table th {
    background: #f8fafc;

    color: var(--muted);

    text-align: left;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    padding: 14px;

    border-bottom: 1px solid var(--border);

    white-space: nowrap;
}

.admin-table td {
    padding: 13px 14px;

    border-bottom: 1px solid #edf0f4;

    vertical-align: middle;

    font-size: 13px;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: #fafcff;
}

/* =========================================================
   PRODUCT TABLE
   ========================================================= */

.admin-product-cell {
    display: flex;
    align-items: center;

    gap: 11px;

    min-width: 220px;
}

.admin-product-image {
    width: 55px;
    height: 55px;

    border-radius: 10px;

    object-fit: cover;

    background: #f1f5f9;

    border: 1px solid var(--border);

    flex-shrink: 0;
}

.admin-product-info {
    min-width: 0;
}

.admin-product-info strong {
    display: block;

    color: var(--navy);

    font-size: 13px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    max-width: 220px;
}

.admin-product-info span {
    display: block;

    color: var(--muted);

    font-size: 11px;

    margin-top: 3px;
}

.price-cell strong {
    color: var(--navy);

    font-size: 14px;
}

.old-price {
    color: #9ca3af;

    text-decoration: line-through;

    font-size: 11px;

    margin-left: 5px;
}

.discount-badge {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    background: #fff1f2;

    color: #dc2626;

    padding: 5px 8px;

    border-radius: 7px;

    font-size: 11px;

    font-weight: 800;
}

.stock-badge {
    display: inline-flex;

    padding: 5px 8px;

    border-radius: 7px;

    background: #ecfdf5;

    color: var(--green);

    font-size: 11px;

    font-weight: 750;
}

.stock-badge.low {
    background: #fffbeb;
    color: #b45309;
}

.stock-badge.out {
    background: #fef2f2;
    color: var(--red);
}

.rating-cell {
    white-space: nowrap;
}

.rating-stars {
    color: #f59e0b;

    letter-spacing: 1px;

    font-size: 12px;
}

.rating-number {
    color: var(--muted);

    font-size: 11px;

    margin-left: 3px;
}

/* =========================================================
   ACTION BUTTONS
   ========================================================= */

.table-actions {
    display: flex;

    gap: 6px;

    flex-wrap: wrap;
}

.action-btn {
    border: none;

    border-radius: 8px;

    padding: 7px 9px;

    font-size: 11px;

    font-weight: 750;
}

.action-view {
    background: #eff6ff;
    color: var(--blue);
}

.action-edit {
    background: #fff7ed;
    color: #c2410c;
}

.action-delete {
    background: #fef2f2;
    color: var(--red);
}

.action-btn:hover {
    filter: brightness(0.96);
}

/* =========================================================
   ORDER TABLE
   ========================================================= */

.order-id {
    font-weight: 800;

    color: var(--navy);

    font-size: 12px;
}

.customer-cell strong {
    display: block;

    font-size: 13px;
}

.customer-cell span {
    display: block;

    color: var(--muted);

    font-size: 11px;

    margin-top: 3px;
}

.order-products-count {
    color: var(--muted);

    font-size: 12px;
}

.payment-badge {
    display: inline-flex;

    padding: 5px 8px;

    border-radius: 7px;

    font-size: 11px;

    font-weight: 750;

    background: #f1f5f9;

    color: var(--navy);
}

.status-select {
    min-width: 130px;

    padding: 7px 9px;

    border-radius: 8px;

    border: 1px solid var(--border);

    outline: none;

    font-size: 11px;

    font-weight: 750;

    background: var(--white);

    color: var(--text);
}

.status-select:focus {
    border-color: var(--navy);
}

.status-select.status-placed {
    background: #eff6ff;
    color: #1d4ed8;
}

.status-select.status-confirmed {
    background: #f5f3ff;
    color: #6d28d9;
}

.status-select.status-packed {
    background: #fff7ed;
    color: #c2410c;
}

.status-select.status-shipped {
    background: #ecfeff;
    color: #0e7490;
}

.status-select.status-delivered {
    background: #ecfdf5;
    color: #15803d;
}

.status-select.status-cancelled {
    background: #fef2f2;
    color: #b91c1c;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
    padding: 55px 20px;

    text-align: center;

    color: var(--muted);
}

.empty-state > div {
    font-size: 42px;

    margin-bottom: 10px;
}

.empty-state h3 {
    color: var(--navy);

    font-size: 18px;

    margin-bottom: 5px;
}

.empty-state p {
    font-size: 13px;
}

/* =========================================================
   MODAL
   ========================================================= */

.modal {
    position: fixed;

    inset: 0;

    background:
        rgba(3, 12, 25, 0.72);

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 3000;

    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-box {
    width: 100%;

    max-width: 850px;

    max-height: 92vh;

    overflow-y: auto;

    background: var(--white);

    border-radius: 18px;

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.25);

    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.product-modal-box {
    max-width: 900px;
}

.order-modal-box {
    max-width: 900px;
}

.admin-product-view-box {
    max-width: 900px;
}

/* =========================================================
   MODAL HEADER
   ========================================================= */

.modal-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding: 21px 24px;

    border-bottom: 1px solid var(--border);

    position: sticky;

    top: 0;

    background: var(--white);

    z-index: 5;
}

.modal-header h2 {
    color: var(--navy);

    font-size: 20px;

    font-weight: 850;
}

.modal-header p {
    color: var(--muted);

    font-size: 12px;

    margin-top: 3px;
}

.modal-close {
    width: 35px;
    height: 35px;

    flex-shrink: 0;

    border: none;

    border-radius: 9px;

    background: #f1f5f9;

    color: var(--navy);

    font-size: 24px;

    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e2e8f0;
}

/* =========================================================
   FORM
   ========================================================= */

#productForm {
    padding: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    color: var(--navy);

    font-size: 12px;

    font-weight: 800;
}

.form-group small {
    display: block;

    margin-top: 5px;

    color: var(--muted);

    font-size: 11px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    border: 1px solid var(--border);

    background: var(--white);

    color: var(--text);

    border-radius: 10px;

    padding: 11px 12px;

    outline: none;

    font-size: 13px;
}

.form-group textarea {
    resize: vertical;

    min-height: 120px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--navy);

    box-shadow:
        0 0 0 3px rgba(7, 26, 51, 0.07);
}

.form-row {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 15px;
}

.form-row.three-columns {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

/* =========================================================
   DISCOUNT PREVIEW
   ========================================================= */

.discount-preview {
    margin-top: -5px;

    margin-bottom: 18px;

    padding: 12px 14px;

    border-radius: 10px;

    background: #f8fafc;

    border: 1px solid var(--border);

    color: var(--muted);

    font-size: 13px;
}

.discount-preview strong {
    float: right;

    color: var(--red);

    background: #fff1f2;

    padding: 4px 8px;

    border-radius: 6px;

    font-size: 11px;
}

/* =========================================================
   SIZES
   ========================================================= */

.sizes-admin-section {
    margin-bottom: 20px;

    padding: 15px;

    border-radius: 12px;

    background: #f8fafc;

    border: 1px solid var(--border);
}

.field-title-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 12px;
}

.field-title-row label {
    margin-bottom: 2px;
}

.field-title-row small {
    color: var(--muted);

    font-size: 10px;
}

.sizes-container {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;
}

.size-item {
    display: flex;

    align-items: center;

    gap: 5px;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 9px;

    padding: 5px;
}

.size-item input {
    width: 90px !important;

    border: none !important;

    box-shadow: none !important;

    padding: 7px !important;

    background: transparent !important;
}

.remove-size-btn {
    width: 27px;
    height: 27px;

    border: none;

    border-radius: 6px;

    background: #fef2f2;

    color: var(--red);

    font-weight: 900;
}

/* =========================================================
   IMAGE UPLOAD
   ========================================================= */

.image-drop-zone {
    border: 2px dashed #cbd5e1;

    border-radius: 12px;

    min-height: 130px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 5px;

    cursor: pointer;

    background: #f8fafc;

    transition: 0.2s;
}

.image-drop-zone:hover,
.image-drop-zone.dragover {
    border-color: var(--navy);

    background: #f1f5f9;
}

.upload-icon {
    font-size: 30px;

    margin-bottom: 4px;
}

.image-drop-zone strong {
    color: var(--navy);

    font-size: 13px;
}

.image-drop-zone span {
    color: var(--muted);

    font-size: 11px;
}

.image-preview-container {
    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));

    gap: 8px;

    margin-top: 12px;
}

.image-preview {
    position: relative;

    aspect-ratio: 1;

    border-radius: 9px;

    overflow: hidden;

    border: 1px solid var(--border);

    background: #f1f5f9;
}

.image-preview img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.remove-image-btn {
    position: absolute;

    top: 4px;
    right: 4px;

    width: 22px;
    height: 22px;

    border: none;

    border-radius: 50%;

    background: rgba(0, 0, 0, 0.7);

    color: white;

    font-size: 12px;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   FORM ACTIONS
   ========================================================= */

.form-actions,
.modal-footer {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 10px;

    padding: 18px 24px;

    border-top: 1px solid var(--border);

    background: var(--white);
}

.modal-footer {
    position: sticky;

    bottom: 0;

    z-index: 5;
}

/* =========================================================
   ORDER DETAILS
   ========================================================= */

.order-detail-wrapper {
    padding: 24px;
}

.order-info-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin-bottom: 22px;
}

.info-box {
    padding: 13px;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: #fafcff;
}

.info-box label {
    display: block;

    color: var(--muted);

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    margin-bottom: 5px;

    font-weight: 750;
}

.info-box strong,
.info-box span {
    font-size: 13px;

    color: var(--navy);

    word-break: break-word;
}

.order-products-title {
    color: var(--navy);

    font-size: 16px;

    font-weight: 850;

    margin-bottom: 12px;
}

/* =========================================================
   ORDER PRODUCT CARD
   ========================================================= */

.admin-order-product {
    display: flex;

    gap: 13px;

    padding: 13px;

    border: 1px solid var(--border);

    border-radius: 12px;

    margin-bottom: 10px;

    background: var(--white);

    cursor: pointer;

    transition: 0.2s;
}

.admin-order-product:hover {
    border-color: var(--navy);

    box-shadow:
        0 6px 18px rgba(7, 26, 51, 0.07);
}

.admin-order-product-image {
    width: 75px;
    height: 75px;

    object-fit: cover;

    border-radius: 9px;

    background: #f1f5f9;

    flex-shrink: 0;
}

.admin-order-product-info {
    flex: 1;

    min-width: 0;
}

.admin-order-product-info h4 {
    color: var(--navy);

    font-size: 14px;

    margin-bottom: 5px;
}

.admin-order-product-info p {
    color: var(--muted);

    font-size: 11px;

    margin-top: 3px;
}

.admin-order-product-price {
    color: var(--navy);

    font-weight: 850;

    margin-top: 7px;
}

.click-product {
    color: var(--blue) !important;

    font-weight: 700;
}

/* =========================================================
   ORDER STATUS TIMELINE
   ========================================================= */

.admin-status-timeline {
    display: flex;

    align-items: flex-start;

    margin: 20px 0;

    padding: 10px 0;

    overflow-x: auto;
}

.admin-status-step {
    min-width: 105px;

    position: relative;

    text-align: center;
}

.admin-status-step:not(:last-child)::after {
    content: "";

    position: absolute;

    top: 12px;

    left: 50%;

    width: 100%;

    height: 3px;

    background: #e5e7eb;

    z-index: 0;
}

.admin-status-step.done:not(:last-child)::after {
    background: var(--green);
}

.admin-status-dot {
    width: 26px;
    height: 26px;

    border-radius: 50%;

    background: #e5e7eb;

    color: #94a3b8;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: auto;

    position: relative;

    z-index: 2;

    font-size: 11px;

    font-weight: 900;
}

.admin-status-step.done .admin-status-dot {
    background: var(--green);

    color: var(--white);
}

.admin-status-step.current .admin-status-dot {
    background: var(--yellow);

    color: var(--navy);

    box-shadow:
        0 0 0 4px rgba(255, 210, 31, 0.18);
}

.admin-status-step span {
    display: block;

    margin-top: 7px;

    color: #94a3b8;

    font-size: 10px;

    font-weight: 700;
}

.admin-status-step.done span {
    color: var(--green);
}

/* =========================================================
   ADMIN PRODUCT VIEW
   ========================================================= */

.admin-product-view {
    padding: 24px;
}

.admin-product-view-grid {
    display: grid;

    grid-template-columns:
        minmax(260px, 0.9fr)
        minmax(0, 1.1fr);

    gap: 25px;
}

.admin-product-main-image {
    width: 100%;

    aspect-ratio: 1;

    object-fit: contain;

    border-radius: 15px;

    border: 1px solid var(--border);

    background: #f8fafc;
}

.admin-product-view-info h2 {
    color: var(--navy);

    font-size: 24px;

    margin-bottom: 8px;
}

.admin-product-view-info .category {
    color: var(--muted);

    font-size: 12px;

    margin-bottom: 14px;
}

.admin-price-row {
    display: flex;

    align-items: center;

    gap: 10px;

    flex-wrap: wrap;

    margin: 14px 0;
}

.admin-selling-price {
    font-size: 28px;

    color: var(--navy);

    font-weight: 900;
}

.admin-original-price {
    color: #9ca3af;

    text-decoration: line-through;

    font-size: 15px;
}

.admin-view-discount {
    background: #fff1f2;

    color: var(--red);

    border-radius: 7px;

    padding: 5px 8px;

    font-size: 11px;

    font-weight: 850;
}

.admin-view-rating {
    margin: 12px 0;

    color: #f59e0b;

    font-size: 14px;
}

.admin-view-description {
    margin-top: 18px;

    padding-top: 18px;

    border-top: 1px solid var(--border);

    color: var(--muted);

    font-size: 13px;

    line-height: 1.7;
}

.admin-view-sizes {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 15px;
}

.admin-view-size {
    padding: 7px 11px;

    border: 1px solid var(--border);

    border-radius: 8px;

    color: var(--navy);

    font-size: 11px;

    font-weight: 750;

    background: #f8fafc;
}

.admin-image-thumbs {
    display: flex;

    gap: 7px;

    overflow-x: auto;

    margin-top: 10px;
}

.admin-image-thumbs img {
    width: 58px;
    height: 58px;

    object-fit: cover;

    border-radius: 8px;

    border: 1px solid var(--border);

    cursor: pointer;
}

/* =========================================================
   TOAST
   ========================================================= */

.admin-toast {
    position: fixed;

    right: 25px;
    bottom: 25px;

    min-width: 260px;

    max-width: 400px;

    padding: 13px 16px;

    border-radius: 11px;

    background: var(--navy);

    color: var(--white);

    display: flex;

    align-items: center;

    gap: 10px;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.2);

    z-index: 10000;

    opacity: 0;

    transform: translateY(15px);

    pointer-events: none;

    transition: 0.25s;
}

.admin-toast.show {
    opacity: 1;

    transform: translateY(0);
}

#adminToastIcon {
    width: 25px;
    height: 25px;

    border-radius: 50%;

    background: var(--yellow);

    color: var(--navy);

    display: flex;

    align-items: center;
    justify-content: center;

    font-weight: 900;

    flex-shrink: 0;
}

#adminToastMessage {
    font-size: 13px;

    font-weight: 650;

    line-height: 1.4;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .image-preview-container {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }

}

@media (max-width: 800px) {

    .admin-header {
        padding: 12px 18px;
    }

    .admin-container {
        padding: 18px;
    }

    .admin-user-info {
        display: none;
    }

    .section-heading {
        align-items: flex-start;

        flex-direction: column;
    }

    .section-heading .primary-btn,
    .section-heading .secondary-btn {
        width: 100%;
    }

    .toolbar {
        flex-direction: column;

        align-items: stretch;
    }

    .search-box {
        max-width: none;
    }

    .toolbar select {
        width: 100%;
    }

    .form-row,
    .form-row.three-columns {
        grid-template-columns: 1fr;
    }

    .admin-product-view-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 600px) {

    .admin-header {
        min-height: 68px;
    }

    .admin-brand h1 {
        font-size: 18px;
    }

    .admin-logo {
        width: 40px;
        height: 40px;
    }

    .admin-logo span {
        font-size: 16px;
    }

    .logout-btn {
        padding: 8px 10px;

        font-size: 11px;
    }

    .admin-header-right {
        gap: 8px;
    }

    .admin-avatar {
        width: 36px;
        height: 36px;
    }

    .dashboard-section,
    .admin-section {
        padding: 16px;

        border-radius: 14px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 8px;
    }

    .modal-box {
        max-height: 96vh;

        border-radius: 14px;
    }

    .modal-header {
        padding: 17px;
    }

    #productForm,
    .order-detail-wrapper,
    .admin-product-view {
        padding: 17px;
    }

    .form-actions,
    .modal-footer {
        padding: 14px 17px;
    }

    .image-preview-container {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .order-info-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 430px) {

    .admin-brand small {
        display: none;
    }

    .admin-brand h1 {
        font-size: 17px;
    }

    .admin-container {
        padding: 12px;
    }

    .dashboard-section,
    .admin-section {
        padding: 13px;
    }

    .section-heading h2 {
        font-size: 19px;
    }

    .primary-btn,
    .secondary-btn {
        padding: 10px 13px;
    }

    .image-preview-container {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .admin-toast {
        left: 12px;
        right: 12px;

        bottom: 12px;

        min-width: 0;

        width: auto;
    }

}