:root {
    --lost-bg: #f8f9fa;
    --lost-surface: #ffffff;
    --lost-text: #212529;
    --lost-muted: #6c757d;
    --lost-primary: #31bae7;
    --lost-primary-hover: #1f9cc4;
    --lost-accent: #feb75c;
    --lost-danger: #dc3545;
    --lost-success: #28a745;
    --lost-warning: #ffc107;
    --lost-radius: 12px;
    --lost-shadow: 0 10px 25px rgba(33, 37, 41, 0.08);
}

body.lost-theme {
    background: var(--lost-bg);
    color: var(--lost-text);
    font-family: "Overpass", Arial, sans-serif;
}

body.lost-theme-admin {
    background:
        linear-gradient(rgba(17, 24, 39, 0.76), rgba(17, 24, 39, 0.76)),
        url("../img/lost-theme-hero.png") center top/cover fixed no-repeat;
}

h1, h2, h3, h4, h5, h6, .lost-heading {
    font-family: "Dosis", "Overpass", Arial, sans-serif;
    color: var(--lost-text);
}

.btn-lost {
    background-color: var(--lost-primary);
    border-color: var(--lost-primary);
    color: #fff;
    border-radius: var(--lost-radius);
    box-shadow: var(--lost-shadow);
    transition: all 0.2s ease;
}

.btn-lost:hover,
.btn-lost:focus {
    background-color: var(--lost-primary-hover);
    border-color: var(--lost-primary-hover);
    color: #fff;
}

.btn-lost-outline {
    background-color: transparent;
    border: 1px solid var(--lost-primary);
    color: var(--lost-primary);
    border-radius: var(--lost-radius);
}

.btn-lost-outline:hover,
.btn-lost-outline:focus {
    background-color: var(--lost-primary);
    color: #fff;
}

.card-lost {
    background: var(--lost-surface);
    border: 1px solid #e9ecef;
    border-radius: var(--lost-radius);
    box-shadow: var(--lost-shadow);
}

.form-control-lost {
    border: 1px solid #ced4da;
    border-radius: var(--lost-radius);
    padding: 0.65rem 0.8rem;
    color: var(--lost-text);
}

.form-control-lost:focus {
    border-color: var(--lost-primary);
    box-shadow: 0 0 0 0.2rem rgba(49, 186, 231, 0.25);
    outline: 0;
}

.badge-risk-low {
    background-color: #d1e7dd;
    color: #0f5132;
}

.badge-risk-moderate {
    background-color: #fff3cd;
    color: #664d03;
}

.badge-risk-high {
    background-color: #f8d7da;
    color: #842029;
}

.badge-risk-crisis {
    background-color: #842029;
    color: #fff;
}

.alert-crisis {
    border-left: 4px solid #842029;
    background: #f8d7da;
    color: #842029;
    border-radius: var(--lost-radius);
}

.alert-high {
    border-left: 4px solid var(--lost-danger);
    background: #fde2e4;
    color: #842029;
    border-radius: var(--lost-radius);
}

.table-lost {
    --bs-table-bg: var(--lost-surface);
    --bs-table-color: var(--lost-text);
    --bs-table-striped-bg: #f3f8fb;
    border-radius: var(--lost-radius);
    overflow: hidden;
}

.text-muted-lost {
    color: var(--lost-muted) !important;
}

.navbar-lost {
    background: rgba(21, 28, 39, 0.86);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-lost .navbar-brand,
.navbar-lost .nav-link,
.navbar-lost .text-muted-lost {
    color: #eef4ff !important;
}

.kpi-card {
    border: 0;
    background: linear-gradient(135deg, rgba(49, 186, 231, 0.22), rgba(255, 255, 255, 0.95));
}

.floating-chat-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1040;
    border-radius: 999px;
    padding: 0.7rem 1rem;
}

.floating-chat-panel {
    position: fixed;
    right: 18px;
    bottom: 76px;
    width: min(380px, calc(100vw - 36px));
    height: 520px;
    z-index: 1040;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: none;
    background: #fff;
}

.floating-chat-panel.open {
    display: block;
}

.floating-chat-header {
    padding: 0.65rem 0.9rem;
    color: #fff;
    background: linear-gradient(90deg, #31bae7, #1f9cc4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.floating-chat-frame {
    width: 100%;
    height: calc(100% - 44px);
    border: 0;
}
