:root {
    --bg-color: #050505;
    --card-bg: #0a0a0a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #c9a77c;
    --accent-hover: #b08d62;
    --border-color: rgba(255,255,255,0.05);
    --modal-bg: rgba(0, 0, 0, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Outfit', sans-serif; background-color: var(--bg-color); color: var(--text-primary); -webkit-font-smoothing: antialiased; }

.dashboard { display: flex; flex-direction: row; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar {
    width: 280px;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    z-index: 100;
}
.sidebar.collapsed { width: 80px; }

.sidebar .logo {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    height: 80px;
}
.logo-icon { width: 32px; height: 32px; background: var(--accent); color: #000; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.2rem; flex-shrink: 0; }
.logo-text { white-space: nowrap; overflow: hidden; transition: opacity 0.3s; }
.sidebar.collapsed .logo-text { opacity: 0; pointer-events: none; width: 0; }
.toggle-btn { position: absolute; right: 1rem; background: transparent; border: none; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0.5rem; border-radius: 4px; }
.toggle-btn:hover { background: rgba(255,255,255,0.05); color: #fff; }
.sidebar.collapsed .toggle-btn svg { transform: rotate(180deg); }

.side-nav { padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.nav-item {
    display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem;
    color: var(--text-secondary); text-decoration: none; border-radius: 8px;
    transition: all 0.3s ease; white-space: nowrap; overflow: hidden;
}
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,0.05); color: var(--accent); }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }
.nav-text { transition: opacity 0.3s; }
.sidebar.collapsed .nav-text { opacity: 0; width: 0; }

.bottom-nav { border-top: 1px solid var(--border-color); }
.text-danger { color: #ef4444; }
.text-danger:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* MAIN WRAPPER */
.main-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-color); }
.mobile-header { display: none; }
.main-content { flex: 1; overflow-y: auto; padding: 2rem 3rem; }
.view-section { display: none; }
.view-section.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
h1 { font-size: 2rem; font-weight: 600; }

.search-box { display: flex; align-items: center; background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 0.5rem 1rem; width: 300px; transition: border-color 0.3s; }
.search-box:focus-within { border-color: var(--accent); }
.search-box svg { color: var(--text-secondary); margin-right: 0.5rem; }
.search-box input { background: transparent; border: none; color: var(--text-primary); font-family: inherit; font-size: 0.95rem; width: 100%; outline: none; }

.btn-primary { background: var(--accent); color: #000; padding: 0.6rem 1.2rem; border-radius: 6px; border: none; cursor: pointer; font-weight: 600; font-family: 'Outfit'; transition: background 0.2s; }
.btn-primary:hover { background: var(--accent-hover); }

.table-container { background-color: var(--card-bg); border-radius: 12px; border: 1px solid var(--border-color); overflow-x: auto; }
.registrations-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.registrations-table th, .registrations-table td { padding: 1.25rem 1.5rem; text-align: left; }
.registrations-table th { background-color: rgba(255, 255, 255, 0.02); color: var(--text-secondary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; border-bottom: 1px solid var(--border-color); }
.registrations-table tbody tr { border-bottom: 1px solid var(--border-color); transition: background-color 0.2s; cursor: pointer; }
.registrations-table tbody tr:hover { background-color: rgba(255, 255, 255, 0.02); }
.registrations-table tbody tr:last-child { border-bottom: none; }

/* Modal Styles */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: var(--modal-bg); backdrop-filter: blur(8px); overflow-y: auto; align-items: center; justify-content: center; }
.modal-content { background-color: var(--card-bg); margin: 2rem auto; padding: 2.5rem; border: 1px solid var(--border-color); border-radius: 16px; width: 90%; max-width: 900px; position: relative; box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5); animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.close-btn { position: absolute; top: 1.5rem; right: 2rem; color: var(--text-secondary); font-size: 2rem; font-weight: 300; cursor: pointer; transition: color 0.2s; }
.close-btn:hover { color: #ef4444; }

/* Custom Multiselect */
.custom-multiselect { position: relative; width: 100%; }
.multiselect-header { padding: 0.75rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; color: #fff; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.multiselect-header::after { content: '\25BC'; font-size: 0.8rem; color: var(--text-secondary); }
.multiselect-options { position: absolute; top: 100%; left: 0; right: 0; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 6px; margin-top: 0.25rem; z-index: 10; max-height: 200px; overflow-y: auto; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.multiselect-options label { display: flex; align-items: center; padding: 0.75rem 1rem; cursor: pointer; transition: background 0.2s; color: #fff; margin: 0; font-size: 0.95rem; }
.multiselect-options label:hover { background: rgba(255,255,255,0.05); }
.multiselect-options input[type="checkbox"] { margin-right: 0.75rem; cursor: pointer; }

/* Responsive Mobile */
@media (max-width: 768px) {
    .dashboard { flex-direction: column; }
    .sidebar { position: fixed; top: 0; left: -100%; height: 100vh; width: 280px; transition: left 0.3s; z-index: 2000; box-shadow: 20px 0 50px rgba(0,0,0,0.5); }
    .sidebar.mobile-open { left: 0; }
    .mobile-header { display: flex; align-items: center; justify-content: flex-start; padding: 1rem 1.5rem; background: var(--card-bg); border-bottom: 1px solid var(--border-color); gap: 1rem; }
    .mobile-toggle { background: none; border: none; color: #fff; cursor: pointer; display: flex; align-items: center; }
    .main-content { padding: 1rem; }
    .top-bar { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .search-box { width: 100%; }
    .sidebar .toggle-btn { display: none; }
}

/* Modal details generated by JS */
.guest-details-header { border-bottom: 1px solid var(--border-color); padding-bottom: 1.5rem; margin-bottom: 2rem; }
.guest-details-header h2 { font-size: 2rem; margin-bottom: 0.5rem; color: var(--accent); }
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.detail-item { background: rgba(255,255,255,0.02); padding: 1rem; border-radius: 8px; border: 1px solid var(--border-color); }
.detail-label { display: block; font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 0.25rem; }
.detail-value { font-size: 1.1rem; font-weight: 500; }
.section-title { font-size: 1.5rem; margin: 2rem 0 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.document-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.document-card { background: rgba(255,255,255,0.02); border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color); }
.document-img { width: 100%; height: 200px; object-fit: cover; display: block; cursor: pointer; transition: transform 0.3s; }
.document-img:hover { transform: scale(1.05); }
.document-info { padding: 1rem; }
.person-list { list-style: none; }
.person-item { background: rgba(255,255,255,0.02); border: 1px solid var(--border-color); margin-bottom: 1rem; padding: 1rem; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
