/* ============================================
   ALTRAD WEBSITE BUILDER - MAIN STYLES
   ============================================ */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Spinner animation for loading modal */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

:root {
    /* Colors */
    --primary-color: #1e3a8a;
    --primary-hover: #1e40af;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    /* Borders */
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color: #334155;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: var(--transition);
}

/* === HEADER === */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 40px;
    width: auto;
}

body.dark-mode .logo img {
    filter: brightness(0) invert(1);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--border-color);
    transform: scale(1.05);
}

.mobile-menu-toggle {
    display: none;
}

/* === MOBILE VIEW TOGGLE === */
.mobile-view-toggle {
    display: none;
    position: relative;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.25rem;
    border-radius: 10px;
    gap: 0.25rem;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.view-toggle-btn svg {
    width: 16px;
    height: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.view-toggle-btn span {
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.view-toggle-btn.active {
    color: var(--text-primary);
    background: var(--bg-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-toggle-btn.active svg {
    transform: scale(1.05);
}

.view-toggle-btn:active {
    transform: scale(0.97);
}

/* Remove sliding background */
.mobile-view-toggle::after {
    display: none;
}

body.preview-mode .mobile-view-toggle::after {
    display: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.user-profile:hover {
    background: var(--border-color);
}

.user-avatar-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.user-avatar-default {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--border-color);
}

.user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.dark-mode .user-avatar {
    filter: none;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* === BUTTONS === */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

/* === MAIN CONTENT === */
.main-content {
    padding: 0;
    min-height: calc(100vh - 80px);
    background: #f7f8fa;
}

.builder-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 80px);
}

/* === EDITOR PANEL === */
.editor-panel {
    position: fixed;
    left: 0;
    top: 80px;
    width: 360px;
    height: calc(100vh - 80px);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding: 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1rem;
    margin-bottom: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.25rem;
    width: calc(100% - 2rem);
    overflow: hidden;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    flex: 0 1 auto;
    min-width: 0;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.progress-step.active .step-number {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.step-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-tertiary);
    transition: var(--transition);
    white-space: nowrap;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.progress-step.active .step-label {
    color: var(--primary-color);
}

.progress-line {
    flex: 1 1 auto;
    min-width: 20px;
    max-width: 40px;
    height: 2px;
    background: var(--border-color);
    margin: 0 0.25rem;
    margin-bottom: 1.5rem;
}

.progress-step.active ~ .progress-line {
    background: var(--primary-color);
}

/* Editor Sections */
.editor-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.editor-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin: 0 1.5rem;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* === TEMPLATE CARDS === */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    padding: 0 1.5rem;
}

.template-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.template-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

.template-preview {
    height: 90px;
    background: var(--bg-tertiary);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.template-preview img {
    pointer-events: none;
}

.template-mockup {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.mock-header {
    height: 15px;
    background: linear-gradient(90deg, #e2e8f0 30%, transparent 30%);
}

.mock-hero {
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin: 6px;
    border-radius: 3px;
}

.mock-hero.luxury {
    background: linear-gradient(135deg, #1e293b, #334155);
}

.mock-hero.minimalist {
    background: #f8fafc;
    border: 2px solid var(--border-color);
}

.mock-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 6px;
}

.mock-card {
    height: 30px;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.template-info {
    padding: 1.5rem;
}

.template-info h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    pointer-events: none;
}

.template-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.btn-select-template {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-select-template:hover {
    background: var(--primary-hover);
}

/* === PROPERTIES MANAGER === */
.properties-manager {
    min-height: 400px;
    padding: 0 1.5rem;
}

.manager-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-properties {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-properties svg {
    position: absolute;
    left: 1rem;
    color: var(--text-tertiary);
}

.search-properties input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 0.9375rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-properties input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.properties-list {
    display: grid;
    gap: 1rem;
}

.property-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
    cursor: pointer;
}

.property-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.property-image-thumb {
    width: 100%;
    height: 120px;
    border-radius: var(--border-radius);
    object-fit: cover;
}

.property-info {
    flex: 1;
}

.property-title-row {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.property-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.property-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit, .btn-delete {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-edit {
    background: var(--secondary-color);
    color: white;
}

.btn-edit:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.property-details {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.property-detail {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state svg {
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
}

/* === NAVIGATION BUTTONS === */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1rem 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 10;
}

.navigation-buttons button {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    border-radius: 8px;
    flex: 1;
    justify-content: center;
}

.navigation-buttons button svg {
    width: 14px;
    height: 14px;
}

.navigation-buttons .btn-secondary {
    flex: 0.8;
}

.navigation-buttons .btn-primary {
    flex: 1.2;
}

/* === MESSAGES MANAGER === */
.messages-manager {
    min-height: 500px;
    padding: 0 1.5rem;
}

.messages-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1.5rem;
    height: 600px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.chat-list-panel {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.chat-list-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary);
}

.chat-list-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.unread-count {
    background: var(--danger-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-list-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-primary);
}

.chat-list-item:hover {
    background: var(--bg-secondary);
}

.chat-list-item.active {
    background: rgba(30, 58, 138, 0.1);
    border-left: 3px solid var(--primary-color);
}

.chat-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.chat-visitor-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.chat-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.chat-property-name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.chat-last-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-unread-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
}

.chat-detail-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.no-chat-selected {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.no-chat-selected svg {
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.no-chat-selected h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-chat-selected p {
    color: var(--text-secondary);
}

.chat-detail-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-detail-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.chat-visitor-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.chat-visitor-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--bg-primary);
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.chat-message.seller {
    flex-direction: row-reverse;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    word-wrap: break-word;
}

.chat-message.visitor .message-bubble {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.chat-message.seller .message-bubble {
    background: var(--primary-color);
    color: white;
}

.message-text {
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
}

.chat-input-container {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.chat-input-container textarea {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 0.9375rem;
    resize: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.chat-input-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.btn-send {
    padding: 0.75rem 1.25rem;
    white-space: nowrap;
}

/* === CUSTOMIZE FORM === */
.customize-form {
    display: grid;
    gap: 1.5rem;
    padding: 0 1.5rem;
}

.form-section {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.form-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 0.9375rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.logo-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.logo-upload-area:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.upload-prompt svg {
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.upload-prompt p {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.logo-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--border-radius);
}

.btn-remove-logo {
    padding: 0.5rem 1rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-remove-logo:hover {
    background: #dc2626;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-picker-wrapper input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 0;
    border: none;
    cursor: pointer;
}

.color-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
}

/* === PREVIEW PANEL === */
.preview-panel {
    margin-left: 360px;
    flex: 1;
    background: #f7f8fa;
    padding: 2rem 3rem;
    min-height: calc(100vh - 80px);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.preview-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.preview-controls {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-mode-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.preview-mode-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.preview-mode-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.preview-container {
    width: 100%;
    height: calc(100vh - 200px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: white;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.preview-container.tablet-mode {
    width: 768px;
    margin: 0 auto;
}

.preview-container.mobile-mode {
    width: 375px;
    margin: 0 auto;
}

/* === MODAL === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger-color);
    color: white;
    transform: rotate(90deg);
}

.property-form {
    padding: 1.5rem;
}

.image-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.image-upload-zone:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.images-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: move;
    transition: var(--transition);
}

.image-preview-item.drag-over {
    border: 2px dashed var(--primary-color);
    opacity: 0.5;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drag-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 5;
}

.image-preview-item:hover .drag-handle {
    opacity: 1;
}

.image-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(15, 23, 42, 0.8);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.image-badge.new {
    background: rgba(16, 185, 129, 0.9);
}

.remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--danger-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.remove-image:hover {
    transform: scale(1.1);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Confirm Modal Styles */
.confirm-modal {
    max-width: 480px;
    text-align: center;
    padding: 2.5rem;
}

.confirm-modal h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1a202c;
}

.confirm-modal p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.confirm-modal .modal-actions {
    border-top: none;
    padding: 0;
    justify-content: center;
    margin-top: 2rem;
}

.warning-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

.warning-icon svg {
    color: #b45309;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(251, 191, 36, 0);
    }
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
}

/* Success Modal */
.success-modal {
    text-align: center;
    padding: 3rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-modal h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.success-modal p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* === QUICK SELECT === */
.form-group label.label-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.btn-quick-select {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: transparent;
    color: var(--primary-color);
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: underline;
}

.btn-quick-select:hover {
    background: var(--bg-secondary);
    text-decoration: none;
}

.about-us-options {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.about-option {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.about-option:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-option h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.about-option p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === TOAST === */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(400px);
    transition: var(--transition);
    z-index: 10000;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.toast.success .toast-icon {
    background: var(--success-color);
}

.toast.error .toast-icon {
    background: var(--danger-color);
}

.toast-message {
    font-weight: 600;
    color: var(--text-primary);
}

/* === SIDEBAR SCROLLBAR === */
.editor-panel::-webkit-scrollbar {
    width: 6px;
}

.editor-panel::-webkit-scrollbar-track {
    background: transparent;
}

.editor-panel::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.editor-panel::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .builder-layout {
        flex-direction: column;
        padding: 2rem;
    }
    
    .editor-panel {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-radius: var(--border-radius-lg);
        padding: 2rem;
        margin-bottom: 2rem;
    }
    
    .preview-panel {
        margin-left: 0;
        padding: 2rem;
        background: var(--bg-primary);
        border-radius: var(--border-radius-lg);
    }
    
    .section-header {
        margin: 0;
        padding-top: 0;
    }
    
    .customize-form {
        padding: 0;
    }
    
    .navigation-buttons {
        position: static;
        margin: 1.5rem 0;
    }
    
    .preview-container {
        height: 600px;
    }
}

@media (max-width: 768px) {
    /* Hide desktop-only elements */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Reset body and html */
    body, html {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Container - remove padding */
    .container {
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Header adjustments */
    .header {
        padding: 0.5rem 1rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
        background: var(--bg-primary);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        height: 70px;
    }
    
    .header .container {
        height: 100%;
        display: flex;
        align-items: center;
    }
    
    .header-content {
        justify-content: space-between;
        gap: 0.5rem;
        max-width: 100%;
        width: 100%;
        align-items: center;
    }
    
    .logo {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    .logo img {
        width: auto;
        height: 70px;
        max-width: 120px;
    }
    
    .logo-text {
        display: none;
    }
    
    /* Main content */
    .main-content {
        margin: 0 !important;
        padding: 70px 0 0 0 !important;
        width: 100% !important;
        background: var(--bg-secondary);
        min-height: 100vh;
    }
    
    /* Builder layout - single column */
    .builder-layout {
        display: block !important;
        min-height: calc(100vh - 70px);
        width: 100%;
        padding-bottom: 2rem;
        position: relative;
    }
    
    /* Show mobile view toggle */
    .mobile-view-toggle {
        display: flex !important;
        order: -1;
        margin-right: auto;
    }
    
    .view-toggle-btn {
        padding: 0.5rem 0.875rem;
    }
    
    .view-toggle-btn span {
        display: inline;
    }
    
    .view-toggle-btn svg {
        width: 16px;
        height: 16px;
    }
    
    /* Editor panel - full width, not fixed */
    .editor-panel {
        position: relative !important;
        width: 100% !important;
        left: 0 !important;
        top: 0 !important;
        height: auto !important;
        min-height: calc(100vh - 70px);
        padding: 1rem !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
        display: block;
    }
    
    /* Show preview panel in mobile but hide by default */
    .preview-panel {
        display: none !important;
        position: fixed !important;
        left: 0 !important;
        top: 70px !important;
        width: 100% !important;
        height: calc(100vh - 70px) !important;
        background: var(--bg-secondary);
        z-index: 999;
        padding: 1rem !important;
    }
    
    /* Show preview when active */
    body.preview-mode .preview-panel {
        display: block !important;
    }
    
    body.preview-mode .editor-panel {
        display: none !important;
    }
    
    /* Preview container adjustments for mobile */
    .preview-panel .preview-container {
        width: 100% !important;
        height: calc(100vh - 150px) !important;
    }
    
    /* Hide preview controls */
    .preview-controls {
        display: none !important;
    }
    
    /* Progress indicator */
    .progress-indicator {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        margin-bottom: 1rem;
        padding: 1.25rem;
        gap: 0.5rem;
        width: 100%;
        background: white;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        border: none;
        margin-left: 0;
        margin-right: 0;
    }
    
    .progress-step {
        flex-direction: column;
        align-items: center;
        gap: 0.375rem;
        flex: 0 0 auto;
        min-width: 0;
    }
    
    .progress-step .step-number,
    .progress-number {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        line-height: 32px;
        flex-shrink: 0;
    }
    
    .progress-step .step-label,
    .progress-label {
        font-size: 0.65rem;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .progress-line {
        display: none !important;
    }
    
    /* Template section */
    .editor-section {
        padding: 1.25rem !important;
        width: 100%;
        margin-bottom: 1rem;
        background: white;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .section-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: none;
        text-align: center;
        position: relative;
    }
    
    .section-header h2 {
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
        font-weight: 800;
        color: var(--text-primary);
        background: linear-gradient(135deg, var(--primary-color), #60a5fa);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: -0.02em;
    }
    
    .section-header p {
        font-size: 0.875rem;
        color: var(--text-secondary);
        line-height: 1.5;
    }
    
    .templates-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        width: 100%;
        padding: 0;
    }
    
    .template-card {
        padding: 0;
        width: 100%;
        box-sizing: border-box;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        background: white;
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .template-card:active {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }
    
    .template-preview {
        height: 200px;
        border-radius: 0;
        overflow: hidden;
    }
    
    .template-info h3 {
        font-size: 1rem;
    }
    
    .template-info p {
        font-size: 0.85rem;
    }
    
    .btn-select-template {
        width: 100%;
        padding: 0.75rem;
    }
    
    /* Form adjustments */
    .form-group {
        margin-bottom: 1.25rem;
        width: 100%;
    }
    
    .form-group label {
        font-size: 0.875rem;
        margin-bottom: 0.625rem;
        font-weight: 600;
        display: block;
        color: var(--text-primary);
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px !important;
        padding: 1rem !important;
        width: 100% !important;
        box-sizing: border-box;
        border-radius: 12px;
        border: 2px solid var(--border-color);
        background: var(--bg-primary);
        transition: all 0.2s;
    }
    
    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus {
        border-color: var(--primary-color);
        background: var(--bg-primary);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
        outline: none;
    }
    
    .form-group textarea {
        min-height: 120px;
        resize: vertical;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    /* Color picker */
    .color-picker-wrapper {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.75rem;
    }
    
    .color-picker-wrapper input[type="color"] {
        width: 100% !important;
        height: 60px !important;
        border-radius: 12px;
        border: 3px solid #e5e7eb;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .color-value {
        font-size: 1.125rem;
        font-weight: 700;
        text-align: center;
        padding: 0.75rem;
        background: var(--bg-secondary);
        border-radius: 8px;
    }
    
    .color-preview {
        width: 100%;
        height: 60px;
        margin-bottom: 0.5rem;
    }
    
    /* Logo upload */
    .logo-upload-area {
        padding: 1.5rem 1rem;
        width: 100%;
    }
    
    .logo-preview {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .logo-preview img {
        max-width: 150px;
        max-height: 120px;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    
    .btn-remove-logo {
        width: auto;
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Properties manager */
    .properties-manager {
        padding: 0 !important;
        min-height: auto;
    }

    /* Empty state */
    .empty-state {
        padding: 3rem 1.5rem;
        background: white;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        margin-bottom: 1rem;
    }

    .empty-state svg {
        width: 56px;
        height: 56px;
        margin-bottom: 1rem;
    }

    .empty-state h3 {
        font-size: 1.125rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }

    /* Properties section */
    .properties-list {
        gap: 1rem;
        width: 100%;
        padding: 0;
    }
    
    .property-card {
        padding: 0;
        width: 100%;
        box-sizing: border-box;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        background: white;
    }
    
    .property-images {
        height: 180px;
        border-radius: 0;
        overflow: hidden;
        margin-bottom: 0;
    }
    
    .property-info {
        padding: 1rem;
    }
    
    .property-info h3 {
        font-size: 1.05rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }
    
    .property-price {
        font-size: 1.15rem;
        font-weight: 800;
        color: var(--primary-color);
        margin-bottom: 0.5rem;
    }
    
    .property-details {
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .property-actions {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .property-actions button {
        flex: 1;
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    /* Manager actions */
    .manager-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        padding: 0;
        margin-bottom: 1rem;
    }

    .manager-actions button {
        width: 80% !important;
        max-width: 320px;
        justify-content: center;
        padding: 0.875rem;
        font-size: 1rem;
        font-weight: 700;
        border-radius: 14px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transition: all 0.2s;
    }
    
    .manager-actions .btn-primary {
        background: var(--primary-color) !important;
        color: white !important;
    }    .manager-actions button:active {
        transform: scale(0.97);
    }
    
    .manager-actions button svg {
        width: 20px;
        height: 20px;
    }
    
    /* Navigation buttons */
    .navigation-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
        margin-bottom: 0;
        width: 100%;
        padding: 0;
    }

    .navigation-buttons button {
        width: 100% !important;
        justify-content: center;
        padding: 1.125rem;
        font-size: 1rem;
        font-weight: 700;
        border-radius: 14px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transition: all 0.2s;
    }    .navigation-buttons button:active {
        transform: scale(0.97);
    }
    
    .navigation-buttons button svg {
        width: 20px;
        height: 20px;
    }
    
    .navigation-buttons .btn-primary {
        background: var(--primary-color);
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    }
    
    /* Hide publish button in header on mobile */
    .btn-primary#publishWebsiteBtn {
        display: none !important;
    }
    
    /* Modals */
    .modal {
        padding: 0 !important;
        align-items: flex-start !important;
        background: rgba(0, 0, 0, 0.7);
        overflow: hidden;
        position: fixed;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-content {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        position: relative;
    }
    
    .modal-header {
        position: sticky;
        top: 0;
        background: var(--bg-primary);
        z-index: 10;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        flex-shrink: 0;
    }
    
    .modal-header h2 {
        font-size: 1.125rem;
        font-weight: 700;
    }
    
    .modal-body {
        padding: 1.5rem 1rem;
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .property-form {
        padding: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .modal-footer {
        position: sticky;
        bottom: 0;
        background: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        padding: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
        flex-shrink: 0;
        display: flex;
        gap: 0.75rem;
    }
    
    .modal-footer button {
        flex: 1;
        padding: 1rem;
        font-weight: 600;
    }
    
    /* Modal actions for property form */
    .modal-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        padding: 1rem;
        padding-bottom: max(2rem, calc(1rem + env(safe-area-inset-bottom, 1rem)));
        background: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        z-index: 1000;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: space-between;
        gap: 0.75rem;
        box-sizing: border-box;
    }
    
    .modal-actions button {
        min-height: 48px;
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
        font-weight: 600;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .modal-actions .btn-secondary {
        flex: 0 0 auto;
        min-width: 100px;
    }
    
    .modal-actions .btn-primary {
        flex: 1;
    }
    
    /* Add padding to form to ensure content is not hidden behind buttons */
    .property-form {
        padding: 0;
        padding-bottom: 250px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    /* Property form */
    #propertyForm .form-row {
        grid-template-columns: 1fr !important;
    }
    
    #propertyForm .form-group:last-of-type {
        margin-bottom: 3rem;
    }
    
    #propertyForm {
        padding: 1rem;
        padding-bottom: 200px;
    }
    
    .btn-auto-fill {
        width: 100%;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .images-preview {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 4rem;
    }
    
    .image-preview-item {
        height: 100px;
    }
    
    /* Auth modal */
    .auth-tabs {
        gap: 0.5rem;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .auth-tab {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .auth-form input {
        font-size: 16px !important;
    }
    
    .auth-form button {
        width: 100%;
    }
    
    /* User profile */
    .user-avatar-wrapper {
        width: 32px;
        height: 32px;
    }
    
    .user-name {
        display: none;
    }
    
    .user-profile-dropdown {
        right: 1rem;
        left: auto;
        min-width: 200px;
    }
    
    /* Header actions */
    .header-actions {
        gap: 0.5rem;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    .header-actions .btn-primary {
        padding: 0.625rem 1rem !important;
        font-size: 0.85rem !important;
        white-space: nowrap;
        font-weight: 700 !important;
    }
    
    .header-actions .btn-primary svg {
        width: 16px;
        height: 16px;
    }
    
    /* Contact section */
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    /* Toast */
    .toast {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) translateY(-150px) !important;
        bottom: auto !important;
        top: 80px !important;
        max-width: calc(100% - 2rem) !important;
        width: auto !important;
        min-width: 280px;
        font-size: 0.9rem;
        padding: 0.875rem 1.25rem;
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
    }
    
    .toast.show {
        transform: translateX(-50%) translateY(0) !important;
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }
    
    /* Empty states */
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state svg {
        width: 60px;
        height: 60px;
    }
    
    /* Preview modes */
    .preview-modes {
        display: none !important;
    }
    
    /* Touch targets */
    button, .btn, a {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Quick Select Button */
    .form-group label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .btn-quick-select {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
        align-self: flex-start;
    }
    
    .about-us-options {
        gap: 0.875rem;
    }
    
    .about-option {
        padding: 1rem;
    }
    
    .about-option h4 {
        font-size: 1rem;
    }
    
    .about-option p {
        font-size: 0.875rem;
    }
    
    /* Messages Manager Mobile */
    .messages-layout {
        grid-template-columns: 1fr;
        height: calc(100vh - 250px);
    }
    
    .chat-list-panel {
        display: none;
    }
    
    .chat-list-panel.mobile-show {
        display: flex;
    }
    
    .chat-detail-panel {
        display: none;
    }
    
    .chat-detail-content {
        display: flex !important;
    }
    
    .chat-detail-panel.mobile-show {
        display: flex;
    }
    
    .chat-input-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .chat-input-container textarea {
        width: 100%;
        min-height: 60px;
    }
    
    .btn-send {
        width: 100%;
    }
    
    .chat-messages-container {
        padding: 1rem;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    /* Input styling */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="password"],
    textarea,
    select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        font-size: 16px !important;
        box-sizing: border-box;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .header {
        padding: 0.5rem 0.75rem;
        height: 64px;
    }
    
    .main-content {
        padding-top: 64px !important;
    }
    
    .builder-layout {
        min-height: calc(100vh - 64px);
    }
    
    .editor-panel {
        min-height: calc(100vh - 64px);
        padding: 1rem 0.75rem !important;
    }
    
    .logo img {
        width: 100px;
        height: auto;
        max-height: 44px;
    }
    
    .logo-text {
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    .header-actions .btn-primary {
        padding: 0.5rem 0.875rem !important;
        font-size: 0.8rem !important;
    }
    
    .progress-step .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        line-height: 28px;
    }
    
    .progress-step .step-label {
        font-size: 0.6rem;
    }
    
    .template-preview {
        height: 150px;
    }
    
    .section-header h2 {
        font-size: 1rem;
    }
    
    .images-preview {
        grid-template-columns: 1fr;
    }
}


/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* === ANIMATIONS === */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* === AUTH MODAL STYLES === */
#authEmail:focus,
#authPassword:focus {
    outline: none;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

#emailPasswordButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4) !important;
}

#emailPasswordButton:active {
    transform: translateY(0);
}

#authToggleLink:hover {
    text-decoration: underline;
    color: #2563eb !important;
}

#googleSignInButton:hover {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    transform: translateY(-1px);
}

#guestModeButton:hover {
    background: var(--bg-tertiary) !important;
    transform: translateY(-1px);
}

#cancelAuthButton:hover {
    color: var(--text-primary) !important;
    text-decoration: underline;
}

/* Dark mode adjustments */
[data-theme="dark"] #googleSignInButton {
    background: #1f2937 !important;
    color: #f9fafb !important;
    border-color: #374151 !important;
}

[data-theme="dark"] #googleSignInButton:hover {
    background: #111827 !important;
    border-color: #4b5563 !important;
}

/* Guest Warning Modal */
#guestWarningCancel:hover {
    background: var(--bg-tertiary) !important;
    transform: translateY(-1px);
}

#guestWarningConfirm:hover {
    background: #b91c1c !important;
    transform: translateY(-1px);
}

#guestWarningConfirm:active,
#guestWarningCancel:active {
    transform: translateY(0);
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}