.spots-sheet {
    font-size:14px;
    background:#fff;
    border:1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
}

/* PRELOADER */
#ss-preloader {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s;
}
#ss-preloader.hidden { opacity: 0; visibility: hidden; }
.ss-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #473DC6;
    border-radius: 50%;
    animation: ss-spin 1s linear infinite;
}
@keyframes ss-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* EDIT MODE STYLES */
.ss-inline-edit { outline: none; transition: background 0.2s; min-height: 1.2em; display: inline-block; width: 100%; }

/* Default: Locked */
.spots-sheet:not(.edit-mode) tr:not(.is-row-editing) .ss-inline-edit { cursor: default !important; pointer-events: none; }
.spots-sheet:not(.edit-mode) tr:not(.is-row-editing) .ss-status-select,
.spots-sheet:not(.edit-mode) tr:not(.is-row-editing) .ss-taxonomy-label { pointer-events: none; opacity: 0.8; background: #f8fafc; }
.spots-sheet:not(.edit-mode) tr:not(.is-row-editing) .ss-title-img-wrap { cursor: default; }

/* Active Edit (Global or Row) */
.spots-sheet.edit-mode .ss-inline-edit, 
tr.is-row-editing .ss-inline-edit { pointer-events: auto !important; }

.spots-sheet.edit-mode .ss-inline-edit:hover, 
tr.is-row-editing .ss-inline-edit:hover { background: #f1f5f9; }

.spots-sheet.edit-mode .ss-inline-edit:focus,
tr.is-row-editing .ss-inline-edit:focus { background: #fff; box-shadow: inset 0 0 0 2px #473DC6; border-radius: 4px; }

/* Row editing specific highlight */
tr.is-row-editing { background: #fffbeb !important; }
tr.is-row-editing td { background: #fffbeb !important; }

/* ICON EDIT */
.ss-row-edit-btn, .ss-header-edit-btn {
    width: 24px; 
    height: 24px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: transparent !important;
    border: none !important;
    color: #94a3b8; 
    cursor: pointer; 
    transition: color 0.2s;
    margin: 0 auto;
    padding: 0;
    box-shadow: none !important;
}

.ss-row-edit-btn svg, .ss-header-edit-btn svg {
    width: 14px;
    height: 14px;
    display: block;
}

.ss-row-edit-btn:hover, .ss-header-edit-btn:hover { 
    color: #473DC6; 
    background: transparent !important;
}

tr.is-row-editing .ss-row-edit-btn,
.spots-sheet.edit-mode .ss-header-edit-btn { 
    color: #473DC6 !important; 
    background: transparent !important;
}

/* IMAGE MODAL PREVIEW */
#ss-image-modal {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.85); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s ease; padding: 20px; backdrop-filter: blur(4px);
}
#ss-image-modal.active { opacity: 1; visibility: visible; }
.ss-modal-content { background: #fff; border-radius: 12px; max-width: 600px; width: 100%; overflow: hidden; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2); transform: scale(0.9); transition: transform 0.3s ease; }
#ss-image-modal.active .ss-modal-content { transform: scale(1); }
.ss-modal-img-wrap { width: 100%; height: 350px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.ss-modal-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.ss-modal-footer { padding: 16px; display: flex; gap: 12px; justify-content: center; border-top: 1px solid #e2e8f0; }

.ss-btn-change-img { background: #473DC6; color: #fff; border: none; padding: 10px 20px; border-radius: 6px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 13px; }

.spots-sheet:not(.edit-mode) .ss-btn-change-img { display: none; }
.spots-sheet.edit-mode .ss-btn-change-img,
tr.is-row-editing .ss-btn-change-img { display: flex; }

.ss-btn-close-modal { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; padding: 10px 20px; border-radius: 6px; font-weight: 700; cursor: pointer; font-size: 13px; }

/* TOOLBAR MODERN */
.ss-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:8px 16px; background:#fff; border-bottom:1px solid #e5e7eb; position:sticky; top:0; z-index:150; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
.ss-toolbar-left, .ss-toolbar-right { display:flex; align-items:center; gap:12px; }
.ss-toolbar-left { flex: 1; }
.ss-search-container { flex: 1; max-width: 450px; display: flex; align-items: center; }
.ss-toolbar-search { width: 100%; height:32px; padding:0 12px; border:1px solid #e2e8f0; border-radius:6px; background:#f8fafc; font-size:12px; outline:none; transition: border-color 0.2s; }
.ss-toolbar-search:focus { border-color: #473DC6; background:#fff; }
.ss-toolbar-divider { width: 1px; height: 18px; background: #e2e8f0; }

/* Tombol New Spot Default */
.ss-add-new { 
    height:32px; padding:0 14px; display:inline-flex; align-items:center; justify-content:center; 
    border-radius:6px; 
    background: #473DC6 !important; 
    color:#fff !important; 
    text-decoration:none; font-size:12px; font-weight:600; white-space: nowrap; 
    transition: background 0.2s ease;
}
.ss-add-new:hover { background: #645dc4; }

.ss-undo-btn { height: 32px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; background: #fff; color: #64748b; font-size: 11px; font-weight: 600; cursor: pointer; border: 1px solid #e2e8f0; opacity: 0.5; pointer-events: none; }
.ss-undo-btn.active { opacity: 1; pointer-events: auto; color: #473DC6; border-color: #473DC6; }

/* MODERN ASC/DESC CONTROL */
.ss-sort-control { display: flex; align-items: center; background: #f8fafc; padding: 4px; border-radius: 8px; border: 1px solid #e2e8f0; gap: 2px; }
.ss-sort-btn { height: 26px; padding: 0 14px; font-size: 11px; font-weight: 700; border-radius: 6px; border: none; background: transparent; color: #64748b; cursor: pointer; transition: all 0.2s ease; }
.ss-sort-btn:hover { color: #473DC6; background: #f1f5f9; }
.ss-sort-btn.active { background: #473DC6; color: #fff; box-shadow: 0 2px 4px rgba(71,61,198,0.2); }

/* STATS INFO */
.ss-stats-wrap { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: #475569; white-space: nowrap; }
.ss-stat-item b { color: #473DC6; }
.ss-stat-item.draft b { color: #ef4444; }

/* PAGINATION */
.ss-pagination { display: flex; align-items: center; gap: 4px; background: #f8fafc; padding: 4px; border-radius: 8px; border: 1px solid #e2e8f0; }
.ss-page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 6px; border: 1px solid transparent !important; background: transparent !important; border-radius: 6px !important; cursor: pointer; font-size: 11px !important; font-weight: 700; color: #64748b !important; transition: all 0.2s ease; }
.ss-page-btn:hover { background: #fff !important; border-color: #cbd5e1 !important; color: #473DC6 !important; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.ss-page-btn.active { background: #473DC6 !important; color: #fff !important; border-color: #473DC6 !important; box-shadow: 0 4px 6px rgba(71, 61, 198, 0.2); }
.ss-page-btn.disabled { opacity: 0.3; pointer-events: none; }

/* TABEL & STICKY HEADERS */
.ss-table-wrap { overflow:auto; max-height:80vh; background:#fff; position: relative; }
.ss-table { width:max-content; min-width:100%; border-collapse:separate; border-spacing: 0; table-layout: fixed; }
.ss-table th, .ss-table td { border:1px solid #e5e7eb; padding:6px 12px; vertical-align:middle; font-size:12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #fff; }

.ss-table thead th { 
    position: sticky; top: 0; background:#f8fafc; z-index: 80; font-size:12px; font-weight:700; color:#475569; text-align: center; border-bottom: 2px solid #e2e8f0; 
}
.ss-table thead tr:nth-child(2) th { 
    top: 33px; z-index: 79; background:#f8fafc; left: auto !important; 
}

.ss-table tbody tr:not(.ss-detail-row) td:nth-child(1) { left: 0; z-index: 800; position: sticky; background: #f8fafc; border-right: 1px solid #e2e8f0; }
.ss-table tbody tr:not(.ss-detail-row) td:nth-child(2) { z-index: 799; position: sticky; background: #f8fafc; border-right: 1px solid #e2e8f0; }
.ss-table tbody tr:not(.ss-detail-row) td:nth-child(3) { z-index: 798; position: sticky; background: #fff; border-right: 1px solid #e2e8f0; box-shadow: 6px 0 15px -4px rgba(0,0,0,0.08); }

.ss-table thead tr:first-child th:nth-child(1) { left: 0; z-index: 900 !important; position: sticky; background: #f8fafc !important; border-right: 1px solid #e2e8f0; }
.ss-table thead tr:first-child th:nth-child(2) { left: 50px; z-index: 899 !important; position: sticky; background: #f8fafc !important; border-right: 1px solid #e2e8f0; }
.ss-table thead tr:first-child th:nth-child(3) { left: 150px; z-index: 898 !important; position: sticky; background: #fff !important; border-right: 1px solid #e2e8f0; box-shadow: 6px 0 15px -4px rgba(0,0,0,0.08); }

/* SAAS HORIZONTAL ACCORDION (PRICE GROUP) - EXPANDED */
.ss-price-toggle-btn {
    width: 20px; height: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent !important; 
    border: none !important; 
    color: #473DC6 !important; 
    cursor: pointer; 
    transition: all 0.2s ease;
    margin-left: 4px; padding: 0;
    box-shadow: none !important; 
    outline: none !important; 
}
.ss-price-toggle-btn:hover,
.ss-price-toggle-btn:focus { 
    background: transparent !important; 
    color: #3730a3 !important; 
}
.ss-price-toggle-btn svg { 
    width: 14px; height: 14px; 
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
}

.spots-sheet.show-pricing-details .ss-price-toggle-btn { 
    background: transparent !important; 
    color: #ef4444 !important; 
}
.spots-sheet.show-pricing-details .ss-price-toggle-btn:hover,
.spots-sheet.show-pricing-details .ss-price-toggle-btn:focus { 
    background: transparent !important; 
    color: #dc2626 !important; 
}
.spots-sheet.show-pricing-details .ss-price-toggle-btn svg { 
    transform: rotate(180deg); 
}

.ss-col-price-extra {
    width: 0 !important; min-width: 0 !important; max-width: 0 !important;
    padding-left: 0 !important; padding-right: 0 !important; border-right-width: 0 !important;
    opacity: 0; visibility: hidden;
    background: #f8fafc !important;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s ease;
}

.spots-sheet.show-pricing-details .ss-col-price-extra {
    width: 120px !important; min-width: 120px !important; max-width: 120px !important;
    padding-left: 12px !important; padding-right: 12px !important; border-right-width: 1px !important;
    opacity: 1; visibility: visible;
}

.spots-sheet.show-pricing-details th.ss-col-price-extra:last-child,
.spots-sheet.show-pricing-details td.ss-col-price-extra:last-child {
    width: 140px !important; min-width: 140px !important; max-width: 140px !important;
}

.ss-col-price-main { transition: background 0.4s; }
.spots-sheet.show-pricing-details .ss-col-price-main { background: #f8fafc !important; }

/* TITLE & AGENCY 2 BARIS */
.ss-title-cell, .ss-agency-cell { display: flex; align-items: center; gap: 8px; }
.ss-title-cell .ss-inline-edit { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; overflow: hidden; font-size: 13px !important; font-weight: 700; color: #1e293b; }
.ss-title-img-wrap { flex-shrink: 0; width: 36px; height: 24px; border-radius: 4px; overflow: hidden; background: #f1f5f9; border: 1px solid #e2e8f0; cursor: pointer; display: flex; align-items: center; justify-content: center; }

.ss-accordion-toggle { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #94a3b8; transition: transform .2s ease; }
.ss-accordion-toggle.expanded { color: #473DC6; transform: rotate(90deg); }

/* DETAIL ROW (ACCORDION CARD) */
.ss-detail-row { display: none; }
.ss-detail-row.active { display: table-row; }
.ss-detail-row.active td { overflow: visible !important; padding: 0 !important; background: #fff !important; border-bottom: 2px solid #e5e7eb; }

.ss-detail-container { 
    padding: 28px 32px; background: transparent; position: sticky; left: 0; 
    width: calc(100vw - 200px); max-width: calc(100vw - 200px); 
    box-sizing: border-box; box-shadow: inset 4px 0 0 #473DC6; z-index: 5; 
}

.ss-detail-header { font-weight: 700; font-size: 11px; color: #473DC6; text-transform: uppercase; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* GRID 5 KOLOM */
.ss-detail-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 24px 32px; width: 100%; }
.ss-detail-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ss-item-row-span-2 { grid-row: span 2; }

.ss-tax-poi .ss-taxonomy-label { height: 100%; align-items: flex-start; padding-top: 8px; padding-bottom: 8px; white-space: normal; line-height: 1.4; }

.ss-detail-label { font-size: 9px; color: #94a3b8; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.ss-detail-value { font-size: 11px; font-weight: 600; color: #475569; }

/* PHONE ICON LINK */
.ss-wa-link { display: inline-flex; align-items: center; justify-content: center; opacity: 0.8; transition: transform 0.2s; }
.ss-wa-link:hover { opacity: 1; transform: scale(1.1); }

/* STATUS SELECT */
.ss-status-select { height: 28px; padding: 0 8px; font-size: 11px; font-weight: 700; border-radius: 4px; border: 1px solid #e2e8f0; background: #fff; color: #473DC6; text-transform: uppercase; cursor: pointer; width: 100%; }

/* SELECT2 */
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__rendered,
.select2-results__option, .select2-results__message, .select2-search__field { font-size: 11px !important; }
.select2-dropdown { border-radius: 6px !important; box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important; border: 1px solid #cbd5e1 !important; }
.select2-results__option--highlighted[aria-selected] { background-color: #473DC6 !important; }

.ss-taxonomy-label { display:flex; align-items:center; min-height:24px; padding:0 8px; font-size:11px; color:#1e293b; cursor:pointer; border: 1px solid #e2e8f0; background: #fff; border-radius:4px; }
.ss-tax-agents .ss-taxonomy-label { background: transparent !important; border-color: transparent !important; padding: 0 !important; min-height: auto !important; display: block !important; white-space: normal; line-height: 1.3; }
.ss-taxonomy-wrap.editing .ss-taxonomy-label { display:none; }
.ss-taxonomy-wrap .select2-container { display:none; }
.ss-taxonomy-wrap.editing .select2-container { display:block; width: 100% !important; }

.ss-resizer { position: absolute; top: 0; right: -2px; width: 8px; cursor: col-resize; height: 100%; z-index: 100; }