/* =============================================================================
   System surfaces — glass cards / panels / tiles (SINGLE SOURCE)
   Load after surface CSS + with system-buttons.css.
   Brand edge: #173630 · soft lift · no purple
   ============================================================================= */

body .sys-panel,
body .content-card,
body .stat-card,
body .quick-action-card,
body .admin-shell .card:not(.rounded-circle):not(.border-0),
body [class*="-module-page"] .card:not(.rounded-circle),
body [class*="-module-page"] [class*="-hub-tile__inner"],
body [class*="-module-page"] [class*="-lines-panel"],
body [class*="-module-page"] [class*="-filter-bar"],
body .purch-panel,
body .purch-lines-panel,
body .purch-filter-bar,
body .purch-hub-tile__inner,
body .pf-overview-card,
body .db-setup-card,
body .auth-split-card,
body .auth-split-form-panel,
body .store-shell .shop-product-card,
body .store-shell .shop-panel,
body .store-shell .product-card,
body .pos-terminal-shell .pos-product-card,
body .pos-terminal-shell .pos-card,
body .pos-terminal-shell .pos-panel,
body .modal-content,
body .admin-shell .dropdown-menu {
    background: var(--surf-glass-bg) !important;
    border: 1px solid var(--surf-glass-border) !important;
    box-shadow: var(--surf-glass-shadow) !important;
    backdrop-filter: var(--surf-glass-blur);
    -webkit-backdrop-filter: var(--surf-glass-blur);
    transition:
        transform var(--surf-motion),
        box-shadow var(--surf-motion),
        border-color var(--motion-fast, 0.15s ease),
        background var(--surf-motion);
}

/* Stronger fill for dense data panels (tables stay readable) */
body .sys-panel,
body .content-card,
body .purch-lines-panel,
body [class*="-module-page"] [class*="-lines-panel"] {
    background: var(--surf-glass-bg-strong) !important;
}

/* Interactive cards / hub tiles / KPI */
body .stat-card,
body .quick-action-card,
body .pf-overview-card,
body [class*="-module-page"] [class*="-hub-tile__inner"],
body .purch-hub-tile__inner,
body .store-shell .shop-product-card,
body .store-shell .product-card,
body .pos-terminal-shell .pos-product-card {
    cursor: default;
}

body a.pf-overview-card,
body a.quick-action-card,
body a[class*="-hub-tile"],
body .store-shell a.shop-product-card,
body .store-shell a.product-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

body .stat-card:hover,
body .quick-action-card:hover,
body .pf-overview-card:hover,
body [class*="-module-page"] [class*="-hub-tile"]:hover [class*="-hub-tile__inner"],
body [class*="-module-page"] [class*="-hub-tile"]:focus-visible [class*="-hub-tile__inner"],
body .purch-hub-tile:hover .purch-hub-tile__inner,
body .store-shell .shop-product-card:hover,
body .store-shell .product-card:hover,
body .pos-terminal-shell .pos-product-card:hover,
body .admin-shell .card:not(.rounded-circle):hover,
body .sys-panel:hover,
body .content-card:hover {
    border-color: var(--surf-glass-border-hover) !important;
    box-shadow: var(--surf-glass-shadow-hover) !important;
}

body .stat-card:hover,
body .quick-action-card:hover,
body .pf-overview-card:hover,
body [class*="-module-page"] [class*="-hub-tile"]:hover [class*="-hub-tile__inner"],
body .purch-hub-tile:hover .purch-hub-tile__inner,
body .store-shell .shop-product-card:hover,
body .store-shell .product-card:hover,
body .pos-terminal-shell .pos-product-card:hover {
    transform: translateY(-2px);
}

/* Panel heads keep a softer glass strip */
body .sys-panel__head:not(.sys-form-panel__head),
body .content-card-header {
    background: color-mix(in srgb, var(--surf-glass-bg-strong) 70%, rgba(23, 54, 48, 0.05)) !important;
    border-bottom-color: color-mix(in srgb, var(--surf-glass-border) 80%, transparent) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* Soften older admin hover that fought glass (panels stay calm) */
body .admin-shell .sys-panel:hover,
body .admin-shell .content-card:hover {
    transform: none;
}

/* Modals / dropdowns: glass but no lift */
body .modal-content:hover,
body .admin-shell .dropdown-menu:hover {
    transform: none !important;
    box-shadow: var(--surf-glass-shadow) !important;
}

/* Auth glass shell cards */
body .auth-split-body .auth-split-form-wrap,
body .auth-split-body .card {
    background: var(--surf-glass-bg-strong) !important;
    border: 1px solid var(--surf-glass-border) !important;
    box-shadow: var(--surf-glass-shadow) !important;
    backdrop-filter: var(--surf-glass-blur);
    -webkit-backdrop-filter: var(--surf-glass-blur);
}

/* Setup database card */
body .db-setup-card {
    border-radius: var(--sys-radius);
}

@media (prefers-reduced-motion: reduce) {
    body .sys-panel,
    body .content-card,
    body .stat-card,
    body .quick-action-card,
    body .pf-overview-card,
    body [class*="-module-page"] [class*="-hub-tile__inner"],
    body .store-shell .shop-product-card,
    body .store-shell .product-card,
    body .pos-terminal-shell .pos-product-card {
        transition: none !important;
        transform: none !important;
    }
}
