:root {
  --blue-dark: #092e5f;
  --blue-primary: #12519e;
  --blue-light: #308ce3;
  --bg-primary: #f8fafc;
  --text-main: #0f172a;
  --teal: #0d9488;
  --coral: #f43f5e;
  --glass: rgba(255, 255, 255, 0.7);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary) !important;
    color: var(--text-main);
}

/* Header/Navbar fix for visibility */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
}
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff !important;
    font-weight: 700;
}
.navbar-brand {
    color: #fff !important;
    font-family: 'Outfit', sans-serif;
}
.navbar-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    background-color: white; /* Makes white-bg logo blend as a badge */
    padding: 3px 8px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.login-logo {
    height: 140px;
    width: auto;
    margin-bottom: 2rem;
    background-color: white;
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Mobile App Refinements */
@media (max-width: 991px) {
    html, body {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        overscroll-behavior-y: contain; /* Prevents pull-to-refresh on browsers */
    }
    
    .btn {
        padding: 12px 20px; /* Larger tap targets */
    }
    
    .navbar-logo {
        height: 32px;
    }
}

#pwa-install-banner {
    transition: transform 0.3s ease-in-out;
}

.x-small { font-size: 0.65rem; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }

h1, h2, h3, h4, h5, h6, .outfit {
    font-family: 'Outfit', sans-serif;
}

.text-main { color: var(--text-main); }
.text-teal { color: var(--teal); }
.text-coral { color: var(--coral); }

/* Glassmorphism Card */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

/* Map Style */
#marine-map {
    height: 400px;
    border-radius: 20px;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Weather Widget */
.weather-card {
    background: linear-gradient(135deg, #092e5f 0%, #12519e 100%);
    color: white;
    border-radius: 20px;
    padding: 2rem;
}

.weather-stat-icon {
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

/* Sidebar Simulation for Dashboard */
.dashboard-sidebar {
    background: #0f172a;
    color: #94a3b8;
    border-radius: 20px;
    padding: 1.5rem;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-link-custom:hover, .nav-link-custom.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Premium Input Styling */
.form-control, .form-select {
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: all 0.2s;
}

.form-control:focus {
    box-shadow: 0 0 0 4px rgba(48, 140, 227, 0.1);
    border-color: var(--blue-light);
}

.bg-gradient-blue {
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-light) 100%);
}

/* AI Scanner UI (Light Mode) */
.scanner-container {
    background: white;
    border-radius: 30px;
    padding: 3rem;
    color: var(--blue-dark);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(48, 140, 227, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
}

.scanner-lens {
    width: 100%;
    aspect-ratio: 16/9;
    background: #f8fafc;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 2px dashed rgba(48, 140, 227, 0.2);
}

.scanner-laser {
    position: absolute;
    width: 100%;
    height: 4px;
    background: var(--blue-primary);
    box-shadow: 0 0 15px var(--blue-primary);
    top: -100%;
    left: 0;
    z-index: 10;
    display: none;
}

.scanning .scanner-laser {
    display: block;
    animation: scanLine 2s infinite ease-in-out;
}

@keyframes scanLine {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

.ai-badge {
    background: rgba(48, 140, 227, 0.08);
    color: var(--blue-primary);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-card-ai {
    background: #f1f5f9;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.pulse-ai {
    animation: pulseAI 2s infinite;
}

@keyframes pulseAI {
    0% { box-shadow: 0 0 0 0 rgba(48, 140, 227, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(48, 140, 227, 0); }
    100% { box-shadow: 0 0 0 0 rgba(48, 140, 227, 0); }
}

/* Mobile Responsiveness Overhaul */
@media (max-width: 991.98px) {
    .container { padding-left: 1.5rem; padding-right: 1.5rem; }
    .scanner-container { padding: 1.5rem; border-radius: 20px; }
    .scanner-lens { aspect-ratio: 4/3; }
    
    h2, .h2 { font-size: 1.5rem !important; }
    h3, .h3 { font-size: 1.25rem !important; }
    
    .section-card { margin-bottom: 2rem; }
    .sticky-top-form { position: static !important; margin-bottom: 2rem; }
}

@media (max-width: 767.98px) {
    .header-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; }
    .stat-card { padding: 1rem !important; }
    .btn-step-next, .btn-step-prev { width: 48%; padding: 0.75rem !important; font-size: 0.85rem; }
    
    #map { height: 300px !important; }
    
    .form-nav-link { 
        font-size: 0.8rem; 
        padding: 0.5rem 1rem; 
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 50px;
        margin-bottom: 0.5rem;
    }
    
    #form-steps-nav { 
        flex-direction: row !important; 
        overflow-x: auto; 
        padding-bottom: 0.5rem;
        white-space: nowrap;
        gap: 0.5rem;
    }
}

/* Mobile specific touch targets */
button, .nav-link, .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.font-outfit { font-family: 'Outfit', sans-serif !important; }

/* Global Print Settings */
@media print {
    .no-print, .navbar, .btn, .breadcrumb, .footer { display: none !important; }
    body { background: white !important; font-size: 12pt; }
    .card { border: none !important; box-shadow: none !important; }
    .container { max-width: 100% !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
}


/* Pulse Markers for Map */
.pulse-marker-danger {
    width: 15px;
    height: 15px;
    background: var(--coral);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 rgba(244, 63, 94, 0.4);
    animation: pulseMarkerDanger 2s infinite;
}
@keyframes pulseMarkerDanger {
    0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.pulse-marker-blue {
    width: 15px;
    height: 15px;
    background: var(--blue-primary);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 rgba(18, 81, 158, 0.4);
    animation: pulseMarkerBlue 2s infinite;
}
@keyframes pulseMarkerBlue {
    0% { box-shadow: 0 0 0 0 rgba(18, 81, 158, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(18, 81, 158, 0); }
    100% { box-shadow: 0 0 0 0 rgba(18, 81, 158, 0); }
}

.custom-marker {
    background: transparent;
    border: none;
}
