body.app-shell,
body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(240, 185, 11, 0.18), transparent 24%),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.10), transparent 24%),
        #f3f4f6;
    color: #111827;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a {
    text-decoration: none;
}

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

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
    color: #fff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    min-height: 100vh;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-block small,
.eyebrow {
    color: rgba(255, 255, 255, 0.66);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #f0b90b;
    color: #111827;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(240, 185, 11, 0.35);
}

.sidebar-link {
    color: rgba(255, 255, 255, 0.78);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    transition: all 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #111827;
    background: linear-gradient(135deg, #f0b90b, #f9d255);
    transform: translateX(2px);
}

.sidebar-footer {
    margin-top: auto;
}

.main-content {
    flex: 1;
    padding: 1.5rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
}

.surface-card,
.panel-card,
.metric-card {
    border: 0;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
}

.panel-card .card-body,
.surface-card .card-body,
.metric-card .card-body {
    padding: 1.4rem;
}

.metric-card {
    overflow: hidden;
    position: relative;
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -24px -30px auto;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(240, 185, 11, 0.18);
}

.metric-label {
    color: #6b7280;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
    color: #111827;
}

.metric-highlight {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #fff;
}

.metric-highlight .metric-label,
.metric-highlight .text-muted {
    color: rgba(255, 255, 255, 0.72) !important;
}

.metric-highlight::after {
    background: rgba(240, 185, 11, 0.3);
}

.quick-action {
    border-radius: 18px;
}

.table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    border-bottom-color: #e5e7eb;
}

.table > :not(caption) > * > * {
    padding: 0.95rem 0.85rem;
    vertical-align: middle;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    width: min(1100px, 100%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 32px;
    box-shadow: 0 24px 80px rgba(17, 24, 39, 0.16);
    overflow: hidden;
}

.login-hero {
    background: linear-gradient(160deg, #111827 0%, #1f2937 65%, #f0b90b 210%);
    color: #fff;
    padding: 3rem;
    height: 100%;
}

.login-hero .display-6 {
    font-weight: 700;
}

.wallet-address {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    word-break: break-all;
}

.qr-shell {
    width: 188px;
    min-height: 188px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 24px;
    padding: 1rem;
    box-shadow: inset 0 0 0 1px #e5e7eb;
}

.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    display: grid;
    gap: 0.75rem;
}

.empty-state {
    padding: 2rem;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.08), rgba(37, 99, 235, 0.04));
    text-align: center;
    color: #4b5563;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
    margin-right: 0.45rem;
}

.status-indicator.online {
    background: #16a34a;
    box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.15);
}

.status-indicator.offline,
.status-indicator.critical {
    background: #dc2626;
    box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.15);
}

.status-indicator.warning {
    background: #f0b90b;
    box-shadow: 0 0 0 5px rgba(240, 185, 11, 0.15);
}

@media (max-width: 991.98px) {
    .layout-shell {
        flex-direction: column;
    }

    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-actions {
        justify-content: space-between;
        width: 100%;
    }

    .user-pill {
        align-items: flex-start;
    }
}
