/* -------------------------------------------------------------
   GLOBAL RESET & BASE
------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: #0f172a; /* slate-900 */
    color: #f1f5f9;      /* slate-100 */
}

a {
    color: #38bdf8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------
   LAYOUT WRAPPER
------------------------------------------------------------- */
.layout {
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* -------------------------------------------------------------
   SIDEBAR
------------------------------------------------------------- */
.sidebar {
    width: 240px;
    background: #1e293b; /* slate-800 */
    border-right: 1px solid #0f172a; /* darker */
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar .logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #38bdf8;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar nav a {
    padding: 10px 12px;
    border-radius: 8px;
    background: #334155; /* slate-700 */
    color: #e2e8f0;      /* slate-200 */
    font-size: 0.95rem;
}

.sidebar nav a.active,
.sidebar nav a:hover {
    background: #0ea5e9; /* sky-500 */
    color: #0f172a;
}

/* -------------------------------------------------------------
   MAIN AREA
------------------------------------------------------------- */
.main {
    flex: 1;
    overflow-y: auto;
    padding: 20px 28px;
}

/* -------------------------------------------------------------
   HEADER
------------------------------------------------------------- */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.main-header-title {
    font-size: 1.8rem;
    font-weight: 800;
}

.main-header-subtitle {
    font-size: 0.9rem;
    color: #94a3b8; /* slate-400 */
}

/* User info chips */
.chip {
    padding: 6px 12px;
    background: #334155;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #e2e8f0;
    margin-left: 6px;
    display: inline-block;
}

/* -------------------------------------------------------------
   CARDS
------------------------------------------------------------- */
.card {
    background: #1e293b; /* slate-800 */
    border: 1px solid #0f172a;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

/* -------------------------------------------------------------
   GRID HELPERS
------------------------------------------------------------- */
.grid {
    display: grid;
    gap: 16px;
}

/* -------------------------------------------------------------
   FORM ROWS & INPUTS
------------------------------------------------------------- */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.form-col {
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.85rem;
    color: #cbd5e1; /* slate-300 */
    margin-bottom: 4px;
}

input[type="number"],
input[type="text"],
input[type="range"],
select {
    padding: 8px 10px;
    border-radius: 8px;
    border: none;
    background: #334155;
    color: #f1f5f9;
    font-size: 0.95rem;
}

input[type="range"] {
    cursor: pointer;
}

/* -------------------------------------------------------------
   BUTTONS
------------------------------------------------------------- */
.btn {
    padding: 10px 14px;
    background: #0ea5e9; /* sky-500 */
    border-radius: 8px;
    color: #0f172a;
    cursor: pointer;
    border: none;
    font-weight: 600;
}

.btn:hover {
    background: #38bdf8;
}

/* -------------------------------------------------------------
   TABLES
------------------------------------------------------------- */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.table thead tr {
    background: #334155;
}

.table th {
    text-align: left;
    padding: 10px;
    color: #e2e8f0;
}

.table td {
    padding: 8px 10px;
    border-bottom: 1px solid #334155;
    color: #f1f5f9;
}

.table tr:hover {
    background: #0f172a;
}

/* -------------------------------------------------------------
   BADGES
------------------------------------------------------------- */
.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #0f172a;
    font-weight: 600;
}

.badge.green {
    background: #22c55e;
}

.badge.yellow {
    background: #eab308;
}

.badge.red {
    background: #ef4444;
}

/* -------------------------------------------------------------
   MAP CONTAINER
------------------------------------------------------------- */
#blueDegradedMap {
    border: 1px solid #475569;
    border-radius: 12px;
    background: #0f172a;
}

/* highlight pulse marker overlay (JS driven) */
.leaflet-interactive:focus {
    outline: 2px dashed #38bdf8;
}

/* -------------------------------------------------------------
   SCROLLBARS (nice neutral theme)
------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-thumb {
    background: #475569; /* slate-600 */
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b; /* slate-500 */
}

/* -------------------------------------------------------------
   RESPONSIVE
------------------------------------------------------------- */
@media (max-width: 920px) {
    .sidebar {
        display: none;
    }
    .main {
        padding: 16px;
    }
}

@media (max-width: 680px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
