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

html,
body,
html * {
    text-transform: uppercase !important;
}

body {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background-color: #f5f5f5;
    color: #333;
}

input::placeholder,
textarea::placeholder,
select::placeholder {
    text-transform: uppercase;
    opacity: 0.7;
}

/* ============================================================================
   GENERAL
   ============================================================================ */
.screen {
    display: none;
    width: 100%;
    min-height: 100vh;
}

.screen.active {
    display: flex;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-outline-primary,
.btn-outline-danger,
.btn-outline-light {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.error-message {
    color: #9b1c1c;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.25rem;
}

/* ============================================================================
   AUTH SCREEN
   ============================================================================ */
#authScreen {
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.auth-container {
    background: #ffffff;
    border: none;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 420px;
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    color: #111827;
}

.form-section {
    display: none;
}

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

.form-section h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #111827;
}

.form-section input {
    height: calc(2.5rem + 4px);
    border-radius: 12px;
}

.form-section input:focus {
    border-color: #6c757d;
    box-shadow: 0 0 0 0.15rem rgba(108, 117, 125, 0.2);
}

.form-section a {
    color: #343a40;
}

.form-section a:hover {
    text-decoration: underline;
}

/* ============================================================================
   DASHBOARD SCREEN & LAYOUT
   ============================================================================ */
#dashboardScreen {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
}

/* Polishing Leaflet controls to match the slick UI */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* Floating UI elements */
.menu-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.menu-toggle:active {
    transform: scale(0.95);
}

.active-group-pill {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.3);
}

.active-group-pill.clickable {
    cursor: pointer;
}

.active-group-pill .dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

/* Offcanvas Styling */
.offcanvas {
    width: 340px !important;
    border: none !important;
    box-shadow: 0 0 40px rgba(0,0,0,0.1) !important;
}

.offcanvas-header {
    padding: 2rem 1.5rem 1rem;
}

/* List group items within offcanvas */
.list-group-item {
    border: 1px solid #f0f0f0 !important;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 14px !important;
}

.list-group-item.active {
    background-color: #f8f9fa !important;
    border-color: #333 !important;
    color: #333 !important;
}

.x-small {
    font-size: 0.75rem;
}

.leaflet-tooltip.map-tooltip {
    background: rgba(255, 255, 255, 0.96);
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    padding: 0.35rem 0.65rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    font-size: 0.85rem;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
    .auth-container {
        margin: 16px;
    }
}

/* ============================================================================
   SCROLLBAR STYLING
   ============================================================================ */
.offcanvas-body::-webkit-scrollbar {
    width: 8px;
}

.offcanvas-body::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.offcanvas-body::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 999px;
}
