/* ═══════════════════════════════════════════════════
   ListaPro — Editorial Design System v3.0
   Mobile-first · Pure CSS · Custom Properties
   ═══════════════════════════════════════════════════ */

/* ─── Custom Properties ──────────────────────────── */
:root {
    --primary: #0D9488;
    --primary-hover: #0B7C72;
    --primary-light: #F0FDFA;
    --primary-glow: rgba(13, 148, 136, 0.10);

    --teal: #0D9488;
    --teal-light: #F0FDFA;
    --amber: #D97706;
    --amber-light: #FFFBEB;
    --indigo: #6366F1;
    --indigo-light: #EEF2FF;
    --rose: #E11D48;
    --rose-light: #FFF1F2;
    --slate: #64748B;
    --slate-light: #F8FAFC;
    --green: #059669;
    --green-light: #ECFDF5;
    --red: #DC2626;
    --red-light: #FEF2F2;

    --bg-body: #F6F7F9;
    --bg-card: #FFFFFF;
    --bg-input: #F1F3F6;
    --text-main: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --border-color: #E5E7EB;
    --border-focus: var(--primary);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.06), 0 16px 48px rgba(0, 0, 0, 0.04);
    --shadow-focus: 0 0 0 3px var(--primary-glow);

    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 10px;
    --radius-pill: 100px;

    --font-heading: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
    --font-body: 'Inter', -apple-system, system-ui, sans-serif;

    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition: all 0.2s var(--ease);
}

/* ─── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100vw; }

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background: var(--bg-body);
    line-height: 1.7;
    font-weight: 400;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; display: block; height: auto; }
input, select, textarea, button { font-family: inherit; font-size: 1rem; }
.container { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; overflow-wrap: break-word; }

/* ─── Layout ─────────────────────────────────────── */
.main { padding: 2.5rem 0 5rem; flex: 1; }

/* ─── Header ─────────────────────────────────────── */
.header {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container { display: flex; align-items: center; justify-content: space-between; }

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.logo svg { flex-shrink: 0; color: var(--primary); }

.nav { display: flex; align-items: center; gap: 0.375rem; }

.nav-link {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.nav-link:hover { color: var(--text-main); background: var(--bg-input); }

.nav-link-primary {
    background: var(--text-main);
    color: #FFFFFF !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.nav-link-primary:hover {
    background: var(--primary);
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

/* ─── Footer ─────────────────────────────────────── */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 0;
    margin-top: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--text-muted); font-size: 0.75rem; font-weight: 500; }
.footer-links a:hover { color: var(--primary); }

/* ─── Typography ─────────────────────────────────── */
.page-title {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.page-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ─── Cards ──────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.card:hover { box-shadow: var(--shadow-lg); }

/* Section accent left borders */
.card[data-accent="teal"],
.card.accent-teal { border-left: 3px solid var(--teal); }
.card[data-accent="amber"],
.card.accent-amber { border-left: 3px solid var(--amber); }
.card[data-accent="indigo"],
.card.accent-indigo { border-left: 3px solid var(--indigo); }
.card[data-accent="rose"],
.card.accent-rose { border-left: 3px solid var(--rose); }
.card[data-accent="slate"],
.card.accent-slate { border-left: 3px solid var(--slate); }
.card[data-accent="green"],
.card.accent-green { border-left: 3px solid var(--green); }

.card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

/* Section title with icon — editorial uppercase label style */
.section-title {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

.section-title svg { color: var(--primary); flex-shrink: 0; width: 16px; height: 16px; }

.card.accent-teal .section-title svg,
.card[data-accent="teal"] .section-title svg { color: var(--teal); }
.card.accent-amber .section-title svg,
.card[data-accent="amber"] .section-title svg { color: var(--amber); }
.card.accent-indigo .section-title svg,
.card[data-accent="indigo"] .section-title svg { color: var(--indigo); }
.card.accent-rose .section-title svg,
.card[data-accent="rose"] .section-title svg { color: var(--rose); }
.card.accent-slate .section-title svg,
.card[data-accent="slate"] .section-title svg { color: var(--slate); }
.card.accent-green .section-title svg,
.card[data-accent="green"] .section-title svg { color: var(--green); }

/* ─── Progress Bar (Wizard) ──────────────────────── */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2.5rem;
    padding: 1.25rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    user-select: none;
}
.progress-step:hover .step-number { transform: scale(1.06); }

.step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.3s var(--ease);
}

.progress-step.active .step-number {
    background: var(--text-main);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.progress-step.completed .step-number {
    background: var(--green);
    color: white;
}

.step-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.progress-step.active .step-label { color: var(--text-main); }
.progress-step.completed .step-label { color: var(--green); }

.progress-line {
    width: 48px;
    height: 1px;
    background: var(--border-color);
    margin: 0 0.5rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.progress-line.completed { background: var(--green); }

/* ─── Form Steps & Animations ────────────────────── */
.form-step { display: none; }
.form-step.active { display: block; animation: slideIn 0.3s var(--ease); }
.form-step.slide-out-left { animation: slideOut 0.2s var(--ease) forwards; }
.form-step.slide-in-left { display: block; animation: slideInReverse 0.3s var(--ease); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-24px); }
}
@keyframes slideInReverse {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Keep original keyframe names for JS compatibility */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutLeft {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-24px); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ─── Forms ──────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.form-group label.required::before,
.form-group.required > label::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--red);
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-main);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group textarea {
    height: auto;
    padding: 0.875rem 1rem;
    resize: vertical;
    min-height: 88px;
    line-height: 1.6;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: var(--shadow-focus);
    background: var(--bg-card);
}

.form-group input.error,
.form-group select.error {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.form-group select { cursor: pointer; appearance: none; }

/* Price display */
.price-input-wrapper { position: relative; }
.price-input-wrapper .currency-symbol {
    position: absolute; left: 1rem; top: 50%;
    transform: translateY(-50%); color: var(--text-muted);
    font-weight: 600; font-size: 0.9rem; pointer-events: none;
}
.price-input-wrapper input { padding-left: 2.25rem; font-variant-numeric: tabular-nums; }

.char-counter {
    display: block; text-align: right; font-size: 0.7rem;
    color: var(--text-muted); margin-top: 0.25rem;
    font-variant-numeric: tabular-nums;
}
.char-counter.warning { color: var(--amber); }
.char-counter.danger { color: var(--red); font-weight: 600; }

/* ─── Form Grids ─────────────────────────────────── */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

/* ─── Note Chips ─────────────────────────────────── */
.note-templates { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.875rem; }

.note-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}
.note-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.note-chip:active { transform: scale(0.97); }

/* ─── Amenidades (Chips) ─────────────────────────── */
.amenidades-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.checkbox-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    user-select: none;
    background: transparent;
}
.checkbox-card input[type="checkbox"] { display: none; }
.checkbox-card:hover { border-color: var(--green); color: var(--green); }
.checkbox-card:has(input:checked) {
    border-color: var(--green);
    background: var(--green);
    color: white;
}
.checkbox-card:has(input:checked):hover { background: #047857; }

/* ─── Upload Area ────────────────────────────────── */
.upload-area {
    border: 1.5px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    color: var(--text-muted);
    background: var(--bg-input);
}
.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}
.upload-area.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}
.upload-icon { margin-bottom: 0.75rem; color: inherit; }
.upload-area p { font-size: 0.875rem; font-weight: 500; }
.upload-area .upload-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; display: block; }
.file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ─── Photo Previews ─────────────────────────────── */
.photo-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.photo-preview {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: var(--transition);
}
.photo-preview:hover { border-color: var(--primary); transform: scale(1.03); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

.photo-preview .badge-portada {
    position: absolute; top: 6px; left: 6px;
    background: var(--text-main); color: white;
    font-size: 0.6rem; padding: 2px 8px; border-radius: var(--radius-pill);
    font-weight: 700; letter-spacing: 0.03em;
}

.photo-delete {
    position: absolute; top: 6px; right: 6px;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.55); color: white;
    border: none; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; line-height: 1;
    opacity: 0; transition: var(--transition);
    backdrop-filter: blur(4px);
}
.photo-preview:hover .photo-delete { opacity: 1; }
.photo-delete:hover { background: var(--red); }

.photo-remove-btn {
    position: absolute; top: 4px; right: 4px;
    width: 22px; height: 22px;
    background: rgba(0,0,0,0.55); color: white;
    border: none; border-radius: 50%;
    font-size: 14px; line-height: 1;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s var(--ease);
    backdrop-filter: blur(4px);
}
.photo-preview:hover .photo-remove-btn { opacity: 1; }
.photo-remove-btn:hover { background: var(--red); }

.photo-count {
    text-align: center; margin-top: 0.75rem;
    font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
}

/* ─── Buttons ────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6875rem 1.375rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(180deg, #0FA89C 0%, #0D9488 100%);
    color: white;
    box-shadow: 0 1px 2px rgba(13, 148, 136, 0.2);
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(180deg, #0D9488 0%, #0B7C72 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.2);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); box-shadow: none; }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--bg-input);
    color: var(--text-main);
    border-color: var(--text-muted);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-lg { padding: 0.875rem 2rem; font-size: 0.9rem; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }

.btn-copied {
    background: var(--green) !important;
    color: white !important;
    border-color: var(--green) !important;
}

.btn-instagram {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
    border: none;
}
.btn-instagram:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(220, 39, 67, 0.2);
}

.btn-duplicate {
    background: var(--indigo-light); color: var(--indigo);
    border: 1px solid var(--indigo);
}
.btn-duplicate:hover:not(:disabled) {
    background: var(--indigo); color: white;
    transform: translateY(-1px);
}

.form-actions {
    display: flex; justify-content: space-between;
    align-items: center; margin-top: 1.75rem;
}

/* ─── Keyboard Hints ─────────────────────────────── */
.kbd-hint {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.675rem; color: var(--text-muted); opacity: 0.65;
}
.kbd {
    display: inline-block; padding: 0.1rem 0.35rem;
    background: var(--bg-input); border: 1px solid var(--border-color);
    border-radius: 4px; font-size: 0.6rem; font-family: var(--font-body);
    font-weight: 600; color: var(--text-muted); line-height: 1.4;
    box-shadow: 0 1px 0 var(--border-color);
}

/* ─── Confirmation Card ──────────────────────────── */
.confirmation-card {
    background: var(--green-light);
    border-left: 3px solid var(--green);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.confirmation-card .section-title svg { color: var(--green); }

.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.summary-item { display: flex; flex-direction: column; gap: 0.125rem; }
.summary-label {
    font-size: 0.7rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.04em;
}
.summary-value { font-size: 0.9rem; font-weight: 600; color: var(--text-main); }
.summary-value.price { color: var(--amber); font-size: 1.05rem; font-weight: 800; }
.summary-photos { display: flex; gap: 0.5rem; margin-top: 0.75rem; overflow-x: auto; padding-bottom: 0.25rem; }
.summary-photos img {
    width: 56px; height: 56px; object-fit: cover;
    border-radius: 8px; flex-shrink: 0; border: 2px solid var(--border-color);
}

.confirmation-summary h4 {
    font-family: var(--font-heading); font-size: 0.9rem;
    font-weight: 700; margin-bottom: 0.75rem;
}
.summary-list { list-style: none; padding: 0; }
.summary-list li {
    padding: 0.5rem 0; border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem; color: var(--text-secondary);
}
.summary-list li:last-child { border-bottom: none; }
.summary-list li strong { color: var(--text-main); min-width: 120px; display: inline-block; }

/* ─── Results Page ───────────────────────────────── */
.results-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 2rem;
}

.results-header-actions { display: flex; gap: 0.5rem; align-items: center; }

/* Property hero bar */
.property-bar {
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.75rem; font-size: 0.9rem;
}
.property-bar strong { font-weight: 700; }

.price-badge {
    background: rgba(255, 255, 255, 0.18);
    color: white; padding: 0.375rem 1rem;
    border-radius: var(--radius-pill);
    font-weight: 800; font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

/* Generated content */
.result-card { position: relative; }

.generated-text {
    white-space: pre-wrap;
    line-height: 1.75;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: var(--bg-input);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    overflow-wrap: break-word;
    word-break: break-word;
}

.hashtags-container {
    margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.375rem;
}

.hashtag {
    background: var(--primary-light); color: var(--primary);
    padding: 0.25rem 0.625rem; border-radius: var(--radius-pill);
    font-size: 0.75rem; font-weight: 600;
}

.image-preview {
    border-radius: var(--radius-md); overflow: hidden;
    max-width: 400px; border: 1px solid var(--border-color);
}
.image-preview img { width: 100%; }

/* Actions grid */
.actions-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.875rem; margin-top: 2rem;
}

.btn-action {
    display: flex; align-items: center; gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.8125rem; cursor: pointer;
    transition: var(--transition); text-align: left; color: var(--text-main);
}
.btn-action:hover:not(:disabled) {
    border-color: var(--text-muted);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-action:active:not(:disabled) { transform: translateY(0); }

.btn-icon {
    width: 38px; height: 38px; display: flex;
    align-items: center; justify-content: center;
    background: var(--bg-input); border-radius: var(--radius-sm); flex-shrink: 0;
}
.btn-icon svg { color: var(--primary); }

.tone-selector { display: flex; gap: 0.5rem; align-items: center; }

/* ─── Progress Bar Simple ────────────────────────── */
.progress-bar-simple {
    width: 100%; height: 4px; background: var(--border-color);
    border-radius: 2px; overflow: hidden; margin-top: 0.75rem;
}
.progress-fill {
    height: 100%; background: var(--primary);
    border-radius: 2px; width: 0%; transition: width 0.5s var(--ease);
}

/* ─── Loading Skeleton ───────────────────────────── */
.loading-state { padding: 2rem 0; }
.skeleton-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 2rem; box-shadow: var(--shadow-sm);
}
.skeleton-line {
    height: 14px; background: var(--bg-input); border-radius: 6px;
    margin-bottom: 0.75rem; animation: pulse 1.8s infinite ease-in-out;
}
.w-60 { width: 60%; }
.w-80 { width: 80%; }
.w-100 { width: 100%; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ─── Listings Dashboard ─────────────────────────── */
.listings-page {}
.listings-header {
    display: flex; justify-content: space-between;
    align-items: flex-start; margin-bottom: 2rem;
    flex-wrap: wrap; gap: 1rem;
}

.dashboard-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 1.5rem;
    flex-wrap: wrap; gap: 1rem;
}
.dashboard-filters { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.dashboard-filters select,
.dashboard-filters input {
    height: 40px; padding: 0 0.75rem;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    font-size: 0.8125rem; background: var(--bg-card); color: var(--text-main);
}

/* Listings table */
.listings-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: var(--bg-card); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-sm);
}
.listings-table thead th {
    background: var(--bg-input); padding: 0.75rem 1rem;
    text-align: left; font-size: 0.7rem; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.05em; border-bottom: 1px solid var(--border-color);
}
.listings-table tbody td {
    padding: 0.875rem 1rem; font-size: 0.8125rem;
    color: var(--text-secondary); border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.listings-table tbody tr:last-child td { border-bottom: none; }
.listings-table tbody tr:hover { background: var(--bg-input); }
.listings-table .listing-title { font-weight: 600; color: var(--text-main); }
.listings-table .listing-address { font-size: 0.75rem; color: var(--text-muted); }

/* Listings grid (card view) */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.listing-card {
    display: flex; flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-lg); overflow: hidden;
    text-decoration: none; color: var(--text-main);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.listing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.listing-card-image { height: 160px; background: var(--bg-input); overflow: hidden; }
.listing-card-image img { width: 100%; height: 100%; object-fit: cover; }

.listing-card-header {
    display: flex; justify-content: space-between;
    align-items: center; padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.listing-type { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.listing-op-badge {
    font-size: 0.65rem; font-weight: 700;
    padding: 0.125rem 0.5rem; border-radius: var(--radius-pill);
    background: var(--primary-light); color: var(--primary);
}

.listing-card-body { padding: 1rem 1.25rem; flex: 1; }
.listing-card-body h3,
.listing-address {
    font-family: var(--font-heading); font-size: 0.9rem;
    font-weight: 700; margin-bottom: 0.25rem; line-height: 1.3;
    letter-spacing: -0.02em;
}
.listing-card-body p,
.listing-location { font-size: 0.75rem; color: var(--text-muted); }

.listing-card-footer {
    display: flex; justify-content: space-between;
    align-items: center; padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-input);
}
.listing-price { font-weight: 800; font-size: 0.85rem; color: var(--primary); }
.listing-date { font-size: 0.7rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ─── Status Badges ──────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.2rem 0.625rem; border-radius: var(--radius-pill);
    font-size: 0.675rem; font-weight: 600;
    letter-spacing: 0.01em; white-space: nowrap;
}
.badge::before {
    content: '';
    width: 5px; height: 5px; border-radius: 50%;
    background: currentColor; flex-shrink: 0;
}
.badge-generado { background: var(--green-light); color: var(--green); }
.badge-pendiente { background: var(--amber-light); color: var(--amber); }
.badge-publicado { background: var(--indigo-light); color: var(--indigo); }
.badge-borrador { background: var(--bg-input); color: var(--text-muted); }
.badge-borrador::before { background: var(--text-muted); }

.status-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.status-badge {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.25rem 0.75rem; border-radius: var(--radius-pill);
    font-size: 0.7rem; font-weight: 600;
}
.status-badge::before {
    content: '';
    width: 5px; height: 5px; border-radius: 50%;
    background: currentColor; flex-shrink: 0;
}
.status-success { background: var(--green-light); color: var(--green); }
.status-pending { background: var(--amber-light); color: var(--amber); }
.status-muted { background: var(--bg-input); color: var(--text-muted); }

/* ─── Toast Notifications ────────────────────────── */
#toast-container {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem;
}

.toast {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem; font-weight: 600; color: white;
    transform: translateY(16px) scale(0.97);
    opacity: 0;
    transition: all 0.3s var(--ease);
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex; align-items: center; gap: 0.625rem;
    backdrop-filter: blur(12px);
}
.toast.show { transform: translateY(0) scale(1); opacity: 1; }
.toast-success { background: rgba(5, 150, 105, 0.92); }
.toast-error { background: rgba(220, 38, 38, 0.92); }

.toast-icon {
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.7rem; line-height: 1;
}
.toast-success .toast-icon::after { content: '\2713'; }
.toast-error .toast-icon::after { content: '\2717'; }

/* ─── Empty States ───────────────────────────────── */
.empty-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 3rem 2rem; color: var(--text-muted);
}
.empty-state-icon {
    width: 72px; height: 72px; margin: 0 auto 1.25rem;
    background: var(--bg-input); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px dashed var(--border-color);
}
.empty-state-icon svg { color: var(--text-muted); opacity: 0.4; }
.empty-state h3 {
    font-family: var(--font-heading); font-size: 1.05rem;
    font-weight: 700; color: var(--text-secondary); margin-bottom: 0.375rem;
}
.empty-state p { font-size: 0.85rem; max-width: 360px; margin: 0 auto; line-height: 1.6; }
.empty-state svg { opacity: 0.4; margin-bottom: 1rem; }

.empty-state-full {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 5rem 2rem; color: var(--text-muted);
}
.empty-state-full svg { color: var(--text-muted); opacity: 0.3; margin-bottom: 1.5rem; }
.empty-state-full h3 {
    font-family: var(--font-heading); font-size: 1.2rem;
    font-weight: 700; color: var(--text-main); margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
.empty-state-full p { font-size: 0.85rem; max-width: 360px; line-height: 1.6; }

/* ─── Price Display ──────────────────────────────── */
.price-display, .price-formatted {
    display: block; margin-top: 0.25rem;
    font-size: 0.8rem; font-weight: 700;
    color: var(--primary); min-height: 1.25rem;
}

/* ─── Saved Badge ────────────────────────────────── */
.saved-badge {
    font-size: 0.65rem; font-weight: 600;
    background: var(--green-light); color: var(--green);
    padding: 0.125rem 0.5rem; border-radius: var(--radius-pill);
    margin-left: auto;
}

/* ─── Clear Agent Link ───────────────────────────── */
.clear-agent-link {
    display: inline-block; margin-top: 0.75rem;
    font-size: 0.75rem; color: var(--text-muted);
    text-decoration: underline; cursor: pointer;
}
.clear-agent-link:hover { color: var(--red); }

/* ─── Pagination ─────────────────────────────────── */
.pagination {
    display: flex; justify-content: center;
    gap: 0.375rem; margin-top: 2.5rem;
}
.pagination-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    background: var(--bg-card); color: var(--text-secondary);
    font-weight: 600; font-size: 0.8rem; cursor: pointer;
    transition: var(--transition);
}
.pagination-btn:hover { border-color: var(--text-muted); color: var(--text-main); }
.pagination-btn.active { background: var(--text-main); color: white; border-color: var(--text-main); }

/* ─── Search Bar ─────────────────────────────────── */
.search-bar { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.search-input {
    flex: 1; min-width: 200px; height: 48px; padding: 0 1rem;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    background: var(--bg-card); font-size: 0.85rem;
    transition: var(--transition); color: var(--text-main);
}
.search-input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}
.filter-select {
    height: 48px; padding: 0 1rem;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    background: var(--bg-card); font-size: 0.85rem;
    cursor: pointer; min-width: 140px; color: var(--text-main);
}
.filter-select:focus { outline: none; border-color: var(--primary); }

/* ─── Photos Gallery (Results) ───────────────────── */
.photos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 0.5rem;
}
.photos-gallery img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: 12px; cursor: pointer;
    transition: transform 0.25s var(--ease);
}
.photos-gallery img:hover { transform: scale(1.04); }

/* ─── Spinner ────────────────────────────────────── */
.spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: white; border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Onboarding Tour ────────────────────────────── */
.onboarding-overlay {
    display: none; position: fixed; inset: 0; z-index: 9998;
    background: rgba(0,0,0,0.45);
}
.onboarding-overlay.active { display: block; }
.onboarding-tip {
    position: fixed; z-index: 9999;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 1.5rem; max-width: 320px;
    box-shadow: var(--shadow-lg);
}
.onboarding-tip h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-main); }
.onboarding-tip p { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 1rem; }
.onboarding-tip .btn { font-size: 0.75rem; padding: 0.5rem 1rem; }
.onboarding-step { font-size: 0.675rem; color: var(--text-muted); }

/* ─── Lightbox ───────────────────────────────────── */
.lightbox {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    align-items: center; justify-content: center; cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 12px; }
.lightbox-close {
    position: absolute; top: 1rem; right: 1.5rem;
    color: white; font-size: 1.75rem; cursor: pointer;
    background: none; border: none; line-height: 1;
    opacity: 0.7; transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }

/* ─── Theme Toggle ───────────────────────────────── */
.theme-toggle {
    background: none; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); padding: 0.375rem 0.5rem;
    cursor: pointer; color: var(--text-muted); font-size: 1rem;
    transition: var(--transition); line-height: 1;
}
.theme-toggle:hover { border-color: var(--text-muted); color: var(--text-main); }

/* ─── Header Inner ───────────────────────────────── */
.header-inner { display: flex; align-items: center; justify-content: space-between; }

/* ─── Utilities ──────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.demo-text-block { overflow-wrap: break-word; word-break: break-word; }

/* ─── Focus (Accessibility) ──────────────────────── */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ═══════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════ */
[data-theme="dark"] {
    --bg-body: #0B0F1A;
    --bg-card: #151A28;
    --bg-input: #0F1320;
    --text-main: #E8ECF4;
    --text-secondary: #A1AAB8;
    --text-muted: #5C657A;
    --border-color: rgba(255, 255, 255, 0.07);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);

    --primary-light: rgba(13, 148, 136, 0.12);
    --primary-glow: rgba(13, 148, 136, 0.15);
    --teal-light: rgba(13, 148, 136, 0.12);
    --amber-light: rgba(217, 119, 6, 0.12);
    --indigo-light: rgba(99, 102, 241, 0.12);
    --rose-light: rgba(225, 29, 72, 0.12);
    --green-light: rgba(5, 150, 105, 0.12);
    --slate-light: rgba(100, 116, 139, 0.12);
    --red-light: rgba(220, 38, 38, 0.12);
}

[data-theme="dark"] .header {
    background: rgba(11, 15, 26, 0.8);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .footer { background: var(--bg-card); border-top-color: var(--border-color); }

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--bg-input) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

/* Cards & containers */
[data-theme="dark"] .card { box-shadow: var(--shadow-md), 0 0 0 1px rgba(255,255,255,0.03); }
[data-theme="dark"] .checkbox-card { background: transparent; }
[data-theme="dark"] .upload-area { background: var(--bg-input); border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .generated-text { background: var(--bg-input); border-color: var(--border-color); color: var(--text-main); }
[data-theme="dark"] .confirmation-card { background: var(--green-light); border-color: var(--border-color); }
[data-theme="dark"] .skeleton-line { background: rgba(255,255,255,0.05); }

/* Progress & status */
[data-theme="dark"] .progress-bar { background: var(--bg-card); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .property-bar { background: var(--primary) !important; }
[data-theme="dark"] .badge-borrador { background: var(--bg-input); border-color: var(--border-color); }

/* Navigation */
[data-theme="dark"] .nav-link-primary { background: var(--primary); }
[data-theme="dark"] .logo { color: var(--text-main); }
[data-theme="dark"] .nav-hamburger { color: var(--text-muted); }
[data-theme="dark"] .nav-mobile-drawer { background: var(--bg-card); }
[data-theme="dark"] .nav-mobile-drawer a { color: var(--text-main); }
[data-theme="dark"] .nav-mobile-drawer a:hover { background: var(--bg-input); }
[data-theme="dark"] .nav-mobile-close { color: var(--text-muted); }
[data-theme="dark"] .mobile-nav-divider { background: var(--border-color); }

/* Buttons */
[data-theme="dark"] .btn-secondary { background: var(--bg-input); color: var(--text-secondary); border-color: var(--border-color); }
[data-theme="dark"] .btn-secondary:hover:not(:disabled) { background: var(--bg-card); color: var(--text-main); border-color: rgba(255,255,255,0.12); }
[data-theme="dark"] .btn-outline { color: var(--text-secondary); border-color: var(--border-color); }
[data-theme="dark"] .btn-outline:hover { color: var(--primary); border-color: var(--primary); }
[data-theme="dark"] .btn-action { background: var(--bg-card); border-color: var(--border-color); color: var(--text-main); }
[data-theme="dark"] .btn-action:hover:not(:disabled) { background: rgba(13,148,136,0.1); border-color: var(--primary); }
[data-theme="dark"] .btn-sm { color: var(--text-secondary); }

/* Form elements */
[data-theme="dark"] details { color: var(--text-main); }
[data-theme="dark"] details summary { color: var(--text-main); }
[data-theme="dark"] .note-chip { color: var(--text-secondary); border-color: var(--border-color); }
[data-theme="dark"] .note-chip:hover { background: var(--primary-light); }
[data-theme="dark"] .tone-selector label { color: var(--text-secondary); }
[data-theme="dark"] .search-input,
[data-theme="dark"] .filter-select { background: var(--bg-card); color: var(--text-main); border-color: var(--border-color); }

/* Listings grid */
[data-theme="dark"] .listing-card { box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
[data-theme="dark"] .listing-card:hover { box-shadow: var(--shadow-lg); border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .listing-card-header { border-bottom-color: var(--border-color); }
[data-theme="dark"] .listing-card-footer { background: var(--bg-input); border-top-color: var(--border-color); }
[data-theme="dark"] .listing-op-badge { background: var(--primary-light); }

/* Photos & media */
[data-theme="dark"] .photos-gallery img { border: none; box-shadow: var(--shadow-sm); }
[data-theme="dark"] .photo-preview .badge-portada { background: rgba(255,255,255,0.85); color: var(--bg-body); }
[data-theme="dark"] .lightbox { background: rgba(0,0,0,0.95); }

/* Results page specifics */
[data-theme="dark"] .results-header { color: var(--text-main); }
[data-theme="dark"] .card-header { border-bottom-color: var(--border-color); }
[data-theme="dark"] .card-title { color: var(--text-main); }
[data-theme="dark"] .section-title { color: var(--text-main); }
[data-theme="dark"] .hashtags-container { color: var(--text-secondary); }
[data-theme="dark"] .gen-step { color: var(--text-secondary); }
[data-theme="dark"] .status-muted { background: rgba(255,255,255,0.05); }
[data-theme="dark"] .image-preview img { border: 1px solid var(--border-color); border-radius: 12px; }

/* Empty states */
[data-theme="dark"] .empty-state { color: var(--text-muted); }
[data-theme="dark"] .empty-state h3 { color: var(--text-secondary); }
[data-theme="dark"] .empty-state-icon { background: var(--bg-input); border-color: var(--border-color); }
[data-theme="dark"] .empty-state-full h3 { color: var(--text-main); }

/* Overlays & floating */
[data-theme="dark"] .onboarding-tip { background: var(--bg-card); border-color: var(--border-color); color: var(--text-main); }
[data-theme="dark"] .toast { backdrop-filter: blur(16px); }
[data-theme="dark"] .theme-toggle { border-color: var(--border-color); color: var(--text-muted); }
[data-theme="dark"] .theme-toggle:hover { border-color: rgba(255,255,255,0.15); color: var(--text-main); }

/* Pagination */
[data-theme="dark"] .pagination-btn { background: var(--bg-card); border-color: var(--border-color); color: var(--text-secondary); }
[data-theme="dark"] .pagination-btn:hover { border-color: rgba(255,255,255,0.12); color: var(--text-main); }
[data-theme="dark"] .pagination-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* Misc */
[data-theme="dark"] .kbd { background: var(--bg-input); border-color: var(--border-color); }
[data-theme="dark"] .demo-text-block { color: var(--text-secondary); }
[data-theme="dark"] .price-display, [data-theme="dark"] .price-formatted { color: var(--primary); }
[data-theme="dark"] .saved-badge { background: var(--green-light); }
[data-theme="dark"] .clear-agent-link { color: var(--text-muted); }
[data-theme="dark"] .summary-grid .card { background: var(--bg-card); }
[data-theme="dark"] hr { border-color: var(--border-color); }
[data-theme="dark"] a:not(.btn):not(.listing-card):not(.logo):not(.nav-link-primary) { color: var(--primary); }
[data-theme="dark"] .spinner { border-color: rgba(255,255,255,0.15); border-top-color: var(--primary); }

/* Dashboard & tables */
[data-theme="dark"] .listings-table { background: var(--bg-card); }
[data-theme="dark"] .listings-table thead th { background: var(--bg-input); color: var(--text-muted); border-bottom-color: var(--border-color); }
[data-theme="dark"] .listings-table tbody td { color: var(--text-secondary); border-bottom-color: var(--border-color); }
[data-theme="dark"] .listings-table tbody tr:hover { background: var(--bg-input); }
[data-theme="dark"] .dashboard-filters select,
[data-theme="dark"] .dashboard-filters input { background: var(--bg-card); color: var(--text-main); border-color: var(--border-color); }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
/* ─── Mobile hamburger menu ─────────────────────── */
.nav-hamburger {
    display: none;
    background: none; border: none; cursor: pointer; padding: 0.375rem;
    color: var(--text-secondary); border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-hamburger:hover { background: var(--bg-input); }
.nav-hamburger svg { display: block; }

.nav-mobile-overlay {
    display: none; position: fixed; inset: 0; z-index: 999;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
    opacity: 0; transition: opacity 0.25s var(--ease);
}
.nav-mobile-overlay.open { opacity: 1; }

.nav-mobile-drawer {
    position: fixed; top: 0; right: -280px; z-index: 1000;
    width: 280px; max-width: 85vw; height: 100vh;
    background: var(--bg-card); box-shadow: var(--shadow-lg);
    transition: right 0.3s var(--ease);
    display: flex; flex-direction: column; padding: 1.25rem;
    overflow-y: auto;
}
.nav-mobile-drawer.open { right: 0; }
.nav-mobile-close {
    align-self: flex-end; background: none; border: none;
    cursor: pointer; padding: 0.5rem; color: var(--text-muted);
    border-radius: var(--radius-sm);
}
.nav-mobile-close:hover { background: var(--bg-input); }
.nav-mobile-drawer a {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.875rem 0.75rem; border-radius: var(--radius-sm);
    color: var(--text-main); font-weight: 500; font-size: 0.9rem;
    text-decoration: none; transition: var(--transition);
}
.nav-mobile-drawer a:hover { background: var(--bg-input); }
.nav-mobile-drawer a svg { flex-shrink: 0; color: var(--text-muted); }
.nav-mobile-drawer .mobile-nav-divider {
    height: 1px; background: var(--border-color); margin: 0.5rem 0;
}

@media (max-width: 768px) {
    .progress-bar { padding: 1rem; }
    .progress-line { width: 28px; margin: 0 0.25rem; margin-bottom: 1.25rem; }
    .step-label { font-size: 0.6rem; }
    .step-number { width: 30px; height: 30px; font-size: 0.75rem; }
    .actions-grid { grid-template-columns: 1fr 1fr; }
    .results-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .dashboard-header { flex-direction: column; align-items: stretch; }
    .listings-grid { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: 1fr; }
    .footer .container { flex-direction: column; text-align: center; }

    /* Show hamburger, hide desktop nav links */
    .nav-hamburger { display: flex; }
    .nav-link { display: none; }
    .theme-toggle { display: none; }
    #nav-user-area { display: none; }

    /* Listings header stack */
    .listings-header { flex-direction: column; align-items: stretch; }
    .listings-header > div:last-child {
        display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
    }

    /* Search bar stack */
    .search-bar { flex-direction: column; }
    .search-bar .search-input { width: 100%; }
    .search-bar .filter-select { width: 100%; }
}

@media (max-width: 640px) {
    .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr 1fr; }
    .card { padding: 1.5rem; }
    .page-title { font-size: 1.4rem; }
    .actions-grid { grid-template-columns: 1fr; }
    .property-bar { flex-direction: column; align-items: flex-start; text-align: left; }
    .listings-table, .listings-table thead, .listings-table tbody,
    .listings-table th, .listings-table td, .listings-table tr { display: block; }
    .listings-table thead { display: none; }
    .listings-table tbody tr {
        margin-bottom: 0.75rem; border: 1px solid var(--border-color);
        border-radius: var(--radius-md); padding: 0.75rem;
    }
    .listings-table tbody td { padding: 0.375rem 0; border: none; text-align: left; }
    .listings-table tbody td::before {
        content: attr(data-label); font-weight: 700; font-size: 0.65rem;
        color: var(--text-muted); text-transform: uppercase;
        letter-spacing: 0.04em; display: block; margin-bottom: 0.125rem;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .card { padding: 1.25rem; }
    .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
    .actions-grid { grid-template-columns: 1fr; }
    .progress-bar { padding: 0.75rem 0.5rem; }
    .progress-line { width: 16px; margin: 0 0.125rem; }
    .step-number { width: 28px; height: 28px; font-size: 0.7rem; }
    .step-label { font-size: 0.55rem; }
    .results-header { flex-direction: column; gap: 0.75rem; }
    .results-header-actions { flex-wrap: wrap; width: 100%; }
    .results-header-actions .btn { flex: 1; min-width: 0; font-size: 0.75rem; padding: 0.5rem; }
    .property-bar { flex-direction: column; text-align: center; gap: 0.5rem; }
    .status-bar { justify-content: center; }
    .image-preview { max-width: 100%; }
    .btn-action { padding: 0.875rem 1rem; font-size: 0.8rem; }
    .btn-lg { padding: 0.75rem 1.5rem; font-size: 0.85rem; }
    .form-actions { gap: 0.5rem; }
    .tone-selector { flex-wrap: wrap; }
    #toast-container { left: 1rem; right: 1rem; bottom: 1rem; }
    .toast { max-width: 100%; }
    .footer .container { flex-direction: column; text-align: center; }

    /* Listings header single column on very small */
    .listings-header > div:last-child {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
    .progress-line { width: 12px; }
}

/* ─── Print ──────────────────────────────────────── */
@media print {
    .header, .footer, .form-actions, .actions-grid,
    .btn, #toast-container { display: none !important; }
    .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
    body { background: white; }
}
