:root {
    --bg-primary: #081611;
    --bg-secondary: #0f241d;
    --card-bg: rgba(18, 42, 34, 0.7);
    --card-border: rgba(34, 197, 94, 0.2);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-green: #10b981;
    --accent-emerald: #059669;
    --accent-orange: #f97316;
    --accent-blue: #38bdf8;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle at 50% 0%, #133a2d 0%, var(--bg-primary) 70%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.navbar {
    background: rgba(15, 36, 29, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 16px 24px;
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    font-size: 32px;
}

.brand-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--accent-green);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Status Badge */
.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    color: #34d399;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@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 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* User Badge */
.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 13px;
    color: #e5e7eb;
}

.user-avatar {
    font-size: 14px;
}

.user-email {
    font-weight: 500;
}

.admin-tag {
    background: #0284c7;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* Dashboard Grid */
.dashboard-grid {
    max-width: 1300px;
    width: 100%;
    margin: 30px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    flex: 1;
}

@media (max-width: 950px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.column-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(34, 197, 94, 0.4);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.header-icon {
    width: 44px;
    height: 44px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.card-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
}

.card-header p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Tags & Lists */
.popular-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.pill-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.pill:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: var(--accent-green);
    color: #34d399;
}

.active-list-container {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 8px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tag-item {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-remove {
    cursor: pointer;
    opacity: 0.7;
    font-size: 14px;
}

.tag-remove:hover {
    opacity: 1;
    color: #f87171;
}

/* Forms */
.form-row {
    display: flex;
    gap: 10px;
}

.form-control {
    width: 100%;
    background: rgba(8, 22, 17, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.date-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}

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

.divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 20px 0;
}

.code-badge {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    color: #38bdf8;
    font-family: monospace;
}

.helper-text {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.btn-outline {
    background: transparent;
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.btn-outline:hover {
    background: rgba(16, 185, 129, 0.15);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* Auto-Hold Card */
.autohold-card {
    border-color: rgba(249, 115, 22, 0.3);
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.08) 0%, rgba(18, 42, 34, 0.7) 100%);
}

.autohold-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
    background: rgba(0, 0, 0, 0.25);
    padding: 12px;
    border-radius: var(--radius-md);
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 2px;
}

.highlight-green {
    color: #34d399;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #374151;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-orange);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Results */
.results-container {
    margin-top: 10px;
    max-height: 380px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 14px;
}

.empty-state span {
    font-size: 40px;
    display: block;
    margin-bottom: 8px;
}

.spot-result-card {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spot-title {
    font-weight: 700;
    color: #ffffff;
    font-size: 15px;
}

.spot-sub {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 2px;
}

.btn-book-direct {
    background: #10b981;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

/* Toast */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #1e293b;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 14px 20px;
    position: fixed;
    z-index: 100;
    bottom: 30px;
    right: 30px;
    font-size: 14px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

.toast.show {
    visibility: visible;
    animation: fadein 0.3s, fadeout 0.5s 3.5s;
}

@keyframes fadein { from { bottom: 0; opacity: 0; } to { bottom: 30px; opacity: 1; } }
@keyframes fadeout { from { bottom: 30px; opacity: 1; } to { bottom: 0; opacity: 0; } }

/* Authentication Overlay & Modal */
.btn-logout {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 8px;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.4);
    color: #ffffff;
}

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 15, 11, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    transition: opacity 0.3s ease;
}

.auth-card {
    background: rgba(13, 31, 24, 0.95);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 20px;
    padding: 36px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 40px rgba(16, 185, 129, 0.15);
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.auth-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}

.auth-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.auth-notice {
    display: inline-block;
    margin-top: 12px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
}

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

.auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 6px;
}

.auth-form input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: #ffffff;
    outline: none;
    transition: var(--transition);
}

.auth-form input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.auth-alert {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fde68a;
    font-size: 13px;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.auth-error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 13px;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 14px;
    display: none;
    line-height: 1.4;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    justify-content: center;
}

.auth-links {
    margin-top: 16px;
    text-align: center;
}

.auth-links a {
    color: #9ca3af;
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition);
}

.auth-links a:hover {
    color: var(--accent-green);
}
