/* ===========================
   SMART AUTO-ADJUST
   Profile buttons + analysis popup
   =========================== */

/* ── Profile Button Group ── */

.saa-profile-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 10px;
    padding: 6px 0;
    background: linear-gradient(90deg, #3b82f6, #a78bfa, #3b82f6);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.saa-guide-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid rgba(96, 165, 250, 0.5);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    -webkit-text-fill-color: #60a5fa;
    transition: all 0.2s;
    flex-shrink: 0;
}

.saa-guide-tip:hover {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.15);
    transform: scale(1.1);
}

.saa-profile-btn {
    position: relative;
    padding: 10px 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(30, 41, 59, 0.7);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.saa-profile-btn:hover {
    transform: translateY(-2px);
}

.saa-profile-btn.saa-hd {
    border-color: rgba(245, 158, 11, 0.3);
}
.saa-profile-btn.saa-hd:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

.saa-profile-btn.saa-sd {
    border-color: rgba(139, 92, 246, 0.3);
}
.saa-profile-btn.saa-sd:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

.saa-profile-btn.saa-hd-plus {
    border-color: rgba(6, 182, 212, 0.3);
    position: relative;
}
.saa-profile-btn.saa-hd-plus:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.6);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.2);
}

/* Testing badge */
.saa-testing-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    padding: 1px 5px;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #0e1726;
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
    border-radius: 6px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4);
    animation: saaBadgePulse 2.4s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}
@keyframes saaBadgePulse {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.06); }
}

.saa-profile-name {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #e2e8f0;
}

.saa-hd .saa-profile-name { color: #fbbf24; }
.saa-sd .saa-profile-name { color: #a78bfa; }
.saa-hd-plus .saa-profile-name { color: #22d3ee; }

/* ── Tooltips ── */

.saa-profile-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    position: relative;
    z-index: 10;
}

.saa-profile-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: max(200px, calc(300% + 12px));
    max-width: calc(100vw - 60px);
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
    color: #cbd5e1;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 100;
    pointer-events: none;
}

/* Left button (HD+): shift tooltip right so it doesn't clip off-canvas */
.saa-profile-btn:first-child .saa-profile-tooltip {
    left: 0;
    transform: translateX(0);
}
.saa-profile-btn:first-child .saa-profile-tooltip::before {
    left: 25%;
}

/* Right button (SD): shift tooltip left so it doesn't clip off-canvas */
.saa-profile-btn:last-child .saa-profile-tooltip {
    left: auto;
    right: 0;
    transform: translateX(0);
}
.saa-profile-btn:last-child .saa-profile-tooltip::before {
    left: auto;
    right: 25%;
    transform: translateX(50%);
}

/* Position tooltip arrow centred on parent button */
.saa-profile-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: rgba(15, 23, 42, 0.97);
}

.saa-profile-btn:hover .saa-profile-tooltip {
    display: block;
}

/* ── Popup Container ── */

#smart-adjust-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
#smart-adjust-popup.saa-visible {
    opacity: 1;
    pointer-events: auto;
}
#smart-adjust-popup.saa-closing {
    opacity: 0;
    transition: opacity 0.35s ease;
}

.saa-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.saa-card {
    position: relative;
    width: 320px;
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.95) 100%);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 16px;
    padding: 28px 24px 22px;
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.15), 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: scale(0.92) translateY(12px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.saa-visible .saa-card { transform: scale(1) translateY(0); }
.saa-closing .saa-card { transform: scale(0.95) translateY(8px); }
.saa-card.saa-done {
    border-color: rgba(52, 211, 153, 0.4);
    box-shadow: 0 0 60px rgba(52, 211, 153, 0.12), 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── Close Button ── */

.saa-close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
}

.saa-close-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    transform: scale(1.1);
}

/* ── Popup Header ── */

.saa-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}
.saa-laser-icon { flex-shrink: 0; }
.saa-header-text { display: flex; flex-direction: column; gap: 2px; }

.saa-ring {
    animation: saaRingSpin 2.4s linear infinite;
    transform-origin: 20px 20px;
}
@keyframes saaRingSpin { to { transform: rotate(360deg); } }

.saa-core { animation: saaCorePulse 1.2s ease-in-out infinite alternate; }
@keyframes saaCorePulse {
    from { r: 3; opacity: 0.7; }
    to   { r: 5; opacity: 1; }
}

.saa-done .saa-ring { animation: none; stroke: #34d399; }
.saa-done .saa-core { animation: none; fill: #34d399; r: 4; }

.saa-title {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: #e2e8f0;
}
.saa-subtitle {
    font-size: 11px;
    color: #64748b;
    letter-spacing: 0.3px;
}
.saa-done .saa-title::after { content: ' ✓'; color: #34d399; }

/* ── Histogram ── */

.saa-histogram-area {
    position: relative;
    height: 80px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.1);
    overflow: hidden;
}
#saa-histogram-canvas { display: block; width: 100%; height: 100%; }

.saa-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    animation: saaScanSweep 1.6s ease-in-out infinite;
}
@keyframes saaScanSweep {
    0%   { left: -2px; opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}
.saa-done .saa-scan-line { animation: none; opacity: 0; }

/* ── Metrics ── */

.saa-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 18px;
}
.saa-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.saa-metric.saa-revealed { opacity: 1; transform: translateY(0); }
.saa-metric-label {
    font-size: 11px; font-weight: 500; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.saa-metric-value {
    font-size: 13px; font-weight: 700; color: #60a5fa;
    font-variant-numeric: tabular-nums;
}
.saa-done .saa-metric-value { color: #34d399; }

/* ── Progress ── */

.saa-progress-track {
    height: 3px;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 2px;
    margin-bottom: 14px;
    overflow: hidden;
}
.saa-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.saa-done .saa-progress-fill { background: linear-gradient(90deg, #34d399, #10b981) !important; }

/* ── Status ── */

.saa-status {
    font-size: 14px;
    color: #f1f5f9;
    text-align: center;
    letter-spacing: 0.3px;
    font-weight: 500;
}
.saa-done .saa-status { color: #34d399; }

/* ── CLAIRE Toggle Button ── */

.claire-btn {
    position: relative;
    width: 100%;
    padding: 10px 20px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.claire-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5;
    color: #cbd5e1;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 100;
    pointer-events: none;
}

.claire-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: rgba(15, 23, 42, 0.97);
}

.claire-btn:hover .claire-tooltip {
    display: block;
}

.claire-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #e2e8f0;
}

.claire-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
    border-color: #60a5fa;
    color: #60a5fa;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
}

.claire-btn.active:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(139, 92, 246, 0.35) 100%);
}

/* ── Manual High Pass Popup ── */

#hp-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
#hp-popup.hp-visible {
    opacity: 1;
    pointer-events: auto;
}

.hp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hp-card {
    position: relative;
    width: 380px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.95) 100%);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 16px;
    padding: 24px 22px 20px;
    box-shadow: 0 0 60px rgba(6, 182, 212, 0.12), 0 25px 50px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: scale(0.92) translateY(12px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#hp-popup.hp-visible .hp-card {
    transform: scale(1) translateY(0);
}

.hp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.hp-title {
    font-size: 15px;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.5px;
}
.hp-close-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.hp-close-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

/* Preview toggle */
.hp-view-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 3px;
}
.hp-view-btn {
    flex: 1;
    padding: 5px 8px;
    border: none;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #94a3b8;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.hp-view-btn.active {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

/* Preview canvas */
.hp-preview-wrap {
    position: relative;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(128, 128, 128, 1);
    border: 1px solid rgba(148, 163, 184, 0.1);
    overflow: hidden;
    aspect-ratio: auto;
    cursor: default;
}
#hp-preview-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    will-change: transform;
    transition: transform 0.05s ease-out;
}
.hp-preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    color: #94a3b8;
    font-size: 11px;
    transition: opacity 0.2s;
}

/* Pan hint */
.hp-pan-hint {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #94a3b8;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

/* Zoom row */
.hp-zoom-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 2px;
}
.hp-zoom-slider {
    flex: 1;
}
.hp-zoom-val {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    text-align: right;
}
.hp-zoom-reset {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(30, 41, 59, 0.6);
    color: #94a3b8;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}
.hp-zoom-reset:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
    color: #22d3ee;
}

/* Sliders */
.hp-slider-group {
    margin-bottom: 12px;
}
.hp-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.hp-slider-name {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.hp-slider-value {
    font-size: 12px;
    font-weight: 700;
    color: #22d3ee;
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    text-align: right;
}
.hp-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(148, 163, 184, 0.2);
    outline: none;
    cursor: pointer;
}
.hp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #06b6d4;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(6, 182, 212, 0.4);
    transition: transform 0.15s;
}
.hp-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
.hp-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #06b6d4;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

/* Stats bar */
.hp-stats {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
    padding: 6px 0;
    font-size: 10px;
    color: #64748b;
}
.hp-stat-val {
    color: #94a3b8;
    font-weight: 600;
}

/* Action buttons */
.hp-actions {
    display: flex;
    gap: 8px;
}
.hp-btn {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.hp-btn-cancel {
    background: rgba(30, 41, 59, 0.8);
    color: #94a3b8;
}
.hp-btn-cancel:hover {
    background: rgba(148, 163, 184, 0.15);
    color: #e2e8f0;
}
.hp-btn-merge {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(6, 182, 212, 0.15) 100%);
    border-color: rgba(6, 182, 212, 0.4);
    color: #22d3ee;
}
.hp-btn-merge:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.4) 0%, rgba(6, 182, 212, 0.25) 100%);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.2);
}
.hp-btn-merge:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Post-Adjust Fine-Tune Popup ── */

#post-adjust-popup {
    position: fixed;
    top: 80px;
    right: 60px;
    z-index: 9500;
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}
#post-adjust-popup.pa-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.pa-card {
    position: relative;
    width: 320px;
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.96) 100%);
    border: 1.5px solid rgba(6, 182, 212, 0.5);
    border-radius: 14px;
    padding: 22px 24px 18px;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.15), 0 0 50px rgba(6, 182, 212, 0.08),
                0 20px 50px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.pa-glow {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 100px;
    pointer-events: none;
}

.pa-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.pa-check-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: paCheckPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}
@keyframes paCheckPop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.pa-title-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.pa-title {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.3px;
}
.pa-subtitle {
    font-size: 10px;
    color: #64748b;
    letter-spacing: 0.3px;
}

.pa-controls {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

/* Nudge buttons row */
.pa-nudge-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pa-nudge-btn {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 8px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(30, 41, 59, 0.7);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pa-darken:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}
.pa-lighten:hover {
    background: rgba(250, 250, 250, 0.08);
    border-color: rgba(250, 250, 250, 0.2);
    color: #f8fafc;
}
.pa-nudge-btn:active {
    transform: scale(0.96);
}

/* Nudge indicator bars */
.pa-nudge-indicator {
    flex: 0 0 86px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pa-nudge-dots {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 28px;
}
.pa-dot {
    width: 3px;
    height: 10px;
    border-radius: 1.5px;
    background: rgba(148, 163, 184, 0.12);
    transition: all 0.2s ease;
}
.pa-dot-center {
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: rgba(148, 163, 184, 0.25);
}
.pa-dot-active.pa-dot-dark {
    background: #94a3b8;
    height: 18px;
    box-shadow: 0 0 4px rgba(148, 163, 184, 0.3);
}
.pa-dot-active.pa-dot-light {
    background: #fbbf24;
    height: 18px;
    box-shadow: 0 0 4px rgba(251, 191, 36, 0.3);
}
.pa-dot-active.pa-dot-center {
    background: #60a5fa;
    box-shadow: 0 0 4px rgba(96, 165, 250, 0.3);
}

/* Invert toggle — simple button */
.pa-invert-row {
    display: flex;
    justify-content: center;
}
.pa-invert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 24px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(30, 41, 59, 0.5);
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pa-invert-btn:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.3);
}
.pa-invert-btn.pa-invert-active {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
}
.pa-invert-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.3);
    transition: all 0.2s;
}
.pa-invert-active .pa-invert-indicator {
    background: #60a5fa;
    box-shadow: 0 0 6px rgba(96, 165, 250, 0.5);
}
.pa-invert-text {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Done button */
.pa-done-btn {
    width: 100%;
    padding: 10px;
    border: 1px solid;
    border-radius: 8px;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pa-done-btn:hover {
    background: rgba(96, 165, 250, 0.1);
}

/* ── Responsive ── */

@media (max-width: 400px) {
    .saa-card { width: calc(100vw - 40px); padding: 22px 18px 18px; }
    .saa-profile-tooltip { width: 180px; }
    .hp-card { width: calc(100vw - 24px); padding: 18px 16px 16px; }
}
