/* BParked Web App Modern Theme */
:root {
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-200: #e2e8f0;
    --secondary-300: #cbd5e1;
    --secondary-500: #64748b;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    --secondary-900: #0f172a;
    --success: #10b981;
    --success-100: #ecfdf3;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.12);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.08), transparent 30%),
                radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.07), transparent 25%),
                var(--secondary-50);
    color: var(--secondary-900);
    min-height: 100vh;
    padding: 32px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

header {
    background: white;
    border: 1px solid var(--secondary-200);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    box-shadow: var(--shadow-md);
}

header h1 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 2rem;
    color: var(--secondary-900);
    letter-spacing: -0.02em;
}

.header-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--secondary-50);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--secondary-200);
    box-shadow: var(--shadow-sm);
}

.header-logo svg {
    width: 28px;
    height: 28px;
    fill: var(--primary-600);
}

.brand-icon {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    letter-spacing: -0.04em;
    font-size: 1.15rem;
    box-shadow: var(--shadow-sm);
}

.subtitle {
    margin-top: 6px;
    color: var(--secondary-500);
    font-size: 1rem;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--secondary-100);
}

.section h2 {
    font-size: 1.25rem;
    color: var(--secondary-900);
    margin-bottom: 12px;
}

.section p.lead {
    color: var(--secondary-500);
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}

/* Tabs */
.auth-tabs,
.app-tabs {
    display: inline-flex;
    background: var(--secondary-100);
    padding: 6px;
    border-radius: 999px;
    gap: 6px;
    margin-bottom: 18px;
    border: 1px solid var(--secondary-200);
}

.tab-btn {
    border: none;
    padding: 10px 18px;
    border-radius: 999px;
    background: transparent;
    color: var(--secondary-700);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition);
}

.tab-btn:hover {
    color: var(--primary-600);
}

.tab-btn.active {
    background: white;
    color: var(--primary-600);
    box-shadow: var(--shadow-sm);
}

/* Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-grid {
    display: grid;
    gap: 14px;
}

label {
    font-weight: 600;
    color: var(--secondary-700);
    font-size: 0.95rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--secondary-200);
    font-size: 1rem;
    transition: all var(--transition);
    background: var(--secondary-50);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: white;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 1rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--secondary-800);
    border-color: var(--secondary-200);
}

.btn-secondary:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: transparent;
}

.btn-danger:hover {
    filter: brightness(0.95);
}

.btn-ghost {
    background: transparent;
    color: var(--secondary-700);
    border-color: var(--secondary-200);
}

.btn-sm {
    padding: 9px 14px;
    font-size: 0.9rem;
}

/* User Info */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--secondary-50);
    border: 1px solid var(--secondary-200);
    gap: 10px;
}

/* App Content */
.app-content {
    display: none;
}

.app-content.active {
    display: block;
}

.highlight-card {
    background: white;
    border: 1px solid var(--secondary-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.highlight-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(16, 185, 129, 0.06));
    pointer-events: none;
}

/* Filters */
.date-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin: 12px 0 18px;
    padding: 14px;
    background: var(--secondary-50);
    border: 1px solid var(--secondary-200);
    border-radius: var(--radius-md);
}

.date-filter label {
    white-space: nowrap;
    font-size: 0.95rem;
}

.date-filter .btn {
    align-self: center;
}

/* Floor Selector */
.floor-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.floor-btn {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--secondary-200);
    background: white;
    color: var(--secondary-800);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.floor-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
}

.floor-btn.active {
    background: var(--primary-600);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

/* Cards & grids */
.spots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.spot-card,
.reservation-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 18px;
    border: 1px solid var(--secondary-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.spot-card:hover,
.reservation-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-500);
}

.spot-floor {
    font-weight: 700;
    color: var(--primary-600);
    margin-bottom: 6px;
}

.spot-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-900);
}

.spot-location,
.spot-price,
.spot-status,
.reservation-details p {
    margin: 6px 0;
    color: var(--secondary-600);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-confirmed { background: #d1fae5; color: #065f46; }
.status-active { background: #e0f2fe; color: #075985; }
.status-completed { background: #e0f2fe; color: #0c4a6e; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.status-note {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--secondary-50);
    border: 1px dashed var(--secondary-200);
    border-radius: var(--radius-md);
    color: var(--secondary-700);
    font-size: 0.9rem;
}

.reservations-list {
    display: grid;
    gap: 12px;
}

/* Messages */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-weight: 700;
    z-index: 2000;
    animation: slideIn 0.25s ease;
    border: 1px solid transparent;
}

.message.info { background: #e0f2fe; color: #075985; border-color: #bfdbfe; }
.message.success { background: #ecfdf3; color: #065f46; border-color: #d1fae5; }
.message.error { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 16px;
    animation: fadeIn 0.25s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--secondary-200);
    overflow: hidden;
}

.modal-large .modal-content {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--secondary-200);
}

.modal-header h3 {
    margin: 0;
    color: var(--secondary-900);
    font-size: 1.15rem;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary-500);
    cursor: pointer;
    transition: color var(--transition);
}

.close-btn:hover {
    color: var(--secondary-800);
}

.modal-body {
    padding: 20px 22px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 0 22px 22px;
    border-top: 1px solid var(--secondary-200);
}

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

.help-text {
    font-size: 0.9rem;
    color: var(--secondary-500);
    margin-top: 6px;
}

.no-data {
    text-align: center;
    color: var(--secondary-500);
    padding: 32px;
    font-size: 1rem;
    border: 1px dashed var(--secondary-200);
    border-radius: var(--radius-md);
    background: var(--secondary-50);
}

.reservation-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* Animations */
@keyframes slideIn {
    from { transform: translateY(-12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

/* Responsive */
@media (max-width: 960px) {
    body { padding: 20px; }
    .layout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    header h1 { flex-direction: row; font-size: 1.6rem; }
    .container { gap: 16px; }
    .section { padding: 20px; }
    .date-filter { flex-direction: column; align-items: stretch; }
    .user-info { flex-direction: column; align-items: flex-start; }
    .message { left: 16px; right: 16px; }
    .spots-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    body { padding: 14px; }
    .header-logo { width: 48px; height: 48px; }
    .btn { width: 100%; }
    .modal-content { max-width: 100%; }
}
