/* =====================================================
   EGGTRADE ADMIN (online) 
===================================================== */

/* Fonts match the public front-end (style/styles.css).
   Google Fonts are loaded via <link> in layout.php and login.php. */
:root {
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

h1, h2, h3, h4 { font-family: var(--font-display); }

html, body {
    width: 100%;
    min-height: 100%;
    font-family: var(--font-body);
}

/* One background for the login page and every admin page.
   (.login-page is on login.php, .dashboard-main is on all the others) */
body:has(.login-page, .dashboard-main) {
    min-height: 100vh;
    margin: 0;
    position: relative;
    isolation: isolate;
    color: #ffffff;
    background:
        radial-gradient(ellipse 48% 75% at 92% 105%, rgba(255, 186, 8, 0.95) 0%, rgba(255, 186, 8, 0.35) 45%, transparent 75%),
        radial-gradient(ellipse 40% 55% at 68% 0%, rgba(90, 140, 235, 0.35) 0%, transparent 70%),
        radial-gradient(ellipse 45% 60% at 0% 0%, rgba(40, 90, 200, 0.55) 0%, transparent 70%),
        linear-gradient(105deg, #0A2472 0%, #0e3190 30%, #2a56b8 52%, #d9a63a 78%, #FFBA08 100%);
    background-attachment: fixed;
}

body:has(.login-page, .dashboard-main)::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(5, 22, 80, 0.55) 0%, rgba(5, 22, 80, 0.25) 38%, rgba(5, 22, 80, 0) 66%);
}

body:has(.login-page, .dashboard-main)::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse 60% 40% at 30% 100%, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
    -webkit-mask-image: linear-gradient(90deg, transparent 38%, #000 82%);
            mask-image: linear-gradient(90deg, transparent 38%, #000 82%);
}

a { color: inherit; }

/* =====================================================
   LOGIN PAGE
===================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-login-card {
    background: #ffffff;
    padding: 34px 44px 30px;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    margin: auto;
    box-shadow: 0 18px 45px rgba(10, 30, 80, 0.22);
    text-align: center;
    border-top: 7px solid #ffb72b;
    font-family: var(--font-body);
    animation: loginPop 0.25s ease-out;
}

@keyframes loginPop {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 14px;
}

.login-logo {
    display: block;
    width: 76px;
    height: 76px;
    object-fit: contain;
    border-radius: 50%;
    margin: 0 auto;
}

.admin-login-card h2 {
    color: #1e3a8a;
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #374151;
    font-size: 15px;
    margin-bottom: 26px;
}

.form-group { text-align: left; margin-bottom: 18px; }

.form-group label {
    display: block;
    color: #1e3a8a;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}

.admin-password-input {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #d9dfe8;
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    color: #2d3748;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-password-input::placeholder { color: #6b7280; }

.admin-password-input:focus {
    border-color: #2b3fd1;
    box-shadow: 0 0 0 3px rgba(43, 63, 209, 0.15);
}

.auth-message {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    text-align: left;
}

.auth-message.error { background: #fee2e2; color: #b91c1c; }

.admin-login-submit-btn {
    width: 100%;
    margin-top: 8px;
    padding: 16px;
    background: #2b3fd1;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.5px;
}

.admin-login-submit-btn:hover { background: #2233b0; transform: translateY(-1px); }
.admin-login-submit-btn:active { transform: translateY(0); }

/* =====================================================
   SIDEBAR
===================================================== */
.dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    background: #080616;
    background: linear-gradient(150deg, rgba(8, 6, 22, 1) 0%, rgba(22, 46, 147, 1) 35%, rgba(47, 47, 228, 1) 59%, rgba(26, 25, 83, 1) 100%);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transition: width 0.2s ease;
}

.sidebar-logo {
    width: 100%;
    height: 105px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.sidebar-logo img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 50%;
    padding: 0;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.sidebar-navigation {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.sidebar-link {
    width: 100%;
    min-height: 45px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-icon {
    width: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.sidebar-link:hover { background: #ffb72b; color: #123d7a; transform: translateX(2px); }
.sidebar-link:hover .sidebar-icon { color: #123d7a; }

.sidebar-link.active { background: rgba(255, 255, 255, 0.14); }

.logout-link { min-height: 40px; margin-top: 8px; }

.dashboard-sidebar.collapsed { width: 68px; padding-left: 7px; padding-right: 7px; }
.dashboard-sidebar.collapsed .sidebar-logo img { width: 48px; height: 48px; }
.dashboard-sidebar.collapsed .sidebar-text { display: none; }
.dashboard-sidebar.collapsed .sidebar-link { justify-content: center; padding-left: 4px; padding-right: 4px; }

/* =====================================================
   MAIN AREA + TOP BAR
===================================================== */
.dashboard-main {
    margin-left: 220px;
    min-height: 100vh;
    padding: 18px 25px 25px;
    overflow-x: hidden;
    transition: margin-left 0.2s ease;
}

.dashboard-main.sidebar-collapsed { margin-left: 68px; }

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

.dashboard-title-area { display: flex; align-items: flex-start; gap: 10px; }

.dashboard-title-area h1 {
    margin: 0 0 2px;
    color: #ffffff;
    text-shadow: 0 3px 14px rgba(5, 22, 80, 0.45);
    font-size: 29px;
    line-height: 1.1;
    font-weight: 800;
}

.dashboard-title-area p { color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 6px rgba(5, 22, 80, 0.45); font-size: 13px; }

.sidebar-toggle {
    width: 45px;
    height: 45px;
    border: none;
    background: white;
    border-radius: 11px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
    color: #1454b4;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-toggle:hover { background: #ffb72b; color: #123d7a; transform: translateY(-1px); }

.top-right { display: flex; align-items: center; gap: 10px; }

.admin-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 5px;
    border-radius: 999px;
    background: rgba(5, 22, 80, 0.38);
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 14px;
}

.admin-top-icon {
    width: 31px;
    height: 31px;
    background: #eee9ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #172d62;
    font-size: 14px;
}

.admin-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }

.admin-info strong {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
    font-size: 13px;
}

.admin-info span { color: rgba(255, 255, 255, 0.78); font-size: 11px; }

.admin-logout-top-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 11px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    margin-left: 4px;
    transition: background 0.2s ease;
}

.admin-logout-top-btn:hover { background: #dc2626; }

/* =====================================================
   DASHBOARD CARDS
===================================================== */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.dashboard-card {
    min-height: 125px;
    background: white;
    padding: 14px 16px;
    border-radius: 12px;
    border-top: 4px solid #ffb72b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(0, 0, 0, 0.10); }

.dashboard-card .card-icon {
    height: 30px;
    display: flex;
    align-items: center;
    font-size: 23px;
    color: #b86b3b;
    margin-bottom: 4px;
}

.dashboard-card:nth-child(2) .card-icon { color: #e39a00; }
.dashboard-card:nth-child(3) .card-icon { color: #c77a45; }
.dashboard-card:nth-child(4) .card-icon { color: #54308e; }

.dashboard-card h3 {
    margin-bottom: 3px;
    color: #60708d;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-card .card-number {
    color: #0750a6;
    font-size: 25px;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 3px;
}

.dashboard-card p { color: #7283a0; font-size: 11px; line-height: 1.3; }

/* =====================================================
   CONTENT BOXES
===================================================== */
.dashboard-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(285px, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

.dashboard-box {
    background: white;
    padding: 15px 17px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    min-width: 0;
    margin-bottom: 14px;
}

.dashboard-content-grid .dashboard-box { margin-bottom: 0; }

.box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0b429;
}

.box-header h2 { margin: 0; color: #0b2e6f; font-size: 22px; font-weight: 800; }

.table-container { width: 100%; overflow-x: auto; }

/* =====================================================
   TABLES
===================================================== */
.order-table { width: 100%; border-collapse: separate; border-spacing: 0; }

.order-table th {
    background: #0b3d91;
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.order-table th:first-child { border-top-left-radius: 6px; }
.order-table th:last-child { border-top-right-radius: 6px; }

.order-table td {
    padding: 16px 16px;
    border-bottom: 1px solid #e9edf3;
    color: #4b5d78;
    font-size: 12.5px;
    vertical-align: middle;
}

.order-table td.col-id { font-size: 11.5px; font-weight: 700; color: #4a5f80; white-space: nowrap; }

.order-table tbody tr { transition: background 0.15s ease; }
.order-table tbody tr:hover td { background: #f4f8ff; }

.empty-row td {
    height: 110px;
    text-align: center;
    color: #8ba0bd;
    border-bottom: none;
}

.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.status-completed { background: #dcf3e2; color: #2f7d4a; }
.status-processing { background: #dbe6fb; color: #2f56a5; }
.status-pending { background: #fde6c4; color: #b46a12; }
.status-out { background: #fde2e2; color: #b91c1c; }
.status-other { background: #e8ecf2; color: #55657f; }

.table-footer { display: flex; justify-content: flex-end; margin-top: 10px; }

.view-all-link { color: #2b3fd1; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.view-all-link:hover { text-decoration: underline; }

.actions-cell { white-space: nowrap; }
.actions-cell .btn-sm + .btn-sm { margin-left: 8px; }
.muted { color: #8ba0bd; }

/* =====================================================
   QUICK ACTIONS
===================================================== */
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; width: 100%; }

.quick-action {
    min-width: 0;
    min-height: 64px;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dfe6f0;
    border-radius: 10px;
    background: white;
    color: #0750a6;
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-action:hover {
    border-color: #ffb72b;
    background: #fffdf0;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.quick-action-icon {
    position: relative;
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff7dc;
    border-radius: 9px;
    font-size: 18px;
    color: #b8793d;
}

.quick-action span { flex: 1 1 auto; min-width: 0; color: #0750a6; font-size: 12px; line-height: 1.2; font-weight: 700; }

.quick-action .action-arrow {
    flex: 0 0 auto;
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #315b87;
    font-size: 13px;
    margin-left: auto;
}

/* =====================================================
   BUTTONS
===================================================== */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary { background: #2b3fd1; color: white; }
.btn-primary:hover { background: #2233b0; }

.btn-secondary { background: white; color: #1e3a8a; border: 1px solid #cbd5e1; }
.btn-secondary:hover { background: #f1f4f9; }

/* ---------- Table action buttons (Inventory, Orders, Users) ----------
   .btn-sm            = base pill (Quick adjust: -1, +1, +10, Set)
   .btn-view/.btn-edit = Edit  -> blue, same as the "On the Way" pill
   .btn-delete         = Delete -> red, soft pink pill               */
.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    padding: 9px 18px;
    border: 1px solid #d5deec;
    border-radius: 12px;
    background: #ffffff;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-sm:hover { background: #f1f5fc; border-color: #b9c8e4; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(30, 58, 138, 0.10); }
.btn-sm:active { transform: translateY(0); box-shadow: none; }

/* Edit: blue */
.btn-view,
.btn-edit { background: #dbe6fb; border-color: #dbe6fb; color: #2f56a5; }
.btn-view:hover,
.btn-edit:hover { background: #c9dbf8; border-color: #c9dbf8; color: #2f56a5; box-shadow: 0 3px 8px rgba(47, 86, 165, 0.18); }

/* Delete: red */
.btn-delete { background: #fde2e2; border-color: #fde2e2; color: #b91c1c; }
.btn-delete:hover { background: #fbcaca; border-color: #fbcaca; color: #b91c1c; box-shadow: 0 3px 8px rgba(185, 28, 28, 0.18); }

/* =====================================================
   FORMS (add / edit product, inventory inputs)
===================================================== */
.form-error {
    margin-bottom: 14px;
    padding: 10px 14px;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 8px;
    font-size: 13px;
}

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

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }

.field label { color: #1e3a8a; font-size: 13px; font-weight: 700; }

.field input,
.field select,
.field textarea,
.qty-input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #2d3748;
    background: white;
    outline: none;
}

.field textarea { resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus,
.qty-input:focus {
    border-color: #2b3fd1;
    box-shadow: 0 0 0 3px rgba(43, 63, 209, 0.15);
}

/* Stock box inside the Inventory table (same look as .field input, just narrower) */
.qty-input { width: 110px; padding: 9px 12px; border-radius: 12px; border-color: #d5deec; font-weight: 700; color: #1e3a8a; }

.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* wide: fills the whole content area (Edit Product uses this) */
.form-box { max-width: none; width: 100%; }

/* =====================================================
   CONFIRM DIALOG (replaces the browser confirm box)
   Also used for the Inventory "Add product" and
   "Low-stock alert level" popups (.form-dialog).
===================================================== */
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.confirm-overlay.show { opacity: 1; }

.confirm-dialog {
    width: min(400px, 100%);
    padding: 28px 26px 22px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: translateY(14px) scale(0.97);
    transition: transform 0.2s ease;
}

.confirm-overlay.show .confirm-dialog { transform: translateY(0) scale(1); }

.confirm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    font-size: 24px;
}

.confirm-title { margin: 0 0 6px; color: #164a9c; font-size: 20px; }
.confirm-message { margin: 0 0 22px; color: #315d9c; font-size: 14px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 10px; }

.confirm-btn {
    flex: 1;
    padding: 11px 14px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.confirm-cancel { background: #ffffff; border-color: #1E3A8A; color: #1E3A8A; }
.confirm-cancel:hover { background: #eef1ff; }
.confirm-ok { background: #dc2626; color: #ffffff; }
.confirm-ok:hover { background: #b91c1c; }
.confirm-save { background: #2b3fd1; color: #ffffff; }
.confirm-save:hover { background: #2233b0; }

/* Form version of the dialog: wider, left-aligned, with fields */
.form-dialog { width: min(440px, 100%); text-align: left; }
.form-dialog .confirm-message { margin-bottom: 16px; }
.form-dialog .field { margin-bottom: 14px; }
.form-dialog .confirm-actions { margin-top: 8px; }

/* =====================================================
   TOP BAR: REFRESH + NOTIFICATIONS
===================================================== */
.top-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.top-icon-btn:hover { background: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }

.top-bell { color: #ffb72b; }

.top-icon-btn.spinning i { animation: spin 0.7s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* number badge on the bell (replaces the old red dot) */
.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    font-family: inherit;
    box-sizing: border-box;
}

.notif-wrap { position: relative; }

.notif-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 340px;
    max-width: calc(100vw - 100px);
    padding: 8px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(10, 30, 80, 0.25);
    z-index: 1200;
}

.notif-menu[hidden] { display: none; }

.notif-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px 8px;
    color: #60708d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.notif-empty { padding: 4px 10px 10px; color: #7283a0; font-size: 13px; }

.notif-count {
    padding: 2px 8px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    letter-spacing: 0;
}

.notif-list { max-height: 320px; overflow-y: auto; }

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #172d62;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.notif-item:hover { background: #f1f4f9; }

.notif-item > i {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #fff7dc;
    color: #b8793d;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-text strong { font-weight: 700; }
.notif-text small { color: #60708d; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }

.notif-time { color: #8a97b0; font-size: 11px; font-style: normal; white-space: nowrap; padding-top: 2px; }

.notif-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    padding: 8px 10px 4px;
    border-top: 1px solid #e6ebf3;
}

.notif-footer a { color: #0d3d91; font-size: 12px; font-weight: 700; text-decoration: none; }
.notif-footer a:hover { text-decoration: underline; }

/* =====================================================
   NOTICES + SMALL PIECES
===================================================== */
.notice {
    margin-bottom: 14px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.notice-success { background: #dcf3e2; color: #2f7d4a; }
.notice-error { background: #fee2e2; color: #b91c1c; }

.box-sub { color: #7283a0; font-size: 12px; font-weight: 600; }

.chart-empty { padding: 28px 8px; color: #7283a0; font-size: 13px; text-align: center; }

.field-hint { margin-top: 10px; color: #7283a0; font-size: 12px; }

.inline-form { display: inline; }

.quick-action .action-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-table td.col-product { min-width: 150px; max-width: 260px; }

.payment-pill {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff3d6;
    color: #a15f00;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

/* =====================================================
   INVENTORY MANAGEMENT — recent stock changes list
===================================================== */
.log-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #e9edf3;
    color: #4b5d78;
    font-size: 13px;
}

.log-row:last-child { border-bottom: none; }
.log-row .muted { white-space: nowrap; }

.log-pos { color: #2f7d4a; font-weight: 800; }
.log-neg { color: #b91c1c; font-weight: 800; }

/* =====================================================
   REPORTS
===================================================== */
.range-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.range-tab {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease;
}

.range-tab:hover { background: rgba(255, 255, 255, 0.3); }
.range-tab.active { background: #ffffff; color: #0750a6; }

.bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 210px; padding-top: 10px; }

.bar-col {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bar {
    width: 100%;
    max-width: 38px;
    min-height: 3px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #2b3fd1 0%, #0750a6 100%);
    transition: opacity 0.2s ease;
}

.bar-col:hover .bar { opacity: 0.7; }
.bar-zero .bar { background: #dbe6fb; }

.bar-labels { display: flex; gap: 4px; margin-top: 6px; }

.bar-labels span {
    flex: 1 1 0;
    min-width: 0;
    margin: 0 -24px;
    color: #7283a0;
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
}

/* =====================================================
   CUSTOMER MESSAGES
===================================================== */
.msg-unread td { background: #fffdf0; }

.msg-sender strong { display: block; color: #172d62; font-size: 12.5px; }
.msg-sender span { color: #7283a0; font-size: 11.5px; }

.msg-body summary {
    max-width: 320px;
    color: #4b5d78;
    cursor: pointer;
    list-style: none;
}

.msg-body summary::-webkit-details-marker { display: none; }
.msg-body[open] summary { color: #0750a6; font-weight: 600; }

.msg-full {
    max-width: 420px;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f7faff;
    color: #2d3748;
    font-size: 12.5px;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 900px) {
    .dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-content-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .admin-login-card { padding: 28px 24px 24px; }
    .confirm-actions { flex-direction: column-reverse; }
}

/* =====================================================
   LIVE ORDERS: status dropdown + sidebar badge
===================================================== */
.status-select {
    padding: 7px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #123d7a;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.status-select option { background: #ffffff; color: #123d7a; font-weight: 600; }

/* the dropdown takes the colour of the current status (same as the pills) */
.status-select.status-pending    { background: #fde6c4; border-color: #fde6c4; color: #b46a12; }
.status-select.status-processing { background: #dbe6fb; border-color: #dbe6fb; color: #2f56a5; }
.status-select.status-completed  { background: #dcf3e2; border-color: #dcf3e2; color: #2f7d4a; }
.status-select.status-out        { background: #fde2e2; border-color: #fde2e2; color: #b91c1c; }
.status-select.status-other      { background: #e8ecf2; border-color: #e8ecf2; color: #55657f; }

.sidebar-badge {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.dashboard-sidebar.collapsed .sidebar-badge { display: none; }


/* =====================================================
   ADMIN LOGIN (split panel) - same design + animation as the
   storefront login (.auth-container in style/styles.css).
   Only the admin CSS is touched; login.php markup is unchanged.
   - blue panel is a clip-path layer (.al-card::after) that settles in on load
   - yellow + white circles float inside the panel
   - panel text and form fields rise in one after another
===================================================== */

.al-card {
    --al-blue-a: #0A2472;
    --al-blue-b: #2a56b8;
    --al-ink: #0a2363;
    --al-speed: 0.45s;
    --al-ease: cubic-bezier(0.65, 0, 0.35, 1);
    --al-radius: 30px 150px 150px 30px;
    position: relative;
    display: flex;
    width: min(900px, 100%);
    min-height: 620px;
    background: #ffffff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(5, 22, 80, 0.35);
    font-family: var(--font-body);
    animation: alPop 0.4s ease-out;
}

@keyframes alPop {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* the blue itself: shrinks from full card to the left half on load */
.al-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(135deg, var(--al-blue-a), var(--al-blue-b));
    clip-path: inset(0 50% 0 0 round var(--al-radius));
    animation: alSettle var(--al-speed) var(--al-ease) backwards;
}

@keyframes alSettle {
    from { clip-path: inset(0 round 30px); }
}

/* ---------- left panel ---------- */
.al-panel {
    position: relative;
    z-index: 2;
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 30px;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
    border-radius: var(--al-radius);
}

/* floating circles: yellow (top right) and white (bottom left) */
.al-panel::before,
.al-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: alFloat 7s ease-in-out infinite, alFadeIn 0.4s ease var(--al-speed) backwards;
}

.al-panel::before {
    width: 220px;
    height: 220px;
    top: -70px;
    right: -70px;
    background: rgba(255, 186, 8, 0.18);
}

.al-panel::after {
    width: 160px;
    height: 160px;
    bottom: -50px;
    left: -40px;
    background: rgba(255, 255, 255, 0.1);
    animation-delay: -3s, var(--al-speed);
}

@keyframes alFloat {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-14px, 18px); }
}

@keyframes alFadeIn {
    from { opacity: 0; }
}

@keyframes alRise {
    from { opacity: 0; transform: translateY(16px); }
}

.al-panel > *,
.al-form-side > h1,
.al-form-side > .al-error,
.al-form-side form > * {
    animation: alRise 0.6s ease both;
    animation-delay: calc(var(--al-speed) * 0.5);
}

.al-panel > * { position: relative; z-index: 1; }

.al-panel > :nth-child(2) { animation-delay: calc(var(--al-speed) * 0.5 + 0.1s); }
.al-panel > :nth-child(3) { animation-delay: calc(var(--al-speed) * 0.5 + 0.2s); }
.al-panel > :nth-child(4) { animation-delay: calc(var(--al-speed) * 0.5 + 0.3s); }

.al-form-side > h1 { animation-delay: calc(var(--al-speed) * 0.5); }
.al-form-side > .al-error { animation-delay: calc(var(--al-speed) * 0.5 + 0.07s); }
.al-form-side form > :nth-child(2) { animation-delay: calc(var(--al-speed) * 0.5 + 0.07s); }
.al-form-side form > :nth-child(3) { animation-delay: calc(var(--al-speed) * 0.5 + 0.14s); }
.al-form-side form > :nth-child(4) { animation-delay: calc(var(--al-speed) * 0.5 + 0.21s); }

.al-logo {
    display: block;
    width: 84px;
    height: 84px;
    object-fit: contain;
    margin-bottom: 6px;
    /* itinatago ang puting kanto ng logo (bilog ang logo), kapareho ng navbar */
    border-radius: 50%;
    clip-path: circle(50%);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

.al-panel h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
}

.al-panel p {
    margin: 0;
    font-size: 15px;
    opacity: 0.92;
    color: #ffffff;
}

.al-ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 10px;
    padding: 10px 20px;
    border: 2px solid #ffffff;
    border-radius: 6px;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}

.al-ghost-btn:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--al-ink);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(255, 255, 255, 0.28);
}

.al-ghost-btn:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }

/* ---------- right form side ---------- */
.al-form-side {
    position: relative;
    z-index: 2;
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 44px;
    background: #ffffff;
}

.al-form-side h1 {
    margin: 0 0 22px;
    font-family: var(--font-display);
    color: var(--al-ink);
    font-size: 34px;
    font-weight: 800;
    text-align: center;
}

.al-error {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 15px;
    text-align: left;
}

.al-field { position: relative; margin-bottom: 18px; }

.al-field input {
    width: 100%;
    min-height: 52px;
    padding: 0 52px 0 18px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #eef1f7;
    color: var(--al-ink);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.al-field input::placeholder { color: #5b6479; }

.al-field input:focus {
    background: #ffffff;
    border-color: #fbbf24;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.25);
}

.al-field-icon,
.al-eye {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: #315d9c;
    font-size: 16px;
}

.al-field-icon { pointer-events: none; }

.al-eye {
    right: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.al-eye:hover { background: rgba(22, 74, 156, 0.1); color: var(--al-ink); }

.al-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 6px;
    padding: 12px 24px;
    border: 2px solid #fbbf24;
    border-radius: 6px;
    background: #fbbf24;
    color: #061a45;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.al-submit:hover {
    background: #ffd04d;
    border-color: #ffd04d;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(251, 191, 36, 0.45);
}

.al-submit:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }

.al-submit:focus-visible,
.al-ghost-btn:focus-visible { outline: 3px solid #164a9c; outline-offset: 2px; }

/* ---------- phones: panel becomes a banner on top ---------- */
@media (max-width: 760px) {
    .al-card {
        flex-direction: column;
        min-height: 0;
        --al-radius: 0 0 70px 70px;
    }

    .al-card::after { display: none; }

    .al-panel {
        flex: 0 0 auto;
        gap: 6px;
        padding: 26px 24px 38px;
        background: linear-gradient(135deg, var(--al-blue-a), var(--al-blue-b));
    }

    .al-logo { width: 68px; height: 68px; }
    .al-panel h2 { font-size: 28px; }
    .al-form-side { flex: 0 0 auto; padding: 30px 24px 34px; }
    .al-form-side h1 { font-size: 28px; margin-bottom: 18px; }
}

/* ---------- laptop screens: same fit-to-screen sizing as the storefront login ----------
   The card is at most 900 x 620 and shrinks to fit the window,
   so the page never needs to scroll (no navbar here, just 20px padding). */
@media (min-width: 761px) {
    .login-page { padding: 20px 16px; }

    .al-card {
        min-height: min(620px, calc(100vh - 40px));
        min-height: min(620px, calc(100dvh - 40px));
    }
}

@media (min-width: 761px) and (max-height: 760px) {
    .al-panel { padding: 28px 30px; }
    .al-form-side { padding: 26px 44px; }
    .al-form-side h1 { margin-bottom: 18px; font-size: 32px; }
    .al-field { margin-bottom: 13px; }
    .al-field input { min-height: 48px; }
}

@media (min-width: 761px) and (max-height: 580px) {
    .al-form-side { padding: 18px 40px; }
    .al-form-side h1 { margin-bottom: 12px; font-size: 28px; }
    .al-field { margin-bottom: 9px; }
    .al-field input { min-height: 44px; }
    .al-submit { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .al-card,
    .al-card::after,
    .al-panel::before,
    .al-panel::after,
    .al-panel > *,
    .al-form-side > h1,
    .al-form-side > .al-error,
    .al-form-side form > * { animation: none; }
}

/* =====================================================
   HOVER SHINE
   A band of light sweeps across buttons, sidebar links,
   cards and quick actions every time you hover them
   (same idea as the buttons on the storefront).
===================================================== */
.sidebar-link,
.sidebar-toggle,
.top-icon-btn,
.admin-logout-top-btn,
.btn-primary,
.btn-secondary,
.btn-sm,
.confirm-btn,
.range-tab,
.dashboard-card,
.quick-action,
.admin-login-submit-btn,
.al-submit,
.al-ghost-btn {
    position: relative;
    overflow: hidden;
    --shine: rgba(255, 255, 255, 0.55);
}

/* these were inline: they need a box so the light stays inside */
.admin-logout-top-btn,
.range-tab { display: inline-block; }

/* white / light surfaces: use a warm golden light so it can be seen */
.sidebar-toggle,
.btn-secondary,
.confirm-cancel,
.dashboard-card,
.quick-action,
.range-tab.active,
.al-ghost-btn { --shine: rgba(255, 183, 43, 0.45); }

.sidebar-link::before,
.sidebar-toggle::before,
.top-icon-btn::before,
.admin-logout-top-btn::before,
.btn-primary::before,
.btn-secondary::before,
.btn-sm::before,
.confirm-btn::before,
.range-tab::before,
.dashboard-card::before,
.quick-action::before,
.admin-login-submit-btn::before,
.al-submit::before,
.al-ghost-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent 0%, var(--shine) 50%, transparent 100%);
    transform: skewX(-20deg);
    pointer-events: none;
}

.sidebar-link:hover::before,
.sidebar-toggle:hover::before,
.top-icon-btn:hover::before,
.admin-logout-top-btn:hover::before,
.btn-primary:hover::before,
.btn-secondary:hover::before,
.btn-sm:hover::before,
.confirm-btn:hover::before,
.range-tab:hover::before,
.dashboard-card:hover::before,
.quick-action:hover::before,
.admin-login-submit-btn:hover::before,
.al-submit:hover::before,
.al-ghost-btn:hover::before {
    animation: lightSweep 0.75s ease-in-out;
}

@keyframes lightSweep {
    from { left: -75%; }
    to   { left: 135%; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-link:hover::before,
    .sidebar-toggle:hover::before,
    .top-icon-btn:hover::before,
    .admin-logout-top-btn:hover::before,
    .btn-primary:hover::before,
    .btn-secondary:hover::before,
    .btn-sm:hover::before,
    .confirm-btn:hover::before,
    .range-tab:hover::before,
    .dashboard-card:hover::before,
    .quick-action:hover::before,
    .admin-login-submit-btn:hover::before,
    .al-submit:hover::before,
    .al-ghost-btn:hover::before { animation: none; }
}

/* =====================================================
   ENHANCED FORMS (Settings + Add Product)
===================================================== */

.status-pill[hidden] { display: none; }

/* ---------- header banner ---------- */
.page-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: linear-gradient(120deg, #0b3d91 0%, #2b3fd1 60%, #4a63e8 100%);
    border-bottom: 4px solid #ffb72b;
    box-shadow: 0 6px 18px rgba(10, 30, 80, 0.25);
    color: #ffffff;
}

.hero-avatar {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffb72b;
    color: #0b2e6f;
    font-size: 28px;
    font-weight: 800;
}

.hero-text h2 { margin-bottom: 2px; font-size: 22px; font-weight: 800; }
.hero-text p { color: rgba(255, 255, 255, 0.85); font-size: 13px; }

.hero-tags { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }

.hero-tag {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 12px;
    font-weight: 700;
}

.hero-tag i { margin-right: 6px; color: #ffb72b; }

/* ---------- layouts ---------- */
.settings-grid,
.product-layout {
    display: grid;
    gap: 14px;
    align-items: start;
}

.settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-layout { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }

.settings-grid .dashboard-box,
.product-layout .dashboard-box { margin-bottom: 0; }

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

.box-header h2 i { margin-right: 8px; color: #ffb72b; }

/* ---------- inputs with icons ---------- */
.input-wrap { position: relative; }

.input-wrap input { padding-left: 40px; }
.input-wrap.has-eye input { padding-right: 44px; }

.input-wrap .lead {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8ba0bd;
    font-weight: 700;
    pointer-events: none;
}

.input-wrap .eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 8px;
    border: none;
    background: none;
    color: #8ba0bd;
    cursor: pointer;
}

.input-wrap .eye:hover { color: #0b3d91; }

/* ---------- password strength ---------- */
.strength {
    height: 6px;
    margin-top: 8px;
    border-radius: 999px;
    background: #e9edf3;
    overflow: hidden;
}

.strength span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

.strength-text { margin-top: 4px; color: #7283a0; font-size: 12px; }

/* ---------- Active / Inactive choice ---------- */
.seg-group { display: flex; flex-direction: column; gap: 6px; }
.seg-title { color: #1e3a8a; font-size: 13px; font-weight: 700; }

.seg { display: flex; gap: 10px; }
.seg-opt { position: relative; flex: 1; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }

.seg-opt span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #55657f;
    font-size: 14px;
    font-weight: 700;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.seg-opt input:checked + span {
    border-color: #2b3fd1;
    background: #eef1ff;
    color: #2b3fd1;
    box-shadow: 0 0 0 3px rgba(43, 63, 209, 0.12);
}

.seg-opt input:focus-visible + span { outline: 2px solid #2b3fd1; }

/* ---------- live preview + tips ---------- */
.side-stack { display: flex; flex-direction: column; gap: 14px; }

.preview-card { border: 1px solid #e9edf3; border-radius: 12px; overflow: hidden; }

.preview-img {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff7dc, #ffe6a8);
    color: #e39a00;
    font-size: 46px;
}

.preview-body { padding: 14px 16px; }

.preview-body h4 {
    margin-bottom: 4px;
    color: #0b2e6f;
    font-size: 17px;
    word-break: break-word;
}

.preview-desc {
    min-height: 17px;
    margin-bottom: 12px;
    color: #7283a0;
    font-size: 12.5px;
    line-height: 1.4;
    word-break: break-word;
}

.preview-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.preview-price { color: #0750a6; font-size: 22px; font-weight: 800; }
.preview-flags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }

.tip-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.tip-list li {
    display: flex;
    gap: 10px;
    color: #4b5d78;
    font-size: 12.5px;
    line-height: 1.4;
}

.tip-list i { margin-top: 2px; color: #ffb72b; }

@media (max-width: 900px) {
    .settings-grid,
    .product-layout { grid-template-columns: 1fr; }
    .page-hero { flex-wrap: wrap; }
    .hero-tags { margin-left: 0; }
}

/* =====================================================
   LIVE ORDERS: status dropdown + Delete button side by side
===================================================== */
.order-table td.actions-cell { white-space: nowrap; }
.order-table td.actions-cell .inline-form { display: inline-block; vertical-align: middle; }
.order-table td.actions-cell .inline-form + .inline-form,
.order-table td.actions-cell .btn-sm + .inline-form { margin-left: 8px; }

/* =====================================================
   NOTICE: fades out by itself (dashboard.js)
===================================================== */
.notice { transition: opacity 0.35s ease, transform 0.35s ease; }
.notice.notice-hide { opacity: 0; transform: translateY(-6px); }
/* =====================================================
   PHONE LAYOUT (admin back-end)
   Sidebar becomes a bottom navigation bar, so the whole
   screen width is for the content. No JavaScript needed.
===================================================== */
@media (max-width: 700px) {

    /* ----- bottom navigation bar ----- */
    .dashboard-sidebar,
    .dashboard-sidebar.collapsed {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: calc(60px + env(safe-area-inset-bottom));
        padding: 0 4px env(safe-area-inset-bottom);
        flex-direction: row;
        align-items: stretch;
        justify-content: space-between;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
        box-shadow: 0 -6px 18px rgba(5, 22, 80, 0.35);
    }

    .dashboard-sidebar .sidebar-logo { display: none; }

    .dashboard-sidebar .sidebar-navigation {
        flex: 1 1 auto;
        flex-direction: row;
        gap: 0;
        min-width: 0;
    }

    .dashboard-sidebar .sidebar-text { display: none; }

    .dashboard-sidebar .sidebar-link,
    .dashboard-sidebar.collapsed .sidebar-link {
        position: relative;
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        min-height: 0;
        height: 100%;
        margin: 0;
        padding: 0;
        justify-content: center;
        border-radius: 0;
    }

    .dashboard-sidebar .sidebar-link:hover { transform: none; }

    .dashboard-sidebar .sidebar-link.active {
        background: rgba(255, 255, 255, 0.16);
        box-shadow: inset 0 3px 0 #ffb72b;
    }

    .dashboard-sidebar .logout-link { flex: 0 0 52px; margin: 0; }

    .dashboard-sidebar .sidebar-badge,
    .dashboard-sidebar.collapsed .sidebar-badge {
        display: block;
        position: absolute;
        top: 6px;
        right: 50%;
        margin-right: -22px;
    }

    /* ----- page area ----- */
    .dashboard-main,
    .dashboard-main.sidebar-collapsed {
        margin-left: 0;
        padding: 12px 12px calc(76px + env(safe-area-inset-bottom));
    }

    .sidebar-toggle { display: none; }

    .dashboard-top { flex-wrap: wrap; gap: 10px; }

    .dashboard-title-area { flex: 1 1 0; min-width: 0; }
    .dashboard-title-area h1 { font-size: 24px; }
    .dashboard-title-area p { font-size: 12px; }

    .top-right { gap: 8px; flex-shrink: 0; }
    .top-icon-btn { width: 36px; height: 36px; }
    .admin-info { display: none; }

    /* notification dropdown: fits the screen */
    .notif-wrap { position: static; }
    .notif-menu {
        position: fixed;
        top: 64px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
    }
    .notif-list { max-height: 55vh; }

    /* ----- cards & boxes ----- */
    .dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .dashboard-card { min-height: 0; padding: 12px; }
    .dashboard-box { padding: 13px 12px; }
    .box-header h2 { font-size: 18px; }

    .dashboard-content-grid { gap: 12px; }

    .page-hero { padding-left: 14px; padding-right: 14px; }

    /* ----- tables: swipe sideways, tighter cells ----- */
    .table-container { -webkit-overflow-scrolling: touch; }
    .order-table th { padding: 11px 10px; font-size: 12px; }
    .order-table td { padding: 12px 10px; font-size: 12px; }

    /* ----- forms ----- */
    .form-grid,
    .settings-grid,
    .product-layout { grid-template-columns: 1fr; }

    .seg { flex-wrap: wrap; }
    .seg-opt { flex: 1 1 140px; }

    input, select, textarea { font-size: 16px; } /* stops iPhone auto-zoom */

    /* ----- reports ----- */
    .range-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .range-tab { flex: 0 0 auto; }
    .bar-chart { height: 170px; }

    /* ----- messages / notices / dialogs ----- */
    .confirm-dialog { width: calc(100vw - 24px); max-width: 420px; }
    .log-row { flex-wrap: wrap; gap: 4px 12px; }
}

@media (max-width: 380px) {
    .dashboard-cards { grid-template-columns: 1fr; }
    .dashboard-title-area h1 { font-size: 21px; }
    .dashboard-sidebar .sidebar-icon { font-size: 16px; }
}

/* =====================================================
   CUSTOMER MESSAGES: "Reply by email"
===================================================== */
.btn-reply { background: #fff3d1; border-color: #fff3d1; color: #8a5a00; }
.btn-reply:hover { background: #ffe9a8; border-color: #ffe9a8; color: #8a5a00; box-shadow: 0 3px 8px rgba(180, 106, 18, 0.2); }

.status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.replied-tag i { margin-right: 4px; font-size: 10px; }

.reply-dialog {
    width: min(560px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 0;
    border: none;
    border-radius: 16px;
    background: #ffffff;
    color: #1e3a8a;
    box-shadow: 0 24px 60px rgba(5, 22, 80, 0.45);
    overflow: auto;
}

.reply-dialog::backdrop { background: rgba(8, 20, 60, 0.6); }

.reply-form { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }

.reply-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0b429;
}

.reply-head h3 { margin: 0; color: #0b2e6f; font-size: 20px; font-weight: 800; }
.reply-head h3 i { margin-right: 8px; color: #ffb72b; }

.reply-x {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #eef2fb;
    color: #1e3a8a;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.reply-x:hover { background: #dbe6fb; }

.reply-dialog .field input[readonly] { background: #f4f6fb; color: #55657f; }

.reply-original {
    padding: 10px 12px;
    border-left: 4px solid #ffb72b;
    border-radius: 6px;
    background: #f7f9fd;
    max-height: 120px;
    overflow-y: auto;
}

.reply-original small { color: #7283a0; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.reply-original p { margin-top: 4px; color: #4b5d78; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

.reply-dialog .field-hint { margin-top: 0; }

.reply-actions { display: flex; justify-content: flex-end; gap: 10px; }

.btn-send { background: #fbbf24; border-color: #fbbf24; color: #061a45; }
.btn-send:hover { background: #ffd04d; border-color: #ffd04d; color: #061a45; }
.btn-send:disabled { opacity: 0.7; cursor: wait; transform: none; }

@media (max-width: 700px) {
    .reply-form { padding: 14px 14px 16px; }
    .reply-actions { flex-direction: column-reverse; }
    .reply-actions .btn-sm { width: 100%; }
}

/* =====================================================
   MOTION - same system as the storefront (style/styles.css)
   - riseIn: fade + slide up (tune with --rise-y)
   - slideIn: fade + slide sideways (tune with --slide-x)
   - same easing and same card lift/shadow on hover
   Uses "backwards" fill so hover transforms still work after the intro.
===================================================== */
:root {
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
    --card-lift: -6px;
    --card-shadow-hover: 0 16px 36px rgba(5, 22, 80, 0.30);
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(var(--rise-y, 26px)); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(var(--slide-x, -32px)); }
}

@keyframes iconBob {
    50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: no-preference) {

    /* sidebar glides in from the left */
    .dashboard-sidebar {
        --slide-x: -40px;
        animation: slideIn 0.7s var(--ease-out) backwards;
    }

    /* page header: title, then subtitle, one after another */
    .dashboard-top { animation: riseIn 0.7s var(--ease-out) backwards; --rise-y: 16px; }
    .dashboard-title-area h1 { animation: riseIn 0.8s var(--ease-out) 0.1s backwards; }
    .dashboard-title-area p  { animation: riseIn 0.8s var(--ease-out) 0.22s backwards; }

    /* summary cards, panels and hero banners rise in one after another */
    .page-hero,
    .dashboard-card,
    .dashboard-box,
    .quick-action,
    .notice:not([hidden]) {
        animation: riseIn 0.7s var(--ease-out) backwards;
        animation-delay: var(--d, 0.2s);
    }

    .dashboard-cards > :nth-child(1) { --d: 0.20s; }
    .dashboard-cards > :nth-child(2) { --d: 0.30s; }
    .dashboard-cards > :nth-child(3) { --d: 0.40s; }
    .dashboard-cards > :nth-child(4) { --d: 0.50s; }
    .dashboard-cards > :nth-child(n+5) { --d: 0.60s; }

    .dashboard-content-grid > :nth-child(1) { --d: 0.55s; }
    .dashboard-content-grid > :nth-child(2) { --d: 0.70s; }
    .dashboard-main > .dashboard-box { --d: 0.35s; }

    .quick-actions > :nth-child(1) { --d: 0.80s; }
    .quick-actions > :nth-child(2) { --d: 0.88s; }
    .quick-actions > :nth-child(3) { --d: 0.96s; }
    .quick-actions > :nth-child(4) { --d: 1.04s; }
    .quick-actions > :nth-child(n+5) { --d: 1.10s; }

    /* table rows follow the panel */
    .order-table tbody tr {
        --rise-y: 12px;
        animation: riseIn 0.5s var(--ease-out) backwards;
        animation-delay: calc(0.6s + var(--r, 0) * 50ms);
    }

    .order-table tbody tr:nth-child(2)  { --r: 1; }
    .order-table tbody tr:nth-child(3)  { --r: 2; }
    .order-table tbody tr:nth-child(4)  { --r: 3; }
    .order-table tbody tr:nth-child(5)  { --r: 4; }
    .order-table tbody tr:nth-child(6)  { --r: 5; }
    .order-table tbody tr:nth-child(7)  { --r: 6; }
    .order-table tbody tr:nth-child(8)  { --r: 7; }
    .order-table tbody tr:nth-child(n+9) { --r: 8; }

    /* same hover as the storefront cards: lift + deeper shadow */
    .dashboard-card,
    .dashboard-box,
    .quick-action {
        transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
                    border-color 0.2s ease, background 0.2s ease;
    }

    .dashboard-card:hover,
    .quick-action:hover {
        transform: translateY(var(--card-lift));
        box-shadow: var(--card-shadow-hover);
    }

    .dashboard-card:hover .card-icon { animation: iconBob 0.6s var(--ease-out); }

    /* press feedback on buttons, like the storefront */
    button:active:not(:disabled),
    .btn-primary:active,
    .btn-secondary:active { transform: scale(0.96); }
}