/* SHAKERESPONSE GLOBAL STYLES & VARIABLES */
:root {
    --bg-page: #f7f8fa;
    --bg-card: #ffffff;
    --bg-widget: #ffffff;
    --border-glow: rgba(255, 107, 0, 0.35);
    --border-glass: #e2e5ea;
    --text-primary: #111827;
    --text-muted: #5b6472;
    
    /* Seismic faultline color tokens */
    --seismic-orange: #ff6b00;
    --seismic-gradient: linear-gradient(135deg, #ff6b00 0%, #ff8a00 100%);
    --seismic-glow: 0 0 20px rgba(255, 107, 0, 0.45);
    
    /* Status damage-state color tokens */
    --state-green: #10b981;
    --state-yellow: #f59e0b;
    --state-orange: #f97316;
    --state-red: #ef4444;
}

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

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 107, 0, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(15, 23, 42, 0.03) 0%, transparent 50%);
}

h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* HEADER & NAVIGATION */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
}

.logo-icon {
    color: var(--seismic-orange);
    filter: drop-shadow(0 0 8px rgba(255, 107, 0, 0.6));
    font-size: 1.6rem;
}

.logo .highlight {
    background: var(--seismic-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--seismic-gradient);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link.active::after, .nav-link:hover::after {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* BUTTONS */
.btn {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--seismic-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 4px 25px rgba(255, 107, 0, 0.45);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(17, 24, 39, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(17, 24, 39, 0.08);
    transform: translateY(-2px);
}

.btn-nav {
    background: linear-gradient(135deg, rgba(255,107,0,0.1) 0%, rgba(255,138,0,0.2) 100%);
    border: 1px solid rgba(255, 107, 0, 0.3);
    color: var(--text-primary);
}

.btn-nav:hover {
    background: var(--seismic-gradient);
    border-color: transparent;
}

.btn-block {
    width: 100%;
    padding: 0.8rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.alerts-active {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #10b981 !important;
}

.current-tier {
    border-color: var(--seismic-orange) !important;
    box-shadow: 0 0 0 1px var(--seismic-orange), var(--seismic-glow) !important;
}

/* MAIN LAYOUT */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 7.5rem 2rem 3rem 2rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.tab-content.active-tab {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* GLASSMORPHISM CARD WIDGETS */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

/* SECTION 1: HERO VIEW */
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
    min-height: calc(100vh - 12rem);
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #111827 60%, #4b5563 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 3.5rem;
}

.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.25);
    border-radius: 100px;
    color: #c2410c;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--seismic-orange);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--seismic-orange);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-lbl {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* RECENT-QUAKES MAP CARD (landing hero) — deliberately kept as a dark panel;
   the outline and dots (quake-map.js) are light/orange and lose contrast on white. */
.quake-map-box {
    background: rgba(13, 18, 30, 0.92);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--seismic-glow);
    overflow: hidden;
}

.quake-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.status-indicator.live {
    width: 8px;
    height: 8px;
    background-color: var(--seismic-orange);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px var(--seismic-orange);
    animation: flash 1.2s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.quake-map-header .title {
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#quake-map {
    width: 100%;
    background-color: rgba(5, 7, 12, 0.9);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quake-map-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 1.25rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.footer-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-stat .label {
    color: rgba(255, 255, 255, 0.5);
}

.footer-stat .val {
    font-weight: 700;
    color: #ffffff;
}

.status-green { color: var(--state-green); }

/* SECTION 2: PRICING SYSTEM */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.section-header h2 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 107, 0, 0.3);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}

.pricing-card.premium {
    background: radial-gradient(circle at 100% 0%, rgba(255, 107, 0, 0.1) 0%, transparent 40%), var(--bg-card);
    border: 1px solid var(--seismic-orange);
    box-shadow: 0 8px 32px rgba(255, 107, 0, 0.08);
}

.pricing-card.premium:hover {
    box-shadow: 0 12px 40px rgba(255, 107, 0, 0.2);
}

.ribbon {
    position: absolute;
    top: 18px;
    right: -32px;
    background: var(--seismic-gradient);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 2.5rem;
    transform: rotate(45deg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-header h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    margin: 1.5rem 0;
}

.price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.features li.disabled {
    color: rgba(17, 24, 39, 0.3);
}

.text-orange {
    color: var(--seismic-orange);
}

.pricing-action {
    width: 100%;
}

/* SECTION 3: AUTH BOX */
.auth-box {
    max-width: 480px;
    margin: 4rem auto;
    padding: 2.5rem;
}

.auth-tabs {
    display: flex;
    background: rgba(17, 24, 39, 0.04);
    border-radius: 8px;
    padding: 0.25rem;
    margin-bottom: 2.5rem;
}

.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab-btn.active {
    background: var(--seismic-gradient);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.2);
}

.auth-form {
    display: none;
}

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

.auth-form h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.form-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.form-hint {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-tier-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: rgba(255, 107, 0, 0.06);
    border: 1px solid rgba(255, 107, 0, 0.15);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.form-tier-note a {
    color: var(--seismic-orange);
    text-decoration: none;
    font-weight: 600;
}

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

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

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group input, .input-group select, .input-group textarea {
    background: rgba(17, 24, 39, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    outline: none;
    border-color: var(--seismic-orange);
    box-shadow: 0 0 8px rgba(255, 107, 0, 0.25);
}

.input-group textarea {
    resize: vertical;
    min-height: 8rem;
    line-height: 1.5;
}

/* Contact page */
.contact-box {
    max-width: 640px;
}

.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #b91c1c;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.form-success {
    text-align: center;
}

.form-success i {
    font-size: 3rem;
    color: var(--state-green);
    margin-bottom: 1rem;
}

.form-success:focus {
    outline: none;
}

.field-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: -0.75rem 0 1.25rem;
}

.advanced-fragility-section {
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
}

.advanced-fragility-section summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--seismic-orange);
}

.advanced-fragility-section[open] summary {
    margin-bottom: 0.9rem;
}

.curve-row-grid {
    display: grid;
    grid-template-columns: 90px 1fr 1fr;
    gap: 0.5rem 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.curve-row-grid span {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.curve-row-grid label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.curve-row-grid input {
    background: rgba(17, 24, 39, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin: 0.5rem 0 1rem;
}

/* Consent links must read as links (clickwrap) */
.checkbox-row a {
    color: var(--text-primary);
    text-decoration: underline;
    font-weight: 600;
}

/* SECTION 4: DASHBOARD LAYOUT */
.dashboard-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.75rem;
    align-items: start;
}

.dashboard-sidebar, .dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.widget {
    padding: 1.5rem;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.75rem;
}

.widget-header h3 {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Profile Widget */
.profile-widget {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 107, 0, 0.15);
    border: 1px solid rgba(255, 107, 0, 0.3);
    color: var(--seismic-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.profile-header h4 {
    font-size: 1.05rem;
}

.badge-tier {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--seismic-orange);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quota-meter-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quota-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.quota-bar {
    height: 6px;
    background: rgba(17, 24, 39, 0.05);
    border-radius: 100px;
    overflow: hidden;
}

.quota-progress {
    height: 100%;
    background: var(--seismic-gradient);
    border-radius: 100px;
    transition: width 0.4s ease;
}

/* User Badge in Header */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.75rem;
    background: rgba(17, 24, 39, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    font-size: 0.85rem;
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s;
    padding: 0 0.25rem;
}

.btn-logout:hover {
    color: var(--state-red);
}

/* Properties List Panel */
.btn-icon-plus {
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.3);
    color: var(--seismic-orange);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-plus:hover {
    background: var(--seismic-orange);
    color: white;
}

.properties-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.properties-container::-webkit-scrollbar {
    width: 6px;
}

.properties-container::-webkit-scrollbar-thumb {
    background: rgba(17, 24, 39, 0.15);
    border-radius: 10px;
}

/* Recent Events (live USGS feed, M3.0+, sidebar) */
.recent-events-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.recent-event-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    background: rgba(17, 24, 39, 0.04);
    font-size: 0.78rem;
    text-decoration: none;
    color: var(--text-primary);
}

.recent-event-row:hover { border-color: rgba(255, 107, 0, 0.25); }

.recent-event-mag {
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.recent-event-mag.m3 { background: rgba(245, 158, 11, 0.15); color: var(--state-yellow); }
.recent-event-mag.m5 { background: rgba(249, 115, 22, 0.15); color: var(--state-orange); }
.recent-event-mag.m6 { background: rgba(239, 68, 68, 0.15); color: var(--state-red); }

.recent-event-info { flex: 1; min-width: 0; }
.recent-event-place {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recent-event-time { color: var(--text-muted); font-size: 0.7rem; }

.property-card {
    background: rgba(17, 24, 39, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.property-card:hover {
    border-color: rgba(255, 107, 0, 0.25);
    background: rgba(17, 24, 39, 0.05);
}

.property-card.active-prop {
    border-color: var(--seismic-orange);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.15);
}

.prop-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.prop-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.damage-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.damage-badge.green { background: rgba(16, 185, 129, 0.15); color: var(--state-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.damage-badge.yellow { background: rgba(245, 158, 11, 0.15); color: var(--state-yellow); border: 1px solid rgba(245, 158, 11, 0.3); }
.damage-badge.orange { background: rgba(249, 115, 22, 0.15); color: var(--state-orange); border: 1px solid rgba(249, 115, 22, 0.3); }
.damage-badge.red { background: rgba(239, 68, 68, 0.15); color: var(--state-red); border: 1px solid rgba(239, 68, 68, 0.3); }

.prop-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Damage assessment method badge — which path (MMI vs fragility curve) is active for a facility */
.method-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.35rem;
}

.method-badge.mmi-trigger {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
}

.method-badge.fragility-curve {
    background: rgba(255, 107, 0, 0.12);
    color: var(--seismic-orange);
    border: 1px solid rgba(255, 107, 0, 0.3);
}

/* Alert History — Real vs. Test event indicator */
.alert-type-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.alert-type-badge.real {
    background: rgba(239, 68, 68, 0.12);
    color: var(--state-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-type-badge.test {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
}

.btn-delete-prop, .btn-edit-prop, .btn-ack-prop {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: rgba(17, 24, 39, 0.3);
    cursor: pointer;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.btn-delete-prop:hover, .btn-edit-prop:hover { color: var(--state-red); }
.btn-ack-prop:hover { color: var(--state-green, #10b981); }

.btn-edit-prop { right: 32px; }
.btn-ack-prop  { right: 56px; }

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.empty-state i {
    font-size: 2.25rem;
    color: rgba(17, 24, 39, 0.15);
}

/* Interactive Map Panel */
.map-widget {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.coordinate-marker-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.map-container-box {
    position: relative;
    height: 380px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
}

.intensity-overlay-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .7rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    font-size: .78rem;
    color: var(--text-primary);
    backdrop-filter: blur(6px);
}
.intensity-overlay-badge button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.intensity-overlay-badge button:hover { color: var(--text-primary); }

#leaflet-map {
    height: 100%;
    width: 100%;
    background-color: #eef0f2;
}

.leaflet-container {
    background: #eef0f2 !important;
}

.leaflet-bar a {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-glass) !important;
}

.leaflet-bar a:hover {
    background-color: rgba(255, 107, 0, 0.25) !important;
}

/* Simulator Panel */
.simulator-widget {
    background: radial-gradient(circle at 100% 100%, rgba(255, 107, 0, 0.05) 0%, transparent 40%), var(--bg-card);
}

.sim-alerts-btn {
    width: 100%;
    margin-bottom: 1rem;
}

.sim-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.badge-status-siren {
    padding: 0.25rem 0.6rem;
    background: rgba(255, 107, 0, 0.1);
    color: var(--seismic-orange);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.simulator-controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.simulator-controls label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.simulator-controls select, .simulator-controls input[type="range"] {
    background: rgba(17, 24, 39, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    color: var(--text-primary);
    width: 100%;
}

.simulator-controls input[type="range"] {
    padding: 0.25rem 0;
    accent-color: var(--seismic-orange);
}

/* ENTERPRISE UPLOAD COMPONENT */
.enterprise-section {
    margin-bottom: 1.25rem;
}

.upload-area {
    border: 2px dashed rgba(255, 107, 0, 0.3);
    border-radius: 10px;
    padding: 1rem 0.75rem;
    text-align: center;
    background: rgba(255, 107, 0, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--seismic-orange);
    background: rgba(255, 107, 0, 0.07);
}

.upload-icon {
    font-size: 1.5rem;
    color: var(--seismic-orange);
}

.upload-area p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* NOTIFICATION TOAST ALERT SKELETON (NOTIFEE DND EMERGENCY MOCKUP) */
.notification-container {
    position: fixed;
    top: 5rem;
    right: 2rem;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 420px;
    width: 100%;
}

.toast {
    background: #ffffff;
    border: 1px solid var(--border-glass);
    border-left: 5px solid var(--seismic-orange);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
    animation: slideIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    position: relative;
}

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.toast-red { border-left-color: var(--state-red); box-shadow: 0 0 15px rgba(239, 68, 68, 0.2); }
.toast.toast-orange { border-left-color: var(--state-orange); }
.toast.toast-yellow { border-left-color: var(--state-yellow); }
.toast.toast-green { border-left-color: var(--state-green); }

.toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

.toast-body {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* MODAL DESIGN */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 7, 12, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    max-width: 580px;
    width: 90%;
    max-height: 90vh;
    padding: 2.25rem;
    border: 1px solid var(--border-glass);
    box-shadow: 0 15px 45px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.75rem;
    flex-shrink: 0;
}

.modal > form {
    overflow-y: auto;
    min-height: 0;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
}

.btn-close-modal:hover {
    color: var(--text-primary);
}

.input-row {
    margin-bottom: 1.25rem;
}

.input-row.split-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-row.split-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    padding-bottom: 0.25rem;
    border-top: 1px solid var(--border-glass);
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
}

/* RESPONSIVE MEDIA QUERIES */
@media(max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
        margin-top: 2rem;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
    }
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 768px) {
    .header {
        padding: 1rem;
    }
    .nav {
        gap: 0.75rem;
    }
    .btn-nav {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .input-row.split-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ── M5: Alert History Panel ─────────────────────────────────────────────── */

.history-upgrade {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
}
.history-upgrade i { font-size: 2rem; color: var(--seismic-orange); opacity: .6; }
.history-upgrade p { margin: 0; font-size: .9rem; }

#history-table-wrap { overflow-x: auto; }

.history-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: .82rem;
}
.history-table th {
    text-align: left;
    padding: .45rem .7rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid var(--border-glass);
}
.history-table td {
    padding: .45rem .7rem;
    border-bottom: 1px solid rgba(17,24,39,.06);
    vertical-align: middle;
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: rgba(17,24,39,.03); }
.history-row-clickable { cursor: pointer; }
.mono { font-family: 'Courier New', monospace; font-size: .8rem; }
.history-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: .85rem;
    padding: 1.5rem 0;
    margin: 0;
}


