@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    /* Color Palette - Midnight Professional */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-main: #0f172a;
    --bg-secondary: #1e293b;
    --bg-accent: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

html,
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-main);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    border-radius: var(--radius);
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.content {
    padding: 1.5rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive Containers */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (min-width: 768px) {
    .page {
        flex-direction: row;
    }

    main {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
}

#blazor-error-ui {
    background: var(--bg-secondary);
    color: var(--text-main);
    bottom: 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.5);
    display: none;
    left: 0;
    padding: 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-top: 1px solid var(--border-color);
}

/* Global Form & Input Styling */
.form-control,
.form-select,
input[type="date"],
input[type="datetime-local"] {
    background-color: var(--bg-accent) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    background-color: var(--bg-accent) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Premium Buttons */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    border: none;
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline-secondary:hover {
    background: var(--bg-accent);
    color: white;
}

/* Desktop spacing */
@media (min-width: 1200px) {
    .content {
        padding: 2rem 3rem;
    }
}

.glass-panel {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

/* Map Labels */
.map-label {
    background: var(--primary) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    padding: 2px 6px !important;
}

.map-label::before {
    border-top-color: var(--primary) !important;
}