/* ============================================================
   saas_dashboard.css — AvoloPay Pro Merchant Dashboard
   ============================================================ */

/* --- Variables --- */
:root {
    --saas-primary: #2F80ED;
    --saas-primary-light: #56CCF2;
    --saas-accent: #a855f7;
    --saas-success: #00e676;
    --saas-warning: #ffa726;
    --saas-danger: #ff5252;
    --saas-dark: #0A0F1E;
    --saas-card: rgba(15, 25, 55, 0.65);
    --saas-border: rgba(47, 128, 237, 0.15);
    --saas-text: #ffffff;
    --saas-muted: rgba(255, 255, 255, 0.6);
    --saas-sidebar-w: 240px;
    --saas-font: 'Outfit', 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--saas-font);
    background-color: var(--saas-dark);
    color: var(--saas-text);
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse 80% 60% at 20% 50%, rgba(10, 30, 90, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 60% 80% at 80% 30%, rgba(5, 20, 70, 0.6) 0%, transparent 60%),
        radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.7) 0%, transparent 0%),
        radial-gradient(1px 1px at 40% 8%, rgba(255,255,255,0.6) 0%, transparent 0%),
        radial-gradient(1px 1px at 70% 22%, rgba(255,255,255,0.7) 0%, transparent 0%),
        radial-gradient(1px 1px at 85% 65%, rgba(255,255,255,0.5) 0%, transparent 0%),
        radial-gradient(1.5px 1.5px at 48% 72%, rgba(150,200,255,0.6) 0%, transparent 0%),
        linear-gradient(160deg, #0a0f1e 0%, #0d1a3a 40%, #091428 100%);
    background-attachment: fixed;
}

/* --- Loading Screen --- */
.saas-loading {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--saas-dark); display: flex;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 1rem; transition: opacity 0.5s;
}
.saas-loading.hidden { opacity: 0; pointer-events: none; }
.saas-loading-spinner {
    width: 48px; height: 48px; border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--saas-primary-light); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ Sidebar ═══ */
.saas-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--saas-sidebar-w); background: rgba(8, 14, 35, 0.95);
    border-right: 1px solid var(--saas-border);
    backdrop-filter: blur(20px); display: flex;
    flex-direction: column; z-index: 100; padding: 1.5rem 0;
    transition: transform 0.3s ease;
}
.saas-sidebar-header {
    display: flex; align-items: center; gap: 8px;
    padding: 0 1.2rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.saas-sidebar-logo { height: 32px; }
.saas-sidebar-brand {
    background: linear-gradient(135deg, var(--saas-primary), var(--saas-accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    font-weight: 800; font-size: 1.1rem;
}
.saas-sidebar-business {
    padding: 1rem 1.2rem 0.5rem; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 1.5px;
    opacity: 0.4; font-weight: 600;
}
.saas-sidebar-menu {
    list-style: none; flex: 1; padding: 0.5rem 0;
    overflow-y: auto;
}
.saas-sidebar-menu li {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 1.5rem; cursor: pointer;
    transition: all 0.2s; font-size: 0.92rem; font-weight: 500;
    color: var(--saas-muted); border-left: 3px solid transparent;
}
.saas-sidebar-menu li:hover {
    background: rgba(255,255,255,0.04); color: var(--saas-text);
}
.saas-sidebar-menu li.active {
    color: var(--saas-primary-light);
    background: rgba(47, 128, 237, 0.08);
    border-left-color: var(--saas-primary-light);
}
.saas-sidebar-menu li i { width: 20px; text-align: center; }
.saas-sidebar-footer { padding: 1rem 1.2rem; }
.saas-sandbox-badge {
    background: rgba(255, 167, 38, 0.15); border: 1px solid rgba(255, 167, 38, 0.3);
    border-radius: 8px; padding: 8px 12px; text-align: center;
    font-size: 0.78rem; font-weight: 600; color: var(--saas-warning);
    margin-bottom: 0.75rem;
}
.saas-sandbox-badge.hidden { display: none; }
.saas-logout-btn {
    background: rgba(255,82,82,0.1); border: 1px solid rgba(255,82,82,0.2);
    border-radius: 8px; padding: 8px 12px; width: 100%;
    color: var(--saas-danger); cursor: pointer; font-family: var(--saas-font);
    font-size: 0.85rem; font-weight: 600; transition: all 0.3s;
}
.saas-logout-btn:hover { background: rgba(255,82,82,0.2); }

/* ═══ Topbar (Mobile) ═══ */
.saas-topbar {
    display: none; position: fixed; top: 0; left: 0; right: 0;
    height: 56px; background: rgba(8, 14, 35, 0.95);
    border-bottom: 1px solid var(--saas-border);
    backdrop-filter: blur(20px); z-index: 99;
    align-items: center; padding: 0 1rem; gap: 12px;
}
.saas-topbar-toggle {
    background: none; border: none; color: white;
    font-size: 1.3rem; cursor: pointer; padding: 8px;
}
.saas-topbar-title { flex: 1; font-weight: 600; font-size: 1rem; }
.saas-topbar-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(47,128,237,0.2); display: flex;
    align-items: center; justify-content: center;
    color: var(--saas-primary-light);
}

/* ═══ Main Content ═══ */
.saas-main {
    margin-left: var(--saas-sidebar-w);
    padding: 2rem 2.5rem;
    min-height: 100vh;
}
.saas-page { display: none; }
.saas-page.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.saas-page-title {
    font-size: 1.6rem; font-weight: 700; margin-bottom: 1.5rem;
}

/* ═══ KPI Cards ═══ */
.saas-kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem; margin-bottom: 1.5rem;
}
.saas-kpi-card {
    background: var(--saas-card); border: 1px solid var(--saas-border);
    border-radius: 16px; padding: 1.2rem; display: flex;
    align-items: center; gap: 1rem; backdrop-filter: blur(12px);
    transition: transform 0.3s;
}
.saas-kpi-card:hover { transform: translateY(-3px); }
.saas-kpi-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}
.kpi-revenue .saas-kpi-icon { background: rgba(0,230,118,0.15); color: var(--saas-success); }
.kpi-orders .saas-kpi-icon { background: rgba(47,128,237,0.15); color: var(--saas-primary-light); }
.kpi-clients .saas-kpi-icon { background: rgba(168,85,247,0.15); color: var(--saas-accent); }
.kpi-return .saas-kpi-icon { background: rgba(255,167,38,0.15); color: var(--saas-warning); }
.saas-kpi-info { display: flex; flex-direction: column; }
.saas-kpi-value { font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.saas-kpi-label { font-size: 0.78rem; opacity: 0.5; font-weight: 500; }

/* ═══ Quick Actions ═══ */
.saas-quick-actions {
    display: flex; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.saas-quick-btn {
    background: rgba(47,128,237,0.1); border: 1px solid rgba(47,128,237,0.2);
    border-radius: 12px; padding: 10px 18px; color: var(--saas-primary-light);
    cursor: pointer; font-family: var(--saas-font); font-size: 0.88rem;
    font-weight: 600; transition: all 0.3s; display: flex;
    align-items: center; gap: 8px;
}
.saas-quick-btn:hover { background: rgba(47,128,237,0.2); transform: translateY(-2px); }

/* ═══ Charts ═══ */
.saas-charts-row {
    display: grid; grid-template-columns: 2fr 1fr;
    gap: 1.5rem; margin-bottom: 1.5rem;
}
.saas-chart-card {
    background: var(--saas-card); border: 1px solid var(--saas-border);
    border-radius: 16px; padding: 1.5rem; backdrop-filter: blur(12px);
}
.saas-chart-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; opacity: 0.7; }
.saas-chart-small { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.saas-chart-small canvas { max-width: 160px; max-height: 160px; }
.saas-quota-text { margin-top: 0.75rem; font-weight: 700; font-size: 1rem; }

/* ═══ Month Summary ═══ */
.saas-month-summary {
    display: flex; gap: 1rem; flex-wrap: wrap;
}
.saas-summary-item {
    flex: 1; min-width: 180px; background: var(--saas-card);
    border: 1px solid var(--saas-border); border-radius: 14px;
    padding: 1rem 1.2rem; display: flex; align-items: center; gap: 1rem;
}
.saas-summary-item i {
    font-size: 1.2rem; color: var(--saas-primary-light); opacity: 0.6;
}
.saas-summary-value { font-weight: 700; display: block; }
.saas-summary-label { font-size: 0.78rem; opacity: 0.5; display: block; }

/* ═══ Order Form ═══ */
.saas-order-form {
    background: var(--saas-card); border: 1px solid var(--saas-border);
    border-radius: 20px; padding: 2rem; margin-bottom: 2rem;
}
.saas-order-step {
    margin-bottom: 1.5rem; padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.saas-order-step:last-of-type { border-bottom: none; }
.saas-order-step h3 {
    font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem;
    display: flex; align-items: center; gap: 8px;
}
.saas-search-box { position: relative; }
.saas-search-box input {
    width: 100%; padding: 12px 16px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05);
    color: white; font-size: 0.95rem; font-family: var(--saas-font); outline: none;
    box-sizing: border-box;
}
.saas-search-box input:focus { border-color: var(--saas-primary-light); }
.saas-search-results {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10, 18, 40, 0.98); border: 1px solid var(--saas-border);
    border-radius: 12px; margin-top: 4px; max-height: 200px;
    overflow-y: auto; z-index: 50; display: none;
}
.saas-search-results.visible { display: block; }
.saas-search-result-item {
    padding: 10px 16px; cursor: pointer; transition: background 0.2s;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.9rem;
}
.saas-search-result-item:hover { background: rgba(47,128,237,0.15); }
.saas-search-result-item .price { opacity: 0.5; font-weight: 600; }

.saas-selected-customer {
    background: rgba(0,230,118,0.1); border: 1px solid rgba(0,230,118,0.25);
    border-radius: 12px; padding: 10px 16px; margin-top: 8px;
    display: flex; justify-content: space-between; align-items: center;
}
.saas-link-btn {
    background: none; border: none; color: var(--saas-primary-light);
    cursor: pointer; font-family: var(--saas-font); font-size: 0.85rem;
    font-weight: 600; padding: 8px 0; display: flex; align-items: center; gap: 6px;
}

.saas-order-cart { margin-top: 0.75rem; }
.saas-cart-item {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}
.saas-cart-item .name { flex: 1; }
.saas-cart-item .qty-controls {
    display: flex; align-items: center; gap: 8px;
}
.saas-cart-item .qty-controls button {
    width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06); color: white; cursor: pointer;
    font-size: 0.85rem; display: flex; align-items: center; justify-content: center;
}
.saas-cart-item .subtotal { font-weight: 700; min-width: 80px; text-align: right; }
.saas-cart-item .remove-btn {
    background: none; border: none; color: var(--saas-danger);
    cursor: pointer; font-size: 1rem; padding: 4px;
}

.saas-order-total {
    margin-top: 1rem; text-align: right; font-size: 1.1rem;
    padding-top: 0.75rem; border-top: 2px solid rgba(47,128,237,0.2);
}

.saas-order-options { display: flex; flex-direction: column; gap: 0.75rem; }
.saas-checkbox-label {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; font-size: 0.9rem;
}
.saas-checkbox-label input[type="checkbox"] {
    accent-color: var(--saas-primary-light); width: 18px; height: 18px;
}
.saas-select, .saas-textarea {
    padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05); color: white; font-family: var(--saas-font);
    font-size: 0.9rem; outline: none; resize: vertical;
    box-sizing: border-box; width: 100%;
}
.saas-select option { background: var(--saas-dark); }

/* ═══ Toolbar ═══ */
.saas-toolbar {
    display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: center;
    flex-wrap: wrap;
}
.saas-toolbar input {
    flex: 1; min-width: 200px; padding: 10px 16px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05);
    color: white; font-family: var(--saas-font); font-size: 0.9rem; outline: none;
    box-sizing: border-box;
}
.saas-btn-accent {
    background: linear-gradient(135deg, var(--saas-primary), var(--saas-primary-light));
    border: none; border-radius: 12px; padding: 10px 20px;
    color: white; cursor: pointer; font-family: var(--saas-font);
    font-size: 0.9rem; font-weight: 600; transition: all 0.3s;
    display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.saas-btn-accent:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(47,128,237,0.4); }
.saas-btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ═══ Products Grid ═══ */
.saas-products-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.saas-product-card {
    background: var(--saas-card); border: 1px solid var(--saas-border);
    border-radius: 16px; padding: 1.2rem; transition: all 0.3s;
}
.saas-product-card:hover { transform: translateY(-3px); border-color: rgba(47,128,237,0.3); }
.saas-product-card .name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.saas-product-card .category {
    font-size: 0.75rem; opacity: 0.4; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 8px;
}
.saas-product-card .price {
    font-size: 1.2rem; font-weight: 800; color: var(--saas-success);
}
.saas-product-card .actions {
    display: flex; gap: 8px; margin-top: 10px;
}
.saas-product-card .actions button {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 6px 10px; color: var(--saas-muted);
    cursor: pointer; font-size: 0.8rem; transition: all 0.2s;
}
.saas-product-card .actions button:hover { color: white; border-color: rgba(255,255,255,0.3); }
.saas-product-card .renewable-badge {
    display: inline-block; background: rgba(168,85,247,0.15);
    border: 1px solid rgba(168,85,247,0.3); border-radius: 6px;
    padding: 2px 8px; font-size: 0.7rem; color: var(--saas-accent);
    margin-top: 6px; font-weight: 600;
}

/* ═══ Table Container ═══ */
.saas-table-container { overflow-x: auto; }
.saas-table {
    width: 100%; border-collapse: collapse; font-size: 0.88rem;
}
.saas-table th {
    text-align: left; padding: 12px 14px; font-weight: 600;
    opacity: 0.5; font-size: 0.78rem; text-transform: uppercase;
    letter-spacing: 0.5px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.saas-table td {
    padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.saas-table tr:hover td { background: rgba(255,255,255,0.02); }

.saas-badge {
    display: inline-block; padding: 3px 10px; border-radius: 6px;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
}
.saas-badge-sent { background: rgba(0,230,118,0.15); color: var(--saas-success); }
.saas-badge-pending { background: rgba(255,167,38,0.15); color: var(--saas-warning); }
.saas-badge-failed { background: rgba(255,82,82,0.15); color: var(--saas-danger); }
.saas-badge-cancelled { background: rgba(255,255,255,0.08); color: var(--saas-muted); }

/* ═══ Modals ═══ */
.saas-modal {
    display: none; position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
    align-items: center; justify-content: center;
}
.saas-modal.active { display: flex; }
.saas-modal-box {
    background: rgba(12, 20, 45, 0.98); border: 1px solid var(--saas-border);
    border-radius: 20px; padding: 2rem; max-width: 450px; width: 90%;
    position: relative; max-height: 90vh; overflow-y: auto;
}
.saas-modal-close {
    position: absolute; top: 12px; right: 16px; background: none;
    border: none; color: white; font-size: 1.5rem; cursor: pointer; opacity: 0.5;
}
.saas-modal-close:hover { opacity: 1; }
.saas-modal-box h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.2rem; }

/* Form elements */
.saas-input-group { margin-bottom: 1rem; }
.saas-input-group label {
    display: block; font-size: 0.82rem; font-weight: 600;
    margin-bottom: 5px; opacity: 0.7;
}
.saas-input-group input, .saas-input-group select, .saas-input-group textarea {
    width: 100%; padding: 10px 14px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05);
    color: white; font-size: 0.92rem; font-family: var(--saas-font);
    outline: none; box-sizing: border-box;
}
.saas-input-group input:focus, .saas-input-group select:focus { border-color: var(--saas-primary-light); }
.saas-input-group select option { background: var(--saas-dark); }

.saas-form-btn {
    width: 100%; padding: 12px; border-radius: 12px; border: none;
    background: linear-gradient(135deg, var(--saas-primary), var(--saas-primary-light));
    color: white; font-size: 0.95rem; font-weight: 700; cursor: pointer;
    font-family: var(--saas-font); margin-top: 0.5rem; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.saas-form-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(47,128,237,0.4); }
.saas-btn-lg { padding: 16px; font-size: 1.1rem; border-radius: 14px; }

/* ═══ Section Divider ═══ */
.saas-section-divider {
    display: flex; justify-content: space-between; align-items: center;
    margin: 2rem 0 1rem; flex-wrap: wrap; gap: 1rem;
}
.saas-section-divider h3 { font-size: 1.1rem; font-weight: 700; }
.saas-date-filter {
    display: flex; align-items: center; gap: 8px;
}
.saas-date-filter input {
    padding: 8px 12px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05);
    color: white; font-family: var(--saas-font); font-size: 0.85rem;
}
.saas-filter-btn {
    background: var(--saas-primary); border: none; border-radius: 8px;
    padding: 8px 12px; color: white; cursor: pointer; font-size: 0.85rem;
}

/* ═══ Orders List ═══ */
.saas-orders-list { }
.saas-order-item {
    background: var(--saas-card); border: 1px solid var(--saas-border);
    border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: 0.75rem;
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; flex-wrap: wrap;
}
.saas-order-item .order-info { flex: 1; min-width: 200px; }
.saas-order-item .order-customer { font-weight: 700; }
.saas-order-item .order-details { font-size: 0.8rem; opacity: 0.5; margin-top: 2px; }
.saas-order-item .order-amount {
    font-size: 1.1rem; font-weight: 800; color: var(--saas-success);
}

/* ═══ Settings ═══ */
.saas-settings-sections {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}
.saas-settings-card {
    background: var(--saas-card); border: 1px solid var(--saas-border);
    border-radius: 18px; padding: 1.5rem; backdrop-filter: blur(12px);
}
.saas-settings-card h3 {
    font-size: 1rem; font-weight: 700; margin-bottom: 1rem;
    display: flex; align-items: center; gap: 8px;
}
.saas-settings-desc { font-size: 0.85rem; opacity: 0.6; margin-bottom: 1rem; line-height: 1.5; }

.saas-toggle-row { display: flex; align-items: center; gap: 12px; }
.saas-toggle { position: relative; width: 50px; height: 28px; }
.saas-toggle input { opacity: 0; width: 0; height: 0; }
.saas-toggle-slider {
    position: absolute; inset: 0; background: rgba(255,255,255,0.15);
    border-radius: 50px; cursor: pointer; transition: 0.3s;
}
.saas-toggle-slider::before {
    content: ''; position: absolute; width: 22px; height: 22px;
    border-radius: 50%; background: white; left: 3px; top: 3px;
    transition: 0.3s;
}
.saas-toggle input:checked + .saas-toggle-slider { background: var(--saas-warning); }
.saas-toggle input:checked + .saas-toggle-slider::before { transform: translateX(22px); }

.saas-sub-info p {
    padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}

/* ═══ Staff Cards ═══ */
.saas-staff-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.saas-staff-item .staff-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(168,85,247,0.15); display: flex;
    align-items: center; justify-content: center;
    font-size: 0.85rem; color: var(--saas-accent);
}
.saas-staff-item .staff-info { flex: 1; }
.saas-staff-item .staff-name { font-weight: 600; font-size: 0.9rem; }
.saas-staff-item .staff-role {
    font-size: 0.75rem; opacity: 0.4; text-transform: uppercase;
}
.saas-staff-item .staff-delete {
    background: none; border: none; color: var(--saas-danger);
    cursor: pointer; font-size: 0.85rem; opacity: 0.6;
}
.saas-staff-item .staff-delete:hover { opacity: 1; }

/* ═══ Responsive ═══ */
@media (max-width: 900px) {
    .saas-sidebar { transform: translateX(-100%); }
    .saas-sidebar.open { transform: translateX(0); }
    .saas-topbar { display: flex; }
    .saas-main { margin-left: 0; padding: 72px 1rem 2rem; }
    .saas-charts-row { grid-template-columns: 1fr; }
    .saas-settings-sections { grid-template-columns: 1fr; }
    .saas-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .saas-kpi-grid { grid-template-columns: 1fr; }
    .saas-products-grid { grid-template-columns: 1fr; }
    .saas-order-form { padding: 1.2rem; }
}

/* ═══ QR Modal Customization ═══ */
.saas-qr-modal-box {
    background: linear-gradient(145deg, #0f172a, #1e293b);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.saas-qr-icon-success {
    width: 60px;
    height: 60px;
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.2rem;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
}

.saas-qr-title {
    color: #f8fafc;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.saas-qr-subtitle {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.saas-qr-image-container {
    background: white;
    padding: 15px;
    border-radius: 16px;
    display: inline-block;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.saas-qr-image-container img {
    display: block;
    width: 200px;
    height: 200px;
}

.saas-qr-link-wrapper {
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,0.2);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 1.5rem;
}

.saas-qr-link-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 0.9rem;
    padding: 8px 12px;
    outline: none;
}

.saas-qr-copy-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.saas-qr-copy-btn:hover {
    opacity: 0.9;
}

/* Mobile specific styling for QR Modal (Bottom Sheet) */
@media (max-width: 480px) {
    #qr-modal.saas-modal.active {
        align-items: flex-end;
    }
    .saas-qr-modal-box {
        width: 100%;
        max-width: 100%;
        border-radius: 30px 30px 0 0;
        margin: 0;
        padding-bottom: 3rem; /* extra padding for safe area */
        animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
}
