/*
 * Sharper look on top of the AdminLTE/Bootstrap 3 theme: square corners, hairline borders instead
 * of soft shadows, stronger text contrast and tighter, more deliberate type. Loaded last.
 */
:root {
    --ink: #14202e;
    --ink-soft: #4a5868;
    --line: #d5dbe3;
    --surface: #ffffff;
    --canvas: #f3f5f8;
    --navy: #0f2740;
    --accent: #1565c0;
    --accent-dark: #0d4a94;
}

body,
.content-wrapper,
.main-footer {
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.content-wrapper {
    background: var(--canvas);
}

/* ---- Header ---- */
.skin-blue .main-header .logo,
.skin-blue .main-header .logo:hover,
.skin-blue .main-header .navbar {
    background: var(--navy);
}

.skin-blue .main-header .logo {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 21px;
    letter-spacing: 0.02em;
}

.skin-blue .main-header .logo b {
    font-weight: 700;
}

.skin-blue .main-header .navbar .sidebar-toggle:hover,
.skin-blue .main-header .navbar .nav > li > a:hover,
.skin-blue .main-header .navbar .nav .open > a {
    background: rgba(255, 255, 255, 0.1);
}

.main-header .navbar .user-image {
    border-radius: 2px;
}

/* ---- Sidebar ---- */
.main-sidebar {
    background: var(--surface) !important;
    border-right: 1px solid var(--line);
}

.sidebar .user-panel {
    border-bottom: 1px solid var(--line);
}

.sidebar .user-panel .img-circle,
.dropdown-menu .img-circle {
    border-radius: 2px;
}

.sidebar .user-panel > .info,
.sidebar .user-panel > .info > p {
    color: var(--ink);
}

.sidebar-menu > li.header {
    background: transparent !important;
    color: var(--ink-soft) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 14px 15px 6px;
}

.sidebar-menu > li > a {
    color: var(--ink) !important;
    font-weight: 600;
    border-left: 3px solid transparent;
    padding: 11px 5px 11px 12px;
}

.sidebar-menu > li > a:hover,
.sidebar-menu > li.active > a {
    background: var(--canvas) !important;
    border-left-color: var(--accent);
}

.sidebar-menu > li > .treeview-menu {
    background: var(--canvas) !important;
}

.sidebar-menu .treeview-menu > li > a {
    color: var(--ink-soft) !important;
}

.sidebar-menu .treeview-menu > li > a:hover,
.sidebar-menu .treeview-menu > li.active > a {
    color: var(--accent) !important;
}

.sidebar-menu .text-primary,
.sidebar-menu .text-info {
    color: var(--accent) !important;
}

/* ---- Page header ---- */
.content-header {
    padding: 18px 15px 4px;
}

.content-header > h1 {
    font-size: 22px;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.content-header > .breadcrumb {
    border-radius: 0;
    top: 18px;
}

.content-header > .breadcrumb > li > a,
.content-header > .breadcrumb > .active {
    color: var(--ink-soft);
}

/* ---- Boxes ---- */
.box {
    border: 1px solid var(--line);
    border-top: 3px solid var(--navy);
    border-radius: 0;
    box-shadow: none;
}

.box.box-info,
.box.box-primary,
.box.box-success,
.box.box-default {
    border-top-color: var(--navy);
}

.box-header.with-border {
    border-bottom: 1px solid var(--line);
}

.box-header .box-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.box-body h3 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.005em;
    margin-top: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}

label {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
}

/* ---- Tabs ---- */
.nav-tabs {
    border-bottom: 1px solid var(--line);
}

.nav-tabs > li > a {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin-right: 4px;
    color: var(--ink-soft);
    font-weight: 600;
}

.nav-tabs > li > a:hover,
.nav-tabs > li > a:focus {
    background: transparent;
    border-bottom-color: var(--line);
    color: var(--ink);
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    border: 0;
    border-bottom: 2px solid var(--accent);
    background: transparent;
    color: var(--accent);
}

/* ---- Controls ---- */
.btn,
.btn-app,
.form-control,
.select2-container--default .select2-selection--single,
.dropdown-menu,
.alert,
.callout,
.label,
.well,
.panel {
    border-radius: 0 !important;
}

.btn {
    box-shadow: none;
    font-weight: 600;
}

.btn-app {
    border: 1px solid transparent;
    font-weight: 400;
    margin: 0 0 10px 4px;
}

.btn-info,
.btn-primary,
.btn-app.bg-aqua,
.btn-app.bg-blue {
    background-color: var(--accent) !important;
    border-color: var(--accent-dark) !important;
    color: #fff !important;
}

.btn-info:hover,
.btn-primary:hover,
.btn-app.bg-aqua:hover {
    background-color: var(--accent-dark) !important;
}

.btn-success,
.btn-app.bg-green {
    background-color: #1b7f4b !important;
    border-color: #14633a !important;
    color: #fff !important;
}

.form-control {
    border-color: #b9c2ce;
    box-shadow: none;
    color: var(--ink);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

a:focus-visible,
.btn:focus-visible,
.form-control:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* ---- Range sliders ---- */
.irs-line,
.irs-line-left,
.irs-line-mid,
.irs-line-right {
    background: #dfe4ea;
    border: 0;
    border-radius: 0;
    height: 4px;
    top: 35px;
}

.irs-bar,
.irs-bar-edge {
    background: var(--accent);
    border: 0;
    border-radius: 0;
    height: 4px;
    top: 35px;
}

.irs-slider {
    top: 28px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: #fff;
    box-shadow: none;
}

.irs-slider:hover,
.irs-slider.state_hover {
    background: #e8f1fb;
}

.irs-from,
.irs-to,
.irs-single {
    background: var(--navy);
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
}

.irs-min,
.irs-max {
    background: transparent;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 600;
}

/* ---- Map ---- */
#map,
.leaflet-container {
    border: 1px solid var(--line);
}

.leaflet-bar,
.leaflet-control-layers {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: 1px solid rgba(0, 0, 0, 0.35) !important;
}

.leaflet-bar a,
.leaflet-bar a:first-child,
.leaflet-bar a:last-child {
    border-radius: 0 !important;
}

/* ---- Tables and footer ---- */
.table > thead > tr > th {
    border-bottom: 1px solid var(--ink);
    color: var(--ink);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.table > tbody > tr > td {
    border-top-color: var(--line);
}

.main-footer {
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 13px;
}

/* ---- Landing page ---- */
.landing .header {
    background-image: linear-gradient(rgba(10, 28, 48, 0.62), rgba(10, 28, 48, 0.78)), url(../img/bg.jpg);
    background-size: cover;
    background-position: center;
    padding: 56px 0 48px;
    color: #fff;
    -webkit-font-smoothing: antialiased;
}

.landing .header h1 {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}

.landing .header h2 {
    color: rgba(255, 255, 255, 0.85);
    font-size: 20px;
    font-weight: 400;
    margin: 0 0 8px;
}

.landing .header h3 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: left;
    margin: 18px 0 8px;
}

.landing hr.small {
    max-width: 48px;
    border-top: 2px solid #fff;
    margin: 22px auto;
}

.landing .portfolio-item {
    margin-bottom: 20px;
}

.landing .portfolio-item a {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

.landing .portfolio-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.25s ease-out;
}

.landing .portfolio-item a:hover,
.landing .portfolio-item a:focus-visible {
    border-color: #fff;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.landing .portfolio-item a:hover img {
    transform: scale(1.03);
}

.landing .landing-links a {
    display: inline-block;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.55);
    padding: 9px 18px;
    margin: 0 4px 8px;
    text-decoration: none;
}

.landing .landing-links a:hover,
.landing .landing-links a:focus {
    background: #fff;
    color: var(--navy);
}

.landing .citation {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 28px;
    padding-top: 16px;
    text-align: left;
}

.landing .citation h2 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.landing .citation p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
    max-width: 80ch;
}

.landing footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.8);
    padding: 28px 0;
    font-size: 14px;
}

.landing footer a {
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .landing .portfolio-item img {
        transition: none;
    }
}

/* ---- Refinements ---- */
.content-header > h1,
.content-header > h1 > b {
    font-weight: 700;
}

.nav-tabs > li > a {
    padding: 10px 12px;
    white-space: nowrap;
}

/* Measure panels: less dead space between sliders. */
.box-body .form-group > .pad {
    padding: 0 10px;
}

.box-body .form-group {
    margin-bottom: 10px;
}

.box-body h3 {
    margin-top: 22px;
}

/* Area picker row: radios, flood map and actions line up on one baseline. */
#tab_1-1 .row > [class*="col-md-"] > .pad {
    padding: 10px 10px 0;
}

#lblSelected {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    background: var(--canvas);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

#lblSelected:empty {
    display: none;
}

/* Text pages: calm panels in place of the solid cyan and green blocks, and a readable line length. */
.content .alert,
.content .well {
    background: var(--surface) !important;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    box-shadow: none;
    color: var(--ink) !important;
    padding: 16px 20px;
}

.content .alert-success {
    border-left-color: #1b7f4b;
}

.content .well {
    border-left-color: var(--ink-soft);
}

.content .alert h3,
.content .alert h4 {
    border-bottom: 0;
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    margin-top: 0;
}

.content .alert a,
.content .alert a:hover {
    color: var(--accent);
}

.content .alert hr {
    display: none;
}

.content .alert .close {
    display: none;
}

.content .alert p,
.content .alert li,
.content .well p,
.content .box-body > p,
.content .box-body > ul > li {
    max-width: 90ch;
    line-height: 1.6;
}

.info-box {
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
}

.info-box-icon {
    border-radius: 0;
}
