/* ── Lumihost Design System ─────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg-deep: #0a0e17;
    --bg-card: #111827;
    --bg-input: #1a2234;
    --accent: #f59e0b;
    --accent-hover: #fbbf24;
    --accent-glow: rgba(245, 158, 11, 0.15);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --danger: #ef4444;
    --success: #22c55e;
}
body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; }
.ambient {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none; z-index: 0;
}
.ambient::before {
    content: ''; position: absolute; top: -30%; left: -10%;
    width: 60%; height: 60%;
    background: radial-gradient(ellipse, rgba(245,158,11,0.06) 0%, transparent 70%);
}
.ambient::after {
    content: ''; position: absolute; bottom: -20%; right: -15%;
    width: 50%; height: 50%;
    background: radial-gradient(ellipse, rgba(99,102,241,0.04) 0%, transparent 70%);
}
.container {
    max-width: 1100px; margin: 0 auto; padding: 0 24px;
    position: relative; z-index: 1;
}
nav {
    padding: 20px 0; display: flex; align-items: center;
    justify-content: space-between;
}
.logo {
    font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem;
    font-weight: 700; color: var(--accent); text-decoration: none;
    display: flex; align-items: center; gap: 8px;
}
.logo svg { width: 28px; height: 28px; }

/* ── Buttons ───────────────────────────────────────── */
.btn-primary {
    background: var(--accent); color: #000; font-weight: 600;
    padding: 10px 24px; border-radius: 10px; text-decoration: none;
    font-size: 0.9rem; transition: all 0.2s; display: inline-block;
    border: none; cursor: pointer; font-family: inherit;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(245,158,11,0.3); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-full { width: 100%; text-align: center; padding: 12px; }
.btn-secondary {
    background: rgba(255,255,255,0.06); color: var(--text-primary);
    font-weight: 500; padding: 8px 20px; border-radius: 8px;
    text-decoration: none; font-size: 0.85rem; transition: all 0.2s;
    display: inline-block; border: 1px solid var(--border); cursor: pointer;
    font-family: inherit;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: var(--border-hover); }
.btn-danger {
    background: rgba(239,68,68,0.1); color: var(--danger);
    border: 1px solid rgba(239,68,68,0.2); padding: 8px 20px;
    border-radius: 8px; font-size: 0.85rem; cursor: pointer;
    font-family: inherit; transition: all 0.2s;
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-icon {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 6px; border-radius: 6px; transition: all 0.2s;
}
.btn-icon:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

/* ── Forms ─────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 0.85rem; color: var(--text-secondary);
    margin-bottom: 6px; font-weight: 500;
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px 14px; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: 8px;
    color: var(--text-primary); font-size: 0.9rem;
    font-family: inherit; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Auth Pages ────────────────────────────────────── */
.auth-page {
    display: flex; align-items: center; justify-content: center;
    min-height: calc(100vh - 80px); position: relative; z-index: 1;
}
.auth-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 40px; width: 100%; max-width: 420px;
}
.auth-card h2 { font-size: 1.5rem; margin-bottom: 4px; }
.auth-subtitle { color: var(--text-secondary); margin-bottom: 24px; font-size: 0.9rem; }
.auth-error {
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2);
    color: var(--danger); padding: 10px 14px; border-radius: 8px;
    font-size: 0.85rem; margin-bottom: 16px;
}
.auth-switch {
    text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-muted);
}
.auth-switch a { color: var(--accent); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ── Dashboard Layout ──────────────────────────────── */
.dash-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 0; border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.dash-header h1 { font-size: 1.5rem; }
.dash-user { display: flex; align-items: center; gap: 12px; }
.dash-user span { color: var(--text-secondary); font-size: 0.85rem; }

/* Stats */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px; margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px;
}
.stat-card .stat-value {
    font-family: 'Space Grotesk', sans-serif; font-size: 2rem;
    font-weight: 700; color: var(--accent);
}
.stat-card .stat-label { color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; }

/* ── Property Cards ────────────────────────────────── */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.section-header h2 { font-size: 1.2rem; }
.property-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px; margin-bottom: 32px;
}
.property-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 14px; padding: 24px; cursor: pointer;
    transition: all 0.2s;
}
.property-card:hover { border-color: rgba(245,158,11,0.2); transform: translateY(-2px); }
.property-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.property-card .property-address { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 12px; }
.property-card .property-meta {
    display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-secondary);
}
.property-card .property-meta span { display: flex; align-items: center; gap: 4px; }
.property-card .property-type {
    display: inline-block; background: var(--accent-glow); color: var(--accent);
    padding: 2px 8px; border-radius: 4px; font-size: 0.75rem;
    text-transform: capitalize; margin-bottom: 8px;
}
.add-property-card {
    background: transparent; border: 2px dashed var(--border);
    border-radius: 14px; padding: 24px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; min-height: 140px; transition: all 0.2s;
    color: var(--text-muted); gap: 8px;
}
.add-property-card:hover { border-color: var(--accent); color: var(--accent); }
.add-property-card .plus { font-size: 2rem; line-height: 1; }

/* ── Conversation List ─────────────────────────────── */
.conv-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.conv-item {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; padding: 16px; cursor: pointer;
    transition: all 0.2s;
}
.conv-item:hover { border-color: rgba(245,158,11,0.2); }
.conv-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--accent-glow); display: flex;
    align-items: center; justify-content: center;
    color: var(--accent); font-weight: 700; font-size: 0.85rem;
    flex-shrink: 0;
}
.conv-info { flex: 1; min-width: 0; }
.conv-info h4 { font-size: 0.9rem; margin-bottom: 2px; }
.conv-info .conv-last-msg {
    color: var(--text-muted); font-size: 0.8rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conv-meta { text-align: right; flex-shrink: 0; }
.conv-meta .conv-time { font-size: 0.75rem; color: var(--text-muted); }
.conv-meta .conv-badge {
    background: var(--accent); color: #000; font-size: 0.7rem;
    font-weight: 700; padding: 2px 6px; border-radius: 10px;
    display: inline-block; margin-top: 4px;
}
.conv-platform {
    font-size: 0.7rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.05em;
}

/* ── Chat View ─────────────────────────────────────── */
.chat-container {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden; display: flex;
    flex-direction: column; height: calc(100vh - 200px); min-height: 500px;
}
.chat-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.chat-header-left { display: flex; align-items: center; gap: 12px; }
.chat-header h3 { font-size: 1rem; }
.chat-header .chat-sub { color: var(--text-muted); font-size: 0.8rem; }
.chat-messages {
    flex: 1; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 12px;
}
.chat-msg {
    max-width: 75%; padding: 12px 16px;
    border-radius: 14px; font-size: 0.9rem; line-height: 1.5;
}
.chat-msg-guest {
    background: rgba(255,255,255,0.06);
    align-self: flex-start; border-bottom-left-radius: 4px;
}
.chat-msg-host {
    background: rgba(99,102,241,0.15);
    align-self: flex-end; border-bottom-right-radius: 4px;
}
.chat-msg-ai {
    background: var(--accent-glow); border: 1px solid rgba(245,158,11,0.15);
    align-self: flex-end; border-bottom-right-radius: 4px;
}
.chat-msg .chat-msg-label {
    font-size: 0.7rem; color: var(--text-muted);
    margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.05em;
}
.chat-msg-ai .chat-msg-label { color: var(--accent); }
.chat-msg .chat-msg-time {
    font-size: 0.7rem; color: var(--text-muted); margin-top: 6px;
}
.chat-input {
    padding: 16px 20px; border-top: 1px solid var(--border);
    display: flex; gap: 10px; align-items: center;
}
.chat-input input {
    flex: 1; padding: 10px 14px; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: 10px;
    color: var(--text-primary); font-size: 0.9rem; font-family: inherit;
}
.chat-input input:focus { outline: none; border-color: var(--accent); }
.chat-actions { display: flex; gap: 8px; }

/* ── Modal ─────────────────────────────────────────── */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); z-index: 100; display: flex;
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 32px; width: 90%; max-width: 560px;
    max-height: 90vh; overflow-y: auto; position: relative;
}
.modal h2 { font-size: 1.3rem; margin-bottom: 20px; }
.modal-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; color: var(--text-muted);
    font-size: 1.5rem; cursor: pointer; padding: 4px 8px;
    border-radius: 6px; transition: all 0.2s;
}
.modal-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.modal-actions {
    display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px;
}

/* ── Empty State ───────────────────────────────────── */
.empty-state {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; margin-bottom: 20px; }

/* ── Back Button ───────────────────────────────────── */
.back-link {
    color: var(--text-muted); text-decoration: none; font-size: 0.85rem;
    display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px;
    transition: color 0.2s;
}
.back-link:hover { color: var(--text-primary); }

/* ── Breadcrumb ────────────────────────────────────── */
.breadcrumb {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 20px; font-size: 0.85rem;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-secondary); }

/* ── Loading ───────────────────────────────────────── */
.loading {
    display: flex; align-items: center; justify-content: center;
    padding: 40px; color: var(--text-muted);
}
.spinner {
    width: 24px; height: 24px; border: 2px solid var(--border);
    border-top-color: var(--accent); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin-right: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ─────────────────────────────────────────── */
.toast {
    position: fixed; bottom: 24px; right: 24px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 20px; z-index: 200;
    font-size: 0.85rem; box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .property-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .chat-msg { max-width: 88%; }
    .dash-header { flex-direction: column; gap: 12px; align-items: flex-start; }
}
