:root {
    /* Color Palette - Premium Dark */
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary: #22d3ee;
    --primary-glow: rgba(34, 211, 238, 0.3);
    --secondary: #818cf8;
    --accent: #f472b6;
    --text-main: #f1f5f9;
    --text-dim: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --error: #ef4444;
    --success: #10b981;
    
    /* Spacing & Radii */
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

.light-theme {
    --bg-dark: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --primary: #0891b2;
    --primary-glow: rgba(8, 145, 178, 0.15);
    --secondary: #4f46e5;
    --text-main: #1e293b;
    --text-dim: #64748b;
    --glass-border: rgba(15, 23, 42, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: radial-gradient(circle at top left, var(--bg-dark), #0f172a);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

.light-theme body {
    background: radial-gradient(circle at top left, #ffffff, #e2e8f0);
}

/* Glassmorphism Background Elements */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
}

@keyframes move {
    from { transform: translate(0, 0); }
    to { transform: translate(50px, 50px); }
}

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Typography */
h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; color: var(--primary); margin-bottom: 1.5rem; }

/* Components: Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

#well-list {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

@media (min-width: 1100px) {
    #well-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dim);
}

input, select, textarea {
    background: rgba(15, 23, 42, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-main);
    transition: all 0.2s;
}

.light-theme input, .light-theme select, .light-theme textarea {
    background: rgba(255, 255, 255, 0.9);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Buttons */
.btn {
    height: 42px;
    padding: 0 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.light-theme .btn {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.light-theme .btn:hover {
    background: #f8fafc;
    border-color: var(--primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #0f172a;
}

.light-theme .btn-primary {
    background: linear-gradient(135deg, #22d3ee, #818cf8);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Checklist Section */
.checklist-container {
    margin-top: 2rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.checklist-status {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-dim);
}

.checklist-status.ok {
    background: var(--success);
    border-color: var(--success);
}

/* Hidden elements */
.hidden { display: none !important; }

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.nav-links .btn-icon-only {
    width: 42px;
    padding: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
}

/* Map UI Styles */
.icon-btn {
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid var(--primary-glow);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    transition: all 0.2s;
    height: 42px;
    width: 42px;
    flex-shrink: 0;
}

.input-with-icon {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.input-with-icon input {
    flex: 1;
}

.icon-btn:hover {
    background: var(--primary);
    transform: scale(1.05);
}

.icon-btn:hover svg {
    stroke: #0f172a;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.leaflet-container {
    background: #0f172a;
}

.dash-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    cursor: zoom-in;
    transition: transform 0.2s;
}

.dash-img:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}
/* Responsive Updates */
.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex !important;
    }

    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    /* Navigation Mobile */
    nav {
        padding: 0.5rem 1rem;
    }

    .logo span {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 0;
        gap: 0;
        overflow: hidden;
        transition: all 0.3s ease;
        z-index: 99;
        border-bottom: 0 solid var(--glass-border);
        box-shadow: none;
    }

    .nav-links.active {
        height: auto;
        padding: 1rem;
        border-bottom-width: 1px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
    }

    .nav-links .btn {
        width: 100%;
        justify-content: flex-start;
        height: 50px;
        background: transparent;
        border-radius: 0;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links .btn:last-child {
        border-bottom: none;
    }

    .nav-links .btn-primary {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        margin: 0.5rem 0;
        border-radius: var(--radius-md);
        justify-content: center;
        border: none;
    }

    /* Dashboard Header */
    #dashboard-page > div {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    #search-well {
        width: 100% !important;
    }

    /* Form Adjustments */
    .form-grid {
        grid-template-columns: 1fr;
    }

    .glass-card {
        padding: 1.5rem;
    }

    /* Checklist Item */
    .checklist-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .checklist-item > div:last-child {
        width: 100%;
        justify-content: space-between;
    }

    /* Modals */
    .modal-content {
        width: 95% !important;
        padding: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0 1rem;
        font-size: 0.9rem;
    }
}

/* Floating Theme Button */
.theme-btn-fixed {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    background: var(--bg-card) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    color: var(--primary) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 !important;
}

.theme-btn-fixed:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--primary) !important;
    color: var(--bg-dark) !important;
    box-shadow: 0 0 20px var(--primary-glow);
}

.theme-btn-fixed svg {
    width: 100%;
    height: 100%;
    padding: 8px;
}

@media (max-width: 768px) {
    .theme-btn-fixed {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px !important;
        height: 48px !important;
    }
}
