body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

.page {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    width: 280px;
    min-height: 100vh;
    color: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

main {
    flex: 1;
    min-width: 0;
}

.top-row {
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
}

.content {
    max-width: 1200px;
}

.main-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 247, 251, 0.96));
}

.app-title {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}

.app-title:hover {
    color: #0f766e;
}

.navbar-toggler {
    cursor: pointer;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
}

.top-row.navbar {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    justify-content: space-between;
}

.top-row .navbar-brand {
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nav-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.nav-subtitle {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-scrollable {
    padding-top: 0.5rem;
}

.nav-collapsed {
    display: none;
}

.nav-section {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.5rem;
}

.nav-item {
    font-size: 0.95rem;
    padding-bottom: 0.25rem;
}

.nav-item .nav-link {
    color: rgba(255, 255, 255, 0.84);
    border-radius: 0.85rem;
    height: 3rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    line-height: 3rem;
    text-decoration: none;
}

.nav-icon {
    display: inline-flex;
    width: 1.85rem;
    height: 1.85rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}

.nav-icon .bi {
    font-size: 0.95rem;
    line-height: 1;
}

.nav-item .nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.nav-item .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.card {
    border: 0;
    border-radius: 16px;
}

.shadow-sm {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
}

.form-control,
.btn,
.alert,
.table {
    border-radius: 10px;
}

.btn-primary {
    background: #0f766e;
    border-color: #0f766e;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #115e59;
    border-color: #115e59;
}

.home-hero {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(59, 130, 246, 0.08));
}

.page-intro {
    max-width: 760px;
}

.counter-card {
    max-width: 360px;
}

.counter-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.pwa-install-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(15, 118, 110, 0.14);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.pwa-install-content {
    flex: 1;
}

.pwa-install-actions {
    justify-content: flex-end;
}

.dashboard-payload {
    margin: 0;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 9rem;
}

.dashboard-trace-list {
    display: grid;
    gap: 1rem;
}

.dashboard-trace-item {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
    padding: 1rem;
}

.dashboard-trace-payload {
    margin: 0;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.8rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (min-width: 641px) {
    .navbar-toggler {
        display: none;
    }

    .nav-scrollable {
        display: block;
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }

    .nav-collapsed {
        display: block;
    }
}

@media (max-width: 640.98px) {
    .page {
        flex-direction: column;
    }

    .pwa-install-card {
        flex-direction: column;
        align-items: stretch;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .nav-scrollable {
        padding-bottom: 0.75rem;
    }

    .content {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}
