/* Appearance controls use the existing menu and page typography. */
.theme-options {
    margin: 6px 0;
    padding: 8px 0;
    border: 0;
    border-block: 1px solid var(--border);
    min-width: 0;
}
.theme-options legend { padding: 0 8px; font-size: 12px; color: var(--text-muted); }
.theme-options__choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.header-user-dropdown .theme-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 56px;
    padding: 7px 3px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--text);
    font: 700 11px/1.5 var(--font-family-primary);
    white-space: normal;
}
.header-user-dropdown .theme-choice[aria-pressed="true"] {
    color: var(--link);
    background: var(--primary-50);
    border-color: var(--primary-300);
}
.theme-choice:hover { border-color: var(--border-strong); }
.theme-choice:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.theme-choice span { color: inherit; }
.login-appearance { position: fixed; top: 20px; left: 20px; z-index: 20; }
.login-appearance select {
    min-height: 44px;
    width: 150px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    background: var(--surface);
    font: 700 14px var(--font-family-primary);
}
@media screen {
    html[data-theme="dark"] .app-header__logo { background: #fff !important; border-radius: 4px; padding: 2px; }
    body.index-page .header-user-dropdown .theme-choice { color: var(--text); background: var(--surface-soft); }
    body.index-page .header-user-dropdown .theme-choice[aria-pressed="true"] { color: var(--link); background: var(--primary-50); }
    /* Child labels inherit semantic colors from their action or status surface. */
    :is(button, a, .status-pill, .status-badge, .role-badge, .role-tag, .alert-banner) > span { color: inherit; }
    html[data-theme="dark"] :is(.role-badge.custom,.btn-edit) { color: var(--link); }
    html[data-theme="dark"] :is(.returns-open,.returns-pagination a) { color: var(--danger); }
}
@media print {
    .theme-options, .login-appearance, .theme-storage-indicator { display: none !important; }
    html[data-theme] { color-scheme: light; }
}
