:root {
    --admin-bg: #f5f7fa;
    --admin-panel: #ffffff;
    --admin-border: #eceff3;
    --admin-text: #1d2330;
    --admin-muted: #7a8190;
    --admin-primary: #ffa500;
    --admin-primary-dark: #e89400;
    --admin-primary-soft: #fff8ef;
    --admin-dark: #1d2330;
    --admin-sidebar: #ffffff;
    --admin-sidebar-width: 272px;
    --admin-shadow: 0 10px 30px rgba(29, 35, 48, 0.06);
    --admin-radius: 16px;
}

* {
    box-sizing: border-box;
}

body.admin-body {
    margin: 0;
    background: var(--admin-bg);
    color: var(--admin-text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--admin-sidebar-width);
    background: var(--admin-sidebar);
    border-right: 1px solid var(--admin-border);
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.admin-sidebar-brand {
    padding: 20px 16px 18px;
    border-bottom: 1px solid var(--admin-border);
    background: #fff;
}

.admin-sidebar-brand-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    text-decoration: none;
}

.admin-sidebar-brand-link:hover .brand-text strong {
    color: var(--admin-primary);
}

.admin-sidebar-brand img {
    height: 52px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

.brand-mark {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffa500, #ff8c00);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.3;
    width: 100%;
}

.brand-text strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--admin-dark);
    letter-spacing: 0.01em;
}

.brand-text small {
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.45;
    max-width: 220px;
    margin: 0 auto;
}

.admin-sidebar-nav {
    padding: 14px 10px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #d8dde6 transparent;
}

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

.admin-sidebar-nav::-webkit-scrollbar-thumb {
    background: #d8dde6;
    border-radius: 999px;
}

.nav-section {
    margin-bottom: 18px;
}

.nav-label {
    margin: 0 10px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a0a8b5;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-radius: 8px;
    color: #5f6775;
    margin-bottom: 2px;
    transition: background 0.18s ease, color 0.18s ease;
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.nav-link > i:first-child,
.nav-link .nav-item-icon {
    width: 18px;
    min-width: 18px;
    text-align: center;
    font-size: 15px;
    color: #9aa3b2;
    transition: color 0.18s ease;
}

.nav-link > span:not(.nav-badge) {
    flex: 1;
    min-width: 0;
}

.nav-link:hover {
    background: #f8f9fb;
    color: var(--admin-dark);
}

.nav-link:hover > i:first-child,
.nav-link:hover .nav-item-icon {
    color: var(--admin-primary);
}

.nav-link.active {
    background: #fff8ef;
    color: var(--admin-primary-dark);
    font-weight: 600;
}

.nav-link.active > i:first-child,
.nav-link.active .nav-item-icon {
    color: var(--admin-primary);
}

.nav-group-toggle .nav-caret {
    margin-left: auto;
    width: auto;
    font-size: 11px;
    color: #a0a8b5;
    transition: transform 0.22s ease;
}

.nav-group.open > .nav-group-toggle .nav-caret {
    transform: rotate(180deg);
    color: var(--admin-primary);
}

.nav-submenu {
    display: none;
    margin: 2px 0 6px 0;
    padding: 2px 0 2px 30px;
}

.nav-group.open > .nav-submenu {
    display: block;
}

.nav-sublink {
    display: block;
    margin-bottom: 2px;
    padding: 7px 10px;
    border-radius: 6px;
    color: #7a8190;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.18s ease, color 0.18s ease;
}

.nav-sublink:hover {
    background: #f8f9fb;
    color: var(--admin-dark);
}

.nav-sublink.active {
    color: var(--admin-primary-dark);
    font-weight: 600;
}

.nav-badge {
    margin-left: auto;
    background: var(--admin-primary);
    color: #fff;
    font-style: normal;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.admin-sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid var(--admin-border);
    background: #fafbfd;
}

.admin-sidebar-footer .nav-link {
    margin-bottom: 0;
}

.admin-sidebar-footer .logout-btn:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.admin-sidebar-footer .logout-btn:hover .nav-item-icon {
    color: #dc2626;
}

.admin-sidebar-footer small {
    display: block;
    margin-top: 8px;
    color: #a0a8b5;
    font-size: 11px;
    padding-left: 12px;
}

.logout-btn {
    cursor: pointer;
}

.admin-main {
    margin-left: var(--admin-sidebar-width);
    width: calc(100% - var(--admin-sidebar-width));
    min-height: 100vh;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--admin-border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-welcome h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.topbar-welcome p {
    margin: 2px 0 0;
    color: var(--admin-muted);
    font-size: 13px;
}

.topbar-website-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--admin-primary-soft);
    color: var(--admin-primary-dark);
    border: 1px solid #ffd591;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
}

.topbar-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--admin-border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #4b5563;
}

.topbar-icon-btn.has-badge span {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.topbar-search {
    position: relative;
    display: flex;
    align-items: center;
}

.topbar-search i {
    position: absolute;
    left: 14px;
    color: #9aa3b2;
}

.topbar-search input {
    width: 240px;
    height: 42px;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 0 14px 0 38px;
    background: #fff;
    outline: none;
}

.topbar-search input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    background: #fff;
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffa500, #ff8c00);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.25);
}

.topbar-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.topbar-user-meta strong {
    font-size: 13px;
}

.topbar-user-meta small {
    color: var(--admin-muted);
    font-size: 11px;
}

.admin-content {
    padding: 24px;
}

.admin-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 14px;
}

.admin-alert-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.admin-alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.admin-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.admin-page-head h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 750;
}

.admin-page-head p {
    margin: 4px 0 0;
    color: var(--admin-muted);
    font-size: 14px;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    border: 0;
    background: var(--admin-dark);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-btn:hover {
    background: #111722;
}

.admin-btn-primary {
    background: var(--admin-primary);
    box-shadow: 0 8px 18px rgba(255, 165, 0, 0.24);
}

.admin-btn-primary:hover {
    background: var(--admin-primary-dark);
}

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

.admin-btn-outline:hover {
    border-color: var(--admin-primary);
    color: var(--admin-primary-dark) !important;
    background: var(--admin-primary-soft);
}

.admin-btn-danger {
    background: #fee2e2;
    color: #b91c1c !important;
}

.admin-btn-sm {
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 10px;
}

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

.stat-card {
    background: var(--admin-panel);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 20px;
    box-shadow: var(--admin-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 120px;
}

.stat-card.lavender { background: linear-gradient(135deg, #f3e8ff, #faf5ff); }
.stat-card.sky { background: linear-gradient(135deg, #dbeafe, #eff6ff); }
.stat-card.rose { background: linear-gradient(135deg, #ffe4e6, #fff1f2); }
.stat-card.mint { background: linear-gradient(135deg, #d1fae5, #ecfdf5); }
.stat-card.amber { background: linear-gradient(135deg, #fef3c7, #fffbeb); }
.stat-card.slate { background: linear-gradient(135deg, #e2e8f0, #f8fafc); }

.stat-card h3 {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.stat-card span {
    display: block;
    margin-top: 8px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #111827;
}

.status-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.status-box {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    box-shadow: var(--admin-shadow);
}

.status-box strong {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}

.status-box span {
    color: var(--admin-muted);
    font-size: 13px;
}

.panel-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
}

.admin-panel {
    background: var(--admin-panel);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    padding: 20px;
}

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

.admin-panel-head h3 {
    margin: 0;
    font-size: 18px;
}

.admin-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.admin-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.admin-list strong {
    display: block;
    font-size: 14px;
}

.admin-list small {
    color: var(--admin-muted);
}

.admin-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #f3f4f6;
    color: #374151;
}

.admin-chip.success { background: #dcfce7; color: #166534; }
.admin-chip.warning { background: #fef3c7; color: #92400e; }
.admin-chip.danger { background: #fee2e2; color: #991b1b; }
.admin-chip.info { background: #dbeafe; color: #1e40af; }

.admin-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.admin-toolbar .form-control,
.admin-toolbar .form-select,
.admin-form .form-control,
.admin-form .form-select,
.admin-form textarea,
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="number"],
.admin-form input[type="password"] {
    height: 42px;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 0 14px;
    background: #fff;
    width: 100%;
    outline: none;
}

.admin-form textarea {
    height: auto;
    padding: 12px 14px;
}

.admin-form .form-control:focus,
.admin-form .form-select:focus,
.admin-toolbar .form-control:focus,
.admin-toolbar .form-select:focus,
.admin-form textarea:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.admin-table-wrap {
    overflow: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

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

.admin-table th {
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fafbff;
}

.admin-table tr:hover td {
    background: #fcfcfd;
}

.admin-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.admin-link {
    color: #2563eb;
    font-weight: 600;
    font-size: 13px;
}

.admin-link.danger {
    color: #dc2626;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

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

.admin-form-grid .full {
    grid-column: 1 / -1;
}

.admin-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.admin-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.admin-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--admin-muted);
}

.admin-pagination {
    margin-top: 18px;
}

.admin-pagination nav {
    display: flex;
    justify-content: flex-end;
}

/* Login */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(255, 165, 0, 0.14), transparent 35%),
        radial-gradient(circle at bottom right, rgba(29, 35, 48, 0.08), transparent 30%),
        #f5f7fa;
    padding: 24px;
}

.admin-login-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 24px;
    box-shadow: var(--admin-shadow);
    padding: 32px;
}

.admin-login-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.admin-login-card p {
    margin: 0 0 24px;
    color: var(--admin-muted);
}

.admin-panel-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
}

/* POS Sale Offline */
.pos-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.pos-page-head h2 {
    margin: 0;
    font-size: 22px;
}

.pos-page-head p {
    margin: 4px 0 0;
    color: var(--admin-muted);
    font-size: 13px;
}

.pos-website-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 13px;
    font-weight: 600;
}

.pos-shell {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 16px;
    align-items: start;
}

.pos-panel {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    padding: 16px;
}

.pos-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 10px;
    margin-bottom: 14px;
}

.pos-filters .form-select {
    height: 42px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 13px;
    background: #fff;
}

.pos-search {
    position: relative;
    display: flex;
    align-items: center;
}

.pos-search i {
    position: absolute;
    left: 12px;
    color: var(--admin-muted);
    font-size: 14px;
}

.pos-search input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 0 12px 0 36px;
    font-size: 13px;
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    padding-right: 4px;
}

.pos-product-card {
    display: flex;
    gap: 12px;
    align-items: center;
    text-align: left;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.pos-product-card:hover {
    border-color: #ffd591;
    box-shadow: 0 4px 14px rgba(255, 165, 0, 0.12);
}

.pos-product-thumb {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 10px;
    background: #f5f7fa;
    border: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pos-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pos-product-thumb i {
    font-size: 22px;
    color: #b0b8c4;
}

.pos-product-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pos-product-meta strong {
    font-size: 13px;
    line-height: 1.3;
    color: var(--admin-dark);
}

.pos-product-price {
    font-size: 15px;
    font-weight: 700;
    color: #2563eb;
}

.pos-product-meta small {
    font-size: 11px;
    color: var(--admin-muted);
}

.pos-empty-grid {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    color: var(--admin-muted);
}

.pos-customer-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.pos-customer-search {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.pos-customer-search i {
    position: absolute;
    left: 12px;
    color: var(--admin-muted);
}

.pos-customer-search input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 0 12px 0 36px;
    font-size: 13px;
}

.pos-add-customer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: var(--admin-primary);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.pos-add-customer:hover {
    background: var(--admin-primary-dark);
}

.pos-cart-box {
    min-height: 220px;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: #fafbfd;
    margin-bottom: 14px;
}

.pos-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    color: var(--admin-muted);
    text-align: center;
    padding: 20px;
}

.pos-cart-empty i {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.pos-cart-empty p {
    margin: 0;
    font-weight: 600;
}

.pos-cart-list {
    padding: 10px;
    max-height: 320px;
    overflow-y: auto;
}

.pos-cart-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 10px;
    align-items: start;
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
}

.pos-cart-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pos-cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pos-cart-item-body strong {
    display: block;
    font-size: 13px;
}

.pos-cart-item-body small {
    display: block;
    color: var(--admin-muted);
    font-size: 11px;
    margin-top: 2px;
}

.pos-cart-item-price {
    display: block;
    margin-top: 4px;
    font-weight: 700;
    font-size: 13px;
}

.pos-cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pos-icon-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.pos-icon-btn.edit {
    background: #eff6ff;
    color: #2563eb;
}

.pos-icon-btn.delete {
    background: #fef2f2;
    color: #dc2626;
}

.pos-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.pos-summary-row.discount strong {
    color: #dc2626;
}

.pos-coupon-row {
    display: flex;
    gap: 8px;
    margin: 10px 0 6px;
}

.pos-coupon-row input {
    flex: 1;
    height: 40px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 13px;
}

.pos-coupon-apply {
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--admin-primary);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.pos-coupon-msg {
    margin: 0 0 8px;
    font-size: 12px;
}

.pos-coupon-msg.success { color: #047857; }
.pos-coupon-msg.error { color: #dc2626; }

.pos-actions {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px;
    margin-top: 12px;
}

.pos-btn-draft {
    height: 48px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.pos-btn-checkout {
    height: 48px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffa500, #e89400);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(255, 165, 0, 0.28);
}

.pos-btn-checkout:hover {
    filter: brightness(0.96);
}

/* Online orders list */
.orders-page-head {
    margin-bottom: 16px;
}

.orders-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.orders-page-title h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.orders-website-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 12px;
    font-weight: 600;
}

.orders-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.orders-filter-fields {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.orders-filter-fields .form-select {
    width: 180px;
    height: 42px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 13px;
    background: #fff;
}

.orders-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    min-width: 42px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 0;
}

.orders-filter-btn.primary {
    background: var(--admin-primary);
    color: #fff;
}

.orders-filter-btn.reset {
    background: #64748b;
    color: #fff;
    padding: 0 14px;
}

.orders-search {
    position: relative;
    min-width: 260px;
    flex: 1;
    max-width: 420px;
}

.orders-search input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 0 40px 0 14px;
    font-size: 13px;
}

.orders-search i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
}

.orders-panel {
    padding-top: 14px;
}

.orders-panel-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
}

.orders-table th {
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
}

.orders-table td {
    font-size: 14px;
    vertical-align: middle;
}

.orders-amount {
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.orders-pay-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.orders-pay-badge.warning {
    background: #ffedd5;
    color: #c2410c;
}

.orders-pay-badge.success {
    background: #dcfce7;
    color: #166534;
}

.orders-pay-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.orders-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.orders-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 13px;
}

.orders-action.view {
    background: #64748b;
    color: #fff;
}

.orders-action.view:hover {
    background: #475569;
    color: #fff;
}

.orders-action.download {
    background: #fff;
    border: 1px solid var(--admin-border);
    color: #374151;
}

.orders-action.download:hover {
    background: #f8fafc;
    color: #111827;
}

.orders-empty {
    text-align: center;
    padding: 36px 16px 28px;
    color: #9ca3af;
}

.orders-empty i {
    font-size: 28px;
    margin-bottom: 10px;
    opacity: 0.45;
}

.orders-empty p {
    margin: 0 0 6px;
    font-weight: 600;
    color: #6b7280;
}

.orders-empty small {
    font-size: 13px;
}

/* Product management — flat, lightly rounded (no bubbles) */
.product-list-page,
.product-form-page,
.product-detail-page {
    max-width: 1320px;
}

.product-list-head,
.product-form-head,
.product-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.product-list-title,
.product-detail-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-list-head h2,
.product-form-head h2,
.product-detail-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--admin-dark);
}

.product-website-pill,
.product-website-tag,
.product-live-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--admin-border);
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.product-website-pill:hover,
.product-website-tag:hover,
.product-live-btn:hover {
    border-color: #d1d5db;
    color: var(--admin-dark);
}

.product-view-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #f8fafc;
}

.product-view-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: transparent;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.product-view-btn:hover {
    background: #fff;
    color: var(--admin-dark);
}

.product-view-btn.active {
    background: #fff;
    color: var(--admin-dark);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    border: 1px solid var(--admin-border);
}

.product-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.product-filter-fields {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.product-filter-fields .form-select {
    width: 170px;
    height: 40px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    background: #fff;
}

.product-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    min-width: 40px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.product-filter-btn.primary {
    background: var(--admin-primary);
    color: #fff;
    border-color: var(--admin-primary);
}

.product-filter-btn.reset {
    background: #fff;
    color: #475569;
    border-color: var(--admin-border);
}

.product-search {
    display: flex;
    align-items: stretch;
    min-width: 280px;
    max-width: 420px;
    flex: 1;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.product-search input {
    flex: 1;
    height: 40px;
    border: 0;
    border-radius: 0;
    padding: 0 12px;
    font-size: 13px;
    background: transparent;
}

.product-search-btn {
    width: 40px;
    border: 0;
    border-left: 1px solid var(--admin-border);
    border-radius: 0;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
}

.product-search-btn:hover {
    background: #f1f5f9;
    color: var(--admin-dark);
}

.product-panel {
    padding-top: 14px;
}

.product-panel-title,
.product-section-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--admin-dark);
}

.product-panel-title {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.product-table th {
    background: #f8fafc;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid var(--admin-border);
}

.product-table td {
    border-bottom: 1px solid #f1f5f9;
}

.product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumb i {
    color: #94a3b8;
    font-size: 16px;
}

.product-action.view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--admin-border);
    color: #475569;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.product-action.view:hover {
    border-color: #cbd5e1;
    color: var(--admin-dark);
}

.product-empty,
.product-muted {
    text-align: center;
    padding: 28px 16px;
    color: #94a3b8;
    font-size: 14px;
}

.product-muted {
    text-align: left;
    padding: 0 0 12px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.product-grid-card {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 12px;
    display: grid;
    gap: 8px;
    position: relative;
}

.product-grid-thumb {
    aspect-ratio: 1;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-grid-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
    align-items: start;
}

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

.product-form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-form-grid .full {
    grid-column: 1 / -1;
}

.product-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.product-field .required {
    color: #dc2626;
}

.product-field input,
.product-field textarea,
.product-field select {
    width: 100%;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    background: #fff;
}

.product-field textarea {
    resize: vertical;
}

.product-permalink {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 0 12px;
    height: 40px;
    font-size: 13px;
    color: #6b7280;
    background: #fff;
}

.product-permalink input {
    border: 0;
    padding: 0;
    flex: 1;
    height: auto;
    background: transparent;
}

.product-sku-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.product-link-btn {
    border: 0;
    background: none;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    padding: 0;
}

.product-optional-badge,
.product-count-badge,
.product-range-badge,
.product-approved-badge,
.product-meta-tag,
.product-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--admin-border);
    background: #f8fafc;
    color: #64748b;
    vertical-align: middle;
}

.product-meta-tag.muted {
    color: #64748b;
}

.product-status-tag {
    margin-left: 0;
    padding: 4px 10px;
    font-size: 12px;
}

.product-status-tag.pending {
    background: #fff;
    color: #b45309;
    border-color: #fde68a;
}

.product-status-tag:not(.pending) {
    background: #fff;
    color: #047857;
    border-color: #bbf7d0;
}

.product-approved-badge {
    margin-left: 0;
    padding: 4px 10px;
    font-size: 12px;
}

.product-approved-badge.pending {
    background: #fff;
    color: #b45309;
    border-color: #fde68a;
}

.product-approved-badge:not(.pending) {
    background: #fff;
    color: #047857;
    border-color: #bbf7d0;
}

.product-range-badge {
    color: #475569;
}

.product-variant-form-table input {
    width: 100%;
    min-width: 80px;
    height: 38px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    padding: 0 8px;
    font-size: 13px;
}

.product-remove-row {
    width: 34px;
    height: 34px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: #fff;
    color: #dc2626;
    cursor: pointer;
}

.product-upload-box {
    min-height: 140px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-upload-box.dashed {
    border-style: dashed;
    border-color: #cbd5e1;
    background: #fff;
}

.product-upload-box i {
    font-size: 24px;
    color: #94a3b8;
}

.product-upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-category-list {
    display: grid;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.product-category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.product-category-item:hover {
    background: #f8fafc;
    border-color: var(--admin-border);
}

.product-form-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.product-form-sidebar {
    display: grid;
    gap: 16px;
}

.product-form-sidebar .admin-panel,
.product-form-main .admin-panel {
    border-radius: 8px;
}

.product-hero-panel {
    padding: 18px;
}

.product-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: start;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--admin-border);
    margin-bottom: 18px;
}

.product-hero-main {
    width: 112px;
    height: 112px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-hero-thumbs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.product-hero-thumbs img {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--admin-border);
}

.product-hero-copy h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
}

.product-short-label {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 4px;
    font-weight: 600;
}

.product-hero-stats {
    text-align: right;
}

.product-stat-row {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.product-stat-row span {
    padding-right: 14px;
    border-right: 1px solid var(--admin-border);
}

.product-stat-row span:last-child {
    padding-right: 0;
    border-right: 0;
}

.product-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.product-info-grid h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--admin-dark);
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.product-info-item {
    display: grid;
    gap: 3px;
    margin-bottom: 10px;
}

.product-info-item span {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.product-info-item strong {
    font-size: 14px;
    color: #111827;
    font-weight: 600;
}

.product-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.product-section-head > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.product-variant-label {
    color: #2563eb;
    font-weight: 600;
}

.product-variant-sku {
    color: #64748b;
    font-size: 12px;
    font-family: ui-monospace, monospace;
}

.product-stock-green {
    color: #047857;
    font-weight: 600;
}

.product-description {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

.product-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.product-variant-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
}

/* My Products grid */
.my-products-page .my-products-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.my-products-create {
    height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.my-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.my-product-card {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.my-product-image {
    aspect-ratio: 1.15;
    background: #f8fafc;
    border-bottom: 1px solid var(--admin-border);
    overflow: hidden;
}

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

.my-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 32px;
}

.my-product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.my-product-body {
    padding: 12px;
    display: grid;
    gap: 6px;
    flex: 1;
}

.my-product-body h3 {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--admin-dark);
}

.my-product-body p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

.my-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.my-product-meta strong {
    font-size: 15px;
    color: var(--admin-dark);
}

.my-product-meta span {
    font-size: 12px;
    color: #94a3b8;
}

.my-product-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.my-product-row-actions form {
    margin: 0;
}

.my-product-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
}

.my-product-icon:hover {
    border-color: #cbd5e1;
    color: var(--admin-dark);
}

.my-product-icon.danger:hover {
    border-color: #fecaca;
    color: #dc2626;
}

.product-status-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.product-status-toggle input {
    display: none;
}

.product-status-slider {
    width: 38px;
    height: 22px;
    background: #e2e8f0;
    border-radius: 4px;
    position: relative;
    transition: background 0.2s ease;
}

.product-status-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s ease;
}

.product-status-toggle input:checked + .product-status-slider {
    background: var(--admin-primary);
}

.product-status-toggle input:checked + .product-status-slider::after {
    transform: translateX(16px);
}

.my-products-empty {
    grid-column: 1 / -1;
}

.my-products-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 16px;
}

.my-products-stat {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 12px 14px;
}

.my-products-stat span {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 4px;
}

.my-products-stat strong {
    font-size: 20px;
    color: var(--admin-dark);
    font-weight: 700;
}

.my-products-live {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #94a3b8;
    padding: 0 4px;
    white-space: nowrap;
}

.my-product-stock-warn {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: #b45309;
}

.my-product-stock-warn.out {
    color: #dc2626;
}

/* Barcode generator */
.barcode-page {
    max-width: 1180px;
}

.barcode-shell {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    padding: 18px;
}

.barcode-product-panel {
    border-right: 1px solid #f1f5f9;
    padding-right: 20px;
}

.barcode-product-image {
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 14px;
    background: #f8fafc;
}

.barcode-product-image img,
.barcode-product-image .my-product-placeholder {
    width: 100%;
    aspect-ratio: 1.2;
    object-fit: cover;
}

.barcode-product-panel h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

.barcode-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.barcode-product-meta strong {
    font-size: 16px;
    margin-right: 8px;
}

.barcode-code-label {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.barcode-product-panel p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.barcode-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.barcode-count-input {
    width: 72px;
    height: 40px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 0 10px;
    font-size: 14px;
}

.barcode-control-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.barcode-control-btn.primary {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: #fff;
}

.barcode-control-btn.print {
    border-color: #bbf7d0;
    color: #047857;
}

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

.barcode-label {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
    background: #fff;
}

.barcode-label-store {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}

.barcode-label-name {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.barcode-label-price {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.barcode-label svg {
    width: 100%;
    max-width: 180px;
    height: 48px;
}

.barcode-label-code {
    margin-top: 6px;
    font-size: 11px;
    color: #64748b;
}

@media print {
    .admin-sidebar,
    .admin-topbar,
    .barcode-page .product-list-head,
    .barcode-controls,
    .admin-alert {
        display: none !important;
    }

    .admin-main,
    .admin-content,
    .barcode-page,
    .barcode-shell {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    .barcode-shell {
        grid-template-columns: 1fr;
    }

    .barcode-product-panel {
        display: none;
    }

    .barcode-label-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Order details page */
.order-detail-page {
    max-width: 1280px;
}

.order-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.order-detail-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.order-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.order-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.order-doc-btn.dark {
    background: #64748b;
    color: #fff;
}

.order-doc-btn.light {
    background: var(--admin-primary);
    color: #fff;
}

.order-detail-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
    gap: 16px;
    align-items: start;
}

.order-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 18px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--admin-border);
}

.order-meta-item span {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.order-meta-item strong {
    font-size: 14px;
    color: #111827;
}

.order-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.order-status-badge.cancelled {
    background: #fee2e2;
    color: #dc2626;
}

.order-status-badge.completed {
    background: #dcfce7;
    color: #166534;
}

.order-status-badge.processing {
    background: #dbeafe;
    color: #1d4ed8;
}

.order-status-badge.pending {
    background: #ffedd5;
    color: #c2410c;
}

.order-items-table th {
    background: #f9fafb;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
    color: #374151;
}

.order-product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-product-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #f3f4f6;
    border: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.order-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-product-thumb i {
    color: #9ca3af;
    font-size: 16px;
}

.order-totals-box {
    width: min(360px, 100%);
    margin-left: auto;
    margin-top: 16px;
    padding-top: 8px;
}

.order-totals-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    font-size: 14px;
    color: #6b7280;
}

.order-totals-row strong {
    color: #111827;
}

.order-totals-row.grand {
    border-top: 1px solid var(--admin-border);
    margin-top: 6px;
    padding-top: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.order-customer-panel {
    margin-top: 16px;
}

.order-side-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
}

.order-info-list,
.order-shipping-list {
    display: grid;
    gap: 12px;
}

.order-info-list div,
.order-shipping-list div {
    display: grid;
    gap: 4px;
}

.order-info-list span,
.order-shipping-list span {
    font-size: 12px;
    color: #9ca3af;
}

.order-info-list strong,
.order-shipping-list strong {
    font-size: 14px;
    color: #111827;
    font-weight: 600;
}

.order-detail-sidebar {
    display: grid;
    gap: 16px;
}

.order-side-form {
    display: grid;
    gap: 14px;
}

.order-side-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.order-side-field .form-select {
    width: 100%;
    height: 42px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 13px;
    background: #fff;
}

.order-pay-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.order-pay-toggle input[type="checkbox"] {
    display: none;
}

.order-pay-slider {
    position: relative;
    width: 46px;
    height: 26px;
    background: #e5e7eb;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.order-pay-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.order-pay-toggle input:checked + .order-pay-slider {
    background: var(--admin-primary);
}

.order-pay-toggle input:checked + .order-pay-slider::after {
    transform: translateX(20px);
}

.order-pay-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.order-assign-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: var(--admin-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.order-assigned-rider {
    margin: 0;
    font-size: 13px;
    color: #374151;
}

.order-back-link {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* POS offline sales list */
.pos-sales-page .admin-page-head h2 {
    font-size: 22px;
    font-weight: 600;
}

.pos-sales-panel {
    padding-top: 14px;
}

.pos-sales-panel-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
}

.pos-sales-table th {
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
}

.pos-sales-table td {
    font-size: 14px;
    color: #111827;
}

.pos-sales-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    transition: background 0.15s ease;
}

.pos-sales-action:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.pos-sales-empty {
    text-align: center;
    padding: 36px 16px 28px;
    color: #9ca3af;
}

.pos-sales-empty i {
    font-size: 28px;
    margin-bottom: 10px;
    opacity: 0.45;
}

.pos-sales-empty p {
    margin: 0 0 6px;
    font-weight: 600;
    color: #6b7280;
}

.pos-sales-empty small {
    font-size: 13px;
}

.pos-sales-empty a {
    color: var(--admin-primary);
    font-weight: 600;
}

.text-end {
    text-align: right;
}

/* POS customer modal */
.pos-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.pos-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.pos-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.pos-modal-dialog {
    position: relative;
    width: min(520px, 100%);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.pos-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 0;
}

.pos-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.pos-modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
}

.pos-modal-body {
    padding: 16px 20px 20px;
}

.pos-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pos-modal-field {
    margin-bottom: 12px;
}

.pos-modal-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.pos-modal-field .required {
    color: #dc2626;
}

.pos-modal-field input,
.pos-modal-field select {
    width: 100%;
    height: 42px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 13px;
    background: #fff;
}

.pos-modal-msg {
    margin: 4px 0 0;
    min-height: 18px;
    font-size: 12px;
}

.pos-modal-msg.success { color: #047857; }
.pos-modal-msg.error { color: #dc2626; }

.pos-modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.pos-modal-btn {
    height: 44px;
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.pos-modal-btn.close {
    background: #64748b;
    color: #fff;
}

.pos-modal-btn.confirm {
    background: var(--admin-primary);
    color: #fff;
}

.pos-modal-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.pos-totals {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--admin-border);
    display: grid;
    gap: 8px;
}

.pos-totals div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Dashboard */
.stat-meta {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--admin-muted);
    font-weight: 500;
}

.dash-live-meta {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--admin-muted);
}

.dash-section {
    margin-bottom: 22px;
}

.dash-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dash-section-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.dash-muted {
    color: var(--admin-muted);
    font-size: 12px;
}

.dash-subtitle {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-muted);
}

.order-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.summary-card {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    box-shadow: var(--admin-shadow);
}

.summary-card strong {
    display: block;
    font-size: 22px;
    margin-bottom: 4px;
    color: var(--admin-dark);
}

.summary-card span {
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 600;
}

.summary-card.highlight {
    background: var(--admin-primary-soft);
    border-color: #ffd591;
}

.summary-card.highlight strong {
    color: var(--admin-primary-dark);
}

.dash-analytics-grid {
    margin-bottom: 22px;
}

.analytics-chart-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--admin-muted);
    margin-bottom: 10px;
}

.analytics-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
    height: 120px;
}

.analytics-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
}

.analytics-bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.analytics-bar {
    width: 100%;
    max-width: 36px;
    border-radius: 8px 8px 4px 4px;
    min-height: 4px;
    transition: height 0.3s ease;
}

.analytics-bar.orders {
    background: linear-gradient(180deg, #60a5fa, #3b82f6);
}

.analytics-bar.revenue {
    background: linear-gradient(180deg, #ffa500, #e89400);
}

.analytics-bar-col small {
    font-size: 11px;
    color: var(--admin-muted);
    font-weight: 600;
}

.progress-row {
    margin-bottom: 10px;
}

.progress-row-head {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 4px;
}

.progress-row-head span {
    color: #5f6775;
}

.progress-track {
    height: 8px;
    background: #f1f3f6;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--admin-primary);
}

.progress-fill.status-pending { background: #f59e0b; }
.progress-fill.status-confirmed { background: #3b82f6; }
.progress-fill.status-processing { background: #8b5cf6; }
.progress-fill.status-completed { background: #10b981; }
.progress-fill.status-cancelled { background: #ef4444; }
.progress-fill.status-draft { background: #9ca3af; }

.source-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f6;
    font-size: 13px;
}

.source-row span {
    color: #5f6775;
}

.source-row span i {
    width: 18px;
    color: var(--admin-primary);
}

.source-row em {
    font-style: normal;
    font-size: 12px;
    color: var(--admin-muted);
    min-width: 36px;
    text-align: right;
}

.dash-total-box {
    background: var(--admin-primary-soft);
    border: 1px solid #ffd591;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-total-box span {
    font-size: 13px;
    color: #7a8190;
}

.dash-total-box strong {
    font-size: 20px;
    color: var(--admin-primary-dark);
}

.dash-catalog-strip {
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.dash-crm-strip {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 14px;
}

.dash-list-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.dash-list-end strong {
    font-size: 13px;
    color: var(--admin-dark);
}

.dash-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--admin-border);
}

.dash-quick-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8f9fb;
    border: 1px solid var(--admin-border);
    font-size: 12px;
    font-weight: 600;
    color: #5f6775;
}

.dash-quick-links a:hover {
    background: var(--admin-primary-soft);
    color: var(--admin-primary-dark);
    border-color: #ffd591;
}

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

    .order-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dash-catalog-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .status-strip,
    .panel-grid,
    .pos-shell {
        grid-template-columns: 1fr;
    }

    .pos-filters {
        grid-template-columns: 1fr;
    }

    .pos-product-grid {
        max-height: none;
    }

    .pos-modal-grid {
        grid-template-columns: 1fr;
    }

    .order-detail-shell {
        grid-template-columns: 1fr;
    }

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

    .product-form-layout,
    .product-hero,
    .product-info-grid {
        grid-template-columns: 1fr;
    }

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

    .my-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .my-products-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .my-products-live {
        grid-column: 1 / -1;
    }

    .barcode-shell {
        grid-template-columns: 1fr;
    }

    .barcode-product-panel {
        border-right: 0;
        padding-right: 0;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 16px;
        margin-bottom: 4px;
    }
}

/* Promo forms — flash sales, ads, coupons */
.promo-form-page {
    max-width: 980px;
}

.promo-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.promo-form-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.promo-form-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--admin-dark);
}

.promo-form-panel {
    padding: 20px 22px 22px;
    border-radius: 8px;
}

.promo-form-panel-narrow {
    max-width: 640px;
}

.promo-panel-heading {
    margin: 0 0 18px;
    font-size: 15px;
    font-weight: 700;
    color: var(--admin-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.promo-panel-heading i {
    color: #64748b;
    font-size: 14px;
}

.promo-form {
    display: grid;
    gap: 18px;
}

.flash-sale-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 24px;
    align-items: start;
}

.promo-form-main {
    display: grid;
    gap: 16px;
}

.promo-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.promo-field .required {
    color: #dc2626;
}

.promo-field-hint {
    font-weight: 400;
    color: #64748b;
}

.promo-ratio-link {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
}

.promo-field input[type="text"],
.promo-field input[type="number"],
.promo-field input[type="date"],
.promo-field input[type="time"],
.promo-field textarea,
.promo-select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
    color: #0f172a;
}

.promo-field textarea {
    min-height: 120px;
    resize: vertical;
}

.promo-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.coupon-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
}

.promo-upload {
    display: block;
    cursor: pointer;
}

.promo-upload-wide .promo-upload-box {
    width: 100%;
    aspect-ratio: 3 / 2;
}

.promo-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.promo-upload-box {
    width: 160px;
    height: 100px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.promo-upload-box-ad {
    width: 200px;
    height: 125px;
}

.promo-upload-box i {
    font-size: 32px;
    color: #94a3b8;
}

.promo-upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promo-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
}

.promo-form-footer-right {
    justify-content: flex-end;
}

.promo-btn-cancel {
    background: #fff;
    border: 1px solid var(--admin-border);
    color: #475569;
    min-width: 110px;
}

.promo-btn-cancel:hover {
    background: #f8fafc;
    color: #0f172a;
}

.promo-btn-submit {
    min-width: 140px;
}

/* Driver form */
.driver-form-page {
    max-width: 1120px;
}

.driver-page-top {
    margin-bottom: 14px;
}

.driver-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.driver-back-link:hover {
    color: var(--admin-primary-dark);
}

.driver-form-panel {
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
}

.driver-form-intro {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #fffdf9 0%, #fff 100%);
}

.driver-form-intro-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--admin-primary-soft);
    border: 1px solid rgba(255, 165, 0, 0.25);
    color: var(--admin-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.driver-form-intro h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: var(--admin-dark);
}

.driver-form-intro p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.driver-form {
    padding: 24px;
}

.driver-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.driver-form-main {
    display: grid;
    gap: 28px;
}

.driver-form-section {
    display: grid;
    gap: 16px;
}

.driver-section-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.driver-section-title i {
    color: #94a3b8;
    font-size: 13px;
}

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

.driver-field-full {
    grid-column: 1 / -1;
}

.driver-field label,
.driver-photo-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.driver-field .required {
    color: #dc2626;
}

.driver-optional {
    font-weight: 500;
    color: #94a3b8;
    font-size: 12px;
}

.driver-input,
.driver-form .driver-select {
    width: 100%;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
    background: #fff;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: none;
    appearance: none;
}

.driver-form textarea.driver-input {
    height: auto;
    min-height: 100px;
    padding: 12px 14px;
}

.driver-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.driver-input::placeholder {
    color: #94a3b8;
}

.driver-input:focus,
.driver-form .driver-select:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.14);
}

.driver-form-sidebar {
    position: sticky;
    top: 88px;
}

.driver-sidebar-card {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    padding: 18px;
    display: grid;
    gap: 18px;
}

.driver-photo-meta {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
}

.driver-photo-drop {
    display: block;
    cursor: pointer;
}

.driver-photo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.driver-photo-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.driver-photo-drop:hover .driver-photo-box {
    border-color: var(--admin-primary);
    background: #fffdf8;
}

.driver-photo-empty {
    display: grid;
    gap: 6px;
    justify-items: center;
    text-align: center;
    padding: 16px;
    color: #64748b;
}

.driver-photo-empty i {
    font-size: 28px;
    color: #94a3b8;
}

.driver-photo-empty em {
    font-style: normal;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.driver-photo-empty small {
    font-size: 11px;
    color: #94a3b8;
}

.driver-photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.driver-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.driver-btn-cancel {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    min-width: 110px;
    height: 44px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.driver-btn-cancel:hover {
    background: #f8fafc;
    color: #0f172a;
}

.driver-btn-submit {
    min-width: 150px;
    height: 44px;
    border-radius: 8px;
    font-weight: 700;
}

.driver-photo-help-inline {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #64748b;
}

.customer-intro-icon {
    color: #2563eb;
    background: #eff6ff;
    border-color: rgba(37, 99, 235, 0.2);
}

/* Customer list */
.customer-list-panel {
    padding-top: 8px;
}

.customer-table th {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    white-space: nowrap;
}

.customer-table td {
    vertical-align: middle;
    font-size: 13px;
}

.customer-col-sl {
    width: 52px;
}

.customer-col-actions {
    width: 130px;
}

.customer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
}

.customer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.customer-action-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.customer-action-btns form {
    margin: 0;
}

.customer-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.customer-action-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.customer-action-btn.edit {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #059669;
}

.customer-action-btn.delete {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.customer-action-btn.reset {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

/* Users & RBAC */
.rbac-intro-icon {
    color: #7c3aed;
    background: #f5f3ff;
    border-color: rgba(124, 58, 237, 0.2);
}

.rbac-user-grid {
    margin-bottom: 8px;
}

.rbac-you-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--admin-primary-soft);
    color: var(--admin-primary-dark);
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}

.rbac-role-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.rbac-check-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
}

.rbac-check-compact {
    font-size: 12px;
    font-weight: 500;
}

.rbac-permissions-section {
    margin-top: 24px;
}

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

.rbac-permission-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    background: #fafbfc;
}

.rbac-permission-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.rbac-permission-head strong {
    font-size: 13px;
    color: #0f172a;
}

.rbac-permission-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

@media (max-width: 767px) {
    .rbac-permissions-grid {
        grid-template-columns: 1fr;
    }
}

/* Business Settings */
.business-settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.business-settings-tab {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: #fff;
    color: #5f6775;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.business-settings-tab:hover {
    background: #f8f9fb;
    color: var(--admin-dark);
}

.business-settings-tab.active {
    background: var(--admin-dark);
    border-color: var(--admin-dark);
    color: #fff;
}

.business-settings-hint {
    margin: -4px 0 18px;
    font-size: 13px;
    color: #64748b;
}

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

.social-link-card {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fafbfc;
}

.social-link-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.social-link-card-head strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
}

.social-link-card-head small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
}

.social-link-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
}

.social-link-card--facebook .social-link-icon {
    background: #1877f2;
}

.social-link-card--instagram .social-link-icon {
    background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af);
}

.social-link-card--youtube .social-link-icon {
    background: #ff0000;
}

.social-link-card--whatsapp .social-link-icon {
    background: #25d366;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: path(rect(0 0 0 0));
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 767px) {
    .social-link-grid {
        grid-template-columns: 1fr;
    }
}

.business-settings-panel {
    margin-bottom: 16px;
}

.business-settings-section-title {
    margin: 0 0 18px;
    font-size: 15px;
    font-weight: 700;
    color: var(--admin-dark);
}

.business-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    min-height: 42px;
    align-items: center;
}

.business-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
}

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

.business-payment-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fafbfc;
}

.business-payment-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff8ef;
    color: var(--admin-primary-dark);
    font-size: 18px;
}

.business-payment-icon.online {
    background: #eff6ff;
    color: #2563eb;
}

.business-payment-card strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 4px;
}

.business-payment-card p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

.business-settings-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

/* General Settings */
.general-settings-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.general-settings-head-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--admin-primary-soft);
    color: var(--admin-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.general-settings-panel {
    margin-bottom: 16px;
}

.general-settings-section-title {
    margin: 0 0 18px;
    font-size: 15px;
    font-weight: 700;
    color: var(--admin-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.general-settings-panel-head .general-settings-section-title {
    margin-bottom: 0;
}

.general-settings-toggle {
    flex-shrink: 0;
    max-width: 320px;
}

.general-settings-toggle .order-pay-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.35;
}

.general-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.general-media-grid-footer {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.general-media-item > label:first-child {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.general-media-hint {
    font-weight: 500;
    color: #94a3b8;
    font-size: 12px;
}

.general-media-upload {
    display: block;
    cursor: pointer;
}

.general-media-upload-wide {
    max-width: 520px;
}

.general-media-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.general-media-box {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.general-media-box.general-media-wide {
    width: 100%;
    max-width: 280px;
    height: 70px;
}

.general-media-upload-wide .general-media-box.general-media-wide {
    max-width: 520px;
    height: 140px;
}

.general-media-box i {
    font-size: 28px;
    color: #94a3b8;
}

.general-media-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.general-media-preview.is-logo {
    object-fit: contain;
    padding: 8px;
    background: #fff;
}

.general-media-note {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #94a3b8;
}

.general-settings-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    margin-bottom: 24px;
}

/* Promotional Banners */
.banner-list-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--admin-dark);
}

.banner-table .banner-thumb {
    width: 120px;
    height: 56px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: #f8fafc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-table .banner-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-table .banner-thumb i {
    color: #94a3b8;
    font-size: 20px;
}

.appearance-color-input {
    height: 42px;
    padding: 4px;
}

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

.appearance-toggle-item {
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fafbfc;
}

.appearance-promo-panel {
    overflow: hidden;
}

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

.appearance-promo-head .general-settings-section-title {
    margin-bottom: 4px;
}

.appearance-promo-head p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.appearance-promo-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.appearance-promo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.85fr);
    gap: 24px;
    align-items: start;
}

.appearance-promo-layout-wide {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 1.1fr);
}

.appearance-promo-media {
    position: sticky;
    top: 16px;
}

.appearance-media-card {
    display: block;
    cursor: pointer;
    margin: 0;
}

.appearance-media-frame {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background:
        linear-gradient(45deg, #f1f5f9 25%, transparent 25%) 0 0 / 16px 16px,
        linear-gradient(-45deg, #f1f5f9 25%, transparent 25%) 0 8px / 16px 16px,
        #f8fafc;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.appearance-media-card.is-portrait .appearance-media-frame {
    aspect-ratio: 4 / 5;
    max-width: 280px;
    margin-left: auto;
}

.appearance-media-card.is-tall .appearance-media-frame {
    aspect-ratio: 375 / 470;
    max-width: 260px;
    margin-left: auto;
}

.appearance-media-card.is-wide .appearance-media-frame {
    aspect-ratio: 920 / 350;
    max-width: 100%;
}

.appearance-media-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.appearance-media-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-align: center;
    padding: 16px;
}

.appearance-media-overlay i {
    font-size: 22px;
}

.appearance-media-overlay span {
    font-size: 13px;
    font-weight: 700;
}

.appearance-media-card:hover .appearance-media-frame,
.appearance-media-frame.is-updated {
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.appearance-media-card:hover .appearance-media-overlay {
    opacity: 1;
}

.appearance-media-meta {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
    text-align: right;
}

.appearance-promo-layout-wide .appearance-media-meta {
    text-align: left;
}

@media (max-width: 992px) {
    .appearance-promo-layout,
    .appearance-promo-layout-wide {
        grid-template-columns: 1fr;
    }

    .appearance-promo-media {
        position: static;
    }

    .appearance-media-card.is-portrait .appearance-media-frame,
    .appearance-media-card.is-tall .appearance-media-frame {
        margin-left: 0;
        max-width: 320px;
    }

    .appearance-media-meta {
        text-align: left;
    }
}

.page-banner-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 8px;
}

.page-banner-admin-card {
    margin: 0;
}

.page-banner-admin-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.page-banner-admin-card-head h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.page-banner-admin-key {
    display: inline-block;
    font-size: 12px;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.page-banner-admin-chip-muted {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.page-banner-admin-upload .appearance-media-frame {
    aspect-ratio: 1900 / 250;
}

.contact-map-admin-preview {
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.contact-map-admin-preview iframe {
    display: block;
    width: 100%;
    height: 280px;
    border: 0;
}

@media (max-width: 991px) {
    .page-banner-admin-grid {
        grid-template-columns: 1fr;
    }
}

/* Import / Export */
.import-export-help-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-primary-dark);
}

.import-export-panel {
    max-width: 720px;
}

.import-export-panel-title {
    margin: 0 0 18px;
    font-size: 16px;
    font-weight: 700;
    color: var(--admin-dark);
}

.import-export-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.import-export-field {
    max-width: 360px;
}

.import-export-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.file-manager-head-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.file-manager-panel {
    padding-top: 18px;
}

.file-manager-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.file-manager-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #64748b;
}

.file-manager-breadcrumbs a {
    color: var(--admin-primary-dark);
    font-weight: 600;
}

.file-manager-count {
    font-size: 12px;
    color: #94a3b8;
}

.file-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.file-manager-card {
    position: relative;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fff;
    min-height: 170px;
    overflow: hidden;
}

.file-manager-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 14px 16px;
    text-align: center;
    min-height: 170px;
    color: inherit;
}

.file-manager-card-link strong {
    font-size: 13px;
    color: #0f172a;
    word-break: break-word;
}

.file-manager-card-link span {
    font-size: 12px;
    color: #94a3b8;
}

.file-manager-folder-icon {
    font-size: 42px;
    color: #60a5fa;
}

.file-manager-image-thumb {
    width: 100%;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.file-manager-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-manager-delete {
    position: absolute;
    top: 8px;
    right: 8px;
}

.file-manager-delete button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: #dc2626;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Invoicing */
.invoice-filter-panel {
    margin-bottom: 16px;
}

.invoice-show-actions,
.invoice-show-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.invoice-show-grid {
    align-items: flex-start;
    gap: 18px;
}

.invoice-show-grid > .admin-panel {
    flex: 1;
    min-width: 0;
}

.invoice-show-grid > .order-detail-sidebar {
    width: 320px;
    flex-shrink: 0;
}

.invoice-side-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.invoice-send-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.invoice-status-draft { background: #f1f5f9; color: #475569; }
.invoice-status-sent { background: #eff6ff; color: #2563eb; }
.invoice-status-paid { background: #ecfdf5; color: #059669; }
.invoice-status-overdue { background: #fef2f2; color: #dc2626; }
.invoice-status-cancelled { background: #f8fafc; color: #94a3b8; }

.invoice-items-section {
    margin: 24px 0;
}

.invoice-items-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.invoice-items-table input.driver-input {
    width: 100%;
    min-width: 0;
}

.invoice-line-total {
    font-weight: 700;
    white-space: nowrap;
}

.invoice-remove-item {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: #fef2f2;
    color: #dc2626;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.invoice-estimated-total {
    height: 42px;
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--admin-primary-dark);
}

.invoice-totals-fields {
    margin-top: 8px;
}

@media (max-width: 991px) {
    .invoice-show-grid {
        flex-direction: column;
    }

    .invoice-show-grid > .order-detail-sidebar {
        width: 100%;
    }
}

@media (max-width: 991px) {
    .general-media-grid {
        grid-template-columns: 1fr 1fr;
    }

    .general-settings-panel-head {
        flex-direction: column;
    }
}

@media (max-width: 767px) {
    .business-payment-grid {
        grid-template-columns: 1fr;
    }

    .general-media-grid,
    .general-media-grid-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .driver-form-layout {
        grid-template-columns: 1fr;
    }

    .driver-form-sidebar {
        position: static;
    }

    .driver-sidebar-card {
        display: grid;
        grid-template-columns: 180px 1fr;
        gap: 18px;
        align-items: start;
    }

    .driver-photo-box {
        max-width: 180px;
    }
}

@media (max-width: 767px) {
    .driver-fields-grid {
        grid-template-columns: 1fr;
    }

    .driver-field-full {
        grid-column: auto;
    }

    .driver-sidebar-card {
        grid-template-columns: 1fr;
    }

    .driver-photo-box {
        max-width: 220px;
    }

    .driver-form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .driver-btn-cancel,
    .driver-btn-submit {
        width: 100%;
    }
}

/* Blog admin */
.blog-form-page {
    max-width: 1100px;
}

.blog-form-panel {
    padding: 22px;
}

.blog-form-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
    align-items: start;
}

.blog-form-main {
    display: grid;
    gap: 16px;
}

.blog-cover-box {
    width: 100%;
    aspect-ratio: 2 / 1;
    height: auto;
}

.blog-tags-field {
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-height: 42px;
}

.blog-tags-field input {
    flex: 1;
    min-width: 180px;
    border: 0;
    outline: 0;
    font-size: 14px;
    padding: 4px 0;
    background: transparent;
}

.blog-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.blog-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid var(--admin-border);
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

.blog-tag-chip button {
    border: 0;
    background: none;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 14px;
}

.blog-tags-help {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
}

.blog-editor-field {
    margin-top: 4px;
}

.blog-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.blog-editor-head label {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.blog-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 165, 0, 0.35);
    background: var(--admin-primary-soft);
    color: var(--admin-primary-dark);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.blog-ai-btn:hover {
    background: #ffefdb;
}

.blog-ai-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

#blogContentEditor {
    min-height: 280px;
    border: 1px solid var(--admin-border);
    border-radius: 0 0 8px 8px;
    background: #fff;
}

.blog-form-panel .ql-toolbar.ql-snow {
    border: 1px solid var(--admin-border);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #f8fafc;
}

.blog-form-panel .ql-container.ql-snow {
    border: 0;
}

.blog-content-hidden {
    display: none !important;
}

.blog-list-filters {
    margin-bottom: 16px;
    padding: 14px 16px;
}

.blog-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.blog-filter-form input[type="search"],
.blog-filter-form .form-select {
    min-height: 40px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    background: #fff;
}

.blog-filter-form input[type="search"] {
    min-width: 220px;
}

.blog-filter-form .form-select {
    min-width: 180px;
}

.blog-list-post {
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-list-thumb {
    width: 52px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blog-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-list-thumb i {
    color: #94a3b8;
}

.blog-list-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.blog-list-tags span {
    font-size: 11px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1px 6px;
}

@media (max-width: 767px) {
    .flash-sale-form-grid,
    .coupon-form-grid,
    .promo-field-row {
        grid-template-columns: 1fr;
    }

    .promo-form-aside {
        order: -1;
    }

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

    .blog-form-aside {
        order: -1;
    }
}

/* Category manager */
.category-manager {
    display: grid;
    grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.category-tree-panel {
    padding: 16px;
    display: grid;
    gap: 12px;
    max-height: calc(100vh - 180px);
    overflow: hidden;
}

.category-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0;
    border: 1px solid #111;
    border-radius: 8px;
    overflow: hidden;
}

.category-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border-right: 1px solid #111;
}

.category-toolbar-btn:last-child,
.category-toolbar-delete .category-toolbar-btn {
    border-right: 0;
}

.category-toolbar-btn.is-active {
    background: #fff;
    color: var(--admin-primary-dark);
}

.category-toolbar-btn[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
}

.category-toolbar-btn-icon {
    width: 42px;
    padding-inline: 0;
}

.category-toolbar-delete {
    margin: 0;
}

.category-tree-search input {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}

.category-expand-all {
    justify-self: start;
    padding: 0;
    border: 0;
    background: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
}

.category-expand-all:hover {
    color: var(--admin-primary-dark);
}

.category-tree-list {
    overflow: auto;
    display: grid;
    gap: 6px;
    padding-right: 4px;
}

.category-tree-empty {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.category-tree-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 4px 8px 4px calc(8px + var(--depth, 0) * 16px);
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid transparent;
}

.category-tree-row.is-selected {
    background: var(--admin-primary-soft);
    border-color: rgba(255, 165, 0, 0.35);
}

.category-tree-toggle,
.category-tree-spacer {
    width: 18px;
    flex-shrink: 0;
}

.category-tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: none;
    color: #64748b;
    cursor: pointer;
}

.category-tree-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    color: #0f172a;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.category-tree-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-tree-icon {
    color: #334155;
    font-size: 13px;
}

.category-tree-children {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.category-form-panel {
    padding: 20px;
}

.category-form {
    display: grid;
    gap: 18px;
    max-width: 520px;
}

.category-form-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.category-form-field .required {
    color: #dc2626;
}

.category-field-hint {
    font-weight: 400;
    color: #64748b;
}

.category-form-field input[type="text"],
.category-form-field textarea {
    width: 100%;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
}

.category-thumbnail-upload {
    display: block;
    cursor: pointer;
}

.category-thumbnail-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.category-thumbnail-box {
    width: 120px;
    height: 90px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-thumbnail-box i {
    font-size: 28px;
    color: #94a3b8;
}

.category-thumbnail-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-form-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.category-form-toggle-row > span {
    font-size: 14px;
    font-weight: 600;
}

.category-toggle {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.category-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.category-toggle-track {
    width: 44px;
    height: 24px;
    border-radius: 8px;
    background: #cbd5e1;
    position: relative;
    transition: background 0.15s ease;
}

.category-toggle-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: #fff;
    transition: transform 0.15s ease;
}

.category-toggle input:checked + .category-toggle-track {
    background: var(--admin-primary);
}

.category-toggle input:checked + .category-toggle-track::after {
    transform: translateX(20px);
}

.category-form-actions {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 10px;
    margin-top: 8px;
}

.category-btn-reset {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.category-btn-reset:hover {
    background: #fecaca;
    color: #991b1b;
}

.category-btn-submit {
    width: 100%;
}

@media (max-width: 991px) {
    .category-manager {
        grid-template-columns: 1fr;
    }

    .category-tree-panel {
        max-height: none;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

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

    .admin-main {
        margin-left: 0;
        width: 100%;
    }

    .topbar-search,
    .topbar-user-meta,
    .topbar-website-btn {
        display: none;
    }

    .admin-form-grid,
    .status-strip,
    .panel-grid,
    .stat-grid,
    .order-summary-grid,
    .dash-catalog-strip {
        grid-template-columns: 1fr;
    }
}

.brand-admin-thumb {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #eceff3;
    border-radius: 50%;
    padding: 6px;
}
