/* ============================================================
   NicyFoods Admin — Shared Stylesheet
   Used by every admin page (dashboard.html, products.html, ...)
   ============================================================ */

/* ===== RESET & BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Poppins', sans-serif;
    background: #FBF1E2;
    color: #3A2417;
    display: flex;
    min-height: 100vh;
}
h1,
h2,
h3,
.font-display {
    font-family: 'Rozha One', serif;
    letter-spacing: .01em;
}

/* ===== SIDEBAR ===== */
#sidebar {
    width: 270px;
    background: #1a110c;
    color: #cbb9ab;
    flex-shrink: 0;
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 100;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}
#sidebar .brand {
    padding: 1.6rem 1.5rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
#sidebar .brand h1 {
    font-size: 1.7rem;
    color: #FBF1E2;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.02em;
}
#sidebar .brand h1 i {
    color: #E8A33D;
    margin-right: 8px;
}
#sidebar .brand span {
    font-size: 0.6rem;
    opacity: 0.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem 1.5rem;
    color: #b09f91;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    border-left: 3px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    margin: 0.05rem 0;
}
.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}
.nav-item.active {
    background: rgba(166, 58, 46, 0.18);
    color: #fff;
    border-left-color: #A63A2E;
}
.nav-item .icon {
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    font-size: 1rem;
    color: #b09f91;
}
.nav-item.active .icon {
    color: #E8A33D;
}
.nav-item .badge {
    margin-left: auto;
    background: #A63A2E;
    color: #fff;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
}
.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-footer .user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sidebar-footer .user .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8A33D, #A63A2E);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.sidebar-footer .user .name {
    font-weight: 600;
    color: #fff;
    font-size: 0.85rem;
}
.sidebar-footer .user .role {
    font-size: 0.55rem;
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.logout-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #b09f91;
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    margin-top: 0.6rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.logout-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* ===== MAIN ===== */
#main {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 2rem 3rem;
    background: #FBF1E2;
}
#sidebar::-webkit-scrollbar {
    width: 3px;
}
#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 12px -6px rgba(26, 17, 12, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px -12px rgba(26, 17, 12, 0.18);
}
.stat-card .icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-card .icon-wrap.orange {
    background: #fef3e2;
    color: #E8A33D;
}
.stat-card .icon-wrap.green {
    background: #e6f5ed;
    color: #5F7A4F;
}
.stat-card .icon-wrap.red {
    background: #fde8e6;
    color: #A63A2E;
}
.stat-card .icon-wrap.blue {
    background: #e3edf7;
    color: #3b82f6;
}
.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #5C3A25;
    line-height: 1.2;
}
.stat-card .stat-label {
    font-size: 0.7rem;
    color: #8a7362;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ===== CHART ===== */
.chart-card {
    background: white;
    border-radius: 1rem;
    padding: 1.2rem 1.5rem 1rem;
    box-shadow: 0 2px 12px -6px rgba(26, 17, 12, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.chart-card .chart-title {
    font-family: 'Rozha One', serif;
    font-size: 1.05rem;
    color: #5C3A25;
    margin: 0 0 0.6rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.chart-card .chart-title i {
    color: #A63A2E;
}
.chart-wrapper {
    position: relative;
    height: 210px;
    max-width: 100%;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, #E8A33D, #A63A2E);
    color: white;
    font-weight: 600;
    padding: 0.55rem 1.4rem;
    border-radius: 0.6rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(166, 58, 46, 0.4);
}
.btn-primary:active {
    transform: scale(0.97);
}
.btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.btn-secondary {
    background: white;
    color: #A63A2E;
    font-weight: 600;
    padding: 0.4rem 1.2rem;
    border-radius: 0.6rem;
    border: 1.5px solid #A63A2E;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.btn-secondary:hover {
    background: #A63A2E;
    color: white;
}
.btn-danger {
    background: #dc2626;
    color: white;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 0.6rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.btn-danger:hover {
    background: #b91c1c;
}
.btn-edit {
    background: #3b82f6;
    color: white;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 0.6rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.btn-edit:hover {
    background: #2563eb;
}
.btn-icon-remove {
    background: #fee2e2;
    color: #991b1b;
    border: none;
    border-radius: 0.5rem;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.btn-icon-remove:hover {
    background: #fecaca;
}

/* ===== TABLE ===== */
.table-wrap {
    overflow-x: auto;
    border-radius: 0.8rem;
    border: 1px solid rgba(26, 17, 12, 0.05);
    background: white;
    box-shadow: 0 2px 8px -4px rgba(26, 17, 12, 0.05);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
th {
    background: #f8f2ea;
    padding: 0.65rem 0.8rem;
    text-align: left;
    font-weight: 600;
    color: #5C3A25;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
td {
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid rgba(26, 17, 12, 0.04);
    vertical-align: middle;
}
tr:hover td {
    background: rgba(166, 58, 46, 0.015);
}

/* ===== BADGE ===== */
.badge-status {
    display: inline-block;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: capitalize;
}
.badge-status.pending {
    background: #fef9c3;
    color: #854d0e;
}
.badge-status.processing {
    background: #dbeafe;
    color: #1e40af;
}
.badge-status.shipped {
    background: #d1fae5;
    color: #065f46;
}
.badge-status.delivered {
    background: #d1fae5;
    color: #065f46;
}
.badge-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}
.badge-status.new {
    background: #dbeafe;
    color: #1e40af;
}
.badge-status.contacted {
    background: #fef9c3;
    color: #854d0e;
}
.badge-status.converted {
    background: #d1fae5;
    color: #065f46;
}
.badge-status.ignored {
    background: #f1f5f9;
    color: #64748b;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 17, 12, 0.55);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    padding: 1rem;
}
.modal-overlay.open {
    display: flex;
}
.modal-box {
    background: #FDF8F2;
    border-radius: 1.5rem;
    max-width: 840px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 2rem 2.2rem 2rem;
    box-shadow: 0 32px 64px -20px rgba(26, 17, 12, 0.5);
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from {
        transform: scale(0.95) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}
.modal-box .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(166, 58, 46, 0.08);
}
.modal-box .modal-header h2 {
    font-family: 'Rozha One', serif;
    font-size: 1.5rem;
    color: #5C3A25;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.modal-box .modal-header h2 i {
    color: #A63A2E;
}
.modal-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #8a7362;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
}
.modal-close:hover {
    color: #A63A2E;
    background: rgba(166, 58, 46, 0.05);
}

/* ===== FORM ===== */
input,
select,
textarea {
    border: 1.5px solid rgba(92, 58, 37, 0.12);
    border-radius: 0.6rem;
    padding: 0.6rem 0.9rem;
    width: 100%;
    font-family: inherit;
    background: white;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    font-size: 0.85rem;
    color: #3A2417;
    min-height: 46px;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #A63A2E;
    box-shadow: 0 0 0 4px rgba(166, 58, 46, 0.08);
}
input::placeholder,
textarea::placeholder {
    color: #bfaea0;
    font-weight: 400;
}
textarea {
    min-height: 80px;
    resize: vertical;
}

.form-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #5C3A25;
    display: block;
    margin-bottom: 0.3rem;
}
.form-label i {
    margin-right: 6px;
    color: #A63A2E;
    width: 18px;
    text-align: center;
}
.form-group {
    margin-bottom: 1.2rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}
@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Image upload (multiple) */
.image-upload-box {
    border: 2px dashed rgba(92, 58, 37, 0.15);
    border-radius: 0.9rem;
    padding: 1.5rem 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.15s ease;
    position: relative;
    background: rgba(255, 255, 255, 0.5);
}
.image-upload-box:hover {
    border-color: #A63A2E;
    background: rgba(166, 58, 46, 0.03);
    transform: scale(1.005);
}
.image-upload-box input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.image-upload-hint {
    font-size: 0.8rem;
    color: #8a7362;
}
.image-upload-hint i {
    color: #A63A2E;
    margin-right: 6px;
    font-size: 1.1rem;
}
.image-upload-hint strong {
    color: #5C3A25;
}
.image-upload-status {
    font-size: 0.7rem;
    margin-top: 0.4rem;
    min-height: 1.2em;
    font-weight: 500;
}
.image-upload-status.uploading {
    color: #E8A33D;
}
.image-upload-status.success {
    color: #5F7A4F;
}
.image-upload-status.error {
    color: #dc2626;
}

/* Multi-image preview grid */
.image-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 0.6rem;
    overflow: hidden;
    border: 2px solid #e5e0da;
    background: #f8f2ea;
    flex-shrink: 0;
}
.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-preview-item .remove-img {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #dc2626;
    color: white;
    border: none;
    font-size: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.image-preview-item .remove-img:hover {
    transform: scale(1.15);
}

/* Weight rows */
.weight-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.6rem;
    padding: 0.4rem 0.6rem 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0.6rem;
    border: 1px solid rgba(92, 58, 37, 0.05);
    transition: border-color 0.2s ease;
}
.weight-row:hover {
    border-color: rgba(166, 58, 46, 0.15);
}
.weight-row input {
    border: 1px solid rgba(92, 58, 37, 0.06);
    padding: 0.4rem 0.6rem;
    font-size: 0.82rem;
    border-radius: 0.4rem;
    min-height: 40px;
}
.weight-row input:focus {
    border-color: #A63A2E;
    box-shadow: 0 0 0 3px rgba(166, 58, 46, 0.06);
}
@media (max-width: 480px) {
    .weight-row {
        grid-template-columns: 1fr 1fr auto;
        padding: 0.4rem 0.4rem;
    }
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #5C3A25;
    color: #FBF1E2;
    padding: 0.65rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s ease;
    font-size: 0.85rem;
    box-shadow: 0 8px 24px -8px rgba(26, 17, 12, 0.4);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast i {
    font-size: 1rem;
}

/* ===== ACTIONS ===== */
.actions-cell {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        transform: translateX(-100%);
        width: 280px;
        height: 100vh;
        z-index: 200;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
    }
    #sidebar.open {
        transform: translateX(0);
    }
    #main {
        padding: 1rem;
    }
    .modal-box {
        padding: 1.2rem;
        margin: 0.5rem;
    }
    #hamburger {
        display: flex !important;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }
    .stat-card {
        padding: 0.9rem 1rem;
    }
    .stat-card .icon-wrap {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .stat-card .stat-value {
        font-size: 1.2rem !important;
    }
    .chart-wrapper {
        height: 160px;
    }
}
@media (min-width: 769px) {
    #hamburger {
        display: none !important;
    }
    #sidebarOverlay {
        display: none !important;
    }
}

#hamburger {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: #5C3A25;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
#sidebarOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 150;
    display: none;
}
#sidebarOverlay.open {
    display: block;
}

.form-section-title {
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8a7362;
    margin: 1.2rem 0 0.6rem 0;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(92, 58, 37, 0.06);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.form-section-title i {
    color: #A63A2E;
    width: 18px;
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #8a7362;
}
.empty-state i {
    font-size: 2rem;
    color: #d4c5b8;
    margin-bottom: 0.4rem;
    display: block;
}

/* Toggle switch */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.3rem 0;
}
.toggle-wrap .toggle-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #5C3A25;
}
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #d4c5b8;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}
.toggle-switch.active {
    background: #5F7A4F;
}
.toggle-switch .toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.toggle-switch.active .toggle-knob {
    transform: translateX(20px);
}
.toggle-switch input {
    display: none;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Hero styles */
.hero-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0.5rem;
    border: 1px solid rgba(92, 58, 37, 0.05);
}
.hero-stat-row:hover {
    border-color: rgba(166, 58, 46, 0.15);
}
.hero-stat-row input {
    border: 1px solid rgba(92, 58, 37, 0.06);
    padding: 0.4rem 0.6rem;
    font-size: 0.82rem;
    min-height: 40px;
}
.hero-stat-row input:focus {
    border-color: #A63A2E;
    outline: none;
    box-shadow: 0 0 0 2px rgba(166, 58, 46, 0.08);
}

.hero-preview-box {
    background: #1a110c;
    border-radius: 1rem;
    padding: 1.5rem;
    color: #FBF1E2;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    background-image: radial-gradient(circle at 20% 30%, rgba(232, 163, 61, 0.15), transparent 60%);
}
.hero-preview-box .preview-title {
    font-family: 'Rozha One', serif;
    font-size: 1.3rem;
    color: #FBF1E2;
    line-height: 1.2;
}
.hero-preview-box .preview-subtitle {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 0.2rem;
}
.hero-preview-box .preview-eyebrow {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #F2C14E;
    opacity: 0.7;
    margin-bottom: 0.2rem;
}
.hero-preview-box .preview-cta {
    display: inline-block;
    background: linear-gradient(135deg, #E8A33D, #A63A2E);
    color: white;
    font-weight: 600;
    padding: 0.3rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}
.hero-preview-box .preview-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    opacity: 0.6;
    flex-wrap: wrap;
}

.fallback-badge {
    background: #fef9c3;
    color: #854d0e;
    font-size: 0.55rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    display: inline-block;
    margin-left: 0.5rem;
}
.fallback-badge i {
    margin-right: 3px;
}

.status-badge {
    display: inline-block;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 600;
}
.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}
.status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.hero-api-status {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.hero-api-status code {
    background: #fef3c7;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    color: #78350f;
}

.core-value-icon-preview {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.core-value-icon-preview svg {
    width: 20px;
    height: 20px;
}
.core-value-icon-preview-lg {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.core-value-icon-preview-lg svg {
    width: 26px;
    height: 26px;
}

.qp-icon-preview {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background: #f8f2ea;
}
.qp-icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.qp-icon-preview i {
    color: #cbb9ab;
    font-size: 1.2rem;
}

.form-card {
    background: white;
    border-radius: 1.2rem;
    padding: 1.8rem;
    box-shadow: 0 4px 20px -8px rgba(26, 17, 12, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.form-card .form-card-title {
    font-family: 'Rozha One', serif;
    font-size: 1rem;
    color: #5C3A25;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.form-card .form-card-title i {
    color: #A63A2E;
}

.input-icon-wrap {
    position: relative;
}
.input-icon-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #bfaea0;
    font-size: 0.9rem;
    pointer-events: none;
    width: 18px;
    text-align: center;
}
.input-icon-wrap input,
.input-icon-wrap select,
.input-icon-wrap textarea {
    padding-left: 2.8rem;
}
.input-icon-wrap textarea+i {
    top: 18px;
    transform: none;
}

.form-hint {
    font-size: 0.65rem;
    color: #8a7362;
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.form-hint i {
    color: #A63A2E;
    font-size: 0.55rem;
    width: 14px;
    text-align: center;
}

.modal-box::-webkit-scrollbar {
    width: 5px;
}
.modal-box::-webkit-scrollbar-track {
    background: rgba(92, 58, 37, 0.04);
    border-radius: 8px;
}
.modal-box::-webkit-scrollbar-thumb {
    background: rgba(166, 58, 46, 0.2);
    border-radius: 8px;
}
.modal-box::-webkit-scrollbar-thumb:hover {
    background: rgba(166, 58, 46, 0.35);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a7362' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A63A2E' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* Image preview in table */
.product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #f8f2ea;
    border: 1px solid rgba(92, 58, 37, 0.06);
}
.product-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f8f2ea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbb9ab;
    font-size: 1.1rem;
    border: 1px solid rgba(92, 58, 37, 0.06);
}

/* Image preview in modal */
.image-preview {
    max-width: 100%;
    max-height: 120px;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    display: none;
    object-fit: contain;
    background: #f8f2ea;
}
.image-preview.show {
    display: block;
}

/* SVG icon wrapper in table */
.icon-svg-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.icon-svg-wrapper svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}
.icon-svg-wrapper img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* fallback icon in table */
.icon-fallback {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f2ea;
    color: #cbb9ab;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ========== INLINE STATUS SELECT (table quick-update) ========== */
.status-select {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
    font-size: .7rem;
    font-weight: 700;
    padding: .38rem 1.7rem .38rem .85rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .03em;
    background-repeat: no-repeat;
    background-position: right .55rem center;
    background-size: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    transition: all .2s ease;
}
.status-select:hover { filter: brightness(0.96); }
.status-select:focus { outline: none; box-shadow: 0 0 0 3px rgba(215,38,61,.15); }
.status-select:disabled { opacity: .55; cursor: wait; }

.status-select.pending    { background-color: rgba(245,166,35,.15); color: #B87A0E; }
.status-select.confirmed,
.status-select.processing { background-color: rgba(215,38,61,.1);  color: var(--kumkum); }
.status-select.shipped    { background-color: rgba(59,130,246,.12); color: #2563eb; }
.status-select.delivered  { background-color: rgba(34,197,94,.14);  color: #16a34a; }
.status-select.cancelled  { background-color: rgba(148,148,148,.14); color: #6b7280; }

.status-select option { background: #fff; color: var(--ink); font-weight: 600; }