body { background: #f4f7fb; color: #243044; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 82px;
    background: linear-gradient(180deg, #fff, #eef3f9);
    border-right: 1px solid #d9e2ef;
    box-shadow: 3px 0 20px rgba(15, 23, 42, .08);
    padding: 24px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-brand { color: #1e9ce8; font-size: .75rem; font-weight: 800; margin-bottom: 34px; text-align: center; }
.side-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin-bottom: 12px;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: .72rem;
    text-align: center;
}
.side-link:hover, .side-link:first-of-type { background: #2d9cdb; color: #fff; box-shadow: 0 8px 18px rgba(45, 156, 219, .28); }
.main-area { flex: 1; min-width: 0; }
.topbar {
    height: 72px;
    background: #f7f8fa;
    border-bottom: 1px solid #dde5ef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}

.metric-card {
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
}

.panel-card {
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #fff;
}

.media-table th { color: #2b73bf; font-weight: 500; font-size: .88rem; }
.media-table td { padding-top: 1rem; padding-bottom: 1rem; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #e5e7eb; color: #555; font-weight: 600;
}
.service-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; min-height: 28px; padding: 4px 9px;
    border-radius: 999px; color: #fff; font-size: .72rem; font-weight: 700;
}
.service-radio { background: #ec2f70; }
.service-webtv { background: #3b82f6; }
.service-vod { background: #10b981; }
.service-relay { background: #64748b; }
.service-event { background: #7c3aed; }
.service-default { background: #334155; }
.status-dot {
    width: 13px; height: 13px; border-radius: 50%;
    display: inline-block; margin-right: 7px; vertical-align: -2px;
}
.status-online { background: #2f80c8; }
.status-offline { background: #8a8178; }
.status-suspended { background: #ef4444; }
.status-provisioning { background: #f59e0b; }
.thin-progress { height: 3px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.thin-progress span { display: block; height: 100%; background: #2f80c8; }
.thin-progress.danger span { background: #ef4444; }
.quick-action { min-width: 44px; }

@media (max-width: 768px) {
    .app-shell { display: block; }
    .sidebar { width: 100%; height: auto; position: static; display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
    .sidebar-brand { margin: 0 12px 0 0; display: flex; align-items: center; }
    .side-link { min-width: 110px; margin: 0; }
    .topbar { height: auto; min-height: 64px; padding: 12px; align-items: flex-start; gap: 12px; }
}

.form-control,
.form-select {
    border-color: #9eb0c7;
}

.form-control:focus,
.form-select:focus {
    border-color: #315d9c;
    box-shadow: 0 0 0 .2rem rgba(49, 93, 156, .16);
}

.codebox {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .875rem;
}
