/* ============================================
   KEEL CUSTOM HOMES - MODERN UI STYLES
   Glass-morphism + Animations + Light/Dark Mode
   ============================================ */

/* CSS Variables for Theming */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-hover: rgba(255, 255, 255, 0.85);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.2);
    --border-hover: rgba(148, 163, 184, 0.4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
    --accent-primary: #6366f1;
    --accent-primary-light: #818cf8;
    --accent-primary-dark: #4f46e5;
    --accent-secondary: #f97316;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    --gradient-card: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%);
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --blur-sm: 8px;
    --blur-md: 16px;
    --blur-lg: 24px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-glass: rgba(30, 41, 59, 0.8);
    --bg-glass-hover: rgba(51, 65, 85, 0.9);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: rgba(148, 163, 184, 0.15);
    --border-hover: rgba(148, 163, 184, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);
    --gradient-card: linear-gradient(180deg, rgba(51,65,85,0.8) 0%, rgba(30,41,59,0.4) 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--transition-slow), color var(--transition-slow);
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.04) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-md));
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-normal);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transition: transform var(--transition-bounce);
}

.brand-logo:hover {
    transform: scale(1.05) rotate(-2deg);
}

.brand-logo svg { width: 24px; height: 24px; color: white; }

.brand-text { display: flex; flex-direction: column; }

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.navbar-actions { display: flex; align-items: center; gap: 12px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before { left: 100%; }

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-sm));
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px rgba(249, 115, 22, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(249, 115, 22, 0.4);
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-sm));
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--bg-glass-hover);
    transform: rotate(15deg);
    box-shadow: var(--shadow-md);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
    transition: all var(--transition-normal);
    position: absolute;
}

.theme-toggle .sun-icon { opacity: 1; transform: rotate(0deg); }
.theme-toggle .moon-icon { opacity: 0; transform: rotate(-90deg); }

[data-theme="dark"] .theme-toggle .sun-icon { opacity: 0; transform: rotate(90deg); }
[data-theme="dark"] .theme-toggle .moon-icon { opacity: 1; transform: rotate(0deg); }

.app-container {
    display: flex;
    min-height: calc(100vh - 70px);
    position: relative;
    z-index: 1;
}

.sidebar {
    width: 320px;
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-md));
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.sidebar-subtitle { font-size: 0.8rem; color: var(--text-muted); }

.plan-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-list::-webkit-scrollbar { width: 6px; }
.plan-list::-webkit-scrollbar-track { background: transparent; }
.plan-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: var(--radius-full); }

.plan-card {
    background: var(--gradient-card);
    backdrop-filter: blur(var(--blur-sm));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-normal);
    animation: fadeInUp 0.4s ease-out backwards;
}

.plan-card:nth-child(1) { animation-delay: 0.05s; }
.plan-card:nth-child(2) { animation-delay: 0.1s; }
.plan-card:nth-child(3) { animation-delay: 0.15s; }
.plan-card:nth-child(4) { animation-delay: 0.2s; }
.plan-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.plan-card:hover {
    transform: translateX(8px) translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.plan-card.active {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.plan-card.dragging { opacity: 0.5; transform: scale(0.95); }
.plan-card.drag-over { border-color: var(--accent-secondary); border-style: dashed; }

.plan-rank {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-bounce);
    z-index: 1;
}

.plan-card:hover .plan-rank { transform: scale(1.1); }
.plan-rank.top { background: var(--gradient-secondary); box-shadow: var(--shadow-md), 0 0 15px rgba(249, 115, 22, 0.4); }

.plan-drag-handle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition-fast);
    cursor: grab;
}

.plan-card:hover .plan-drag-handle { opacity: 1; }

.plan-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    padding-right: 24px;
}

.plan-meta { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 4px; }
.plan-price { font-size: 0.875rem; font-weight: 600; color: var(--accent-primary); margin-bottom: 8px; }

.plan-stats { display: flex; flex-wrap: wrap; gap: 8px; }

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.plan-card:hover .stat-badge { background: var(--accent-primary); color: white; }

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.tabs-container {
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-md));
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
}

.tabs-nav {
    display: flex;
    gap: 8px;
    position: relative;
    background: var(--bg-tertiary);
    padding: 6px;
    border-radius: var(--radius-lg);
    width: fit-content;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
}

.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: white; }
.tab-btn svg { width: 18px; height: 18px; }

.tabs-indicator {
    position: absolute;
    height: calc(100% - 12px);
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    top: 6px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    z-index: 0;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

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

.content-title { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }

.floor-switcher {
    display: flex;
    gap: 8px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-md);
}

.floor-btn {
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.floor-btn.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.image-card {
    background: var(--gradient-card);
    backdrop-filter: blur(var(--blur-sm));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    animation: scaleIn 0.4s ease-out backwards;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.image-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
}

.image-card.selected {
    border-color: var(--accent-success);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(16, 185, 129, 0.3);
}

.image-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.image-card:hover .image-card-img { transform: scale(1.05); }

.image-card-content { padding: 16px; }
.image-card-title { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.image-card-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

.selected-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--accent-success);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-top: 10px;
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.floor-plan-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
}

.floor-plan-thumbs { display: flex; flex-direction: column; gap: 12px; }

.thumb-card {
    background: var(--gradient-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
}

.thumb-card:hover { border-color: var(--accent-primary); transform: scale(1.02); }
.thumb-card.active { border-color: var(--accent-primary); box-shadow: var(--shadow-md), var(--shadow-glow); }
.thumb-card img { width: 100%; height: 100px; object-fit: contain; border-radius: var(--radius-sm); margin-bottom: 8px; }
.thumb-card span { font-size: 0.75rem; color: var(--text-secondary); }

.floor-plan-viewer {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    min-height: 500px;
}

.floor-plan-image { width: 100%; max-height: 600px; object-fit: contain; }

.annotation-marker {
    position: absolute;
    width: 28px;
    height: 28px;
    background: var(--accent-danger);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-md), 0 0 10px rgba(239, 68, 68, 0.4);
    transition: all var(--transition-normal);
    animation: markerPulse 2s infinite;
    z-index: 10;
}

@keyframes markerPulse {
    0%, 100% { box-shadow: var(--shadow-md), 0 0 10px rgba(239, 68, 68, 0.4); }
    50% { box-shadow: var(--shadow-lg), 0 0 20px rgba(239, 68, 68, 0.6); }
}

.annotation-marker:hover { transform: translate(-50%, -50%) scale(1.2); }
.annotation-marker.high { background: var(--accent-danger); }
.annotation-marker.medium { background: var(--accent-warning); }
.annotation-marker.low { background: var(--accent-primary); }

.annotations-panel {
    position: fixed;
    top: 70px;
    right: 0;
    width: 380px;
    height: calc(100vh - 70px);
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-lg));
    border-left: 1px solid var(--border-color);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.annotations-panel.open { transform: translateX(0); }

.annotations-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.annotations-title { font-size: 1.125rem; font-weight: 600; }

.annotations-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.annotation-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all var(--transition-fast);
}

.annotation-item:hover { border-color: var(--accent-primary); box-shadow: var(--shadow-md); }

.annotation-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.annotation-number {
    width: 24px;
    height: 24px;
    background: var(--accent-danger);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.annotation-room { font-weight: 600; color: var(--text-primary); }
.annotation-floor { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; }
.annotation-text { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }

.preferences-section { margin-bottom: 32px; }

.preferences-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preferences-section-title svg { color: var(--accent-primary); }

.preferences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.preference-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.preference-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.preference-card.selected { border-color: var(--accent-success); box-shadow: 0 0 20px rgba(16, 185, 129, 0.2); }
.preference-card img { width: 100%; height: 140px; object-fit: cover; }
.preference-card-content { padding: 12px; }
.preference-card-label { font-size: 0.8rem; color: var(--text-secondary); }
.preference-card-source { font-size: 0.7rem; color: var(--text-muted); }

.summary-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.summary-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    transition: all var(--transition-normal);
}

.summary-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.summary-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.summary-card-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.summary-card-title { font-size: 1.125rem; font-weight: 600; }
.summary-list { display: flex; flex-direction: column; gap: 12px; }

.summary-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.summary-item-icon { color: var(--accent-success); flex-shrink: 0; }
.summary-item-text { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.show { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
}

.modal-overlay.show .modal-content { transform: scale(1) translateY(0); }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title { font-size: 1.25rem; font-weight: 600; }

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.modal-close:hover { background: var(--accent-danger); color: white; }

.modal-body { padding: 24px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.image-viewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.image-viewer-overlay.show { opacity: 1; visibility: visible; }

.image-viewer-content { position: relative; max-width: 90vw; max-height: 90vh; }
.image-viewer-img { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: var(--radius-lg); }

.image-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-sm));
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all var(--transition-fast);
}

.image-viewer-nav:hover { background: var(--accent-primary); transform: translateY(-50%) scale(1.1); }
.image-viewer-prev { left: -70px; }
.image-viewer-next { right: -70px; }

.image-viewer-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: var(--bg-glass);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    color: white;
    transition: all var(--transition-fast);
}

.image-viewer-close:hover { background: var(--accent-danger); }

.general-notes {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.general-notes h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.general-notes-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
}

@media (max-width: 1024px) {
    .sidebar { width: 280px; }
    .floor-plan-container { grid-template-columns: 1fr; }
    .floor-plan-thumbs { flex-direction: row; overflow-x: auto; }
    .thumb-card { min-width: 150px; }
}

@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .sidebar {
        position: fixed;
        left: 0;
        top: 70px;
        height: calc(100vh - 70px);
        transform: translateX(-100%);
        z-index: 50;
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { width: 100%; }
    .tabs-nav { overflow-x: auto; width: 100%; }
    .tab-btn span { display: none; }
    .annotations-panel { width: 100%; }
    .image-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
