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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    color: #1e293b;
}

.hidden { display: none !important; }

.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-align: center;
}

.login-box h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: #1e293b;
}

.login-box p {
    color: #64748b;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
}

.error-msg {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.btn-primary {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.btn-primary:hover { background: #1d4ed8; }

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover { background: #e2e8f0; }

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
}

.btn-danger:hover { background: #b91c1c; }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; width: auto; }

.btn-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 12px;
}

.btn-link:hover { text-decoration: underline; }

.admin-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.admin-header h1 {
    font-size: 1.5rem;
    color: #1e293b;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

.filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 20px;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.filter-search {
    flex: 1;
    min-width: 200px;
}

.filter-search input {
    width: 100%;
}

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow-x: auto;
}

.reservations-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.reservations-table th {
    background: #f8fafc;
    padding: 12px 14px;
    text-align: left;
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.reservations-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    vertical-align: middle;
}

.reservations-table tbody tr:hover {
    background: #f8fafc;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-confirmed {
    background: #dcfce7;
    color: #166534;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.btn-cancel-reservation {    width: 100%;
    background: none;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
}

.btn-cancel-reservation:hover {
    background: #fee2e2;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 1rem;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.confirm-box {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.confirm-box h3 {
    margin-bottom: 12px;
    color: #1e293b;
}

.confirm-box p {
    color: #64748b;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.questionnaire-detail-box {
    max-width: 600px;
    text-align: left;
    max-height: 80vh;
    overflow-y: auto;
}

.questionnaire-detail-box h3 {
    text-align: center;
}

.questionnaire-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.questionnaire-content td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    vertical-align: top;
}

.questionnaire-content td:first-child {
    font-weight: 600;
    color: #475569;
    width: 35%;
    background: #f8fafc;
}

.btn-view-questionnaire {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;    width: 100%;margin-bottom: 10px;
}

.btn-view-questionnaire:hover {
    background: #7c3aed;
}

.confirm-actions button {
    min-width: 120px;
}

.note-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: white;
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tab-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.tab-btn:hover {
    color: #1e293b;
    background: #f1f5f9;
}

.tab-btn.active {
    background: #2563eb;
    color: white;
}

.settings-container {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    max-width: 600px;
}

.settings-container h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #1e293b;
}

.settings-desc {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.btn-save-settings {
    margin-top: 8px;
}

.settings-msg {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.settings-msg.success {
    background: #dcfce7;
    color: #166534;
}

.settings-msg.error {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .filters-bar {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

