*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    background-color: #0f172a;
    color: #e2e8f0;
    font-family: 'Roboto', sans-serif;
}

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

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar {
    width: 56px;
    background: #1e293b;
    border-right: 1px solid #334155;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    gap: 4px;
    flex-shrink: 0;
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    background: #38bdf8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.logo-text {
    color: #0f172a;
    font-weight: 900;
    font-size: 14px;
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-icon-btn {
    width: 44px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.nav-icon-btn:hover {
    background: #334155;
    color: #94a3b8;
}

.nav-icon-btn.active {
    background: #38bdf8;
    color: #0f172a;
}

.nav-spacer {
    flex: 1;
}

.nav-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
}

.top-bar {
    height: 48px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    flex-shrink: 0;
}

.top-bar-title {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 15px;
}

.top-bar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.znuny-status {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: 12px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-ok { background: #34d399; }
.status-error { background: #f87171; }
.status-warn { background: #fbbf24; }

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #0f172a;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 8px 16px;
    background: #b32121;
    color: white;
    z-index: 1000;
}

/* ── Auth Layout ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #1e293b;
    border-radius: 12px;
    padding: 40px;
    border: 1px solid #334155;
}

.auth-logo {
    width: 44px;
    height: 44px;
    background: #38bdf8;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 900;
    font-size: 16px;
    color: #0f172a;
}

.auth-title {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    color: #e2e8f0;
    margin-bottom: 28px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.auth-field label {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.auth-field input {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px 12px;
    color: #e2e8f0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.auth-field input:focus {
    border-color: #38bdf8;
}

.auth-field .validation-message {
    font-size: 12px;
    color: #f87171;
}

.auth-submit {
    width: 100%;
    padding: 10px;
    background: #38bdf8;
    color: #0f172a;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s;
}

.auth-submit:hover {
    background: #7dd3fc;
}

.auth-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid #f87171;
    border-radius: 8px;
    padding: 10px 12px;
    color: #f87171;
    font-size: 13px;
    margin-bottom: 16px;
}
