:root {
    --app-primary: #0f4c81;
    --app-primary-dark: #0d3f6a;
    --app-accent: #2e7bbb;
    --app-bg-top: #edf5ff;
    --app-bg-mid: #f6f9fc;
    --app-bg-bottom: #fbfbfd;
    --app-border: #e3e8ef;
    --app-text-muted: #6b7280;
    --app-text-medium: #4b5563;
}

body {
    background: radial-gradient(circle at top right, var(--app-bg-top) 0, var(--app-bg-mid) 40%, var(--app-bg-bottom) 100%);
    color: #111827;
}

.app-navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 76, 129, 0.12);
}

.brand-text {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--app-primary-dark);
}

.app-navbar .navbar-toggler {
    border-color: rgba(15, 76, 129, 0.25);
}

.app-navbar .nav-link {
    font-weight: 600;
    color: var(--app-primary-dark);
    border-radius: 0.5rem;
    padding: 0.35rem 0.65rem;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
    background-color: rgba(46, 123, 187, 0.12);
    color: var(--app-primary-dark);
}

.app-navbar .nav-link.active {
    background-color: rgba(46, 123, 187, 0.18);
    color: var(--app-primary-dark);
}

.app-page {
    padding-top: 1.4rem;
    padding-bottom: 2rem;
}

body .charts {
    max-width: none;
}

.page-head h1 {
    margin-bottom: 0.3rem;
}

.home-hero {
    position: relative;
    background: linear-gradient(120deg, var(--app-primary) 0%, #16629f 45%, var(--app-accent) 100%);
    border-radius: 1rem;
    overflow: hidden;
    color: #fff;
}

.hero-glow {
    position: absolute;
    width: 24rem;
    height: 24rem;
    right: -6rem;
    top: -10rem;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0, rgba(255, 255, 255, 0) 70%);
}

.hero-content {
    position: relative;
    padding: 1.5rem;
}

.eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
}

.hero-stat {
    border-radius: 0.75rem;
}

.hero-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-right: 0.5rem;
    color: var(--app-primary);
}

.hero-stat-label {
    font-size: 0.9rem;
    color: #5d6472;
}

.installation-card,
.form-card,
.auth-card,
.map-card {
    border-radius: 1rem;
    background-color: #fff;
}

.installation-title {
    font-size: 1.35rem;
    margin: 0;
}

.data-panel {
    border: 1px solid var(--app-border);
    border-radius: 0.75rem;
    padding: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.panel-title {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
}

.chart-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.alert-shell {
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
}

.alert-impact {
    display: inline-block;
    padding: 0 6px;
    border-radius: 5px;
    font-weight: 700;
    color: #fff;
    font-family: monospace;
}

.app-table thead th {
    border-bottom: 1px solid var(--app-border);
    background-color: #f8fafc;
    color: #374151;
}

.app-table tbody tr td {
    border-color: var(--app-border);
}

.auth-shell {
    max-width: 560px;
    margin: 1rem auto 0;
}

.comment-link {
    text-decoration: none;
}

.comment-link:hover {
    text-decoration: underline;
}

.card.comment .card-body {
    background-color: #fff9df;
}

.card.comment {
    max-width: 100%;
}

.form-card .form-control,
.form-card .form-select,
.auth-card .form-control,
.auth-card .form-select,
textarea.form-control {
    border-color: #d2dae4;
}

.form-card .form-control:focus,
.form-card .form-select:focus,
.auth-card .form-control:focus,
.auth-card .form-select:focus,
textarea.form-control:focus {
    border-color: #7cb0df;
    box-shadow: 0 0 0 0.2rem rgba(46, 123, 187, 0.2);
}

.text-small {
    font-size: 0.875rem;
    color: var(--app-text-muted);
}

.text-medium {
    font-size: 1rem;
    color: var(--app-text-medium);
}

@media (max-width: 991.98px) {
    .hero-content {
        padding: 1.2rem;
    }

    .installation-title {
        font-size: 1.15rem;
    }

    .app-page {
        padding-top: 1rem;
    }
}
