/* ═══════════════════════════════════════════════════════
   Service Fusion Customer Portal – Frontend Styles
   ═══════════════════════════════════════════════════════ */

.sfcp-portal {
    --primary: var(--sfcp-primary, #2563eb);
    --accent: var(--sfcp-accent, #1e40af);
    --text: #1e293b;
    --muted: #64748b;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e2e8f0;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}
.sfcp-portal *, .sfcp-portal *::before, .sfcp-portal *::after { box-sizing: border-box; }

/* ── Login ──────────────────────────────────────────── */
.sfcp-login-wrapper {
    display: flex; justify-content: center; align-items: center;
    min-height: 55vh; padding: 40px 0;
}
.sfcp-login-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 12px;
    padding: 40px 36px; width: 100%; max-width: 420px; box-shadow: var(--shadow-md);
}
.sfcp-login-header { text-align: center; margin-bottom: 28px; }
.sfcp-login-header h2 { font-size: 22px; font-weight: 700; margin: 0 0 4px; color: var(--primary); }
.sfcp-login-header p { color: var(--muted); margin: 0; font-size: 14px; }
.sfcp-login-help { text-align: center; font-size: 13px; color: var(--muted); margin-top: 20px; }
.sfcp-divider { text-align: center; position: relative; margin: 16px 0; }
.sfcp-divider::before { content:''; position: absolute; left:0; right:0; top:50%; border-top:1px solid var(--border); }
.sfcp-divider span { background: var(--card); padding: 0 12px; position: relative; color: var(--muted); font-size: 13px; }

/* ── Form Controls ──────────────────────────────────── */
.sfcp-field { margin-bottom: 16px; }
.sfcp-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.sfcp-field input[type="text"],
.sfcp-field input[type="email"],
.sfcp-field input[type="tel"],
.sfcp-field input[type="date"],
.sfcp-field textarea,
.sfcp-input, .sfcp-select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 14px; transition: border-color .2s; background: #fff; color: var(--text);
}
.sfcp-field input:focus, .sfcp-field textarea:focus, .sfcp-input:focus, .sfcp-select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.sfcp-field textarea { resize: vertical; min-height: 100px; }
.sfcp-field small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.sfcp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sfcp-muted { color: var(--muted); font-size: 14px; }

/* ── Buttons ────────────────────────────────────────── */
.sfcp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border: none; border-radius: var(--radius);
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s;
    text-decoration: none; line-height: 1.4;
}
.sfcp-btn-primary { background: var(--primary); color: #fff; }
.sfcp-btn-primary:hover { background: var(--accent); }
.sfcp-btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.sfcp-btn-outline:hover { background: var(--primary); color: #fff; }
.sfcp-btn-block { width: 100%; }
.sfcp-btn-sm { padding: 6px 14px; font-size: 13px; }
.sfcp-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Spinner */
.sfcp-spinner {
    width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff; border-radius: 50%;
    animation: sfcp-spin .6s linear infinite; display: inline-block;
}
@keyframes sfcp-spin { to { transform: rotate(360deg); } }

/* ── Alerts ─────────────────────────────────────────── */
.sfcp-alert {
    padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px;
}
.sfcp-alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.sfcp-alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.sfcp-alert-info { background: #eff6ff; color: var(--primary); border: 1px solid #bfdbfe; }

/* ── Top Bar ────────────────────────────────────────── */
.sfcp-topbar {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
    padding: 14px 0; border-bottom: 2px solid var(--primary); margin-bottom: 0;
}
.sfcp-topbar-left { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.sfcp-topbar-left strong { color: var(--primary); }
.sfcp-sep { color: var(--border); }
.sfcp-topbar-right { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.sfcp-greeting { color: var(--muted); }

/* ── Tabs ───────────────────────────────────────────── */
.sfcp-tabs {
    display: flex; flex-wrap: wrap; gap: 0; background: var(--card); border: 1px solid var(--border);
    border-top: none; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden;
}
.sfcp-tab {
    padding: 12px 20px; background: none; border: none; border-bottom: 3px solid transparent;
    font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; transition: all .2s;
    white-space: nowrap;
}
.sfcp-tab:hover { color: var(--text); background: var(--bg); }
.sfcp-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--bg); }

/* ── Panels ─────────────────────────────────────────── */
.sfcp-panel-wrapper { padding: 24px 0; }
.sfcp-panel { display: none; }
.sfcp-panel.active { display: block; }
.sfcp-panel h3 { font-size: 18px; margin: 0 0 16px; }
.sfcp-panel-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.sfcp-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.sfcp-filters .sfcp-select, .sfcp-filters .sfcp-input { width: auto; min-width: 160px; padding: 8px 10px; font-size: 13px; }

/* ── Stats ──────────────────────────────────────────── */
.sfcp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.sfcp-stat-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; text-align: center; box-shadow: var(--shadow); transition: transform .2s;
}
.sfcp-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.sfcp-stat-icon { font-size: 28px; margin-bottom: 6px; }
.sfcp-stat-value { font-size: 28px; font-weight: 700; color: var(--primary); }
.sfcp-stat-label { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── Data Table ─────────────────────────────────────── */
.sfcp-table-wrap { overflow-x: auto; }
.sfcp-table {
    width: 100%; border-collapse: collapse; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.sfcp-table th { background: var(--bg); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.sfcp-table th, .sfcp-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.sfcp-table tr:last-child td { border-bottom: none; }
.sfcp-table tr:hover td { background: #f1f5f9; }
.sfcp-table .sfcp-link { color: var(--primary); cursor: pointer; text-decoration: none; font-weight: 500; }
.sfcp-table .sfcp-link:hover { text-decoration: underline; }

/* ── Status Badges ──────────────────────────────────── */
.sfcp-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
    text-transform: capitalize; white-space: nowrap;
}
.sfcp-badge-scheduled { background: #dbeafe; color: #1d4ed8; }
.sfcp-badge-in-progress, .sfcp-badge-inprogress { background: #fef3c7; color: #92400e; }
.sfcp-badge-completed { background: #d1fae5; color: #065f46; }
.sfcp-badge-invoiced { background: #e0e7ff; color: #3730a3; }
.sfcp-badge-cancelled, .sfcp-badge-declined { background: #fee2e2; color: #991b1b; }
.sfcp-badge-draft { background: #f1f5f9; color: #475569; }
.sfcp-badge-sent { background: #dbeafe; color: #1d4ed8; }
.sfcp-badge-approved { background: #d1fae5; color: #065f46; }
.sfcp-badge-closed { background: #f3e8ff; color: #6b21a8; }
.sfcp-badge-default { background: #f1f5f9; color: #475569; }
.sfcp-badge-success { background: #d1fae5; color: #065f46; }
.sfcp-badge-warning { background: #fef3c7; color: #92400e; }

/* ── Pagination ─────────────────────────────────────── */
.sfcp-pagination {
    display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 20px; flex-wrap: wrap;
}
.sfcp-pagination button {
    padding: 6px 12px; border: 1px solid var(--border); background: var(--card); border-radius: var(--radius);
    font-size: 13px; cursor: pointer; transition: all .2s;
}
.sfcp-pagination button:hover { background: var(--bg); }
.sfcp-pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.sfcp-pagination button:disabled { opacity: .4; cursor: not-allowed; }
.sfcp-page-info { font-size: 13px; color: var(--muted); }

/* ── Contact Card ───────────────────────────────────── */
.sfcp-contact-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px 24px; margin-top: 24px;
}
.sfcp-contact-card h3 { margin: 0 0 10px; font-size: 16px; }
.sfcp-contact-card p { margin: 6px 0; font-size: 14px; }
.sfcp-contact-card a { color: var(--primary); text-decoration: none; }
.sfcp-contact-card a:hover { text-decoration: underline; }

/* ── Account Info ───────────────────────────────────── */
.sfcp-account-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px;
}
.sfcp-account-item { padding: 12px 16px; background: var(--bg); border-radius: var(--radius); }
.sfcp-account-item dt { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--muted); letter-spacing: .5px; margin-bottom: 2px; }
.sfcp-account-item dd { margin: 0; font-size: 15px; }

/* ── Customer ID Bar ──────────────────────────── */
.sfcp-account-id-bar {
    display: flex; gap: 24px; flex-wrap: wrap;
    padding: 16px 20px; margin-bottom: 20px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border-radius: var(--radius); color: #fff;
}
.sfcp-account-id-item { display: flex; flex-direction: column; gap: 2px; }
.sfcp-account-id-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #94a3b8; font-weight: 600; }
.sfcp-account-id-value { font-size: 18px; font-weight: 700; }

/* ── Portal Users Section ─────────────────────── */
.sfcp-portal-users-section { margin-top: 28px; }
.sfcp-section-title { font-size: 16px; font-weight: 700; color: #0f172a; margin: 0 0 4px; }
.sfcp-section-desc { font-size: 13px; color: #64748b; margin: 0 0 16px; }

.sfcp-portal-users-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.sfcp-portal-user-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; background: var(--bg); border-radius: var(--radius);
    border: 1px solid var(--border); transition: background 0.15s;
}
.sfcp-portal-user-row:hover { background: #f1f5f9; }
.sfcp-pu-current { border-left: 3px solid #D4A017; }
.sfcp-pu-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, #D4A017, #b8860b);
    color: #fff; font-weight: 700; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sfcp-pu-info { flex: 1; min-width: 0; }
.sfcp-pu-name { font-weight: 600; font-size: 14px; color: #0f172a; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sfcp-pu-email { font-size: 13px; color: #64748b; }
.sfcp-pu-last-login { font-size: 11px; color: #94a3b8; }

/* ── Add User Form ────────────────────────────── */
.sfcp-add-user-form {
    padding: 16px 20px; background: var(--bg); border-radius: var(--radius);
    border: 1px dashed var(--border);
}
.sfcp-add-user-fields {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end;
}

/* ── Equipment Cards ────────────────────────────────── */
.sfcp-equipment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.sfcp-equip-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; box-shadow: var(--shadow);
}
.sfcp-equip-card h4 { margin: 0 0 10px; font-size: 15px; color: var(--primary); }
.sfcp-equip-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 13px; }
.sfcp-equip-meta dt { color: var(--muted); font-weight: 600; }
.sfcp-equip-meta dd { margin: 0; }

/* ── Modal ──────────────────────────────────────────── */
.sfcp-modal { position: fixed; inset: 0; z-index: 99999; display: flex; justify-content: center; align-items: center; }
.sfcp-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.sfcp-modal-content {
    position: relative; background: var(--card); border-radius: 12px; padding: 28px;
    max-width: 700px; width: 90%; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,.15);
}
.sfcp-modal-close {
    position: absolute; top: 12px; right: 16px; background: none; border: none;
    font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1;
}
.sfcp-modal-close:hover { color: var(--text); }

/* ── Detail View ────────────────────────────────────── */
.sfcp-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sfcp-detail-header h3 { margin: 0; }
.sfcp-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.sfcp-detail-item dt { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.sfcp-detail-item dd { margin: 0 0 8px; font-size: 14px; }
.sfcp-detail-description { background: var(--bg); padding: 14px; border-radius: var(--radius); font-size: 14px; margin-top: 12px; white-space: pre-wrap; }

/* ── Section ────────────────────────────────────────── */
.sfcp-section { margin-bottom: 24px; }
.sfcp-section h3 { font-size: 16px; margin-bottom: 12px; }

/* ── Loading ────────────────────────────────────────── */
.sfcp-loading-placeholder { color: var(--muted); padding: 20px; text-align: center; }
.sfcp-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.sfcp-empty-icon { font-size: 40px; margin-bottom: 10px; }

/* ── Unpaid Invoice Cards ───────────────────────────── */
.sfcp-invoice-cards { display: flex; flex-direction: column; gap: 12px; }
.sfcp-inv-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.15s;
}
.sfcp-inv-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.sfcp-inv-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.sfcp-inv-card-id { display: flex; flex-direction: column; gap: 2px; }
.sfcp-inv-num { font-weight: 700; font-size: 15px; color: #0f172a; }
.sfcp-inv-date { font-size: 12px; color: var(--muted); }
.sfcp-inv-amount { font-size: 20px; font-weight: 800; color: #dc2626; white-space: nowrap; }
.sfcp-inv-desc {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.sfcp-inv-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sfcp-inv-pay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dc2626;
    color: #fff;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(220,38,38,0.3);
    transition: all 0.15s;
    flex: 1;
    min-width: 120px;
    text-align: center;
}
.sfcp-inv-pay-btn:hover { background: #b91c1c; box-shadow: 0 4px 14px rgba(220,38,38,0.4); transform: translateY(-1px); }

/* Desktop unpaid invoice layout - horizontal rows */
@media (min-width: 769px) {
    .sfcp-inv-card {
        display: grid;
        grid-template-columns: 160px 1fr auto auto;
        grid-template-rows: auto;
        align-items: center;
        gap: 0 20px;
        padding: 14px 24px;
    }
    .sfcp-inv-card-top {
        display: contents;
    }
    .sfcp-inv-card-id {
        grid-column: 1;
        grid-row: 1;
    }
    .sfcp-inv-desc {
        grid-column: 2;
        grid-row: 1;
        margin-bottom: 0;
        font-size: 14px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .sfcp-inv-amount {
        grid-column: 3;
        grid-row: 1;
        font-size: 18px;
        padding-left: 12px;
    }
    .sfcp-inv-card-actions {
        grid-column: 4;
        grid-row: 1;
        flex-wrap: nowrap;
        margin-left: 12px;
    }
    .sfcp-inv-pay-btn {
        flex: none;
        min-width: 100px;
        padding: 8px 20px;
        font-size: 13px;
    }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .sfcp-portal { padding: 0 12px; }
    .sfcp-equipment-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .sfcp-portal { padding: 0 0; font-size: 14px; }

    /* ── TOPBAR ── */
    .sfcp-topbar {
        padding: 12px 16px;
        border-bottom: 2px solid var(--primary);
        margin-bottom: 0;
        gap: 0;
    }
    .sfcp-topbar-left { display: none; }
    .sfcp-topbar-right {
        width: 100%;
        justify-content: space-between;
    }
    .sfcp-topbar-right .sfcp-greeting {
        font-size: 15px;
        font-weight: 600;
        color: var(--text);
    }
    .sfcp-topbar-right .sfcp-btn-sm {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* ── TABS: scrollable pill bar ── */
    .sfcp-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding: 8px 12px;
        margin: 0;
        border: none;
        border-radius: 0;
        background: #f1f5f9;
        border-bottom: 1px solid var(--border);
    }
    .sfcp-tabs::-webkit-scrollbar { display: none; }
    .sfcp-tab {
        flex: 0 0 auto;
        padding: 8px 16px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 20px;
        border-bottom: none;
        color: var(--muted);
        background: transparent;
        transition: all 0.15s;
    }
    .sfcp-tab:hover {
        background: #e2e8f0;
        color: var(--text);
    }
    .sfcp-tab.active {
        background: var(--primary);
        color: #fff;
        border-bottom-color: transparent;
    }

    /* ── PANELS ── */
    .sfcp-panel-wrapper { padding: 16px 14px; }
    .sfcp-panel h3 { font-size: 17px; margin: 0 0 14px; }
    .sfcp-panel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .sfcp-panel-header h3 { margin-bottom: 4px; }

    /* ── FILTERS ── */
    .sfcp-filters {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    .sfcp-filters .sfcp-select,
    .sfcp-filters .sfcp-input {
        width: 100%;
        min-width: 0;
        padding: 10px 12px;
        font-size: 14px;
    }

    /* ── STATS: compact row ── */
    .sfcp-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 20px;
    }
    .sfcp-stat-card {
        padding: 12px 6px;
        border-radius: 10px;
    }
    .sfcp-stat-icon { font-size: 20px; margin-bottom: 2px; }
    .sfcp-stat-value { font-size: 18px; }
    .sfcp-stat-label { font-size: 10px; }

    /* ── TABLES → CARDS ── */
    .sfcp-table-wrap { overflow-x: visible; }
    .sfcp-table { border: none; background: transparent; }
    .sfcp-table,
    .sfcp-table thead,
    .sfcp-table tbody,
    .sfcp-table th,
    .sfcp-table td,
    .sfcp-table tr { display: block; }
    .sfcp-table thead { display: none; }
    .sfcp-table tr {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 12px;
        margin-bottom: 10px;
        padding: 14px 16px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    .sfcp-table td {
        border-bottom: none;
        padding: 4px 0;
        font-size: 14px;
        display: flex;
        align-items: baseline;
        gap: 4px;
    }
    .sfcp-table td:before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        color: var(--muted);
        min-width: 80px;
    }
    .sfcp-table td[data-label=""]::before { display: none; }
    .sfcp-table td[data-label=""] {
        padding-top: 10px;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    .sfcp-table tr:hover td { background: transparent; }

    /* ── UNPAID CARDS mobile ── */
    .sfcp-inv-card { padding: 14px 16px; border-radius: 12px; }
    .sfcp-inv-amount { font-size: 18px; }
    .sfcp-inv-num { font-size: 14px; }
    .sfcp-inv-desc { font-size: 12px; margin-bottom: 10px; }
    .sfcp-inv-pay-btn {
        padding: 12px 24px;
        font-size: 15px;
        border-radius: 10px;
        width: 100%;
    }

    /* ── DOWNLOAD BUTTONS ── */
    .sfcp-download-btns {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .sfcp-download-btns a {
        text-align: center;
        justify-content: center;
        padding: 12px 20px !important;
        border-radius: 10px !important;
        font-size: 14px !important;
    }

    /* ── DETAIL VIEW ── */
    .sfcp-detail-grid { grid-template-columns: 1fr; }
    .sfcp-detail-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    /* ── MODAL: near full screen ── */
    .sfcp-modal-content {
        width: 96%;
        max-height: 92vh;
        padding: 20px 16px;
        border-radius: 14px;
        margin: 0 8px;
    }
    .sfcp-modal-close {
        top: 10px;
        right: 14px;
        font-size: 28px;
        padding: 4px;
    }

    /* ── ACCOUNT ── */
    .sfcp-account-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .sfcp-account-item {
        padding: 12px 14px;
    }

    /* ── EQUIPMENT ── */
    .sfcp-equipment-grid { grid-template-columns: 1fr; }
    .sfcp-equip-meta { grid-template-columns: 1fr; }

    /* ── CONTACT ── */
    .sfcp-contact-card {
        padding: 16px;
        margin-top: 16px;
    }

    /* ── FORMS ── */
    .sfcp-field-row { grid-template-columns: 1fr; }
    .sfcp-login-card { padding: 28px 20px; }

    /* ── PAGINATION ── */
    .sfcp-pagination {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 16px;
    }
    .sfcp-page-info {
        font-size: 12px;
        text-align: center;
    }
    .sfcp-page-btns {
        display: flex;
        gap: 8px;
    }

    /* ── BUTTONS ── */
    .sfcp-btn {
        font-size: 14px;
        padding: 10px 18px;
    }
    .sfcp-btn-sm { font-size: 12px; padding: 8px 14px; }

    /* ── SECTION TITLES ── */
    .sfcp-section h3 { font-size: 15px; }
}

/* ═══ Bulk Pay Animations ═══ */
@keyframes sfcp-fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.sfcp-inv-card { transition: outline 0.15s ease; outline-offset: -2px; }
#sfcp-bulk-pay-bar button:hover { opacity: 0.9; transform: translateY(-1px); }
#sfcp-bulk-clear:hover { background: rgba(255,255,255,0.2) !important; }
.sfcp-paypal-pay-btn:hover { background: #005ea6 !important; transform: translateY(-1px); }

/* ── PDK Dashboard Toggle Switch ── */
.sfcp-toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.sfcp-toggle input { opacity: 0; width: 0; height: 0; }
.sfcp-toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 24px; transition: 0.2s; }
.sfcp-toggle-slider:before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.sfcp-toggle input:checked + .sfcp-toggle-slider { background: #059669; }
.sfcp-toggle input:checked + .sfcp-toggle-slider:before { transform: translateX(20px); }
