/* BetterDesk Server Attestation — page + badge styles */

/* ── vPRO-style badge ─────────────────────────────────────────────────────── */

.bd-attest-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(135deg, #0a1628 0%, #050a12 55%, #000 100%);
    border-radius: 4px;
    padding: 10px 14px;
    min-width: 120px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    user-select: none;
    line-height: 1.1;
}

.bd-attest-badge--large {
    padding: 16px 22px;
    min-width: 180px;
}

.bd-attest-badge--small {
    padding: 8px 12px;
    min-width: 100px;
}

.bd-attest-brand {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.bd-attest-badge--sm {
    box-sizing: border-box;
    width: 158px;
    min-width: 158px;
    max-width: 158px;
    padding: 8px 10px;
    flex-shrink: 0;
    align-items: center;
}

.bd-attest-badge--sm .bd-attest-brand {
    font-size: 12px;
    width: 100%;
    text-align: center;
}

.bd-attest-badge--sm .bd-attest-tier {
    font-size: 13px;
    letter-spacing: 0.14em;
    width: 100%;
    text-align: center;
}

.bd-attest-badge--large .bd-attest-brand {
    font-size: 18px;
}

.bd-attest-i {
    position: relative;
}

.bd-attest-i::before {
    content: '';
    position: absolute;
    top: -0.05em;
    left: 50%;
    transform: translateX(-50%);
    width: 0.28em;
    height: 0.28em;
    background: currentColor;
    border-radius: 1px;
}

.bd-attest-tier {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 2px;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.bd-attest-badge--large .bd-attest-tier {
    font-size: 22px;
    margin-top: 4px;
}

.bd-attest-conn {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 6px;
    letter-spacing: 0.05em;
}

/* Tier metallic gradients */
.bd-attest-tier-bronze .bd-attest-brand,
.bd-attest-tier-bronze .bd-attest-tier {
    background-image: linear-gradient(180deg, #e8a857 0%, #cd7f32 45%, #a0622a 100%);
}

.bd-attest-tier-iron .bd-attest-brand,
.bd-attest-tier-iron .bd-attest-tier {
    background-image: linear-gradient(180deg, #e0e0e0 0%, #a0a0a0 45%, #707070 100%);
}

.bd-attest-tier-titanium .bd-attest-brand,
.bd-attest-tier-titanium .bd-attest-tier {
    background-image: linear-gradient(180deg, #f0f4f8 0%, #c8d0dc 40%, #98a8b8 100%);
}

.bd-attest-tier-obsidian .bd-attest-brand,
.bd-attest-tier-obsidian .bd-attest-tier {
    background-image: linear-gradient(180deg, #e8eeff 0%, #8b9cff 35%, #3a4a8a 70%, #1a2244 100%);
}

.bd-attest-tier-platinum .bd-attest-brand,
.bd-attest-tier-platinum .bd-attest-tier {
    background-image: linear-gradient(180deg, #fff8e7 0%, #e8dcc0 35%, #d4af37 100%);
}

.bd-attest-tier-none .bd-attest-brand,
.bd-attest-tier-none .bd-attest-tier {
    background-image: linear-gradient(180deg, #8899aa 0%, #556677 100%);
}

/* Login page placement */
.login-attestation-badge {
    position: fixed;
    bottom: var(--space-md, 16px);
    left: var(--space-md, 16px);
    z-index: 10;
}

.login-attestation-badge .bd-attest-badge.bd-attest-badge--small {
    padding: 10px 16px;
    min-width: 130px;
}

.login-attestation-badge .bd-attest-brand {
    font-size: 17px;
}

.login-attestation-badge .bd-attest-tier {
    font-size: 20px;
    margin-top: 3px;
}

.login-attestation-badge .bd-attest-conn {
    font-size: 13px;
    margin-top: 8px;
}

.desktop-login-page .login-attestation-badge {
    bottom: 100px;
    left: 32px;
    z-index: 6;
}

/* ── Attestation page ─────────────────────────────────────────────────────── */

.sa-page {
    max-width: 1200px;
}

.sa-header h1 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sa-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    margin-bottom: 24px;
    border-radius: var(--radius-md, 8px);
    background: rgba(255, 171, 0, 0.08);
    border: 1px solid rgba(255, 171, 0, 0.25);
    color: var(--text-primary);
}

.sa-notice .material-icons {
    color: #ffb74d;
    flex-shrink: 0;
}

.sa-notice p {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.85;
}

.sa-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sa-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.sa-hero-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.sa-muted {
    opacity: 0.6;
}

.sa-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sa-progress {
    padding: 12px 0;
}

.sa-progress-bar {
    height: 6px;
    background: var(--bg-muted, rgba(255,255,255,0.08));
    border-radius: 3px;
    overflow: hidden;
}

.sa-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent, #4a9eff), #7b68ee);
    transition: width 0.4s ease;
}

.sa-progress-text {
    font-size: 13px;
    margin-top: 8px;
    color: var(--text-secondary);
}

.sa-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .sa-grid {
        grid-template-columns: 1fr;
    }
}

.sa-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: var(--radius-md, 8px);
    padding: 16px;
}

.sa-card-wide {
    grid-column: 1 / -1;
}

.sa-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.sa-card-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.sa-card-header .material-icons {
    font-size: 20px;
    opacity: 0.7;
}

.sa-stat-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.sa-stat-detail {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.sa-threshold-table {
    width: 100%;
    font-size: 13px;
}

.sa-threshold-table td {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
}

.sa-threshold-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.sa-chart-wrap {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

#sa-ramp-chart {
    display: block;
    width: 100% !important;
    height: 200px !important;
    max-width: 100%;
    max-height: 200px;
}

.sa-chart-legend {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.sa-chart-legend .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.dot-cpu { background: #ff7b72; }
.dot-mem { background: #79c0ff; }
.dot-conns { background: #56d364; }

.sa-tier-guide {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sa-tier-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sa-tier-row p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
    min-width: 200px;
}

.sa-docker-note {
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.75;
}

.hidden {
    display: none !important;
}
