@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg: #f3f4f6;
    --card: #ffffff;
    --line: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --primary: #dc2626;
}

body {
    margin: 0;
    background:
        linear-gradient(rgba(243, 244, 246, 0.55), rgba(243, 244, 246, 0.55)),
        url('../images/663910607_977507174700059_2109660712684329952_n.webp') center / cover no-repeat;
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-y: auto;
}

.evac-page {
    padding: 84px 12px 36px;
    display: flex;
    justify-content: center;
}

.evac-container {
    width: 100%;
    max-width: 1120px;
    display: grid;
    gap: 12px;
}

.evac-header {
    background: linear-gradient(180deg, #ef4444, #dc2626);
    border-radius: 12px;
    color: #fff;
    padding: 14px;
}

.evac-header h1 {
    margin: 0 0 4px;
    font-size: 24px;
}

.evac-header p {
    margin: 0;
    opacity: .95;
    font-size: 14px;
}

.evac-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
}

.evac-card h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.evac-steps {
    border-left: 5px solid var(--primary);
}

.step-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 6px;
    font-size: 14px;
    line-height: 1.35;
}

.guide-status {
    margin: 10px 0 0;
    padding: 9px 10px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 600;
}

label {
    display: grid;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    min-height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #9ca3af;
}

.map-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.capacity-summary {
    margin-top: 10px;
    display: grid;
    gap: 6px;
    font-size: 14px;
}

.map-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

button {
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

button.secondary {
    background: #e5e7eb;
    color: #111827;
}

.route-link {
    display: inline-block;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: #111827;
    background: #fff;
}

.map-hint {
    margin: 8px 0;
    font-size: 12px;
    color: var(--muted);
}

.map-frame {
    width: 100%;
    min-height: 260px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

@media (min-width: 900px) {
    .map-frame {
        min-height: 320px;
    }
}

.map-frame .leaflet-control-attribution {
    font-size: 10px;
}

.alternatives {
    display: grid;
    gap: 8px;
}

.alt-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.alt-item p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.alt-item a {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: #111827;
    background: #fff;
}

.empty {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.guide-grid article {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
}

.guide-grid h3 {
    margin: 0 0 6px;
    font-size: 14px;
}

.guide-grid ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 760px) {
    .evac-page { padding-top: 76px; }
    .map-controls,
    .guide-grid {
        grid-template-columns: 1fr;
    }
}

.reporter-evacuation-v5 .evac-header {
    border-radius: 22px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background:
        radial-gradient(circle at 15% -20%, rgba(255, 255, 255, 0.18), transparent 42%),
        linear-gradient(145deg, #cf1f3d 0%, #af1732 56%, #821527 100%);
    box-shadow: 0 20px 40px rgba(120, 17, 36, 0.28);
}

.reporter-evacuation-v5 .evac-header h1 {
    font-size: clamp(34px, 3vw, 44px);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.reporter-evacuation-v5 .evac-header p {
    font-size: 14px;
    max-width: 56ch;
}

.reporter-evacuation-v5 .evac-card {
    border-color: #dbe2ea;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.reporter-evacuation-v5 .guide-grid article,
.reporter-evacuation-v5 .alt-item,
.reporter-evacuation-v5 .capacity-summary {
    border-color: #dbe2ea;
}

.reporter-evacuation-v5 .route-link,
.reporter-evacuation-v5 button.secondary {
    border-color: #cbd5e1;
    border-radius: 10px;
}

@media (max-width: 760px) {
    .reporter-evacuation-v5 .evac-header {
        border-radius: 18px;
        padding: 18px;
    }

    .reporter-evacuation-v5 .evac-header h1 {
        font-size: 31px;
    }
}

/* Nearest Centers Grid */
.nearest-centers {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.center-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    background: #fafbfc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.center-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.12);
    transform: translateY(-2px);
}

.center-card-1 {
    border-left: 4px solid #dc2626;
}

.center-card-2 {
    border-left: 4px solid #f59e0b;
}

.center-card-3 {
    border-left: 4px solid #10b981;
}

.center-card-header {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.center-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.center-card-1 .center-rank {
    background: #dc2626;
}

.center-card-2 .center-rank {
    background: #f59e0b;
}

.center-card-3 .center-rank {
    background: #10b981;
}

.center-card-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    line-height: 1.3;
}

.center-info {
    display: grid;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-row span {
    color: var(--muted);
    font-weight: 500;
}

.info-row strong {
    font-weight: 600;
    color: var(--text);
}

.info-row strong.success {
    color: #10b981;
}

.info-row strong.danger {
    color: #dc2626;
}

.center-actions {
    display: flex;
    gap: 6px;
}

.center-actions .route-link {
    flex: 1;
    text-align: center;
    padding: 6px 8px;
    font-size: 12px;
    border-color: var(--line);
}

.center-actions .route-link:hover {
    background: #f3f4f6;
    border-color: var(--primary);
}

.reporter-evacuation-v5 .center-card {
    border-color: #dbe2ea;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

.reporter-evacuation-v5 .center-card:hover {
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.15);
}

@media (max-width: 760px) {
    .nearest-centers {
        grid-template-columns: 1fr;
    }
}
