* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: #060b18;
    color: #dbe7ff;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.sidebar {
    border-right: 1px solid #1a2d56;
    background: #081025;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand h1 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: #8db7ff;
}

.sidebar-brand p {
    margin: 0;
    color: #9eb2da;
    font-size: 0.9rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-nav a {
    text-decoration: none;
    color: #c9dcff;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.sidebar-nav a:hover {
    background: #101f42;
    border-color: #1f3d76;
}

.sidebar-nav a.active {
    background: #17316b;
    border-color: #2c57ab;
    color: #eff5ff;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.content {
    padding: 20px;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.content-header h2 {
    margin: 0;
}

.content-header p {
    margin: 0;
    color: #acc4f5;
}

.logout-link {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #2c4f95;
    border-radius: 8px;
    text-decoration: none;
    color: #c8dbff;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.card {
    background: #0d152b;
    border: 1px solid #1a2d56;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.error {
    border-color: #b94747;
    color: #ffd9d9;
}

.success-box {
    border: 1px solid #2f8f5a;
    color: #d8ffe8;
    background: #10221a;
    border-radius: 8px;
    padding: 10px;
    margin-top: 12px;
}

h2 {
    margin-top: 0;
    color: #9dc0ff;
}

h3 {
    color: #9dc0ff;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #acc4f5;
    font-size: 0.92rem;
}

input,
select,
textarea,
button {
    border-radius: 8px;
    border: 1px solid #26478a;
    background: #091126;
    color: #e6efff;
    padding: 10px;
}

button {
    background: linear-gradient(180deg, #2f6fe4, #2458b5);
    border: none;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    filter: brightness(1.06);
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 10px;
}

th,
td {
    border-bottom: 1px solid #1c325f;
    padding: 10px;
    text-align: left;
    font-size: 0.9rem;
}

th {
    background: #102146;
    color: #8fb8ff;
}

code,
pre {
    background: #091126;
    border: 1px solid #274885;
    border-radius: 8px;
    padding: 8px;
}

a {
    color: #77a8ff;
}

.login-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
    text-align: center;
}

.stat-card h3 {
    margin: 0 0 6px;
}

.stat-number {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 700;
    color: #8db7ff;
}

.stat-subline {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: #9eb2da;
}

.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
}

.status-ok {
    color: #d8ffe8;
    background: #1b5f3d;
}

.status-warn {
    color: #fff2d8;
    background: #6b4c18;
}

.status-error {
    color: #ffd9d9;
    background: #712828;
}

.status-unknown {
    color: #d7e1f6;
    background: #384157;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #1a2d56;
    }
}
