/* Graphite admin skin. Screen only: invoice print styles stay independent. */
@media screen {
body.admin-graphite {--bg:#151517;--panel:#202023;--panel-2:#29292d;--line:#424248;--line-strong:#74747d;--text:#eeeef1;--muted:#b6b6bf;--soft:#9999a4;--gold:#ddddE2;--primary:#f1f1f3;--secondary:#a9a9b2;--purple:#b4b4bd;--cyan:#b9cbd0;--pink:#c6aeb8;--green:#9ac9aa;--danger:#ed9ea5;--text-muted:#b6b6bf;--glass-bg:#242427;background:#151517 !important;color:var(--text) !important;font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif !important;}
body.admin-graphite :is(.bg-animation,.bg-grid) {display:none !important;}
body.admin-graphite :is(h1,h2,h3,h4) {font-weight:500 !important;letter-spacing:-.02em !important;line-height:1.3 !important;text-shadow:none !important;}
body.admin-graphite h1 {font-size:clamp(23px,2.5vw,30px) !important;}
body.admin-graphite h2 {font-size:22px !important;}
body.admin-graphite h3 {font-size:17px !important;}
body.admin-graphite h4 {font-size:14px !important;}
body.admin-graphite :is(.dashboard-header,.sub-sidebar,.admin-section-panel,.cost-calculator-panel,.modal-card,#customer-access-dialog,.quick-sale-image-dialog,#admin-login-box) {background:#202023 !important;border-color:#48484f !important;box-shadow:none !important;backdrop-filter:none !important;}
body.admin-graphite :is(.admin-panel,.dashboard-card,.admin-dashboard-hero,.product-config-card,.settings-tab-panel,.retail-toggle-card,.cost-result-card,.inventory-qr-card,.quick-sale-shell,.quick-sale-client-panel,.quick-sale-catalog-panel,.quick-sale-checkout-panel,.quick-sale-product-tile,.preview-desc-card,.preview-variant-panel,.product-preview-panel,.inv-summary-card,.china-admin-card,.china-item-card,.payment-method-card,.measurement-panel) {background:#222225 !important;border:1px solid #45454c !important;border-radius:8px !important;box-shadow:none !important;backdrop-filter:none !important;}
body.admin-graphite :is(.admin-title-row,.orders-admin-header,.china-header,.product-form-intro,.carousel-admin-intro,.product-config-card > summary,.admin-fold > summary,.settings-fold > summary,.orders-navigation-fold > summary,.inv-modal-header,.inv-modal-footer) {background:#26262a !important;border-color:#45454c !important;color:#d7d7de !important;box-shadow:none !important;font-weight:500 !important;}
body.admin-graphite :is(.admin-kicker,.sidebar-label,.dashboard-badge,.product-config-card label,.form-group label,.detail-block-label,.cost-market-note,.enterprise-panel-kicker,.quick-sale-panel-kicker) {color:#bcbcc5 !important;font-weight:500 !important;letter-spacing:.5px !important;}
body.admin-graphite :is(button,.admin-btn,.sidebar-btn,.settings-tab-btn,.orders-tab-btn,.product-config-tab) {font-weight:500 !important;text-shadow:none !important;box-shadow:none !important;border-radius:6px !important;letter-spacing:.15px !important;}
body.admin-graphite :is(.admin-btn,.admin-otp-submit) {background:#eeeef1 !important;color:#242426 !important;border:1px solid #eeeef1 !important;}
body.admin-graphite :is(.admin-btn.secondary,.sidebar-btn,.settings-tab-btn,.orders-tab-btn,.product-config-tab,.cost-calculator-tab,.admin-section-tab,.admin-section-close,.cost-calculator-close,.cost-market-btn,.quick-sale-mobile-tabs button,.quick-sale-category-btn,.quick-sale-payment-btn,.quick-sale-action-btn) {background:#29292d !important;color:#dedee4 !important;border:1px solid #53535d !important;}
body.admin-graphite :is(.sidebar-btn.active,.settings-tab-btn.active,.orders-tab-btn.active,.product-config-tab.active,.quick-sale-mobile-tabs button.active,.quick-sale-category-btn.active,.quick-sale-payment-btn.active) {background:#45454d !important;border-color:#aaaab5 !important;color:#fff !important;}
body.admin-graphite :is(.admin-btn,.sidebar-btn,.settings-tab-btn,.orders-tab-btn):hover:not(:disabled) {filter:brightness(1.1);}
body.admin-graphite :is(button:disabled,.admin-btn:disabled) {opacity:.45 !important;cursor:not-allowed !important;}
body.admin-graphite :is(.admin-btn.danger,.sidebar-btn.logout,.btn-delete,.delete-btn) {background:#493034 !important;border-color:#ab777f !important;color:#ffd0d6 !important;}
body.admin-graphite :is(.form-control,input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea) {background:#2b2b30 !important;border:1px solid #575760 !important;color:#ededf1 !important;border-radius:6px !important;box-shadow:none !important;font-weight:400 !important;}
body.admin-graphite :is(input,textarea)::placeholder {color:#9999a5 !important;opacity:1;}
body.admin-graphite :is(input[type=checkbox],input[type=radio],input[type=range]) {accent-color:#d5d5dd;}
body.admin-graphite :is(button,a,input,select,textarea,summary):focus-visible {outline:2px solid #ceced8 !important;outline-offset:3px !important;}
body.admin-graphite :is(.table-wrapper,.inv-table-wrapper,.invoice-table,.inventory-table,.orders-table) {border-color:#45454d !important;background:#222225 !important;box-shadow:none !important;}
body.admin-graphite :is(th,td,.quick-sale-total-row,.quick-sale-client-head,.enterprise-panel-head,.quick-sale-payment-methods,.product-form-actions,.quick-sale-checkout-actions) {border-color:#45454d !important;}
body.admin-graphite th {background:#29292d !important;color:#c7c7d0 !important;font-weight:500 !important;font-size:11px !important;letter-spacing:.6px !important;}
body.admin-graphite td {font-weight:400 !important;}
body.admin-graphite tbody tr:hover {background:#2d2d32 !important;}
body.admin-graphite :is(.quick-sale-brand-title,.enterprise-pos-title,.quick-sale-total-value,.stat-value,.dashboard-stat-value,.preview-title) {color:#ededf2 !important;font-weight:500 !important;text-shadow:none !important;}
body.admin-graphite :is(.quick-sale-product-tile,.product-config-card,.dashboard-card)::before,body.admin-graphite :is(.quick-sale-product-tile,.product-config-card,.dashboard-card)::after {box-shadow:none !important;background:none !important;}
body.admin-graphite #customer-access-dialog :is(button,details,textarea) {border-radius:6px !important;border-color:#666670 !important;box-shadow:none !important;}
body.admin-graphite #customer-access-dialog [data-request-status] {color:#d6d6df !important;}
body.admin-graphite .admin-otp-title {font-size:25px !important;}
body.admin-graphite :is(.admin-otp-sub,.admin-otp-kicker,.admin-otp-back) {color:#b3b3bf !important;}
body.admin-graphite .admin-otp-card {border-radius:8px !important;background:#202023 !important;border-color:#48484f !important;box-shadow:none !important;}
@media(max-width:760px) {
 body.admin-graphite .dashboard-header h1 {font-size:20px !important;}
 body.admin-graphite :is(.sidebar-btn,.settings-tab-btn,.orders-tab-btn,.admin-btn,.admin-section-tab,.quick-sale-mobile-tabs button) {min-height:44px;}
 body.admin-graphite h2 {font-size:20px !important;}
}
}
@media screen {
body.admin-graphite :is(.dashboard-main,.dashboard-content-area,.product-admin-grid > *) {min-width:0 !important;}
body.admin-graphite :is(.dashboard-stat-card,.enterprise-pos-header,.enterprise-pos-metrics > div,.quick-sale-change-card,.enterprise-ticket-summary,.settings-fold,.dashboard-quick-actions button) {background:#242427 !important;border-color:#4b4b53 !important;border-radius:6px !important;box-shadow:none !important;}
body.admin-graphite #view-dashboard .dashboard-quick-actions b {background:#42424a !important;color:#e6e6ed !important;box-shadow:none !important;border-radius:5px !important;}
body.admin-graphite #view-dashboard :is(.dashboard-quick-actions span,.dashboard-stat-card strong) {font-weight:500 !important;color:#ededf3 !important;}
body.admin-graphite :is(.enterprise-pos-logo,.enterprise-pos-brand,.enterprise-section-head,.enterprise-pos-metrics,.enterprise-cart-total) {border-color:#4b4b53 !important;color:#dedee6 !important;}
body.admin-graphite :is(.enterprise-ticket-action,.quick-sale-refresh-btn,.quick-sale-scan-btn,[data-quick-sale-method],.quick-sale-category-chip) {background:#2d2d32 !important;border:1px solid #65656f !important;color:#e4e4ec !important;box-shadow:none !important;}
body.admin-graphite [data-quick-sale-method].active {background:#484851 !important;border-color:#bdbdc7 !important;}
body.admin-graphite .enterprise-charge-btn {background:#eeeef2 !important;color:#262629 !important;border-color:#eeeef2 !important;box-shadow:none !important;}
body.admin-graphite :is(.product-preview-name,.enterprise-pos-brand h2) {font-weight:500 !important;font-size:22px !important;}
@media(max-width:1300px) {body.admin-graphite #view-products .grid-split.product-admin-grid {grid-template-columns:minmax(0,1fr) !important;} body.admin-graphite #view-products .product-preview-panel {position:static !important;}}
}

@media screen {.qr-camera-controls {padding:12px 0;color:#cccdd5;font-size:13px;line-height:1.5;} .qr-camera-controls p {margin:0 0 10px;} .qr-camera-controls label {display:grid;gap:8px;} .qr-camera-controls input {width:100%;accent-color:#ceced8;}}
@media screen {
body.admin-graphite .inventory-category-manager-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
body.admin-graphite .inventory-category-manager-grid label {display:grid;gap:8px;font-size:13px;color:#c7c7d0;}
body.admin-graphite .inventory-category-manager-grid p {grid-column:1/-1;margin:0;line-height:1.6;color:#bfc0ca;font-size:13px;}
body.admin-graphite #inventory-delete-category {justify-self:start;}
@media(max-width:650px) {body.admin-graphite .inventory-category-manager-grid {grid-template-columns:minmax(0,1fr);}}
}
@media screen {
    .admin-graphite .inv-item-visual {display:flex; align-items:center; gap:14px; min-width:0;}
    .admin-graphite .inv-item-photo,.admin-graphite .inv-item-photo-empty {width:76px; height:76px; flex:0 0 76px; object-fit:contain; background:#f1f1f1; border:1px solid #535359; border-radius:6px;}
    .admin-graphite .inv-item-photo-empty {display:flex; align-items:center; justify-content:center; color:#666; font-size:11px;}
    .admin-graphite .inv-item-visual [hidden] {display:none;}
    .admin-graphite .inv-item-fields {flex:1; min-width:0;}
    .admin-graphite .inv-item-option {display:block; color:#c6c6cb; font-size:12px; margin-top:6px; line-height:1.5;}
}

/* Keep every admin section reachable in short windows and expanded menus. */
@media(min-width:1025px) {
 body.admin-graphite #admin-main-content .sub-sidebar {height:100vh;height:100dvh;max-height:100dvh;box-sizing:border-box;min-height:0;overflow:hidden !important;}
 body.admin-graphite #admin-main-content .sub-sidebar > :is(.desktop-sidebar-toggle,.sidebar-logo) {flex-shrink:0;}
 body.admin-graphite #admin-main-content .sub-sidebar .sidebar-menu-wrapper {flex:1 1 auto !important;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#74747d #242428;padding-bottom:18px;scroll-padding-block:12px;}
 body.admin-graphite #admin-main-content .sub-sidebar .sidebar-section {flex-shrink:0;}
}
body.admin-graphite .barcode-reader-mode {display:grid;gap:6px;margin:10px 0;color:#dedee4;font-size:13px;}
body.admin-graphite .barcode-phone-hint {font-size:12px;line-height:1.6;color:#cccdd5;margin:10px 0;}
body.admin-graphite :is(.barcode-scanner-stage video,#barcode-scanner-reader video) {object-fit:contain !important;}
body.admin-graphite .barcode-scanner-card {max-height:calc(100dvh - 24px);overflow-y:auto;}

body.admin-graphite .barcode-frame-controls {margin-top:12px;padding:12px;border:1px solid #53535d;border-radius:6px;background:#242428;}
body.admin-graphite .barcode-frame-actions {display:flex;flex-wrap:wrap;gap:8px;}
body.admin-graphite .barcode-frame-controls p {font-size:12px;line-height:1.6;color:#d2d2da;margin:10px 0 0;}
body.admin-graphite .barcode-frame-controls img {display:block;max-width:100%;max-height:220px;object-fit:contain;margin-top:12px;background:#fff;}
body.admin-graphite .barcode-frame-controls [hidden] {display:none !important;}
body.admin-graphite .pending-product-row {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid #494950;}
body.admin-graphite .pending-product-row span {overflow-wrap:anywhere;}
body.admin-graphite .pending-product-row button {flex-shrink:0;}
body.admin-graphite #pending-products-panel p {color:#ccc;line-height:1.6;}
@media(max-width:600px) {body.admin-graphite .pending-product-row {flex-direction:column;align-items:stretch;}}
body.admin-graphite .admin-header-actions {display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap;}
body.admin-graphite #admin-refresh-btn {white-space:nowrap;min-height:42px;}
body.admin-graphite .product-work-tabs {display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px;border-bottom:1px solid #505056;padding-bottom:12px;}
body.admin-graphite .product-work-tabs button {border:1px solid #5b5b64;background:#252529;color:#d5d5df;border-radius:6px;padding:12px 18px;min-height:44px;font:inherit;cursor:pointer;}
body.admin-graphite .product-work-tabs button[aria-selected="true"] {background:#eeeef2;color:#242428;border-color:#eeeef2;}
body.admin-graphite .product-work-tabs button:focus-visible {outline:2px solid #d5d5df;outline-offset:3px;}
body.admin-graphite :is(#products-form-pane,#pending-products-panel)[hidden] {display:none !important;}
body.admin-graphite #pending-products-panel {padding:24px;}

/* Equal-sized product actions, with no orphaned submit button. */
body.admin-graphite #view-products .product-form-actions {grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:12px;}
body.admin-graphite #view-products .product-form-actions > div {display:contents !important;}
body.admin-graphite #view-products .product-form-actions .admin-btn {width:100%;min-width:0;min-height:54px;margin:0;box-sizing:border-box;white-space:normal;line-height:1.4;padding:12px 16px;}
body.admin-graphite .pending-product-actions {display:flex;align-items:center;gap:10px;flex-shrink:0;}
body.admin-graphite .pending-product-actions .pending-product-delete {display:inline-flex;align-items:center;justify-content:center;width:46px;min-width:46px;min-height:46px;padding:10px;color:#f1b3b3 !important;}
body.admin-graphite .pending-product-delete:hover {background:#432b2e !important;border-color:#b6757c !important;}
@media(max-width:600px) {body.admin-graphite .pending-product-actions .admin-btn:first-child {flex:1;}}
@media(max-width:380px) {body.admin-graphite #view-products .product-form-actions {grid-template-columns:minmax(0,1fr) !important;}}

/* Keep camera pixels and the decoder's video geometry aligned in portrait. */
body.admin-graphite .barcode-scanner-stage {
    height:auto !important;
    min-height:0;
    aspect-ratio:var(--barcode-camera-ratio, 16 / 9);
}
body.admin-graphite #barcode-scanner-video {
    position:absolute;
    inset:0;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
}
body.admin-graphite #barcode-scanner-reader {
    height:auto !important;
    min-height:0 !important;
}
body.admin-graphite #barcode-scanner-reader video {
    display:block;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
}
@media(max-width:600px) {
    body.admin-graphite .barcode-scanner-card {
        display:block;
        height:auto;
        max-height:calc(100dvh - 24px);
        overflow-y:auto;
    }
    body.admin-graphite .barcode-scanner-stage {
        aspect-ratio:var(--barcode-camera-ratio, 3 / 4);
    }
    body.admin-graphite .barcode-scanner-guide {
        width:calc(100% - 22px);
        height:calc(100% - 22px);
    }
}
