/* ========================================
   Spiti365 CRM — Property Management Styles
   Phase 1: Property List + DataTable
   ======================================== */

/* ===== Status Bar ===== */
.sp-status-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    font-family: 'Roboto', sans-serif;
}
.sp-status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}
.sp-status-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.sp-status-item .dot.green, .sp-status-item .dot.connected { background: #4CAF50; box-shadow: 0 0 4px rgba(76,175,80,0.4); }
.sp-status-item .dot.yellow { background: #FF9800; box-shadow: 0 0 4px rgba(255,152,0,0.4); }
.sp-status-item .dot.red, .sp-status-item .dot.disconnected { background: #F44336; box-shadow: 0 0 4px rgba(244,67,54,0.4); }
.sp-mock-indicator { background: #fff8e1; padding: 3px 10px; border-radius: 4px; border: 1px solid #ffe082; }
.sp-mock-indicator .val { color: #e65100; font-size: 11px; }
.sp-status-item .val { color: #333; font-weight: 600; }
.sp-status-item .label { color: #999; font-size: 11px; }

/* ===== Stats Row ===== */
.sp-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
.sp-stat-card {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    padding: 14px;
    text-align: center;
}
.sp-stat-card .num { font-size: 1.8em; font-weight: 800; color: #333; }
.sp-stat-card .label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.sp-stat-card.live .num { color: #4CAF50; }
.sp-stat-card.draft .num { color: #FF9800; }
.sp-stat-card.error .num { color: #F44336; }
.sp-stat-card { cursor: pointer; transition: all 0.15s; }
.sp-stat-card:hover { border-color: #bbb; }
.sp-stat-card.active { border-color: #1abc9c; box-shadow: 0 0 0 1px #1abc9c; }

/* ===== Status Badges ===== */
.sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.sp-badge-live { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.sp-badge-draft { background: #fff8e1; color: #e65100; border: 1px solid #ffe082; }
.sp-badge-error { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.sp-badge-pending { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }

/* ===== Buttons ===== */
.sp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.sp-btn:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.sp-btn-primary { background: #3498db; color: #fff; border-color: #3498db; }
.sp-btn-primary:hover { background: #2980b9; border-color: #2980b9; }
.sp-btn-secondary { background: #fff; color: #333; border: 1px solid #ddd; }
.sp-btn-secondary:hover { color: #1abc9c; border-color: #1abc9c; }
.sp-btn-danger { background: #F44336; color: #fff; border: 1px solid #F44336; }
.sp-btn-danger:hover { background: #d32f2f; }
.sp-btn-success { background: #4CAF50; color: #fff; border: 1px solid #4CAF50; }
.sp-btn-success:hover { background: #388E3C; }
.sp-btn-sm { padding: 5px 10px; font-size: 12px; }
.sp-btn-ghost {
    background: transparent;
    color: #666;
    border: 1px solid transparent;
    padding: 6px 10px;
}
.sp-btn-ghost:hover { color: #333; background: #f5f5f5; }
.sp-btn:disabled { opacity: 0.4; pointer-events: none; }

/* Icon buttons (row actions) */
.sp-btn-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #999;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}
.sp-btn-icon:hover { color: #333; background: #f0f0f0; }
.sp-btn-icon-danger:hover { color: #F44336; background: #ffebee; }

/* ===== Main Layout: List + Filter ===== */
.sp-main-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.sp-content-area {
    flex: 1;
    min-width: 0;
}

/* ===== Filter Panel (Sidebar) ===== */
.sp-filter-panel {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    overflow: hidden;
    transition: width 0.3s;
}
.sp-filter-panel.collapsed {
    width: 0;
    border: none;
    overflow: hidden;
    padding: 0;
}
.sp-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #f8f9fa;
    border-bottom: 1px solid #e7e7e7;
    cursor: pointer;
}
.sp-filter-header h4 {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}
.sp-filter-header i {
    color: #999;
    font-size: 11px;
    transition: transform 0.2s;
}
.sp-filter-body {
    padding: 12px;
    max-height: calc(100vh - 320px);
    overflow-y: auto;
}
.sp-filter-group {
    margin-bottom: 14px;
}
.sp-filter-group label {
    display: block;
    font-size: 11px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.sp-filter-group select,
.sp-filter-group input {
    width: 100%;
    padding: 7px 10px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
}
.sp-filter-group select:focus,
.sp-filter-group input:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 0 2px rgba(26,188,156,0.15);
}
.sp-filter-range {
    display: flex;
    gap: 6px;
    align-items: center;
}
.sp-filter-range input {
    flex: 1;
    min-width: 0;
}
.sp-filter-range .sep {
    color: #bbb;
    font-size: 11px;
}
.sp-filter-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}
.sp-filter-actions .sp-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 11px;
}

/* ===== Table Controls Bar ===== */
.sp-table-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    flex-wrap: wrap;
}
.sp-table-controls-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sp-table-controls-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.sp-select-all-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.sp-batch-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.sp-selected-count {
    font-size: 11px;
    color: #999;
    margin-left: 4px;
}
.sp-search-input {
    padding: 7px 12px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    min-width: 140px;
}
.sp-search-input:focus { border-color: #1abc9c; box-shadow: 0 0 0 2px rgba(26,188,156,0.15); }
.sp-search-input::placeholder { color: #bbb; }
.sp-page-size {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #666;
}
.sp-page-size select {
    padding: 5px 8px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}
/* (sp-table-controls-right replaces sp-controls-right) */

/* ===== Column Picker Dropdown ===== */
.sp-column-picker-wrap {
    position: relative;
}
.sp-column-picker {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    padding: 8px;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}
.sp-column-picker label,
.sp-column-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    font-size: 12px;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
}
.sp-column-picker label:hover { background: #f5f5f5; }
.sp-column-picker input[type="checkbox"] { accent-color: #1abc9c; }

/* ===== DataTable — Exact RealStatus match ===== */
/* NOTE: !important needed to override dark theme in voice-dashboard.css (lines 8071-8109) */
.sp-table-wrap {
    background: #fff !important;
    border: 0.8px solid #ddd !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05) !important;
    overflow-x: auto;
    margin-bottom: 12px;
    backdrop-filter: none !important;
}
.sp-datatable {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    background: #fff !important;
}
.sp-datatable thead,
.sp-datatable thead tr {
    background: transparent !important;
}
.sp-datatable th {
    background: transparent !important;
    color: #333 !important;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    padding: 12px 30px 12px 20px !important;
    text-align: left;
    border-bottom: 0.8px solid #bbb !important;
    white-space: nowrap;
    user-select: none;
    position: relative;
}
.sp-datatable th.sortable { cursor: pointer; }
.sp-datatable th.sortable:hover { color: #000; }
.sp-datatable th.sortable::after {
    content: '\f0dc';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 6px;
    font-size: 10px;
    color: #ccc;
}
.sp-datatable th.sort-asc::after { content: '\f0de'; color: #455a64; }
.sp-datatable th.sort-desc::after { content: '\f0dd'; color: #455a64; }
.sp-datatable th.col-image { width: 166px; }
.sp-datatable th.col-code { width: 102px; }
.sp-datatable th.col-owner { width: 66px; text-align: center; }
.sp-datatable th.col-actions { width: 50px; text-align: center; }
.sp-datatable tbody {
    background: #fff !important;
}
.sp-datatable tbody tr {
    background: #fff !important;
    border-bottom: 1px solid #f0f0f0 !important;
}
.sp-datatable tbody tr:nth-child(even) {
    background: #fff !important;
}
.sp-datatable td {
    padding: 12px 20px !important;
    font-size: 13px;
    color: #333 !important;
    border-bottom: 0px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    vertical-align: middle;
    line-height: 20px;
}
.sp-datatable tbody tr:hover { background: #f5f9ff !important; }
.sp-datatable tbody tr:hover td { background: #f5f9ff !important; }
.sp-datatable tr.sp-row-selected td { background: #e3f2fd !important; }
.sp-datatable tr.selected td { background: #e3f2fd !important; }
.sp-datatable td.center { text-align: center; }

/* ===== Thumbnail — Exact RealStatus (100×75, no radius) ===== */
.sp-datatable .thumb {
    width: 100px;
    height: 75px;
    border-radius: 0;
    object-fit: cover;
    display: block;
}
.sp-datatable .thumb-placeholder {
    width: 100px;
    height: 75px;
    border-radius: 0;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 20px;
}

/* ===== Image Cell with Overlay Icons ===== */
.sp-img-cell {
    position: relative;
    display: inline-block;
    width: 100px;
    height: 75px;
}
.sp-img-cell img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 0;
    display: block;
}
.sp-img-cell .sp-img-overlay {
    position: absolute;
    font-size: 11px;
}
.sp-img-cell .sp-img-bookmark { top: 2px; left: 2px; color: #2196F3; }
.sp-img-cell .sp-img-star { top: 2px; right: 2px; color: #ccc; }
.sp-img-cell .sp-img-key { bottom: 18px; right: 2px; color: #FF9800; }
.sp-img-cell .sp-img-portal { bottom: 2px; right: 2px; color: #4CAF50; }

/* ===== Code Label — Exact RealStatus match ===== */
.sp-code-label {
    display: inline-block;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
    color: #1e88e5;
    background: #f5f5f5;
    border: none;
    border-radius: 0;
}
.sp-code-sale { border-left: 1.6px solid #4CAF50; }
.sp-code-rent { border-left: 1.6px solid #F44336; }

/* ===== Owner Icon ===== */
.sp-owner-icon {
    color: #999;
    cursor: default;
    font-size: 13px;
}
.sp-owner-icon:hover { color: #666; }

/* ===== Price Styling ===== */
.sp-datatable .price { color: #333; font-weight: 700; }
.sp-datatable .price-sqm { color: #666; font-size: 12px; }

/* ===== Actions Dropdown (⋮ menu) ===== */
.sp-actions-dropdown {
    position: relative;
    display: inline-block;
}
.sp-btn-dots {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.15s;
    line-height: 1;
}
.sp-btn-dots:hover { color: #333; background: #f0f0f0; }
.sp-actions-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 100;
    padding: 4px 0;
}
.sp-actions-menu.show { display: block; }
.sp-actions-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: background 0.1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.sp-actions-menu-item:hover { background: #f5f5f5; color: #1abc9c; }
.sp-actions-menu-item.danger { color: #F44336; }
.sp-actions-menu-item.danger:hover { background: #ffebee; color: #c62828; }
.sp-actions-menu-divider { height: 1px; background: #eee; margin: 4px 0; }

.sp-datatable .row-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
}
.sp-datatable .row-actions button {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #999;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}
.sp-datatable .row-actions button:hover { color: #333; background: #f0f0f0; }
.sp-datatable .row-actions button.delete:hover { color: #F44336; background: #ffebee; }
.sp-datatable input[type="checkbox"] { accent-color: #1abc9c; cursor: pointer; }

/* Hidden columns */
.sp-datatable .col-hidden { display: none; }

/* ===== Pagination ===== */
.sp-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}
.sp-pagination-info {
    font-size: 13px;
    color: #999 !important;
}
.sp-pagination-info strong { color: #333 !important; }
.sp-pagination-btns {
    display: flex;
    gap: 4px;
}
.sp-pagination-btns button {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    background: #fff !important;
    color: #333 !important;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}
.sp-pagination-btns button:hover { border-color: #1abc9c !important; color: #1abc9c !important; }
.sp-pagination-btns button.active { background: #455a64 !important; color: #fff !important; border-color: transparent !important; border-radius: 3px; }
.sp-pagination-btns button:disabled { opacity: 0.3; pointer-events: none; }
.sp-page-btn {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}
.sp-page-btn:hover { border-color: #1abc9c; color: #1abc9c; }
.sp-page-btn.active { background: #455a64; color: #fff; border-color: transparent; border-radius: 3px; }
.sp-page-btn:disabled { opacity: 0.3; pointer-events: none; }
.sp-page-dots { color: #999; padding: 0 4px; font-size: 13px; }

/* ===== FAB (Floating Action Button) — Red RealStatus style ===== */
.sp-fab {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 100px !important;
    background: #F44336 !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.26), 0 2px 10px rgba(0,0,0,0.16) !important;
    cursor: pointer;
    font-size: 20px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 50;
}
.sp-fab:hover {
    transform: scale(1.1);
    background: #d32f2f;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3), 0 4px 20px rgba(0,0,0,0.2);
}
.sp-fab .tooltip {
    position: absolute;
    right: 66px;
    background: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    border: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.sp-fab:hover .tooltip { opacity: 1; }

/* ===== Empty State ===== */
.sp-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.sp-empty i { font-size: 3em; margin-bottom: 16px; display: block; color: #ccc; }
.sp-empty h3 { color: #666; margin-bottom: 8px; font-size: 1.1em; }
.sp-empty p { font-size: 13px; margin-bottom: 16px; }

/* ===== Filter Toggle Button ===== */
.sp-filter-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}
.sp-filter-toggle:hover { color: #333; border-color: #bbb; }
.sp-filter-toggle.active { background: #1abc9c; color: white; border-color: #1abc9c; }
.sp-filter-toggle .count {
    background: #1abc9c;
    color: white;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}
.sp-filter-toggle.active .count { background: white; color: #1abc9c; }

/* ===== Selected Count Bar ===== */
.sp-selected-bar {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #333;
}
.sp-selected-bar.visible { display: flex; }
.sp-selected-bar strong { color: #1565c0; }

/* ===== Toast Notifications ===== */
.sp-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 10px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    animation: sp-toast-in 0.3s ease;
}
.sp-toast.success { background: #166534; border: 1px solid #22c55e; }
.sp-toast.error { background: #7f1d1d; border: 1px solid #ef4444; }
.sp-toast.info { background: #1e3a5f; border: 1px solid #3b82f6; }

@keyframes sp-toast-in {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== Progress Bar ===== */
.sp-progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}
.sp-progress-bar .fill {
    height: 100%;
    background: #1abc9c;
    border-radius: 4px;
    transition: width 0.5s ease;
}
.sp-progress-bar {
    position: relative;
    margin-bottom: 12px;
}
.sp-progress-text {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #666;
    font-weight: 600;
}

/* ===== Page Header — RealStatus style ===== */
.sp-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    margin-bottom: 12px;
    font-family: 'Roboto', sans-serif;
}
.sp-page-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sp-page-header h5 i {
    color: #1abc9c;
    font-size: 16px;
}
.sp-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sp-btn-outline {
    background: transparent;
    color: #333;
    border: 1px solid #ddd;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.sp-btn-outline:hover {
    border-color: #1abc9c;
    color: #1abc9c;
}

/* ===== Section wrapper (Roboto font) ===== */
.sp-section {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: #333;
}

/* ========================================
   Phase 2: Property Editor Styles
   ======================================== */

/* ===== Editor Header ===== */
.sp-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.sp-editor-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.sp-editor-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.sp-editor-title {
    font-size: 18px;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Score Ring (SVG) ===== */
.sp-score-ring {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}
.sp-score-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.sp-score-bg {
    fill: none;
    stroke: #334155;
    stroke-width: 3;
}
.sp-score-fill {
    fill: none;
    stroke: #667eea;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}
.sp-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 700;
    color: #e2e8f0;
}

/* ===== Editor Body Layout ===== */
.sp-editor-body {
    display: flex;
    gap: 16px;
    min-height: 600px;
}
.sp-editor-main {
    flex: 1;
    min-width: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
}

/* ===== Editor Tab Navigation ===== */
.sp-editor-tabs {
    display: flex;
    background: #0f172a;
    border-bottom: 1px solid #334155;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.sp-editor-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.sp-editor-tab:hover {
    color: #94a3b8;
    background: rgba(102, 126, 234, 0.05);
}
.sp-editor-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}
.sp-editor-tab i {
    font-size: 13px;
}

/* ===== Tab Panels ===== */
.sp-tab-panel {
    display: none;
    padding: 20px;
    animation: spFadeIn 0.2s ease;
}
.sp-tab-panel.active {
    display: block;
}
@keyframes spFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Tab Placeholder ===== */
.sp-tab-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #475569;
}
.sp-tab-placeholder i {
    font-size: 48px;
    color: #334155;
    margin-bottom: 16px;
    display: block;
}
.sp-tab-placeholder h3 {
    color: #64748b;
    font-size: 18px;
    margin: 0 0 8px;
}
.sp-tab-placeholder p {
    font-size: 13px;
    margin: 0 0 12px;
}

/* ===== Form Sections ===== */
.sp-form-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #1e293b44;
}
.sp-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.sp-form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #334155;
}
.sp-form-section-title i {
    color: #667eea;
    font-size: 14px;
    width: 18px;
    text-align: center;
}

/* ===== Form Grid ===== */
.sp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.sp-form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}
.sp-form-full {
    grid-column: 1 / -1;
}

/* ===== Form Groups ===== */
.sp-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sp-form-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.sp-form-label .req {
    color: #ef4444;
    font-weight: 700;
}
.sp-form-control {
    padding: 9px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.sp-form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}
.sp-form-control::placeholder {
    color: #475569;
}
select.sp-form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
    cursor: pointer;
}
select.sp-form-control option {
    background: #1e293b;
    color: #e2e8f0;
}
.sp-form-control.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* ===== Textarea ===== */
.sp-textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    line-height: 1.5;
}
.sp-richtext {
    min-height: 200px;
    font-size: 14px;
}
.sp-char-count {
    text-align: right;
    font-size: 11px;
    color: #475569;
    margin-top: 2px;
}

/* ===== Toggle Switches ===== */
.sp-toggle-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.sp-toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.sp-toggle-item:hover {
    border-color: #475569;
}
.sp-toggle-item input[type="checkbox"] {
    display: none;
}
.sp-toggle-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: #334155;
    border-radius: 10px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.sp-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #64748b;
    border-radius: 50%;
    transition: all 0.2s;
}
.sp-toggle-item input:checked + .sp-toggle-slider {
    background: #667eea;
}
.sp-toggle-item input:checked + .sp-toggle-slider::after {
    left: 18px;
    background: white;
}
.sp-toggle-label {
    font-size: 13px;
    color: #94a3b8;
    user-select: none;
}

/* ===== Language Tabs ===== */
.sp-lang-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    border-bottom: 1px solid #334155;
}
.sp-lang-tab {
    padding: 8px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.sp-lang-tab:hover {
    color: #94a3b8;
}
.sp-lang-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}
.sp-lang-panel {
    display: none;
}
.sp-lang-panel.active {
    display: block;
}

/* ===== Editor Right Sidebar ===== */
.sp-editor-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px 0;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    position: sticky;
    top: 80px;
}
.sp-sidebar-title {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 16px 8px;
    margin: 0;
}
.sp-sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    color: #94a3b8;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}
.sp-sidebar-link:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #e2e8f0;
}
.sp-sidebar-link i {
    width: 16px;
    text-align: center;
    font-size: 12px;
    color: #667eea;
}
.sp-sidebar-divider {
    height: 1px;
    background: #334155;
    margin: 8px 16px;
}

/* ===== Phase 3: Checkbox Grid ===== */
.sp-checkbox-group {
    margin-bottom: 20px;
}
.sp-checkbox-group-title {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sp-checkbox-group-title i {
    color: #667eea;
    font-size: 12px;
}
.sp-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px 12px;
}
.sp-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 13px;
    color: #cbd5e1;
}
.sp-checkbox-item:hover {
    background: #1e293b;
}
.sp-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}
.sp-checkbox-item label {
    cursor: pointer;
    user-select: none;
    line-height: 1.3;
}

/* ===== Phase 3: Dynamic Rows (Tabs 7 & 8) ===== */
.sp-dynamic-info {
    font-size: 12px;
    color: #64748b;
    padding: 8px 12px;
    background: #0f172a;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid #667eea;
}
.sp-dynamic-info i {
    color: #667eea;
    margin-right: 4px;
}
.sp-dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sp-dynamic-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    transition: border-color 0.2s;
}
.sp-dynamic-row:hover {
    border-color: #667eea55;
}
.sp-dynamic-row input,
.sp-dynamic-row select {
    flex: 1;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    color: #e2e8f0;
}
.sp-dynamic-row input:focus,
.sp-dynamic-row select:focus {
    border-color: #667eea;
    outline: none;
}
.sp-dynamic-row .sp-dynamic-distance {
    width: 100px;
    flex: none;
}
.sp-dynamic-row .sp-btn-delete {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.15s;
}
.sp-dynamic-row .sp-btn-delete:hover {
    background: #7f1d1d33;
}
.sp-dynamic-empty {
    text-align: center;
    padding: 30px 20px;
    color: #475569;
}
.sp-dynamic-empty i {
    font-size: 28px;
    display: block;
    margin-bottom: 10px;
}
.sp-dynamic-empty p {
    font-size: 13px;
    margin: 0;
}
.sp-add-row-btn {
    float: right;
    font-size: 12px !important;
    padding: 4px 10px !important;
}

/* ===== Phase 3: Private Notes ===== */
.sp-private-notes {
    border-left: 3px solid #f59e0b !important;
    background: #1c191250 !important;
}

/* ===== Phase 4: Photo Manager ===== */
.sp-photo-panel {
    padding: 20px;
    background: #1e293b;
    border-radius: 12px;
    min-height: 400px;
}
.sp-photo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #334155;
    flex-wrap: wrap;
    gap: 10px;
}
.sp-photo-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sp-photo-header-left h3 {
    margin: 0;
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
}
.sp-photo-header-right {
    display: flex;
    gap: 8px;
}
.sp-upload-btn {
    cursor: pointer;
}
.sp-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.sp-photo-card {
    background: #0f172a;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
    cursor: grab;
}
.sp-photo-card:active {
    cursor: grabbing;
}
.sp-photo-card.is-featured {
    border-color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}
.sp-photo-card.dragging {
    opacity: 0.5;
    border-color: #667eea;
}
.sp-photo-card.drag-over {
    border-color: #667eea;
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.3);
}
.sp-photo-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}
.sp-photo-card-order {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}
.sp-photo-card-featured {
    position: absolute;
    top: 6px;
    right: 6px;
    color: #f59e0b;
    font-size: 16px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    cursor: pointer;
}
.sp-photo-card-featured.inactive {
    color: #475569;
}
.sp-photo-card-body {
    padding: 10px;
}
.sp-photo-card-caption {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 4px;
    color: #e2e8f0;
    font-size: 12px;
    padding: 5px 8px;
    margin-bottom: 8px;
    box-sizing: border-box;
}
.sp-photo-card-caption::placeholder {
    color: #64748b;
}
.sp-photo-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sp-photo-card-actions label {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.sp-photo-card-actions label input {
    accent-color: #667eea;
}
.sp-photo-card-delete {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.sp-photo-card-delete:hover {
    color: #ef4444;
    background: #7f1d1d33;
}
.sp-photo-empty {
    text-align: center;
    padding: 60px 20px;
    color: #475569;
}
.sp-photo-empty i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    color: #334155;
}
.sp-photo-empty p {
    font-size: 14px;
    margin: 0 0 8px;
}
.sp-photo-hint {
    font-size: 12px !important;
    color: #64748b !important;
}

/* ===== Phase 4: Spitogatos Sync ===== */
.sp-sync-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #334155;
    flex-wrap: wrap;
    gap: 10px;
}
.sp-sync-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.sp-sync-header-left h3 {
    margin: 0;
    color: #e2e8f0;
    font-size: 17px;
    font-weight: 600;
}
.sp-sync-credits {
    background: #334155;
    color: #94a3b8;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}
.sp-sync-credits strong {
    color: #22c55e;
}
.sp-sync-header-right {
    display: flex;
    gap: 8px;
}
.sp-sync-tabs {
    display: flex;
    background: #0f172a;
    border-bottom: 1px solid #334155;
    padding: 0 16px;
}
.sp-sync-tab {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s, border-color 0.2s;
}
.sp-sync-tab:hover {
    color: #e2e8f0;
}
.sp-sync-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}
.sp-sync-badge {
    background: #334155;
    color: #94a3b8;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.sp-sync-tab.active .sp-sync-badge {
    background: #667eea;
    color: #fff;
}
.sp-sync-panel {
    display: none;
    padding: 20px;
    background: #1e293b;
    border-radius: 0 0 12px 12px;
}
.sp-sync-panel.active {
    display: block;
}
.sp-sync-info {
    background: #0c1629;
    border: 1px solid #1e3a5f;
    border-radius: 8px;
    padding: 12px 16px;
    color: #93c5fd;
    font-size: 13px;
    margin-bottom: 16px;
}
.sp-sync-info i {
    margin-right: 6px;
}
.sp-sync-table td {
    vertical-align: middle;
}
.sp-sync-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.sp-sync-progress {
    margin-top: 20px;
    background: #0f172a;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #334155;
}
.sp-sync-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: #e2e8f0;
}
.sp-sync-progress-bar {
    background: #334155;
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}
.sp-sync-progress-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
}
.sp-sync-log {
    max-height: 200px;
    overflow-y: auto;
    font-size: 12px;
    font-family: 'Consolas', 'Courier New', monospace;
    color: #94a3b8;
}
.sp-sync-log-entry {
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sp-sync-log-entry .icon-ok {
    color: #22c55e;
}
.sp-sync-log-entry .icon-err {
    color: #ef4444;
}
.sp-sync-log-entry .icon-pending {
    color: #f59e0b;
}
.sp-sync-empty {
    text-align: center;
    padding: 40px 20px;
    color: #475569;
}
.sp-sync-empty i {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
    color: #334155;
}
.sp-sync-empty p {
    font-size: 13px;
    margin: 0;
}

/* Sync table row statuses */
.sp-sync-status-ready { color: #22c55e; }
.sp-sync-status-sent { color: #667eea; }
.sp-sync-status-error { color: #ef4444; }
.sp-sync-status-pending { color: #f59e0b; }

/* ===== Phase 5: Validation ===== */
.sp-form-control.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    animation: sp-shake 0.4s ease;
}
@keyframes sp-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}
.sp-form-group.sp-error-group .sp-form-label {
    color: #ef4444;
}
.sp-validation-msg {
    font-size: 11px;
    color: #ef4444;
    margin-top: 3px;
    display: none;
}
.sp-form-group.sp-error-group .sp-validation-msg {
    display: block;
}

/* Conditional field hide */
.sp-conditional-hidden {
    display: none !important;
}

/* Keyboard shortcut hint badges */
.sp-kbd-hint {
    font-size: 10px;
    color: #64748b;
    margin-left: 6px;
    opacity: 0.7;
}

/* Save indicator */
.sp-saving-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
    margin-left: 12px;
}
.sp-saving-indicator i {
    animation: sp-spin 1s linear infinite;
}
@keyframes sp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== Responsive — All breakpoints (consolidated) ===== */
@media (max-width: 1200px) {
    .sp-editor-sidebar { width: 180px; }
}
@media (max-width: 1024px) {
    .sp-main-layout { flex-direction: column; }
    .sp-filter-panel { width: 100%; }
    .sp-filter-body { max-height: 250px; }
    .sp-stats-row { grid-template-columns: repeat(2, 1fr); }
    .sp-editor-body { flex-direction: column; }
    .sp-editor-sidebar {
        width: 100%;
        max-height: none;
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        padding: 12px;
        gap: 4px;
    }
    .sp-sidebar-title { grid-column: 1 / -1; }
    .sp-sidebar-divider { display: none; }
    .sp-form-grid-3 { grid-template-columns: repeat(2, 1fr); }
    /* Sync view */
    .sp-sync-header { flex-direction: column; align-items: flex-start; }
    .sp-sync-tabs { overflow-x: auto; }
}
/* ===== Light Theme Data Tables (inside .sp-content-area) ===== */

/* Override voice-dashboard.css dark theme !important rules */
.sp-content-area table td { color: #333 !important; }
.sp-content-area table th { color: #666 !important; }
.sp-content-area table a { color: #2980b9 !important; }
.sp-content-area table a:hover { color: #1abc9c !important; }
.sp-content-area h2,
.sp-content-area h3,
.sp-content-area h4 { color: #333 !important; }
.sp-content-area select,
.sp-content-area input[type="text"],
.sp-content-area input[type="search"],
.sp-content-area input[type="number"],
.sp-content-area input[type="date"],
.sp-content-area input[type="email"],
.sp-content-area input[type="tel"],
.sp-content-area textarea { color: #333 !important; }
.sp-content-area label { color: #555 !important; }

/* Re-override for dark-themed editors — keep light text on dark bg */
.sp-content-area select.sp-form-control,
.sp-content-area input.sp-form-control,
.sp-content-area textarea.sp-form-control { color: #e2e8f0 !important; }
.sp-content-area select.sp-form-control option { color: #e2e8f0 !important; background: #1e293b !important; }
.sp-content-area .sp-form-label { color: #94a3b8 !important; }
.sp-content-area .sp-form-section-title { color: #e2e8f0 !important; }
.sp-content-area .sp-form-control::placeholder { color: #475569 !important; }

/* Editor overrides (ID selector beats class) — light text in dark editors */
#sp-client-editor select,
#sp-client-editor input[type="text"],
#sp-client-editor input[type="number"],
#sp-client-editor input[type="email"],
#sp-client-editor input[type="tel"],
#sp-client-editor input[type="date"],
#sp-client-editor textarea { color: #e2e8f0 !important; }
#sp-client-editor select option { color: #e2e8f0 !important; background: #1a1a25 !important; }
#sp-client-editor label { color: #94a3b8 !important; }
#sp-client-editor h3, #sp-client-editor h4 { color: #e2e8f0 !important; }
#sp-client-editor input::placeholder,
#sp-client-editor textarea::placeholder { color: #475569 !important; }

#sp-request-editor select,
#sp-request-editor input[type="text"],
#sp-request-editor input[type="number"],
#sp-request-editor input[type="email"],
#sp-request-editor input[type="tel"],
#sp-request-editor input[type="date"],
#sp-request-editor textarea { color: #e2e8f0 !important; }
#sp-request-editor select option { color: #e2e8f0 !important; background: #1a1a25 !important; }
#sp-request-editor label { color: #94a3b8 !important; }
#sp-request-editor h3, #sp-request-editor h4 { color: #e2e8f0 !important; }
#sp-request-editor input::placeholder,
#sp-request-editor textarea::placeholder { color: #475569 !important; }

.sp-content-area .sp-card {
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    padding: 20px;
    margin-bottom: 20px;
}
.sp-content-area .sp-table-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 15px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid #e7e7e7;
    flex-wrap: wrap;
}
.sp-content-area .sp-table-search {
    flex: 0 0 auto;
}
.sp-content-area .sp-search-input {
    padding: 7px 12px;
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    min-width: 200px;
    outline: none;
}
.sp-content-area .sp-search-input:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 0 2px rgba(26,188,156,0.15);
}
.sp-content-area .sp-search-input::placeholder { color: #999; }
.sp-content-area .sp-table-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #666 !important;
}
.sp-per-page-select {
    padding: 5px 8px;
    background: #fff !important;
    color: #333 !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    margin: 0 4px;
}
.sp-content-area .sp-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.sp-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.sp-data-table thead th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #666 !important;
    background: #f8f9fa !important;
    border-bottom: 2px solid #e7e7e7;
    white-space: nowrap;
    user-select: none;
}
.sp-th-sortable {
    cursor: pointer;
}
.sp-th-sortable:hover {
    background: #eef0f2;
}
.sp-sort-icon {
    font-size: 10px;
    color: #bbb;
    margin-left: 4px;
}
.sp-th-sortable.sorted-asc .sp-sort-icon,
.sp-th-sortable.sorted-desc .sp-sort-icon {
    color: #1abc9c;
}
.sp-data-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.1s;
}
.sp-data-table tbody tr:hover {
    background: #f5f9ff;
}
.sp-data-table tbody td {
    padding: 10px 12px;
    color: #333 !important;
    vertical-align: middle;
}
.sp-data-table tbody td a {
    color: #2980b9 !important;
    text-decoration: none;
}
.sp-data-table tbody td a:hover {
    color: #1abc9c !important;
    text-decoration: underline;
}
.sp-data-table .sp-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    font-size: 11px;
    margin-right: 6px;
    transition: all 0.15s;
}
.sp-data-table .sp-expand-btn:hover {
    background: #e0e0e0;
}
.sp-data-table .sp-expand-row td {
    background: #fafbfc;
    padding: 8px 12px 8px 40px;
    font-size: 12px;
    color: #555;
}
.sp-data-table .sp-expand-row .sp-expand-detail {
    display: flex;
    gap: 30px;
}
.sp-data-table .sp-expand-row .sp-expand-label {
    font-weight: 600;
    color: #333;
}
.sp-data-table .sp-expand-row .sp-expand-value a {
    color: #2980b9;
    margin-right: 6px;
}
.sp-content-area .sp-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 0 0;
    border-top: 1px solid #e7e7e7;
    margin-top: 10px;
}
.sp-content-area .sp-table-info {
    font-size: 13px;
    color: #999 !important;
}
.sp-content-area .sp-pagination {
    display: flex;
    gap: 4px;
}
.sp-content-area .sp-page-btn {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff !important;
    color: #333 !important;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
    text-decoration: none;
}
.sp-content-area .sp-page-btn:hover {
    border-color: #1abc9c;
    color: #1abc9c;
}
.sp-content-area .sp-page-btn.active {
    background: #1abc9c;
    color: #fff;
    border-color: #1abc9c;
}
.sp-content-area .sp-page-btn:disabled {
    opacity: 0.4;
    pointer-events: none;
}
.sp-content-area .sp-page-dots {
    color: #999 !important;
    padding: 0 4px;
    font-size: 13px;
    line-height: 32px;
}

/* ===== Dropdown (light) ===== */
.sp-dropdown {
    position: relative;
    display: inline-block;
}
.sp-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 100;
    padding: 4px 0;
}
.sp-dropdown-menu.show {
    display: block;
}
.sp-dropdown-item {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.1s;
}
.sp-dropdown-item:hover {
    background: #f5f5f5;
    color: #1abc9c;
}
.sp-dropdown-divider {
    height: 1px;
    background: #e7e7e7;
    margin: 4px 0;
}
.sp-caret {
    font-size: 10px;
    margin-left: 4px;
}

/* ===== Topbar Actions ===== */
.sp-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-family: 'Roboto', sans-serif;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.sp-btn-primary {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}
.sp-btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
}
.sp-btn-outline {
    background: transparent;
    color: #333;
    border-color: #ddd;
}
.sp-btn-outline:hover {
    border-color: #1abc9c;
    color: #1abc9c;
}
.sp-btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* ===== FAB (light theme override) ===== */
.sp-content-area .sp-fab {
    background: #e74c3c;
    box-shadow: 0 4px 12px rgba(231,76,60,0.3);
}
.sp-content-area .sp-fab:hover {
    background: #c0392b;
    box-shadow: 0 6px 20px rgba(231,76,60,0.5);
}

/* ===== Request purpose badges ===== */
.sp-badge-purpose {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}
.sp-badge-purpose.sale {
    background: #e8f5e9;
    color: #2e7d32;
}
.sp-badge-purpose.rent {
    background: #fff3e0;
    color: #e65100;
}

@media (max-width: 768px) {
    .sp-stats-row { grid-template-columns: 1fr 1fr; }
    .sp-table-controls { flex-direction: column; align-items: stretch; }
    .sp-table-controls-right { margin-left: 0; justify-content: flex-end; }
    .sp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .sp-pagination { flex-direction: column; gap: 8px; text-align: center; }
    .sp-fab { bottom: 16px; right: 16px; width: 48px; height: 48px; font-size: 18px; }
    /* Editor */
    .sp-editor-header { padding: 12px 16px; flex-wrap: wrap; }
    .sp-editor-header-left, .sp-editor-header-right { width: 100%; }
    .sp-editor-header-right { justify-content: flex-end; margin-top: 8px; }
    .sp-editor-title { font-size: 15px; }
    .sp-editor-tab span { display: none; }
    .sp-editor-tab { padding: 10px 12px; }
    .sp-form-grid, .sp-form-grid-3 { grid-template-columns: 1fr; }
    .sp-toggle-group { grid-template-columns: 1fr; }
    /* Photos */
    .sp-photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .sp-photo-header { flex-direction: column; align-items: flex-start; }
    .sp-photo-card-img { height: 100px; }
    /* Sync */
    .sp-sync-tabs { flex-wrap: wrap; }
    .sp-sync-tab { font-size: 12px; padding: 10px 14px; }
    .sp-sync-actions { flex-direction: column; }
    .sp-kbd-hint { display: none; }
    /* Light data tables */
    .sp-content-area .sp-table-controls { flex-direction: column; align-items: stretch; }
    .sp-topbar-actions { flex-wrap: wrap; }
    .sp-content-area .sp-search-input { min-width: 0; width: 100%; }
    .sp-content-area .sp-table-footer { flex-direction: column; gap: 8px; text-align: center; }
    .sp-data-table { font-size: 12px; }
    .sp-data-table thead th { padding: 8px 6px; font-size: 11px; }
    .sp-data-table tbody td { padding: 8px 6px; }
}
@media (max-width: 480px) {
    .sp-stats-row { grid-template-columns: 1fr; }
    .sp-filter-range { flex-direction: column; }
    .sp-photo-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .sp-photo-card-img { height: 80px; }
    .sp-editor-tabs { flex-wrap: wrap; }
    .sp-sync-panel { padding: 12px; }
}

/* ============================================
   REALSTATUS-STYLE DASHBOARD
   Sidebar + Light Theme Dashboard
   ============================================ */

/* Layout: Sidebar + Content */
.sp-layout {
    display: flex;
    min-height: calc(100vh - 120px);
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}
.sp-layout * {
    font-family: inherit;
}

/* Left Sidebar */
.sp-sidebar {
    width: 240px;
    min-width: 240px;
    background: #2c3e50;
    color: #fff;
    overflow-y: auto;
    flex-shrink: 0;
}

/* Sidebar Search Bar */
.sp-sidebar-search {
    padding: 12px 15px;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sp-sidebar-search input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}
.sp-sidebar-search input::placeholder {
    color: rgba(255,255,255,0.4);
}
.sp-sidebar-search input:focus {
    background: rgba(255,255,255,0.15);
    border-color: #1abc9c;
}
.sp-sidebar-search-icon {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    pointer-events: none;
}

/* Sidebar notification count badge (green circle) */
.sp-sidebar-count {
    background: #27ae60;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    margin-left: auto;
}

.sp-sidebar-header {
    padding: 20px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sp-sidebar-header i {
    color: #1abc9c;
}
.sp-sidebar-section {
    padding: 15px 20px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.4);
}
.sp-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
    text-decoration: none;
    border-left: 3px solid transparent;
}
.sp-sidebar-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.sp-sidebar-item.active {
    background: #1abc9c;
    color: #fff;
    border-left-color: #fff;
    font-weight: 500;
}
.sp-sidebar-icon {
    display: inline-block;
    width: 24px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
}
.sp-sidebar-item i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    opacity: 0.8;
}
.sp-sidebar-item.active i {
    opacity: 1;
}
.sp-sidebar-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sp-sidebar-arrow {
    font-size: 16px;
    opacity: 0.4;
    margin-left: auto;
    font-weight: 300;
}
.sp-sidebar-badge {
    background: #1abc9c;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 4px;
}

/* Placeholder Cards (upcoming features) */
.sp-placeholder-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 60px 40px;
    text-align: center;
    max-width: 500px;
    margin: 40px auto;
}
.sp-placeholder-card > i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}
.sp-placeholder-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 500;
    color: #333;
}
.sp-placeholder-card p {
    margin: 0;
    font-size: 14px;
    color: #999;
    line-height: 1.6;
}

/* Content Area */
.sp-content-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f5f5f5;
    min-width: 0;
}

/* Section visibility */
.sp-section {
    display: none;
}
.sp-section.active {
    display: block;
}
/* FAB buttons: only visible when parent section is active */
.sp-section .sp-fab {
    display: none !important;
}
.sp-section.active .sp-fab {
    display: flex !important;
}

/* Dashboard Top Bar */
.sp-dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.sp-dashboard-title {
    margin: 0;
    font-size: 20px;
    font-weight: 400;
    color: #333 !important;
}
.sp-dashboard-title i {
    color: #999;
    margin-right: 8px;
}
.sp-btn-refresh {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.sp-btn-refresh:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

/* Summary Cards Row */
.sp-summary-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.sp-summary-card {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    border-radius: 4px;
    color: #fff;
    position: relative;
}
.sp-card-teal { background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%); }
.sp-card-orange { background: linear-gradient(135deg, #e67e22 0%, #d35400 100%); }
.sp-card-red { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }

.sp-card-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.sp-card-badge {
    background: rgba(0,0,0,0.2);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}
a.sp-card-badge:hover {
    background: rgba(0,0,0,0.35);
    color: #fff;
    text-decoration: none;
}
.sp-card-number {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
}
.sp-card-label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}
.sp-card-detail {
    font-size: 13px;
    opacity: 0.85;
}
.sp-card-detail a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}
.sp-card-detail a:hover {
    opacity: 1;
    text-decoration: underline;
    color: #fff;
}

/* FAB Menu on cards — Animated (RealStatus-style) */
.sp-fab-menu {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: inline-block;
    white-space: nowrap;
    padding: 0;
    margin: 0;
    list-style: none;
    z-index: 999;
}
.sp-fab-menu > li {
    position: relative;
}
.sp-fab-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: box-shadow 0.15s ease-in-out;
    text-decoration: none;
}
.sp-fab-menu-btn:hover,
.sp-fab-menu[data-fab-state="open"] .sp-fab-menu-btn {
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    text-decoration: none;
}
/* Card-specific FAB colors */
.sp-card-teal .sp-fab-menu-btn { background: #26a69a; color: #fff; }
.sp-card-orange .sp-fab-menu-btn { background: #e57373; color: #fff; }
.sp-card-red .sp-fab-menu-btn { background: #ffa726; color: #fff; }

/* Icon toggle animation */
.sp-fab-icon-open,
.sp-fab-icon-close {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(360deg);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal;
    font-size: 18px;
    color: #fff;
    line-height: 1;
    pointer-events: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
.sp-fab-icon-open {
    opacity: 1;
    font-size: 20px;
}
.sp-fab-icon-close {
    opacity: 0;
    font-size: 16px;
}
.sp-fab-menu[data-fab-state="open"] .sp-fab-icon-open,
.sp-fab-menu[data-fab-state="open"] .sp-fab-icon-close {
    transform: translate(-50%, -50%) rotate(0deg);
}
.sp-fab-menu[data-fab-state="open"] .sp-fab-icon-open {
    opacity: 0;
}
.sp-fab-menu[data-fab-state="open"] .sp-fab-icon-close {
    opacity: 1;
}

/* Inner menu items */
.sp-fab-menu-inner {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sp-fab-menu-inner > li {
    display: block;
    position: absolute;
    left: 2px;
    right: 0;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}
.sp-fab-menu-inner > li:nth-child(1) {
    top: -52px;
    transition-delay: 0.05s;
}
.sp-fab-menu-inner > li:nth-child(2) {
    top: -100px;
    transition-delay: 0.1s;
}
.sp-fab-menu-inner > li:nth-child(3) {
    top: -148px;
    transition-delay: 0.15s;
}
.sp-fab-menu[data-fab-state="open"] .sp-fab-menu-inner > li {
    visibility: visible;
    opacity: 1;
}

/* Inner action buttons */
.sp-fab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 100px;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: box-shadow 0.2s ease;
}
.sp-fab-btn:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    color: #fff;
    text-decoration: none;
}
.sp-fab-btn i {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
.sp-fab-btn i.fas,
.sp-fab-btn i.far,
.sp-fab-btn i.fab,
.sp-fab-btn i.fa {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
}
/* Card-specific inner button colors (darker shade) */
.sp-card-teal .sp-fab-btn { background: #00796b; }
.sp-card-orange .sp-fab-btn { background: #c62828; }
.sp-card-red .sp-fab-btn { background: #ef6c00; }

/* Tooltip labels */
.sp-fab-menu-inner div[data-fab-label] {
    position: relative;
}
.sp-fab-menu-inner div[data-fab-label]::after {
    content: attr(data-fab-label);
    position: absolute;
    top: 50%;
    margin-top: -15px;
    right: 56px;
    color: #fff;
    background-color: #333;
    padding: 7px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}
.sp-fab-menu[data-fab-state="open"] .sp-fab-menu-inner div[data-fab-label]:hover::after {
    visibility: visible;
    opacity: 1;
}

/* Old button compat - hide */
.sp-card-menu { display: none; }

/* Alert Icons */
.sp-alert-icons {
    display: flex;
    gap: 20px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    min-width: 280px;
}
.sp-alert-icon {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex: 1;
}
.sp-alert-count {
    font-size: 20px;
    font-weight: 700;
    margin: 4px 0;
}
.sp-alert-label {
    font-size: 11px;
    color: #999;
    line-height: 1.3;
}
.sp-alert-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    background: rgba(0,0,0,0.02);
}
.sp-alert-icon:hover .sp-alert-count {
    color: #e74c3c;
}
/* Alert icon with badge (e.g. "1!") */
.sp-alert-icon-wrapper {
    display: inline-block;
    position: relative;
}
.sp-alert-icon-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #e74c3c;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* Dashboard Grid (Main + Widgets) */
.sp-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}
.sp-dashboard-main {
    min-width: 0;
}
.sp-dashboard-widgets {
    min-width: 0;
}

/* Tracking Cards */
.sp-tracking-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
}
.sp-tracking-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.sp-tracking-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.sp-tracking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f8f8f8;
    font-size: 14px;
    color: #333;
}
.sp-tracking-item:last-child {
    border-bottom: none;
}
.sp-tracking-item span:first-child {
    flex: 1;
}

/* Tracking Table (RealStatus-style single table) */
.sp-tracking-table {
    width: 100%;
    border-collapse: collapse;
}
.sp-tracking-table thead th {
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: #f8f9fa;
    border-bottom: 2px solid #e7e7e7;
    text-align: left;
}
.sp-tracking-table .sp-tracking-th-right {
    text-align: right;
    font-weight: 400;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}
.sp-tracking-table .sp-tracking-th-right i {
    font-size: 10px;
    margin-left: 4px;
}
.sp-tracking-table tbody td {
    padding: 10px 15px;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.sp-tracking-table .sp-tracking-val {
    text-align: right;
    white-space: nowrap;
    width: 60px;
}
.sp-tracking-table .sp-tracking-section-row th {
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: #f8f9fa;
    border-bottom: 1px solid #e7e7e7;
    border-top: 1px solid #e7e7e7;
}
.sp-tracking-table tbody tr:hover {
    background: #fafafa;
}
.sp-tracking-table tbody tr.sp-tracking-section-row:hover {
    background: #f8f9fa;
}

/* Badges */
.sp-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: #e74c3c;
    color: #fff;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    padding: 0 8px;
}
.sp-badge-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #27ae60;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
}

/* Price Changes Table */
.sp-price-changes-table {
    padding: 0;
}
.sp-price-changes-table table {
    width: 100%;
    border-collapse: collapse;
}
.sp-price-changes-table th {
    padding: 10px 20px;
    text-align: left;
    font-size: 12px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
}
.sp-price-changes-table td {
    padding: 12px 20px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f8f8f8;
}

/* Widget Cards */
.sp-widget-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 20px;
}
.sp-widget-title {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
}
.sp-widget-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    gap: 15px;
}
.sp-widget-stat {
    flex: 1;
}
.sp-widget-stat-number {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 8px 0 4px;
}
.sp-widget-stat-label {
    font-size: 11px;
    color: #999;
    line-height: 1.3;
}
/* Clickable widget stat items */
.sp-widget-stat-clickable {
    cursor: pointer;
    border-radius: 8px;
    padding: 8px 4px;
    transition: all 0.2s ease;
}
.sp-widget-stat-clickable:hover {
    background: rgba(38, 166, 154, 0.08);
    transform: translateY(-2px);
}
.sp-widget-stat-clickable:hover .sp-widget-stat-number {
    color: #26a69a;
}
/* Non-clickable stat with tooltip cursor */
.sp-widget-stat[title]:not(.sp-widget-stat-clickable) {
    cursor: help;
}

/* Responsive: Dashboard */
@media (max-width: 1200px) {
    .sp-dashboard-grid {
        grid-template-columns: 1fr;
    }
    .sp-summary-row {
        flex-wrap: wrap;
    }
    .sp-alert-icons {
        min-width: unset;
        width: 100%;
    }
}
@media (max-width: 768px) {
    .sp-sidebar {
        width: 60px;
        min-width: 60px;
    }
    .sp-sidebar-header {
        font-size: 0;
        padding: 15px;
        justify-content: center;
    }
    .sp-sidebar-header i {
        font-size: 20px;
    }
    .sp-sidebar-search {
        display: none;
    }
    .sp-sidebar-section {
        display: none;
    }
    .sp-sidebar-item {
        padding: 12px;
        justify-content: center;
        gap: 0;
    }
    .sp-sidebar-label,
    .sp-sidebar-arrow,
    .sp-sidebar-badge,
    .sp-sidebar-count {
        display: none;
    }
    .sp-sidebar-icon {
        font-size: 20px;
        width: auto;
    }
    .sp-sidebar-item i:first-child {
        font-size: 18px;
        width: auto;
    }
    .sp-summary-card {
        min-width: 100%;
    }
    .sp-alert-icons {
        flex-wrap: wrap;
    }
}
