/* ResaVista - Design System */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #1e293b;
    --bg-hover: #f1f5f9;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: 0.2s ease;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #0f172a;
    --bg-hover: #334155;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --border-light: #1e293b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; color: var(--text); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

/* Layout */
.app-layout { display: flex; min-height: 100vh; }

.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-width); background: var(--bg-sidebar); color: #e2e8f0; z-index: 100; overflow-y: auto; transition: transform 0.3s ease; }

.sidebar-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 0.75rem; }
.sidebar-logo { width: 36px; height: 36px; background: var(--primary); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.sidebar-logo svg { width: 20px; height: 20px; color: white; }
.sidebar-title { font-size: 1.25rem; font-weight: 700; color: white; }

.sidebar-nav { padding: 1rem 0; }
.nav-section { margin-bottom: 0.5rem; }
.nav-section-title { padding: 0.5rem 1.5rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; font-weight: 600; }

.nav-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1.5rem; color: #94a3b8; transition: var(--transition); border-left: 3px solid transparent; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.05); color: white; border-left-color: var(--primary); }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-link span { font-size: 0.875rem; }

.main-content { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-height: 100vh; padding-top: var(--topbar-height); }
.main-content-inner { flex: 1; }

/* Topbar */
.topbar { position: fixed; top: 0; left: var(--sidebar-width); right: 0; height: var(--topbar-height); background: var(--bg-card); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; z-index: 90; }

.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }

.menu-toggle { display: none; background: none; border: none; padding: 0.5rem; cursor: pointer; color: var(--text); }
.menu-toggle svg { width: 24px; height: 24px; }

.search-box { position: relative; }
.search-box input { width: 300px; padding: 0.5rem 1rem 0.5rem 2.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); font-size: 0.875rem; transition: var(--transition); }
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.search-box svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }
.search-box kbd { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); background: var(--bg-hover); padding: 0.125rem 0.375rem; border-radius: 4px; font-size: 0.7rem; color: var(--text-muted); border: 1px solid var(--border); }

.hotel-selector { position: relative; }
.hotel-selector-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.875rem; color: var(--text); transition: var(--transition); }
.hotel-selector-btn:hover { border-color: var(--primary); }
.hotel-selector-btn svg { width: 16px; height: 16px; color: var(--text-muted); }
.hotel-dropdown { position: absolute; top: 100%; left: 0; margin-top: 0.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 220px; display: none; z-index: 100; }
.hotel-dropdown.show { display: block; }
.hotel-dropdown-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; cursor: pointer; transition: var(--transition); }
.hotel-dropdown-item:hover { background: var(--bg-hover); }
.hotel-dropdown-item.active { background: rgba(99,102,241,0.1); color: var(--primary); }

.topbar-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: none; border: none; border-radius: var(--radius); cursor: pointer; color: var(--text-light); transition: var(--transition); }
.topbar-btn:hover { background: var(--bg-hover); color: var(--text); }
.topbar-btn svg { width: 20px; height: 20px; }
.topbar-btn .badge { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; }

.user-menu { position: relative; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 0.875rem; cursor: pointer; }
.user-dropdown { position: absolute; top: 100%; right: 0; margin-top: 0.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 200px; display: none; z-index: 100; }
.user-dropdown.show { display: block; }
.user-dropdown-header { padding: 1rem; border-bottom: 1px solid var(--border); }
.user-dropdown-name { font-weight: 600; color: var(--text); }
.user-dropdown-email { font-size: 0.8rem; color: var(--text-muted); }
.user-dropdown-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; color: var(--text-light); cursor: pointer; transition: var(--transition); }
.user-dropdown-item:hover { background: var(--bg-hover); color: var(--text); }
.user-dropdown-item svg { width: 16px; height: 16px; }
.user-dropdown-divider { height: 1px; background: var(--border); margin: 0.25rem 0; }

/* Page Header & Breadcrumbs */
.page-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg-card); }
.breadcrumbs { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .separator { color: var(--border); }
.page-title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-title { font-size: 1.5rem; font-weight: 600; }
.page-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Content */
.content-wrapper { padding: 1.5rem; flex: 1; }

/* Cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-title { font-size: 1rem; font-weight: 600; }
.card-body { padding: 1.25rem; }
.card-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); background: var(--bg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; transition: var(--transition); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--text-muted); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-ghost { background: transparent; color: var(--text-light); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* Form Elements */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 500; color: var(--text); }
.form-input, .form-select, .form-textarea { width: 100%; padding: 0.5rem 0.75rem; font-size: 0.875rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text); transition: var(--transition); }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 0.25rem; }
.form-input.error { border-color: var(--danger); }

.form-check { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.form-check input[type="checkbox"], .form-check input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

.form-row { display: grid; gap: 1rem; }
.form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Tables */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); background: var(--bg); }
tr:hover td { background: var(--bg-hover); }
td { font-size: 0.875rem; }
.table-sortable th { cursor: pointer; user-select: none; }
.table-sortable th:hover { color: var(--text); }
.sort-icon { display: inline-block; margin-left: 0.25rem; opacity: 0.5; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.625rem; font-size: 0.7rem; font-weight: 600; border-radius: 9999px; text-transform: uppercase; letter-spacing: 0.025em; }
.badge-primary { background: rgba(99,102,241,0.1); color: var(--primary); }
.badge-success { background: rgba(16,185,129,0.1); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.1); color: var(--danger); }
.badge-info { background: rgba(6,182,212,0.1); color: var(--info); }
.badge-secondary { background: var(--bg); color: var(--text-muted); }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem; background: var(--bg); border: 1px solid var(--border); border-radius: 9999px; font-size: 0.8rem; }
.chip-remove { cursor: pointer; color: var(--text-muted); }
.chip-remove:hover { color: var(--danger); }

/* Stats/KPIs */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.stat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.stat-icon { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.primary { background: rgba(99,102,241,0.1); color: var(--primary); }
.stat-icon.success { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-icon.warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.stat-icon.info { background: rgba(6,182,212,0.1); color: var(--info); }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.stat-trend { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; font-weight: 500; margin-left: 0.5rem; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* Tabs */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn { padding: 0.75rem 1rem; background: none; border: none; border-bottom: 2px solid transparent; font-size: 0.875rem; font-weight: 500; color: var(--text-light); cursor: pointer; transition: var(--transition); margin-bottom: -1px; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: var(--transition); padding: 1rem; }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal { background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 560px; width: 100%; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; transform: scale(0.95); transition: var(--transition); }
.modal-overlay.show .modal { transform: scale(1); }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }
.modal-header { padding: 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 1.125rem; font-weight: 600; }
.modal-close { background: none; border: none; padding: 0.25rem; cursor: pointer; color: var(--text-muted); transition: var(--transition); }
.modal-close:hover { color: var(--text); }
.modal-close svg { width: 20px; height: 20px; }
.modal-body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.75rem; background: var(--bg); }

/* Toast */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1100; display: flex; flex-direction: column; gap: 0.75rem; }
.toast { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 300px; max-width: 450px; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-icon { width: 20px; height: 20px; flex-shrink: 0; }
.toast-content { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.875rem; }
.toast-message { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.125rem; }
.toast-close { background: none; border: none; padding: 0.25rem; cursor: pointer; color: var(--text-muted); }
.toast.success { border-left: 4px solid var(--success); }
.toast.success .toast-icon { color: var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info { border-left: 4px solid var(--info); }
.toast.info .toast-icon { color: var(--info); }

/* Empty State */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state-icon { margin-bottom: 1.5rem; color: var(--text-muted); }
.empty-state-icon svg { width: 80px; height: 80px; }
.empty-state h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; max-width: 400px; margin-left: auto; margin-right: auto; }

/* Skeleton Loader */
.skeleton { background: linear-gradient(90deg, var(--bg) 25%, var(--bg-hover) 50%, var(--bg) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text { height: 1rem; margin-bottom: 0.5rem; }
.skeleton-title { height: 1.5rem; width: 60%; margin-bottom: 1rem; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; top: 100%; left: 0; margin-top: 0.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 180px; z-index: 100; display: none; }
.dropdown-menu.show { display: block; }
.dropdown-menu.right { left: auto; right: 0; }
.dropdown-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; font-size: 0.875rem; color: var(--text-light); cursor: pointer; transition: var(--transition); }
.dropdown-item:hover { background: var(--bg-hover); color: var(--text); }
.dropdown-item svg { width: 16px; height: 16px; }
.dropdown-divider { height: 1px; background: var(--border); margin: 0.375rem 0; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.pagination-info { font-size: 0.875rem; color: var(--text-muted); }
.pagination-btns { display: flex; gap: 0.25rem; }
.pagination-btn { display: flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 0.75rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.875rem; color: var(--text); cursor: pointer; transition: var(--transition); }
.pagination-btn:hover { background: var(--bg-hover); border-color: var(--text-muted); }
.pagination-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.pagination-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Timeline */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 0.5rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -1.75rem; top: 0.25rem; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid var(--bg-card); }
.timeline-dot.success { background: var(--success); }
.timeline-dot.warning { background: var(--warning); }
.timeline-dot.danger { background: var(--danger); }
.timeline-date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.timeline-title { font-weight: 600; margin-bottom: 0.25rem; }
.timeline-desc { font-size: 0.875rem; color: var(--text-light); }

/* Stepper */
.stepper { display: flex; align-items: center; margin-bottom: 2rem; }
.step { display: flex; align-items: center; flex: 1; }
.step-number { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 600; color: var(--text-muted); margin-right: 0.75rem; flex-shrink: 0; }
.step.active .step-number { background: var(--primary); border-color: var(--primary); color: white; }
.step.completed .step-number { background: var(--success); border-color: var(--success); color: white; }
.step-label { font-size: 0.875rem; font-weight: 500; color: var(--text-muted); }
.step.active .step-label, .step.completed .step-label { color: var(--text); }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 0.75rem; }
.step.completed .step-line { background: var(--success); }

/* Filter Bar */
.filter-bar { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 0; flex-wrap: wrap; }
.filter-search { position: relative; flex: 1; min-width: 200px; }
.filter-search input { width: 100%; padding: 0.5rem 1rem 0.5rem 2.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); font-size: 0.875rem; }
.filter-search svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }
.filter-select { padding: 0.5rem 2rem 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); font-size: 0.875rem; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.5rem center; }

/* Quick Actions */
.quick-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Avatar */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.125rem; }
.avatar-group { display: flex; }
.avatar-group .avatar { margin-left: -0.5rem; border: 2px solid var(--bg-card); }
.avatar-group .avatar:first-child { margin-left: 0; }

/* Toggle Switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 9999px; transition: var(--transition); }
.toggle-slider::before { content: ''; position: absolute; left: 2px; bottom: 2px; width: 20px; height: 20px; background: white; border-radius: 50%; transition: var(--transition); }
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Grid */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Alert */
.alert { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-icon { flex-shrink: 0; }
.alert-icon svg { width: 20px; height: 20px; }
.alert-content { flex: 1; }
.alert-title { font-weight: 600; margin-bottom: 0.125rem; }
.alert-message { font-size: 0.875rem; }
.alert-info { background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.2); color: var(--info); }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); color: var(--warning); }
.alert-danger { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: var(--danger); }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2); color: var(--success); }

/* Calendar Grid */
.calendar-grid { display: grid; grid-template-columns: 100px repeat(7, 1fr); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.calendar-header-cell { padding: 0.75rem 0.5rem; background: var(--bg); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; text-align: center; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.calendar-row-header { padding: 0.75rem 0.5rem; background: var(--bg); font-size: 0.8rem; font-weight: 500; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.calendar-cell { padding: 0.375rem; border-right: 1px solid var(--border-light); border-bottom: 1px solid var(--border); min-height: 50px; position: relative; }
.calendar-cell:last-child { border-right: none; }
.calendar-event { padding: 0.25rem 0.5rem; background: var(--primary); color: white; font-size: 0.7rem; border-radius: 4px; margin-bottom: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-event.confirmed { background: var(--success); }
.calendar-event.pending { background: var(--warning); }
.calendar-event.blocked { background: var(--text-muted); }
.calendar-event.checkout { background: var(--info); }

/* Channel Card */
.channel-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.channel-logo { width: 48px; height: 48px; background: var(--bg); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.875rem; color: var(--text-muted); }
.channel-info { flex: 1; }
.channel-name { font-weight: 600; margin-bottom: 0.125rem; }
.channel-status { font-size: 0.8rem; color: var(--text-muted); }
.channel-actions { display: flex; gap: 0.5rem; }

/* Progress Bar */
.progress { height: 8px; background: var(--bg); border-radius: 9999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 9999px; transition: width 0.3s ease; }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger { background: var(--danger); }

/* Command Palette */
.command-palette-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1200; display: flex; align-items: flex-start; justify-content: center; padding-top: 15vh; opacity: 0; visibility: hidden; transition: var(--transition); }
.command-palette-overlay.show { opacity: 1; visibility: visible; }
.command-palette { background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; overflow: hidden; transform: scale(0.95) translateY(-10px); transition: var(--transition); }
.command-palette-overlay.show .command-palette { transform: scale(1) translateY(0); }
.command-palette-input { display: flex; align-items: center; padding: 1rem; border-bottom: 1px solid var(--border); gap: 0.75rem; }
.command-palette-input svg { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.command-palette-input input { flex: 1; border: none; background: none; font-size: 1rem; color: var(--text); outline: none; }
.command-palette-results { max-height: 400px; overflow-y: auto; }
.command-palette-section { padding: 0.5rem 0; }
.command-palette-section-title { padding: 0.5rem 1rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; }
.command-palette-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; cursor: pointer; transition: var(--transition); }
.command-palette-item:hover, .command-palette-item.active { background: var(--bg-hover); }
.command-palette-item svg { width: 16px; height: 16px; color: var(--text-muted); }
.command-palette-item span { flex: 1; font-size: 0.875rem; }
.command-palette-item kbd { font-size: 0.7rem; padding: 0.125rem 0.375rem; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; color: var(--text-muted); }
.command-palette-footer { padding: 0.75rem 1rem; border-top: 1px solid var(--border); background: var(--bg); display: flex; gap: 1rem; font-size: 0.75rem; color: var(--text-muted); }
.command-palette-footer kbd { font-size: 0.65rem; padding: 0.125rem 0.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 3px; margin-right: 0.25rem; }

/* Login Page */
.login-page { 
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: #f8fafc;
    background-image: 
        radial-gradient(at 40% 20%, rgba(99, 102, 241, 0.04) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(59, 130, 246, 0.03) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(99, 102, 241, 0.03) 0px, transparent 50%);
    padding: 1rem; 
}
[data-theme="dark"] .login-page {
    background: var(--bg-primary);
    background-image: 
        radial-gradient(at 40% 20%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%);
}
.login-card { background: var(--bg-card); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; padding: 2.5rem; }
.login-header { text-align: center; margin-bottom: 2rem; }
.login-logo { width: 56px; height: 56px; background: var(--primary); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.login-logo svg { width: 32px; height: 32px; color: white; }
.login-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.login-subtitle { color: var(--text-muted); font-size: 0.875rem; }
.login-form .form-group { margin-bottom: 1.25rem; }
.login-form .form-input { padding: 0.75rem 1rem; }
.login-actions { margin-top: 1.5rem; }
.login-actions .btn { width: 100%; padding: 0.75rem; }
.login-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-muted); font-size: 0.8rem; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-muted); }
.login-footer a { color: var(--primary); }

/* Footer */
.app-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--bg-card); font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; justify-content: space-between; }
.app-footer a { color: var(--text-light); }
.app-footer a:hover { color: var(--primary); }

/* Responsive */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .search-box input { width: 200px; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .topbar { left: 0; }
    .menu-toggle { display: flex; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row.cols-2, .form-row.cols-3, .form-row.cols-4 { grid-template-columns: 1fr; }
    .page-title-row { flex-direction: column; align-items: flex-start; }
    .search-box { display: none; }
    .hotel-selector-btn span { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-search { min-width: 100%; }
    .calendar-grid { overflow-x: auto; }
    .stepper { flex-direction: column; gap: 1rem; }
    .step { width: 100%; }
    .step-line { display: none; }
    .pagination { flex-direction: column; gap: 1rem; }
    .app-footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0 1rem; }
    .content-wrapper { padding: 1rem; }
    .card-body { padding: 1rem; }
    .modal { margin: 0.5rem; max-height: calc(100vh - 1rem); }
}

/* Print */
@media print {
    .sidebar, .topbar, .app-footer { display: none; }
    .main-content { margin: 0; padding: 0; }
}

/* Utils */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.font-bold { font-weight: 600; }
.font-mono { font-family: 'SF Mono', Monaco, monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

