/* ========== Admin Layout Global ========== */
:root {
    --admin-bg: #f3f4f6;
    --admin-sidebar-bg: #0f172a;
    --admin-sidebar-hover: #1f2937;
    --admin-sidebar-active: #111827;
    --admin-sidebar-text: #e5e7eb;
    --admin-sidebar-muted: #9ca3af;
    --admin-header-bg: #ffffff;
    --admin-border: #e5e7eb;
    --admin-text: #111827;
    --admin-text-muted: #6b7280;
    --admin-primary: #2563eb;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body.admin-body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
}

/* Layout utama */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.admin-sidebar {
    width: 240px; /* lebih ramping, sebelumnya 260px */
    background: var(--admin-sidebar-bg);
    color: var(--admin-sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    transform: translateX(0);
    transition: transform 0.25s ease;
}

/* header sidebar lebih rapat */
.admin-sidebar-header {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.admin-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-sidebar-logo img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 999px;
    background: #fff;
}

.admin-sidebar-close {
    display: none;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--admin-sidebar-muted);
    font-size: 1.2rem;
}

.admin-sidebar-nav {
    flex: 1;
    padding: 0.5rem 0.6rem 0.6rem;
    overflow-y: auto;
}

/* section title lebih kecil & padat */
.admin-sidebar-section-title {
    padding: 0.35rem 0.55rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--admin-sidebar-muted);
}

/* === Sidebar nav fix: icon + text rapat & rapi di mobile === */
.admin-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-nav-item + .admin-nav-item {
    margin-top: 2px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;                /* jarak icon-teks kecil */
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.75rem;
    border-radius: 0.6rem;
    border: none;
    background: transparent;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.88rem;
    cursor: pointer;
}

.admin-nav-link:hover {
    background: rgba(148, 163, 184, 0.18);
    color: #ffffff;
}

.admin-nav-link.active {
    background: rgba(248, 250, 252, 0.16);
    color: #ffffff;
}

/* Link yang hanya untuk buka modal (tampilan FE / WA / user) */
.admin-nav-link-action {
    /* sama seperti link biasa, tapi tidak ada underline default browser */
    text-decoration: none;
}

/* Icon di kiri */
.admin-nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.1rem;        /* makin nempel */
    font-size: 1rem;
}

/* Responsif: di layar kecil sidebar tetap enak dibaca */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 260px;
    }
    .admin-nav-link {
        padding: 0.4rem 0.7rem;
        font-size: 0.86rem;
    }
}

/* Footer sidebar juga dipadatkan */
.admin-sidebar-footer {
    padding: 0.6rem 0.9rem 0.7rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 0.72rem;
    color: var(--admin-sidebar-muted);
}

.admin-main {
    margin-left: 240px; /* sebelumnya 260px */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Header/topbar */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--admin-header-bg);
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    gap: 1rem;
}

.admin-header-left,
.admin-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-header-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.admin-header-subtitle {
    font-size: 0.8rem;
    color: var(--admin-text-muted);
}

/* Tombol hamburger (mobile) */
.admin-header-toggle {
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    padding: 0.35rem 0.55rem;
    display: none;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    background: #ffffff;
    font-size: 0.85rem;
}

.admin-header-toggle-icon {
    font-size: 1.1rem;
}

/* Info user kecil di kanan */
.admin-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid var(--admin-border);
    font-size: 0.8rem;
}

.admin-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Konten & footer */
.admin-content {
    padding: 1.25rem 1.25rem 1rem;
    flex: 1;
}

.admin-footer {
    padding: 0.75rem 1.25rem 0.9rem;
    font-size: 0.78rem;
    color: var(--admin-text-muted);
    border-top: 1px solid var(--admin-border);
    background: #ffffff;
}

/* Contoh kartu konten umum */
.admin-card {
    background: #ffffff;
    border-radius: 0.9rem;
    border: 1px solid var(--admin-border);
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

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

    .admin-sidebar-close {
        display: inline-flex;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-header {
        padding-inline: 0.75rem;
    }

    .admin-header-toggle {
        display: inline-flex;
    }
}

@media (max-width: 640px) {
    .admin-content {
        padding: 0.9rem 0.75rem 0.75rem;
    }

    .admin-header-title {
        font-size: 0.98rem;
    }

    .admin-header-subtitle {
        display: none;
    }
}

/* Opsional: sembunyikan scrollbar sidebar di mobile */
.admin-sidebar-nav::-webkit-scrollbar {
    width: 6px;
}
.admin-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 999px;
}

/* ========== AUTH / LOGIN PAGE ========== */

.admin-auth-body {
    min-height: 100vh;
    position: relative;
}

/* Wrapper supaya card di tengah layar */
.admin-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

/* Card login */
.admin-auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 1.25rem;
    border: 1px solid var(--admin-border);
    padding: 1.7rem 1.6rem 1.4rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    position: relative;
    overflow: hidden;
}

/* Header di dalam card */
.admin-auth-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.admin-auth-badge {
    display: inline-flex;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(37, 99, 235, 0.08);
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
}

.admin-auth-header h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-auth-header p {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: var(--admin-text-muted);
}

/* Alert error */
.admin-auth-alert {
    margin-bottom: 0.9rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.7rem;
    font-size: 0.8rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* Form login */
.admin-auth-form .form-group {
    margin-bottom: 0.75rem;
}

.admin-auth-form label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    color: var(--admin-text);
}

.admin-auth-form input[type="text"],
.admin-auth-form input[type="password"],
.admin-auth-form input[type="tel"],
.admin-auth-form input[type="email"],
.admin-auth-form input[type="number"] {
    width: 100%;
    border-radius: 0.6rem;
    border: 1px solid var(--admin-border);
    padding: 0.45rem 0.6rem;
    font-size: 0.86rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-auth-form input:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

/* CAPTCHA row */
.admin-auth-captcha-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    color: var(--admin-text-muted);
}

.admin-auth-captcha-code {
    display: inline-block;
    padding: 0.4rem 0.6rem;
    border-radius: 0.6rem;
    background: #fff3fa;
    border: 1px dashed #f3c1da;
    letter-spacing: 3px;
    font-weight: 600;
    color: #c5327d;
    font-family: monospace;
    min-width: 90px;
    text-align: center;
}

/* Tombol submit */
.admin-auth-submit {
    margin-top: 0.6rem;
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--admin-primary);
    color: #ffffff;
    transition: background 0.15s ease, transform 0.05s ease;
}

.admin-auth-submit:hover {
    background: #1d4ed8;
}

.admin-auth-submit:active {
    transform: translateY(1px);
}

/* Footer kecil di bawah form */
.admin-auth-footer-text {
    margin-top: 0.9rem;
    font-size: 0.76rem;
    text-align: center;
    color: var(--admin-text-muted);
}

/* Mobile */
@media (max-width: 480px) {
    .admin-auth-card {
        padding: 1.5rem 1.2rem 1.3rem;
    }
}

/* ========== MODAL (ADMIN) ========== */

.modal {
    position: fixed;
    inset: 0;
    display: none; /* akan di-set ke flex oleh JS */
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.45);
    z-index: 80; /* di atas sidebar & header */
}

/* Konten utama modal */
.modal-content {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid var(--admin-border);
    padding: 1rem 1.1rem 1.1rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

/* Variasi lebar */
.modal-content.modal-settings {
    max-width: 720px;
}

.modal-content.modal-invoice-content {
    max-width: 420px;
    max-height: 90vh;              /* supaya tidak lebih tinggi dari layar */
    padding: 0.8rem 0.9rem 0.75rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;              /* isi yang scroll, bukan keluar modal */
}

/* Modal gambar (lihat referensi / bukti bayar) */
.modal-content.modal-image-content {
    max-width: 480px;
    max-height: 90vh;                 /* jangan lebih tinggi dari 90% layar */
    padding: 0.75rem 0.9rem 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;                 /* biar konten di dalam yang scroll, bukan keluar */
}

/* Area yang diprint (nota) */
#invoicePrintArea {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.78rem;
    line-height: 1.4;
    max-width: 260px;              /* lebar nota thermal */
    margin: 0 auto;
    padding: 0.75rem 0.8rem 0.9rem;
    background: #ffffff;
    border: 1px dashed #e5e7eb;
    position: relative;            /* penting untuk watermark */
    overflow: hidden;              /* biar watermark & isi rapi */
}

/* Watermark LUNAS / PROSESS */
.invoice-paid-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 1.8rem;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.35);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    text-align: center;
}

/* Header nota */
.invoice-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.invoice-header-text {
    text-align: center;
}

.invoice-header-title {
    font-size: 1rem;
    font-weight: 700;
}

.invoice-contact-line {
    font-size: 0.7rem;
    color: #6b7280;
}

/* Info meta (Yth, No, Tanggal, Status) */
.invoice-meta {
    margin-top: 0.25rem;
    margin-bottom: 0.4rem;
    font-size: 0.78rem;
}

/* Baris isi nota */
.invoice-lines {
    border-top: 1px dashed #e5e7eb;
    border-bottom: 1px dashed #e5e7eb;
    padding: 0.45rem 0;
    margin: 0.35rem 0;
}

.invoice-lines-total {
    margin-top: 0.35rem;
}

.invoice-line {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.invoice-line-label {
    font-size: 0.78rem;
}

.invoice-line-value {
    font-size: 0.78rem;
    font-weight: 600;
}

/* Footer text */
.invoice-footer-text {
    margin-top: 0.4rem;
    font-size: 0.76rem;
    text-align: center;
    color: #6b7280;
}

/* Footer tombol modal invoice */
.invoice-modal-footer {
    margin-top: 0.65rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Responsif (mobile) */
@media (max-width: 640px) {
    .modal-content.modal-invoice-content {
        max-width: 95vw;
        max-height: 90vh;
        padding: 0.7rem 0.8rem 0.7rem;
    }

    #invoicePrintArea {
        max-width: 100%;
    }
}
/* Tombol close (X) */
.modal-close {
    position: absolute;
    top: 0.6rem;
    right: 0.7rem;
    border: none;
    background: transparent;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
}

.modal-close:hover {
    color: #4b5563;
}

/* Isi modal umum */
.modal-content h3,
.modal-content h2,
.modal-content h4 {
    margin-top: 0;
    margin-bottom: 0.6rem;
}

.modal .form-group {
    margin-bottom: 0.75rem;
}

.modal .form-group label {
    font-size: 0.82rem;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--admin-text);
}

.modal .form-group input[type="text"],
.modal .form-group input[type="number"],
.modal .form-group input[type="password"],
.modal .form-group input[type="file"],
.modal .form-group textarea,
.modal .form-group select {
    width: 100%;
    border-radius: 0.6rem;
    border: 1px solid var(--admin-border);
    padding: 0.45rem 0.55rem;
    font-size: 0.84rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal .form-group input:focus,
.modal .form-group textarea:focus,
.modal .form-group select:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.modal small,
.modal .note-small {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
}

/* Tombol di footer modal */
.modal .modal-actions {
    margin-top: 0.9rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Modal invoice – sesuaikan sedikit */
.modal-invoice-content .invoice-modal-footer {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Modal gambar */
.modal-image-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 0.75rem;
}

/* WA settings backdrop (kalau masih pakai div .modal-backdrop) */
.modal-backdrop {
    display: none; /* tidak dipakai karena .modal sudah punya overlay */
}

/* Responsive */
@media (max-width: 640px) {
    .modal {
        padding: 0.75rem;
    }

    .modal-content {
        padding: 0.9rem;
        border-radius: 0.9rem;
    }
    
    .modal-content.modal-image-content {
        max-width: 95vw;
        max-height: 90vh;
        padding: 0.6rem 0.7rem 0.75rem;
    }
}

/* ========== TABEL ADMIN ========== */

.admin-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: #ffffff;
    border-radius: 0.9rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.admin-content thead {
    background: linear-gradient(to right, #f9fafb, #eef2ff);
}

.admin-content thead th {
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.admin-content tbody td {
    padding: 0.55rem 0.75rem;
    border-top: 1px solid #f1f5f9;
    vertical-align: top;
}

.admin-content tbody tr:nth-child(even) {
    background: #f9fafb;
}

.admin-content tbody tr:hover {
    background: #eff6ff;
}

/* Baris pesanan dengan status khusus tetap terlihat */
.admin-content tr.row-overdue {
    background: #fef2f2;
}

.admin-content tr.row-warning {
    background: #fffbeb;
}

.admin-content tr.row-new {
    box-shadow: inset 3px 0 0 #2563eb;
}

/* Lencana status */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.status-Baru {
    background: #dbeafe;
    color: #1d4ed8;
}
.status-Diproses {
    background: #fef3c7;
    color: #92400e;
}
.status-Selesai {
    background: #dcfce7;
    color: #166534;
}
.status-Batal {
    background: #fee2e2;
    color: #b91c1c;
}

/* Tombol collapsible di kolom pertama */
.order-row-toggle {
    border: none;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: 0.82rem;
}

.order-row-toggle-icon {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Ringkas info utama di atas, detail di bawah */
.order-row-summary-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.order-row-summary-sub {
    margin-top: 0.2rem;
}

/* Pagination */
.admin-content .pagination {
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.admin-content .pagination a,
.admin-content .pagination span.current-page {
    display: inline-flex;
    min-width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
}

.admin-content .pagination a {
    color: #4b5563;
    background: #ffffff;
}

.admin-content .pagination a:hover {
    border-color: #2563eb;
}

.admin-content .pagination span.current-page {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* Mobile – biar padding tetap enak */
@media (max-width: 640px) {
    .admin-content table {
        box-shadow: none; /* biar nggak berat di mobile */
    }
    .admin-content tbody td {
        padding: 0.4rem 0.55rem;
    }
}

/* ========== SEARCH BAR DASHBOARD ========== */

.admin-card .search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: flex-end;
    margin-top: 0.75rem;
}

.admin-card .search-bar > div {
    flex: 1 1 160px;
    min-width: 0;
}

.admin-card .search-bar label {
    font-size: 0.75rem;
    color: #555;
    display: block;
    margin-bottom: 0.2rem;
}

.admin-card .search-bar input[type="text"],
.admin-card .search-bar select {
    width: 100%;
    border-radius: 0.6rem;
    border: 1px solid var(--admin-border);
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
}

/* Kolom tombol lebih kecil */
.admin-card .search-bar > div.search-bar-actions {
    flex: 0 0 auto;
}

/* Responsive: di mobile jadi bertumpuk & tombol full width */
@media (max-width: 640px) {
    .admin-card .search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-card .search-bar > div {
        flex: 1 1 auto;
        width: 100%;
    }

    .admin-card .search-bar > div.search-bar-actions {
        align-self: stretch;
    }

    .admin-card .search-bar button {
        width: 100%;
        justify-content: center;
    }
}

/* ========== LAYOUT KOLOM TABEL PESANAN ========== */

.admin-content table.orders-table th:nth-child(1),
.admin-content table.orders-table td:nth-child(1) {
    width: 12%;   /* No Order */
}

.admin-content table.orders-table th:nth-child(2),
.admin-content table.orders-table td:nth-child(2) {
    width: 13%;   /* Waktu Order */
}

.admin-content table.orders-table th:nth-child(3),
.admin-content table.orders-table td:nth-child(3) {
    width: 20%;   /* Nama & Kontak */
}

.admin-content table.orders-table th:nth-child(4),
.admin-content table.orders-table td:nth-child(4) {
    width: 12%;   /* Jadwal – sengaja diperkecil */
}

.admin-content table.orders-table th:nth-child(5),
.admin-content table.orders-table td:nth-child(5) {
    width: 28%;   /* Detail Cake – dibesarkan */
}

.admin-content table.orders-table th:nth-child(6),
.admin-content table.orders-table td:nth-child(6) {
    width: 15%;   /* Bukti & Status */
}

/* Bantu teks di Detail Cake supaya enak dibaca */
.admin-content table.orders-table td:nth-child(5) {
    word-wrap: break-word;
    white-space: normal;
}

/* Di mobile, biarkan browser mengatur lebar sendiri */
@media (max-width: 768px) {
    .admin-content table.orders-table th,
    .admin-content table.orders-table td {
        width: auto;
    }
}

/* ========== PRINT: HANYA INVOICE SAJA ========== */
@media print {
    /* Hilangkan semua elemen lain */
    body * {
        visibility: hidden;
    }

    /* Tampilkan hanya area invoice + isinya */
    #invoicePrintArea,
    #invoicePrintArea * {
        visibility: visible;
    }

    /* Posisi & tampilan invoice saat print */
    #invoicePrintArea {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        margin: 0 auto;
        box-shadow: none;
        border: none;      /* kalau mau tanpa border saat print */
        background: #ffffff;
    }

    /* Jangan print tombol X & footer modal */
    .modal-close,
    .invoice-modal-footer {
        display: none !important;
    }

    /* Hilangkan efek overlay / frame modal saat print */
    .modal,
    .modal-content.modal-invoice-content {
        position: static;
        inset: auto;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding: 0;
        max-width: none;
        max-height: none;
    }
}

/* ========== KATALOG: ACTION BAR ATAS ========== */

.admin-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.admin-card-actions-left,
.admin-card-actions-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

/* ========== KATALOG: GRID HARGA PER UKURAN ========== */

.grid-cake-sizes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 4px;
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .grid-cake-sizes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.grid-cake-sizes label {
    display: block;
    font-size: 0.85rem;
    color: #555;
}

.grid-cake-sizes input[type="number"],
.grid-cake-sizes input[type="text"] {
    width: 100%;
}

.size-desc-input {
    margin-top: 0.25rem;
    font-size: 0.78rem;
}

.size-desc-input input {
    font-size: 0.78rem;
}

/* ========== KATALOG: ACTION BAR ATAS ========== */

.admin-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

/* ========== KATALOG: GRID HARGA PER UKURAN ========== */

.grid-cake-sizes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 4px;
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .grid-cake-sizes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.grid-cake-sizes label {
    display: block;
    font-size: 0.85rem;
    color: #555;
}

.grid-cake-sizes input[type="number"],
.grid-cake-sizes input[type="text"] {
    width: 100%;
}

.size-desc-input {
    margin-top: 0.25rem;
    font-size: 0.78rem;
}

.size-desc-input input {
    font-size: 0.78rem;
}

/* ========== TOMBOL AKSI KECIL DENGAN ICON ========== */

.action-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.4rem;      /* lebih rapat */
    border-radius: 0.55rem;
}

.btn-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* Kalau punya state disabled khusus */
.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== FLASH / ALERT BASE ===== */
.alert,
.alert-success,
.alert-error,
.alert-warning,
.alert-info {
    display: block;
    padding: 0.65rem 0.9rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-top: 0.75rem;
    border: 1px solid transparent;
}

/* Sukses – hijau */
.alert-success {
    background: #ecfdf3;      /* hijau muda */
    border-color: #bbf7d0;
    color: #166534;
}

/* Error – merah */
.alert-error {
    background: #fef2f2;      /* merah muda */
    border-color: #fecaca;
    color: #b91c1c;
}

/* Warning – kuning */
.alert-warning {
    background: #fffbeb;      /* kuning muda */
    border-color: #fed7aa;
    color: #92400e;
}

/* Info – biru (opsional) */
.alert-info {
    background: #eff6ff;      /* biru muda */
    border-color: #bfdbfe;
    color: #1d4ed8;
}