:root {
    --app-bg: #edf3f8;
    --app-border: rgba(15, 23, 42, 0.08);
    --app-surface: rgba(255, 255, 255, 0.92);
    --app-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.12);
    --app-text-soft: #5b6475;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(13, 110, 253, 0.15), transparent 30%),
        radial-gradient(circle at top right, rgba(32, 201, 151, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbfe 0%, var(--app-bg) 100%);
    color: #142033;
}

.app-navbar {
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid var(--app-border);
}

.app-brand-mark {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd, #20c997);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0.75rem 1.5rem rgba(13, 110, 253, 0.25);
}

.app-shell {
    padding: 2.5rem 0 3.5rem;
}

.page-card {
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 1.25rem;
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.page-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--app-border);
}

.page-heading {
    letter-spacing: -0.03em;
}

.section-kicker {
    color: var(--app-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 700;
}

.login-page {
    min-height: calc(100vh - 5rem);
    display: flex;
    align-items: center;
}

.login-card {
    max-width: 30rem;
    margin: 0 auto;
}

.table > :not(caption) > * > * {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    vertical-align: middle;
}

.table-muted {
    color: var(--app-text-soft);
}

.masked-secret {
    letter-spacing: 0.22em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.metric-card {
    border-radius: 1rem;
    border: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.72);
}

.endpoint-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(13, 110, 253, 0.08);
    color: #0b5ed7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
}

.content-meta dt {
    color: var(--app-text-soft);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.content-meta dd {
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.context-help-trigger {
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(13, 110, 253, 0.25);
    border-radius: 999px;
    background: rgba(13, 110, 253, 0.08);
    color: #0d6efd;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
}

.context-help-trigger:hover,
.context-help-trigger:focus {
    background: rgba(13, 110, 253, 0.14);
    border-color: rgba(13, 110, 253, 0.4);
    color: #0a58ca;
}

.context-help-popover {
    --bs-popover-max-width: 24rem;
}

.context-help-popover .popover-header {
    font-weight: 700;
}

.context-help-popover .popover-body {
    font-size: 0.92rem;
    line-height: 1.5;
}

.delivery-card {
    height: 100%;
    padding: 1.25rem;
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.78);
}

.delivery-url-box {
    padding: 1rem;
    border: 1px solid rgba(13, 110, 253, 0.12);
    border-radius: 0.9rem;
    background: rgba(13, 110, 253, 0.05);
    overflow-wrap: anywhere;
}

.install-qr-image {
    width: min(100%, 15rem);
    height: auto;
    padding: 0.5rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--app-border);
}

@media (max-width: 767.98px) {
    .app-shell {
        padding-top: 1.5rem;
    }

    .login-page {
        min-height: auto;
    }
}
