/* Dashboard Styles - Inversió */

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

:root {
    --gold: #f5c76e;
    --dark-brown: #2f2a1f;
    --light-bg: #fffbf5;
    --border-gold: #f5c76e;
    --text-dark: #1a1a1a;
    --text-gray: #6b7280;
    --shadow: rgba(0, 0, 0, 0.1);
    --success-green: #10b981;
    --error-red: #ef4444;
    --warning-orange: #f59e0b;
    --info-blue: #3b82f6;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 450px;
    pointer-events: all;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid;
}

.toast.removing {
    animation: slideOut 0.3s ease-out forwards;
}

.toast-success {
    border-left-color: var(--success-green);
}

.toast-error {
    border-left-color: var(--error-red);
}

.toast-warning {
    border-left-color: var(--warning-orange);
}

.toast-info {
    border-left-color: var(--info-blue);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: var(--success-green);
}

.toast-error .toast-icon {
    color: var(--error-red);
}

.toast-warning .toast-icon {
    color: var(--warning-orange);
}

.toast-info .toast-icon {
    color: var(--info-blue);
}

.toast-message {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e6 100%);
    color: var(--text-dark);
    min-height: 100vh;
    padding: 20px;
    transition: padding-top 0.3s ease;
}

body.demo-active {
    padding-top: 90px;
}

/* Dashboard Header */
.dashboard-header {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 24px;
    border: 3px solid var(--border-gold);
    box-shadow: 0 4px 20px var(--shadow);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-logo-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
}

.header-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gold);
    color: #000;
    border-color: #000;
}

.btn-primary:hover {
    background: #e0b55c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-secondary {
    background: var(--dark-brown);
    color: var(--gold);
    border-color: var(--gold);
}

.btn-secondary:hover {
    background: #463d2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-danger {
    background: #ff6b6b;
    color: white;
    border-color: #000;
}

.btn-danger:hover {
    background: #ee5a52;
    transform: translateY(-2px);
}

.btn-demo {
    background: #3b82f6;
    color: white;
    border-color: #000;
}

.btn-demo:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-demo.active {
    background: #10b981;
    border-color: #000;
    animation: pulse-demo 2s infinite;
}

@keyframes pulse-demo {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

.demo-mode-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    animation: slideDown 0.3s ease-out;
    border-bottom: 3px solid #047857;
}

.demo-indicator-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.demo-indicator-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

.demo-indicator-icon {
    font-size: 24px;
    animation: pulse 2s ease-in-out infinite;
}

.demo-indicator-label {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.demo-indicator-exit {
    background: white;
    color: #059669;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.demo-indicator-exit:hover {
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.demo-indicator-exit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

@keyframes slideDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: linear-gradient(135deg, var(--light-bg) 0%, #fff8e6 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--border-gold);
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold) 0%, #e0b55c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Integrated Filters */
.integrated-filters {
    margin-top: 20px;
}

.integrated-filters .filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.integrated-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.integrated-filters .filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.integrated-filters .filter-input,
.integrated-filters .filter-select {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.integrated-filters .filter-input:focus,
.integrated-filters .filter-select:focus {
    outline: none;
    border-color: var(--gold);
}

.integrated-filters .sort-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.integrated-filters .sort-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.integrated-filters .sort-btn:hover {
    border-color: var(--gold);
}

.integrated-filters .sort-btn.active {
    background: var(--gold);
    border-color: #000;
    color: #000;
}

/* Multi-select Component */
.multiselect-wrapper {
    position: relative;
}

.multiselect-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    user-select: none;
}

.multiselect-toggle:hover {
    border-color: var(--gold);
    background: #fffbf5;
}

.multiselect-toggle.open {
    border-color: var(--gold);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.multiselect-toggle-text {
    flex: 1;
    color: var(--text-dark);
}

.multiselect-toggle-text.empty {
    color: var(--text-gray);
}

.multiselect-toggle-arrow {
    font-size: 12px;
    color: var(--text-gray);
    transition: transform 0.2s;
}

.multiselect-toggle.open .multiselect-toggle-arrow {
    transform: rotate(180deg);
}

.multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--gold);
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.multiselect-dropdown.open {
    display: block;
}

/* Custom scrollbar for dropdown */
.multiselect-dropdown::-webkit-scrollbar {
    width: 8px;
}

.multiselect-dropdown::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-bottom-right-radius: 6px;
}

.multiselect-dropdown::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

.multiselect-dropdown::-webkit-scrollbar-thumb:hover {
    background: #e0b55c;
}

.multiselect-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.multiselect-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    user-select: none;
}

.multiselect-option:hover {
    background: #fffbf5;
}

.multiselect-option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: 14px;
    height: 14px;
    accent-color: var(--gold);
}

.multiselect-option input[type="checkbox"]:checked+span {
    font-weight: 600;
    color: var(--text-dark);
}

.multiselect-option:has(input:checked) {
    background: var(--gold);
    color: #000;
}

/* Sort Section */
.sort-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #e0e0e0;
}

.sort-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sort-field-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-field-btn:hover {
    border-color: var(--gold);
    background: #fffbf5;
}

.sort-field-btn.active {
    background: var(--gold);
    border-color: #000;
    color: #000;
}

.sort-arrow {
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
    display: inline-block;
}

.sort-field-btn.active .sort-arrow {
    color: #000;
}

.sort-label {
    white-space: nowrap;
}

/* Filter Panel (kept for backward compatibility) */
.filter-panel {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 3px solid var(--border-gold);
    box-shadow: 0 4px 20px var(--shadow);
}

.filter-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input,
.filter-select {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--gold);
}

.sort-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sort-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-btn:hover {
    border-color: var(--gold);
}

.sort-btn.active {
    background: var(--gold);
    border-color: #000;
    color: #000;
}

/* Property Cards Grid */
.properties-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.property-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--border-gold);
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(245, 199, 110, 0.3);
}

.property-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
    color: white;
    padding: 20px 16px 16px 16px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-content {
    padding: 20px;
}

.property-header {
    margin-bottom: 16px;
}

.property-mode {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.mode-venta {
    background: #10b981;
    color: white;
}

.mode-alquiler {
    background: #3b82f6;
    color: white;
}

.property-address {
    font-size: 13px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-zone {
    font-size: 12px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-weight: 500;
}

.property-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--light-bg);
    border-radius: 10px;
}

.detail-item {
    text-align: center;
}

.detail-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.detail-label {
    font-size: 11px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.metric-box {
    padding: 14px;
    border-radius: 10px;
    border: 2px solid;
    text-align: center;
}

.metric-box.primary {
    background: linear-gradient(135deg, var(--light-bg) 0%, #fff8e6 100%);
    border-color: var(--gold);
}

.metric-box.success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #10b981;
}

.metric-box.info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #3b82f6;
}

.metric-box.warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #f59e0b;
}

.metric-value {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 4px;
}

.metric-box.primary .metric-value {
    background: linear-gradient(135deg, var(--gold) 0%, #e0b55c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-box.success .metric-value {
    color: #10b981;
}

.metric-box.info .metric-value {
    color: #3b82f6;
}

.metric-box.warning .metric-value {
    color: #f59e0b;
}

.metric-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tooltip Styles */
.metric-box.has-tooltip {
    position: relative;
}

.info-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-gray);
    transition: all 0.2s ease;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.info-icon:hover {
    color: var(--gold);
    background: rgba(245, 199, 110, 0.1);
    transform: scale(1.1);
}

.info-icon svg {
    width: 14px;
    height: 14px;
}

/* Popup Modal Styles */
.popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(4px);
}

.popup-backdrop.visible {
    opacity: 1;
}

.popup-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    min-width: 400px;
    width: 85%;
    max-height: 95vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid var(--border-gold);
    overflow: hidden;
}

.popup-modal.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: 2px solid var(--gold);
    background: var(--dark-brown);
    color: var(--gold);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    flex-shrink: 0;
}

.popup-close:hover {
    background: var(--gold);
    color: var(--dark-brown);
    transform: scale(1.15) rotate(90deg);
}

.popup-close svg {
    pointer-events: none;
}

.popup-content {
    padding: 28px 70px 32px 32px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-dark);
    text-align: left;
    max-height: 70vh;
    overflow-y: auto;
    word-wrap: break-word;
    white-space: pre-line;
}

@media (max-width: 768px) {
    .popup-modal {
        min-width: 320px;
        width: 92%;
        max-width: 500px;
    }

    .popup-content {
        padding: 24px 60px 28px 24px;
        font-size: 16px;
    }
}

.property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 2px solid #f0f0f0;
}

.confidence-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-gray);
}

.property-link {
    padding: 10px 20px;
    background: var(--dark-brown);
    color: var(--gold);
    border: 2px solid var(--gold);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

.property-link:hover {
    background: #463d2a;
    transform: translateY(-2px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    display: none;
}

.empty-state.visible {
    display: block;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.empty-message {
    font-size: 16px;
    color: var(--text-gray);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 80px 20px;
    display: none;
}

.loading-state.visible {
    display: block;
}

.spinner {
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 6px solid rgba(245, 199, 110, 0.3);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-gray);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 16px;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .properties-container {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sort-buttons {
        gap: 6px;
    }

    .multiselect-container {
        gap: 4px;
    }

    .multiselect-option {
        font-size: 12px;
        padding: 6px 8px;
    }

    .multiselect-toggle {
        font-size: 13px;
        padding: 8px 12px;
    }

    .multiselect-dropdown {
        max-height: 200px;
    }

    .sort-field-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    .demo-mode-indicator {
        padding: 12px 16px;
    }

    .demo-indicator-content {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        text-align: center;
    }

    .demo-indicator-text {
        justify-content: center;
        gap: 8px;
    }

    .demo-indicator-icon {
        font-size: 20px;
    }

    .demo-indicator-label {
        font-size: 14px;
    }

    .demo-indicator-exit {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }

    .btn-demo {
        font-size: 13px;
    }
}

/* Payment Management Styles */
.payment-manage-btn {
    background: var(--gold);
    color: var(--dark-brown);
    border: 2px solid var(--dark-brown);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.payment-manage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 199, 110, 0.4);
}

/* Payment Modal */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.payment-modal.visible {
    display: flex;
}

.payment-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 1200px;
    width: 90%;
    max-height: 95vh;
    border: 3px solid var(--border-gold);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    overflow: hidden;
}

.payment-modal-layout {
    display: flex;
    width: 100%;
    height: 100%;
    max-height: 95vh;
}

.payment-modal-sidebar {
    width: 280px;
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e6 100%);
    border-right: 2px solid var(--border-gold);
    padding: 15px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.payment-modal-sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-brown);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-gold);
}

.payment-modal-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.payment-modal-info-block {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.payment-modal-info-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-modal-info-text {
    flex: 1;
}

.payment-modal-info-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-brown);
    margin-bottom: 6px;
}

.payment-modal-info-text p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-gray);
    margin: 0;
}

.payment-modal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 30px;
}

#unpaidListingsContainer {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.payment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-gold);
    flex-shrink: 0;
}

.payment-modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-modal-title-wrapper .info-icon {
    position: relative;
    width: 24px;
    height: 24px;
    top: auto;
    right: auto;
    color: var(--gold);
    background: rgba(245, 199, 110, 0.15);
    border-color: var(--gold);
    flex-shrink: 0;
    align-self: center;
    margin: 0;
    padding: 0;
}

.payment-modal-title-wrapper .info-icon svg {
    display: block;
    margin: auto;
}

.payment-modal-title-wrapper .info-icon:hover {
    color: var(--dark-brown);
    background: var(--gold);
    transform: scale(1.15);
}

.payment-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-brown);
    line-height: 1;
    margin: 0;
}

.payment-modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    color: var(--text-gray);
    transition: color 0.3s ease;
}

.payment-modal-close:hover {
    color: var(--dark-brown);
}

/* Payment Filters */
.payment-filters {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.payment-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 1200px) {
    .payment-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .payment-filter-grid {
        grid-template-columns: 1fr;
    }

    .payment-modal-layout {
        flex-direction: column;
    }

    .payment-modal-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--border-gold);
        max-height: 200px;
    }

    .payment-modal-content {
        max-height: 90vh;
    }
}

.payment-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Table Wrapper with Scroll */
.unpaid-table-wrapper {
    flex: 1;
    overflow-y: auto;
    border-radius: 12px;
    border: 2px solid var(--border-gold);
    margin: 0;
    min-height: 0;
}

.unpaid-listings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.unpaid-listings-table th {
    background: var(--dark-brown);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.unpaid-listings-table th:first-child {
    border-top-left-radius: 10px;
}

.unpaid-listings-table th:last-child {
    border-top-right-radius: 10px;
}

.unpaid-listings-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

.unpaid-listings-table tbody tr:hover td {
    background: #fffbf5;
}

.unpaid-listings-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.unpaid-listings-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

.unpaid-listings-table tbody tr:last-child td {
    border-bottom: none;
}

.unpaid-listing-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--gold);
}

.payment-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.payment-btn-primary {
    background: var(--gold);
    color: var(--dark-brown);
    border-color: var(--dark-brown);
}

.payment-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 199, 110, 0.4);
}

.payment-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.payment-btn-secondary {
    background: white;
    color: var(--text-dark);
    border-color: #d1d5db;
}

.payment-btn-secondary:hover {
    background: #f9fafb;
}

.payment-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-brown);
    text-align: right;
    margin-top: 15px;
}

.unpaid-listing-title {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unpaid-listing-rooms,
.unpaid-listing-meters,
.unpaid-listing-type,
.unpaid-listing-zone {
    text-align: center;
}

.unpaid-listing-price {
    font-weight: 600;
    color: var(--dark-brown);
    text-align: right;
}

/* Referral Modal Styles */
.referral-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.referral-modal.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.referral-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 30px;
    border: 3px solid var(--border-gold);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10001;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-gray);
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--dark-brown);
}

.referral-header {
    margin-bottom: 24px;
}

.referral-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-brown);
    margin-bottom: 8px;
}

.referral-subtitle {
    font-size: 14px;
    color: var(--text-gray);
}

.referral-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.referral-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.referral-code-box,
.referral-link-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.referral-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.code-display {
    display: flex;
    gap: 8px;
    align-items: center;
}

.code-text {
    flex: 1;
    padding: 12px 16px;
    background: var(--light-bg);
    border: 2px solid var(--border-gold);
    border-radius: 8px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    color: var(--dark-brown);
}

.link-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--light-bg);
    border: 2px solid var(--border-gold);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-dark);
    font-family: monospace;
}

.copy-btn {
    padding: 12px 20px;
    background: var(--gold);
    color: var(--dark-brown);
    border: 2px solid var(--dark-brown);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 199, 110, 0.4);
}

.referral-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}

.points-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.points-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.points-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark-brown);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 0.3s ease;
}

.points-info {
    font-size: 13px;
    color: var(--text-gray);
}

.discount-badge {
    padding: 16px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

/* Responsive styles for referral modal */
@media (max-width: 768px) {
    .referral-modal-content {
        width: 95%;
        padding: 20px;
        max-height: 95vh;
    }

    .referral-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .code-text {
        font-size: 16px;
    }

    .link-input {
        font-size: 11px;
    }

    .copy-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .modal-close {
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
}