:root {
    --mf-navy: #172554;
    --mf-blue: #2563eb;
    --mf-blue-dark: #1d4ed8;
    --mf-bg: #f6f8fc;
    --mf-text: #172033;
    --mf-muted: #64748b;
    --mf-border: #e2e8f0;
    --mf-radius: 1rem;
}

html { min-height: 100%; }
body {
    min-height: 100vh;
    margin: 0;
    background: var(--mf-bg);
    color: var(--mf-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding-bottom: env(safe-area-inset-bottom);
}

.app-header { background: rgba(23, 37, 84, .98); backdrop-filter: blur(10px); }
.navbar-brand { font-weight: 800; letter-spacing: -.02em; }
.brand-mark, .auth-logo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.25rem; height: 2.25rem; border-radius: .75rem;
    background: linear-gradient(135deg, #60a5fa, #ffffff); color: var(--mf-navy);
    font-size: .8rem; font-weight: 900; box-shadow: 0 10px 25px rgba(37,99,235,.2);
}
.auth-logo { width: 4rem; height: 4rem; border-radius: 1.25rem; font-size: 1.15rem; }
.app-main { padding-top: 1.5rem; padding-bottom: 6.5rem; }

.card { border-radius: var(--mf-radius); }
.btn { border-radius: .75rem; font-weight: 600; }
.form-control, .form-select { border-radius: .75rem; border-color: #d7deea; min-height: 2.8rem; }
.form-control:focus, .form-select:focus { border-color: #93c5fd; box-shadow: 0 0 0 .25rem rgba(37,99,235,.1); }
.btn-primary { background: var(--mf-blue); border-color: var(--mf-blue); }
.btn-primary:hover, .btn-primary:focus { background: var(--mf-blue-dark); border-color: var(--mf-blue-dark); }

.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 800; color: #4f6fbf; }
.text-white-75 { color: rgba(255,255,255,.78); }
.hero-panel {
    color: #fff; padding: 2rem; border-radius: 1.35rem;
    background: radial-gradient(circle at top right, rgba(96,165,250,.5), transparent 34%), linear-gradient(135deg, #172554, #1e40af);
    box-shadow: 0 18px 40px rgba(23,37,84,.18);
}
.auth-shell { min-height: calc(100vh - 8rem); display: grid; place-items: center; padding: 2rem 0; }
.auth-card { width: min(100%, 31rem); }

.badge-soft-primary { background: #e8f0ff; color: #1d4ed8; }
.badge-soft-success { background: #dcfce7; color: #166534; }
.badge-soft-dark { background: #eef2f7; color: #334155; }
.avatar {
    width: 2.7rem; height: 2.7rem; border-radius: .9rem; flex: 0 0 auto;
    display: grid; place-items: center; background: #e8f0ff; color: #1d4ed8; font-weight: 800;
}
.min-w-0 { min-width: 0; }
.opacity-60 { opacity: .6; }

.stat-card {
    height: 100%; min-height: 9.2rem; padding: 1.25rem; display: flex; flex-direction: column;
    justify-content: center; align-items: flex-start; background: #fff; color: var(--mf-text);
    border-radius: var(--mf-radius); box-shadow: 0 .125rem .25rem rgba(15,23,42,.075);
}
.stat-card strong { font-size: 2rem; line-height: 1.1; }
.stat-card small { color: var(--mf-muted); }
.stat-icon { font-size: 1.25rem; color: var(--mf-blue); margin-bottom: .5rem; }

.task-row {
    display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem;
    border: 1px solid var(--mf-border); border-left-width: 4px; border-radius: .85rem; background: #fff;
}
.priority-low { border-left-color: #94a3b8; }
.priority-normal { border-left-color: #3b82f6; }
.priority-high { border-left-color: #f59e0b; }
.priority-urgent { border-left-color: #dc2626; }
.task-card { transition: transform .15s ease, box-shadow .15s ease; }
.task-card:hover { transform: translateY(-1px); }

.location-icon {
    width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: .85rem;
    background: #e8f0ff; color: #1d4ed8; font-size: 1.25rem; font-weight: 800;
}
.location-map { width: 100%; height: 420px; border-radius: 1rem; overflow: hidden; border: 1px solid var(--mf-border); }
.empty-inline { padding: 1rem; border: 1px dashed #cbd5e1; color: var(--mf-muted); border-radius: .85rem; text-align: center; }
.nearby-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1rem; border-radius: .8rem; background: #f8fafc; border: 1px solid #e2e8f0; }

.mobile-bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: .15rem;
    padding: .5rem .5rem calc(.5rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97); border-top: 1px solid var(--mf-border); backdrop-filter: blur(12px);
}
.mobile-bottom-nav a { color: #64748b; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: 1.15rem; }
.mobile-bottom-nav small { font-size: .66rem; font-weight: 700; }
.mobile-bottom-nav .mobile-add span { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; background: var(--mf-blue); color: #fff; border-radius: 50%; margin-top: -.35rem; }

.toast { border-radius: .85rem; }
.leaflet-container { font-family: inherit; }

@media (max-width: 767.98px) {
    .app-main { padding-top: 1rem; padding-bottom: 6.5rem; }
    .hero-panel { padding: 1.5rem; border-radius: 1rem; }
    .hero-panel .display-6 { font-size: 1.8rem; }
    .location-map { height: 330px; }
    .task-row { align-items: flex-start; }
}

@media (min-width: 992px) {
    .app-main { padding-bottom: 3rem; }
}
