/* ══════════════════════════════════════════════════════════════════════════════
   DevTest Panel — development-only user switcher and compliance dashboard.
   Uses dev-orange accent for clear visual distinction from production UI.
   ══════════════════════════════════════════════════════════════════════════════ */

.devtest-panel {
    border-top: 2px solid var(--color-dev-accent, #FF9800);
    background: rgba(255, 152, 0, 0.06);
    margin: 0;
}

/* ── Header (collapsible toggle) ──────────────────────────────────────────── */

.devtest-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
}

.devtest-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-dev-accent, #FF9800);
    flex-shrink: 0;
    animation: devtest-pulse 2s ease-in-out infinite;
}

@keyframes devtest-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.devtest-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-dev-accent, #FF9800);
    flex: 1;
}

.devtest-chevron {
    font-size: .6rem;
    color: rgba(255, 255, 255, .4);
    transition: transform 0.2s ease;
}

.devtest-chevron.expanded {
    transform: rotate(180deg);
}

/* ── Body (expanded content) ──────────────────────────────────────────────── */

.devtest-body {
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.devtest-loading {
    font-size: .75rem;
    color: rgba(255, 255, 255, .4);
    padding: 4px 0;
}

.devtest-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .35);
    margin-bottom: 4px;
}

/* ── Current User Card ────────────────────────────────────────────────────── */

.devtest-current-user {
    padding: 8px;
    border-radius: var(--radius-sm, 6px);
    background: rgba(255, 255, 255, .05);
}

.devtest-user-name {
    font-size: .8rem;
    color: #fff;
    font-weight: 600;
}

.devtest-user-meta {
    font-size: .7rem;
    color: rgba(255, 255, 255, .5);
}

.devtest-user-role {
    display: inline-block;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-dev-accent, #FF9800);
    margin-top: 2px;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(255, 152, 0, 0.12);
}

/* ── User Switcher ────────────────────────────────────────────────────────── */

.devtest-switcher {
    display: flex;
    flex-direction: column;
}

.devtest-select {
    width: 100%;
    padding: 6px 8px;
    border-radius: var(--radius-sm, 4px);
    border: 1px solid rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: .75rem;
    margin-bottom: 6px;
}

.devtest-select option {
    background: #333;
    color: #fff;
}

.devtest-switch-btn {
    width: 100%;
    padding: 6px;
    border: none;
    border-radius: var(--radius-sm, 4px);
    background: var(--color-dev-accent, #FF9800);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.devtest-switch-btn:hover:not(:disabled) {
    background: #F57C00;
}

.devtest-switch-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ── Compliance Section ───────────────────────────────────────────────────── */

.devtest-compliance {
    padding: 8px;
    border-radius: var(--radius-sm, 6px);
}

.devtest-compliance-ok {
    font-size: .75rem;
    color: var(--color-success, #4CAF50);
    background: rgba(76, 175, 80, 0.08);
}

.devtest-violation {
    font-size: .7rem;
    padding: 4px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
    background: rgba(255, 152, 0, 0.08);
    color: rgba(255, 255, 255, .7);
    line-height: 1.4;
}

.devtest-violation-blocker {
    border-left: 3px solid #D32F2F;
}

.devtest-violation-critical {
    border-left: 3px solid #F44336;
}

.devtest-violation-warning {
    border-left: 3px solid var(--color-dev-accent, #FF9800);
}

.devtest-violation-info {
    border-left: 3px solid #2196F3;
}

.devtest-violation-id {
    font-weight: 700;
    color: var(--color-dev-accent, #FF9800);
    margin-right: 4px;
}
