.spf-container {
    max-width: 900px;
    margin: 30px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.spf-debug-box {
    background: #fff8e6;
    border: 1px solid #f0dca0;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #5c4b1e;
}

.spf-debug-box ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.spf-debug-box code {
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 5px;
    border-radius: 4px;
}

.spf-step-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.spf-step-sidebar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-right: 1px solid #f0f0f0;
    padding-right: 20px;
}

.spf-step-icon {
    font-size: 28px;
    background: #f8f3ec;
    padding: 12px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.spf-step-sidebar h3 {
    font-size: 16px;
    color: #333333;
    font-weight: 600;
}

.spf-step-fields {
    padding-left: 30px;
}

.spf-field-group {
    margin-bottom: 20px;
}

.spf-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.spf-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.spf-input,
.spf-select,
.spf-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    background: #fcfcfc;
    font-size: 14px;
}

/* Custom Styled Pill Selectors */
.spf-pill-selector {
    display: flex;
    gap: 10px;
}

.spf-pill-selector input[type="radio"] {
    display: none;
}

.spf-pill-selector label {
    padding: 8px 18px;
    border: 1px solid #dbdbdb;
    border-radius: 20px;
    background-color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.spf-pill-selector input[type="radio"]:checked+label {
    border-color: #98784d;
    background-color: #f3ece1;
    color: #98784d;
    font-weight: 600;
}

.spf-submit-container {
    text-align: right;
}

.spf-submit-button {
    background-color: #98784d;
    color: #ffffff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.spf-submit-button:hover {
    background-color: #7e6640;
}

/* Property Type Tabs */
.spf-type-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid #eee;
    margin-bottom: 16px;
}

.spf-type-tab-btn {
    background: none;
    border: none;
    padding: 0 0 10px 0;
    font-size: 15px;
    color: #777;
    cursor: pointer;
    position: relative;
}

.spf-type-tab-btn.active {
    color: #98784d;
    font-weight: 600;
}

.spf-type-tab-btn.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: #98784d;
}

.spf-type-panel {
    display: none !important;
}

.spf-type-panel.active {
    display: block !important;
}

.spf-pill-wrap {
    flex-wrap: wrap;
}

/* Location search + map */
.spf-location-search {
    margin-bottom: 14px;
    cursor: text;
}

.spf-map-box {
    position: relative;
    height: 220px;
    border-radius: 10px;
    background: #eef0f1;
    overflow: hidden;
}

.spf-map-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    z-index: 1;
    pointer-events: none;
}

#spf-leaflet-map {
    width: 100%;
    height: 100%;
    z-index: 2;
}

.spf-map-set-btn {
    position: absolute;
    left: 14px;
    bottom: 14px;
    background: #ffffff;
    border: 1px solid #dbdbdb;
    color: #98784d;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Input + inline select (Area Size / Price rows) */
.spf-input-with-select {
    display: flex;
    gap: 10px;
}

.spf-select-inline {
    width: 120px;
    flex-shrink: 0;
}

.spf-price-check {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f4f4f4;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    float: right;
}

/* Toggle rows */
.spf-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid #f0f0f0;
}

.spf-toggle-row:first-child {
    border-top: none;
    padding-top: 0;
}

.spf-toggle-text strong {
    display: block;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.spf-toggle-text small {
    color: #888;
    font-size: 13px;
}

.spf-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 20px;
}

.spf-switch input {
    display: none !important;
}

.spf-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: 0.2s;
}

.spf-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: 0.2s;
}

.spf-switch input:checked+.spf-slider {
    background: #98784d;
}

.spf-switch input:checked+.spf-slider::before {
    transform: translateX(20px);
}

.spf-toggle-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spf-mini-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #f4f4f4;
    font-size: 14px;
}

.spf-field-label-icon {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.spf-field-label-icon .spf-label {
    margin-bottom: 0;
}

/* Installment / Balloon sub-panels */
.spf-installment-details {
    display: none;
    padding-left: 20px;
    margin: 4px 0 4px;
    border-left: 2px solid #f0f0f0;
}

.spf-installment-details.open {
    display: block;
}

.spf-balloon-details {
    display: none;
    margin-bottom: 16px;
}

.spf-balloon-details.open {
    display: block;
}

.spf-fee-row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid #f0f0f0;
}

.spf-fee-row-col {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.spf-fee-row-col:last-child {
    border-left: 1px solid #f0f0f0;
    padding-left: 24px;
}

.spf-fee-amount-group {
    flex: 1;
    margin-bottom: 0;
}

.spf-fee-amount-input:disabled {
    background: #f4f4f4;
    color: #aaa;
    cursor: not-allowed;
}

/* Feature and Amenities */
.spf-amenities-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.spf-btn-green {
    background-color: #98784d;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
}

.spf-btn-green:hover {
    background-color: #7e6640;
}

.spf-btn-outline {
    background: #ffffff;
    color: #555;
    border: 1px solid #dbdbdb;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}

.spf-btn-outline-green {
    background: #ffffff;
    color: #98784d;
    border: 1px solid #98784d;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}

.spf-btn-outline-green:hover {
    background: #f8f3ec;
}

/* Property Images and Videos */
.spf-hidden-file-input {
    display: none;
}

.spf-upload-box {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    border: 2px dashed #98784d;
    border-radius: 10px;
    padding: 24px;
    background: #fdfbf8;
}

.spf-upload-icon-circle {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #f3ece1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.spf-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 160px;
}

.spf-upload-actions small {
    color: #888;
    font-size: 12px;
}

.spf-upload-tips {
    list-style: none;
    margin: 0 0 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #444;
}

.spf-upload-tips li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #98784d;
}

.spf-upload-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
}

.spf-image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.spf-image-preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
}

.spf-image-preview-item.cover {
    border-color: #98784d;
}

.spf-image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.spf-image-cover-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #98784d;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.spf-image-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    padding: 0;
    cursor: pointer;
}

.spf-helper-text {
    display: block;
    color: #888;
    font-size: 13px;
    margin-bottom: 12px;
}

.spf-checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 8px;
    cursor: pointer;
}

.spf-video-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.spf-video-row input {
    flex: 1;
}

.spf-quality-tip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #f8f3ec;
    border: 1px solid #e8dcc9;
    border-radius: 10px;
    padding: 14px 18px;
}

.spf-quality-badge {
    background: #fdeaea;
    color: #e74c3c;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

.spf-quality-badge.complete {
    background: #f3ece1;
    color: #98784d;
}

/* Amenities Modal */
.spf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none !important;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.spf-modal-overlay.open {
    display: flex !important;
}

.spf-modal {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.spf-modal h4 {
    margin-bottom: 18px;
    color: #2c3e50;
}

.spf-amenities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.spf-amenity-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #2c3e50;
    cursor: pointer;
}

.spf-amenity-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #98784d;
}

.spf-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* Contact Information - phone rows */
.spf-phone-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.spf-country-select {
    position: relative;
    width: 110px;
    flex-shrink: 0;
}

.spf-country-select-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 12px 10px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    background: #fcfcfc;
    font-size: 14px;
    cursor: pointer;
}

.spf-flag-icon {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.spf-country-code-text {
    flex: 1;
    text-align: left;
    white-space: nowrap;
}

.spf-country-caret {
    font-size: 10px;
    color: #888;
}

.spf-country-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    background: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 20;
    overflow: hidden;
}

.spf-country-select.open .spf-country-dropdown {
    display: block;
}

.spf-country-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
}

.spf-country-option:hover {
    background: #f8f3ec;
}

.spf-country-option img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

.spf-phone-add-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid #dbdbdb;
    background: #ffffff;
    color: #98784d;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.spf-phone-remove-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid #dbdbdb;
    background: #ffffff;
    color: #e74c3c;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}