:root {
    --sidebar: #202a36;
    --sidebar-active: #3b82f6;
    --page-bg: #f5f7fb;
}

body {
    background: var(--page-bg);
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 248px;
    min-height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-bg {
    background: var(--sidebar);
}

.brand {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .2px;
}

.sidebar .nav-link,
.offcanvas .nav-link {
    color: rgba(255, 255, 255, .78);
    border-radius: 8px;
}

.sidebar .nav-link:hover,
.offcanvas .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.sidebar .nav-link.active,
.offcanvas .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
}

.content {
    flex: 1;
    padding: 28px;
    min-width: 0;
}

.stat-card {
    background: #fff;
    border-left: 4px solid #64748b;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.stat-card span {
    display: block;
    color: #64748b;
    font-size: .88rem;
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 2rem;
    line-height: 1;
}

.stat-card.danger {
    border-left-color: #dc3545;
}

.stat-card.warning {
    border-left-color: #f59f00;
}

.stat-card.success {
    border-left-color: #198754;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 420px);
    background: #fff;
    padding: 28px;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, .12);
}

.preset-select {
    width: 135px;
}

textarea {
    resize: vertical;
}

.history-pre {
    max-width: 360px;
    max-height: 170px;
    overflow: auto;
    white-space: pre-wrap;
    font-size: .78rem;
    margin: 0;
}

@media (max-width: 767.98px) {
    .app-shell {
        display: block;
    }

    .content {
        padding: 18px;
    }

    .table {
        font-size: .92rem;
    }
}
