:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #0284c7;
    --success: #10b981;
    --success-hover: #059669;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --font: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

#login-screen {
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: fadeUp 0.5s ease;
}

.glass-card h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    font-family: var(--font);
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.error-msg {
    color: #ef4444;
    font-size: 14px;
    margin-top: 15px;
    height: 20px;
}

/* Base Buttons */
.btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:active {
    transform: scale(0.98);
}

.btn.primary {
    background: var(--accent);
    color: white;
}

.btn.primary:hover { background: var(--accent-hover); }

.btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--border);
}

.btn.secondary:hover { background: rgba(255, 255, 255, 0.2); }

.btn.text-only {
    background: transparent;
    color: var(--text-muted);
}
.btn.text-only:hover { color: white; }

/* Dashboard Header */
.glass-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h2 { font-size: 20px; }
.staff-info { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.live-counter {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success);
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 200px;
    padding: 10px;
    z-index: 200;
    flex-direction: column;
    gap: 5px;
    text-align: left;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.dropdown-content.show {
    display: flex;
    animation: fadeDown 0.2s ease forwards;
}

.dropdown-item {
    background: transparent;
    color: var(--text-main);
    border: none;
    padding: 12px 15px;
    text-align: left;
    font-family: var(--font);
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.text-danger {
    color: #ef4444 !important;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Main Dashboard Content */
.container {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.search-bar-container {
    margin-bottom: 30px;
}

#search-input {
    width: 100%;
    padding: 18px 24px;
    font-size: 18px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: white;
    font-family: var(--font);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

#search-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Guest Grid */
.guest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.guest-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, background 0.2s;
}

.guest-card:hover {
    background: rgba(30, 41, 59, 0.9);
}

.guest-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.guest-info p {
    color: var(--text-muted);
    font-size: 14px;
}

.guest-info .phone {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 6px;
    font-family: monospace;
    font-size: 13px;
}

.btn-checkin {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
    background: var(--success);
    color: white;
    min-width: 120px;
}

.btn-checkin:active { transform: scale(0.95); }

.btn-checkin.checked {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: default;
}
.btn-checkin.checked:active { transform: none; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .glass-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    .header-right { width: 100%; justify-content: space-between; }
    .container { padding: 15px; }
    #search-input { padding: 14px 18px; font-size: 16px; }
    .guest-grid { grid-template-columns: 1fr; }
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Modals */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal .modal-content {
    width: 100%;
    max-width: 450px;
}

.modal .modal-content h3 {
    margin-bottom: 20px;
    font-size: 22px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}
