:root {
    --bg-main: #0b1020;
    --bg-elev: #11172a;
    --bg-panel: #151d34;
    --text-main: #f4f7ff;
    --text-muted: #a3acc4;
    --primary: #46b3ff;
    --primary-2: #50e3c2;
    --border-soft: rgba(255, 255, 255, 0.08);
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: "Segoe UI", "Trebuchet MS", Tahoma, sans-serif;
    position: relative;
}

.site-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(70, 179, 255, 0.20), transparent 38%),
        radial-gradient(circle at 88% 8%, rgba(80, 227, 194, 0.16), transparent 36%),
        linear-gradient(180deg, #090d1a 0%, #0b1020 65%, #0a0f1d 100%);
    z-index: -1;
}

.site-header {
    background: rgba(12, 17, 33, 0.82);
    backdrop-filter: blur(8px);
}

.brand-ant {
    height: 70px;
    width: auto;
    display: inline-block;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-text {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.05;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: "Cinzel", "Times New Roman", serif;
    letter-spacing: 0.01em;
}

.brand-title {
    font-family: "Cinzel", "Times New Roman", serif;
    font-size: 1.55rem;
    letter-spacing: 0.02em;
    color: #f2f6ff;
    text-shadow: 0 2px 12px rgba(70, 179, 255, 0.2);
}

.brand-tagline {
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #9fbbdd;
    letter-spacing: 0.03em;
}

.nav-link {
    border-radius: 10px;
    padding: 0.5rem 0.8rem !important;
    color: #c6cee4 !important;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
}

.page-hero {
    padding: 1.1rem 1.25rem;
    border-radius: 14px;
    background: linear-gradient(140deg, rgba(70, 179, 255, 0.14), rgba(80, 227, 194, 0.06));
    border: 1px solid var(--border-soft);
}

.eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8ebbe6;
}

.panel {
    background: rgba(17, 24, 43, 0.92);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 1rem;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: #e9eeff;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
    --bs-table-border-color: rgba(255, 255, 255, 0.08);
}

.table thead th {
    color: #9db0d1;
    font-weight: 600;
}

.message-cell {
    min-width: 320px;
    white-space: pre-wrap;
}

.footer-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: rgba(17, 24, 43, 0.85);
}

.form-control,
.form-select {
    background-color: #0f1528;
    border-color: rgba(255, 255, 255, 0.12);
    color: #eef3ff;
}

.form-control:focus,
.form-select:focus {
    color: #fff;
    border-color: rgba(70, 179, 255, 0.7);
    box-shadow: 0 0 0 0.2rem rgba(70, 179, 255, 0.2);
    background-color: #10172c;
}

.btn-primary {
    background: linear-gradient(135deg, #1f8bdb, #27b49a);
    border: none;
}

.btn-primary:hover {
    filter: brightness(1.06);
}

code {
    color: #8ed8ff;
}

.home-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem;
}

.live-info-card {
    min-height: 360px;
}

.live-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.live-kpi-item {
    background: rgba(8, 17, 35, 0.45);
    border: 1px solid rgba(142, 216, 255, 0.18);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
}

.live-kpi-label {
    display: block;
    font-size: 0.72rem;
    color: #9bb2d1;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.live-kpi-value {
    display: block;
    color: #f2f7ff;
    font-size: 1.02rem;
}

.flash-feed {
    background: rgba(6, 13, 27, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    padding: 0.75rem;
    max-height: 260px;
    overflow-y: auto;
}

.flash-item + .flash-item {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.14);
}

.flash-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.flash-title {
    color: #e9f2ff;
}

.flash-content {
    margin-top: 0.35rem;
    margin-bottom: 0;
    color: #cad7ee;
}

.flash-date {
    color: #8fa6c8;
}

.flash-empty {
    color: #93a8c9;
}

.home-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    overflow: hidden;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0;
}

.home-image {
    width: min(100%, 560px);
    max-height: 340px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    border: none;
    box-shadow: none;
}

.story-section {
    line-height: 1.7;
}

.story-section p,
.story-section li {
    color: #d0d8ec;
}

.story-section ul {
    margin-bottom: 1rem;
}

.story-section li {
    margin-bottom: 0.45rem;
}

@media (max-width: 992px) {
    .home-grid {
        grid-template-columns: 1fr;
    }

    .live-kpi-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .brand-ant {
        height: 56px;
    }

    .brand-title {
        font-size: 1.28rem;
    }

    .brand-tagline {
        font-size: 0.68rem;
    }
}
