.augnito-preferences-page,
.augnito-dialog {
    --augnito-font-family: var(--font-family-sans-serif, "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    --augnito-font-size: 0.9375rem;
    --augnito-caption-size: 0.8125rem;
    --augnito-small-size: 0.75rem;
    --augnito-surface: #ffffff;
    --augnito-surface-muted: #f4f7f8;
    --augnito-panel: #ffffff;
    --augnito-border: #d7e0e4;
    --augnito-border-strong: #b9c8ce;
    --augnito-text: #17252b;
    --augnito-muted: #5d6b72;
    --augnito-heading: #0b2e3a;
    --augnito-primary: #0b455c;
    --augnito-primary-strong: #073749;
    --augnito-primary-soft: rgba(11, 69, 92, 0.1);
    --augnito-accent: #14a7b8;
    --augnito-danger: #b4233f;
    --augnito-success: #13764f;
    --augnito-warning: #9b6800;
    background: var(--augnito-surface-muted);
    color: var(--augnito-text);
    font-family: var(--augnito-font-family);
    font-size: var(--augnito-font-size);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

.augnito-preferences-page {
    min-height: 100vh;
}

.augnito-preferences-page button,
.augnito-preferences-page input,
.augnito-preferences-page textarea {
    font-family: inherit;
}

.prefs-shell {
    margin: 0 auto;
    max-width: 1220px;
    padding: 22px;
}

.prefs-header {
    align-items: center;
    background: var(--augnito-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(12, 45, 57, 0.18);
    color: #ffffff;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 14px;
    min-height: 76px;
    padding: 14px 16px;
}

.prefs-brand {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 220px;
}

.prefs-brand-mark {
    align-items: center;
    background: transparent;
    border-radius: 0;
    display: inline-flex;
    flex: 0 0 54px;
    height: 54px;
    justify-content: center;
    width: 54px;
}

.prefs-brand-mark img {
    height: 42px;
    width: 42px;
}

.prefs-header h1 {
    color: #ffffff;
    font-size: 1.171875rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 3px;
}

.prefs-powered {
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--augnito-caption-size);
    font-weight: 400;
}

.prefs-tabs {
    align-items: center;
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.prefs-tabs a {
    align-items: center;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.82);
    display: inline-flex;
    font-size: var(--augnito-font-size);
    font-weight: 500;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    text-decoration: none;
}

.prefs-tabs a:hover,
.prefs-tabs a.is-active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.prefs-status {
    border-left: 4px solid transparent;
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(18, 40, 49, 0.08);
    font-size: var(--augnito-caption-size);
    font-weight: 400;
    margin-bottom: 14px;
    padding: 11px 13px;
}

.prefs-modal-status {
    box-shadow: none;
    margin: 0 0 14px;
}

.prefs-status.is-info {
    background: #e8f5f7;
    border-left-color: var(--augnito-accent);
    color: #174553;
}

.prefs-status.is-success {
    background: #e8f6ef;
    border-left-color: var(--augnito-success);
    color: #155c37;
}

.prefs-status.is-danger {
    background: #fdecef;
    border-left-color: var(--augnito-danger);
    color: #8c1d1d;
}

.prefs-workspace {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(320px, 0.42fr) minmax(0, 0.58fr);
}

.prefs-panel {
    background: var(--augnito-panel);
    border: 1px solid var(--augnito-border);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(18, 40, 49, 0.08);
    min-width: 0;
}

.prefs-editor {
    padding: 16px;
}

.prefs-records {
    overflow: hidden;
}

.prefs-list-panel {
    width: 100%;
}

.prefs-support-panel {
    overflow: hidden;
}

.prefs-panel-header {
    align-items: center;
    border-bottom: 1px solid var(--augnito-border);
    display: flex;
    justify-content: space-between;
    margin: -16px -16px 16px;
    min-height: 58px;
    padding: 12px 16px;
}

.prefs-records .prefs-panel-header {
    margin: 0;
}

.prefs-panel-header h2 {
    color: var(--augnito-heading);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 2px 0 0;
}

.prefs-eyebrow {
    color: var(--augnito-muted);
    font-size: var(--augnito-small-size);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.prefs-count-pill,
.prefs-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: var(--augnito-caption-size);
    font-weight: 500;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    white-space: nowrap;
}

.prefs-count-pill {
    background: var(--augnito-primary-soft);
    color: var(--augnito-primary);
    min-width: 34px;
}

.prefs-list-toolbar {
    align-items: center;
    background: var(--augnito-panel);
    border-bottom: 1px solid var(--augnito-border);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
}

.prefs-search {
    align-items: center;
    background: var(--augnito-surface-muted);
    border: 1px solid var(--augnito-border);
    border-radius: 6px;
    color: var(--augnito-muted);
    display: flex;
    flex: 1 1 360px;
    gap: 8px;
    max-width: 520px;
    min-height: 38px;
    padding: 0 10px;
}

.prefs-search input {
    background: transparent;
    border: 0;
    color: var(--augnito-text);
    font-size: var(--augnito-font-size);
    min-width: 0;
    outline: 0;
    width: 100%;
}

.prefs-search input::placeholder {
    color: var(--augnito-muted);
}

.prefs-grid {
    display: grid;
    gap: 14px;
}

.prefs-field > span,
.prefs-check span {
    color: #425158;
    display: block;
    font-size: var(--augnito-caption-size);
    font-weight: 600;
    margin-bottom: 6px;
}

/* MudBlazor supplies the required marker; keep it red inside the dialog portal. */
.augnito-dialog .mud-input-control.mud-input-required > .mud-input-control-input-container > .mud-input-label::after {
    color: var(--mud-palette-error);
    margin-left: 3px;
}

.prefs-input,
.prefs-textarea {
    background: #ffffff;
    border: 1px solid var(--augnito-border-strong);
    border-radius: 6px;
    color: var(--augnito-text);
    font-size: var(--augnito-font-size);
    line-height: 1.5;
    min-height: 40px;
    padding: 8px 10px;
    transition: border-color 120ms ease, box-shadow 120ms ease;
    width: 100%;
}

.prefs-textarea {
    min-height: 130px;
    resize: vertical;
}

.prefs-input:focus,
.prefs-textarea:focus {
    border-color: var(--augnito-accent);
    box-shadow: 0 0 0 3px rgba(20, 167, 184, 0.16);
    outline: 0;
}

.prefs-check {
    align-items: center;
    background: var(--augnito-surface-muted);
    border: 1px solid var(--augnito-border);
    border-radius: 6px;
    display: flex;
    gap: 9px;
    min-height: 42px;
    padding: 0 10px;
}

.prefs-check input {
    accent-color: var(--augnito-primary);
}

.prefs-check span {
    margin: 0;
}

.prefs-actions,
.prefs-recording {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
}

.prefs-modal-backdrop {
    align-items: center;
    background: rgba(8, 24, 30, 0.46);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 20px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 10000;
}

.prefs-modal {
    background: var(--augnito-panel);
    border: 1px solid var(--augnito-border);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    color: var(--augnito-text);
    max-height: calc(100vh - 40px);
    max-width: 620px;
    overflow: auto;
    padding: 16px;
    width: min(620px, 100%);
}

.prefs-modal-header {
    align-items: center;
    border-bottom: 1px solid var(--augnito-border);
    display: flex;
    justify-content: space-between;
    margin: -16px -16px 16px;
    min-height: 58px;
    padding: 12px 16px;
}

.prefs-modal-header h2 {
    color: var(--augnito-heading);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 2px 0 0;
}

.prefs-button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    font-size: var(--augnito-font-size);
    font-weight: 500;
    gap: 8px;
    justify-content: center;
    min-height: 38px;
    min-width: 92px;
    padding: 8px 14px;
}

.prefs-primary {
    background: var(--augnito-primary);
    color: #ffffff;
}

.prefs-primary:hover {
    background: var(--augnito-primary-strong);
}

.prefs-danger {
    background: var(--augnito-danger);
    color: #ffffff;
}

.prefs-danger:hover {
    background: #8c1d30;
}

.prefs-secondary {
    background: #eef3f5;
    border-color: #cbd8dd;
    color: #1f2b32;
}

.prefs-button:disabled,
.prefs-icon-button:disabled,
.prefs-record-button:disabled {
    cursor: default;
    opacity: 0.62;
}

.prefs-recording {
    background: var(--augnito-surface-muted);
    border: 1px solid var(--augnito-border);
    border-radius: 8px;
    justify-content: flex-start;
    min-height: 74px;
    padding: 12px;
}

.prefs-recording.is-live {
    border-color: rgba(180, 35, 63, 0.45);
}

.prefs-record-button {
    align-items: center;
    background: #172229;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 46px;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.prefs-record-button.is-recording {
    background: var(--augnito-danger);
}

.prefs-recording-state {
    color: var(--augnito-muted);
    display: grid;
    flex: 1 1 auto;
    font-size: var(--augnito-caption-size);
    gap: 8px;
    min-width: 0;
}

.prefs-recording-state strong {
    color: var(--augnito-heading);
    font-size: var(--augnito-font-size);
    font-weight: 500;
}

#vocabularyAudio {
    height: 34px;
    max-width: 420px;
    width: 100%;
}

.prefs-table-wrap {
    overflow-x: auto;
}

.prefs-table {
    border-collapse: collapse;
    font-size: var(--augnito-font-size);
    min-width: 620px;
    width: 100%;
}

.prefs-table th,
.prefs-table td {
    border-bottom: 1px solid var(--augnito-border);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}

.prefs-table th {
    background: var(--augnito-surface-muted);
    color: #3b4c54;
    font-size: var(--augnito-caption-size);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.prefs-table tr:last-child td {
    border-bottom: 0;
}

.prefs-table tbody tr:hover td {
    background: rgba(20, 167, 184, 0.05);
}

.prefs-key {
    background: var(--augnito-primary-soft);
    border-radius: 5px;
    color: var(--augnito-primary);
    display: inline-block;
    font-weight: 600;
    line-height: 1.3;
    max-width: 260px;
    overflow-wrap: anywhere;
    padding: 4px 8px;
}

.prefs-delete-copy {
    color: var(--augnito-text);
    display: grid;
    gap: 10px;
}

.prefs-delete-copy p {
    margin: 0;
}

.prefs-delete-target {
    background: var(--augnito-primary-soft);
    border-radius: 6px;
    color: var(--augnito-primary);
    display: inline-block;
    font-weight: 600;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 8px 10px;
    width: fit-content;
}

.prefs-display-value,
.prefs-rich-text {
    color: var(--augnito-text);
    overflow-wrap: anywhere;
}

.prefs-rich-text {
    max-width: 420px;
}

.prefs-action-cell {
    text-align: right;
    white-space: nowrap;
    width: 108px;
}

.prefs-icon-button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--augnito-primary);
    cursor: pointer;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    margin-left: 4px;
    width: 32px;
}

.prefs-icon-button:hover {
    background: var(--augnito-primary-soft);
    border-color: rgba(11, 69, 92, 0.16);
}

.prefs-icon-button.is-danger {
    color: var(--augnito-danger);
}

.prefs-icon-button.is-danger:hover {
    background: rgba(180, 35, 63, 0.1);
    border-color: rgba(180, 35, 63, 0.18);
}

.prefs-pill {
    background: #e9eef0;
    color: #43545c;
}

.prefs-pill.is-success {
    background: #e6f5ee;
    color: var(--augnito-success);
}

.prefs-pill.is-warning {
    background: #fff3d8;
    color: var(--augnito-warning);
}

.prefs-pill.is-danger {
    background: #fdecef;
    color: var(--augnito-danger);
}

.prefs-pill.is-muted {
    background: #e9eef0;
    color: #52636b;
}

.prefs-empty {
    color: var(--augnito-muted);
    font-weight: 400;
    padding: 36px 14px !important;
    text-align: center !important;
}

.prefs-empty i {
    color: var(--augnito-primary);
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.prefs-support-grid {
    align-items: center;
    display: grid;
    gap: 22px;
    grid-template-columns: 300px minmax(0, 1fr);
    padding: 22px;
}

.prefs-qr-card {
    align-items: center;
    background: var(--augnito-surface-muted);
    border: 1px solid var(--augnito-border);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: 300px;
    padding: 20px;
    position: relative;
}

.prefs-qr-frame {
    background: #ffffff;
    border: 1px solid #d7e0e4;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(18, 40, 49, 0.1);
    padding: 18px;
}

.prefs-qr-code {
    align-items: center;
    color: var(--augnito-muted);
    display: flex;
    font-size: var(--augnito-caption-size);
    justify-content: center;
    min-height: 224px;
    overflow-wrap: anywhere;
    width: 224px;
}

.prefs-qr-code canvas,
.prefs-qr-code img,
.prefs-qr-code svg {
    display: block;
    height: 224px !important;
    width: 224px !important;
}

.prefs-qr-loading {
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    bottom: 20px;
    color: var(--augnito-primary);
    display: flex;
    font-size: 24px;
    justify-content: center;
    left: 20px;
    position: absolute;
    right: 20px;
    top: 20px;
}

.prefs-support-copy {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prefs-support-copy h3 {
    color: var(--augnito-heading);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
}

.prefs-support-copy p,
.prefs-command-intro p {
    color: var(--augnito-muted);
    font-size: var(--augnito-font-size);
    line-height: 1.5;
    margin: 0;
}

.prefs-inline-pill {
    background: var(--augnito-primary-soft);
    border-radius: 999px;
    color: var(--augnito-primary);
    display: inline-flex;
    font-size: var(--augnito-caption-size);
    font-weight: 500;
    min-height: 28px;
    padding: 5px 10px;
}

.prefs-command-intro {
    border-bottom: 1px solid var(--augnito-border);
    padding: 14px 16px;
}

.prefs-command-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px;
}

.prefs-command-group {
    background: var(--augnito-surface-muted);
    border: 1px solid var(--augnito-border);
    border-radius: 8px;
    min-width: 0;
    padding: 14px;
}

.prefs-command-title {
    align-items: center;
    color: var(--augnito-heading);
    display: flex;
    font-size: var(--augnito-caption-size);
    font-weight: 600;
    gap: 8px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.prefs-command-title i {
    color: var(--augnito-primary);
}

.prefs-command-group ul {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.prefs-command-group li {
    align-items: center;
    background: var(--augnito-panel);
    border: 1px solid var(--augnito-border);
    border-radius: 6px;
    color: var(--augnito-text);
    display: flex;
    font-size: var(--augnito-font-size);
    line-height: 1.35;
    min-height: 36px;
    padding: 8px 10px;
}

.prefs-command-help-body {
    color: var(--augnito-text);
}

.prefs-command-help-body p {
    margin: 0 0 6px;
}

.prefs-command-help-body h3 {
    color: var(--augnito-heading);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 12px 0 4px;
}

.prefs-command-help-body ul {
    display: grid;
    gap: 3px;
    list-style-position: outside;
    margin: 0 0 2px;
    padding-left: 20px;
}

.prefs-command-help-body li {
    line-height: 1.4;
    padding-left: 2px;
}

.dark .augnito-preferences-page,
.dark-green .augnito-preferences-page,
.dark .augnito-dialog,
.dark-green .augnito-dialog {
    --augnito-surface: #111b1f;
    --augnito-surface-muted: #0e171a;
    --augnito-panel: #17242a;
    --augnito-border: rgba(255, 255, 255, 0.12);
    --augnito-border-strong: rgba(255, 255, 255, 0.24);
    --augnito-text: #edf5f6;
    --augnito-muted: #aebfc5;
    --augnito-heading: #ffffff;
    --augnito-primary: #0b455c;
    --augnito-primary-strong: #0a3c50;
    --augnito-primary-soft: rgba(20, 167, 184, 0.18);
    background: var(--augnito-surface-muted);
    color: var(--augnito-text);
}

.dark-green .augnito-preferences-page,
.dark-green .augnito-dialog {
    --augnito-surface-muted: #0b1715;
    --augnito-panel: #10221f;
    --augnito-primary: #0b455c;
    --augnito-primary-strong: #08394c;
    --augnito-accent: #3bbba2;
}

.dark .prefs-panel,
.dark-green .prefs-panel {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.dark .prefs-field span,
.dark .prefs-check span,
.dark-green .prefs-field span,
.dark-green .prefs-check span {
    color: #c7d5d9;
}

.dark .prefs-input,
.dark .prefs-textarea,
.dark-green .prefs-input,
.dark-green .prefs-textarea {
    background: rgba(0, 0, 0, 0.18);
    color: var(--augnito-text);
}

.dark .prefs-table th,
.dark-green .prefs-table th,
.dark .prefs-check,
.dark-green .prefs-check,
.dark .prefs-recording,
.dark-green .prefs-recording,
.dark .prefs-search,
.dark-green .prefs-search {
    background: rgba(255, 255, 255, 0.05);
}

.dark .prefs-table th,
.dark-green .prefs-table th {
    color: #dce8eb;
}

.dark .prefs-secondary,
.dark-green .prefs-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #eef5f6;
}

.dark .prefs-table tbody tr:hover td,
.dark-green .prefs-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.dark .prefs-status.is-info,
.dark-green .prefs-status.is-info {
    background: rgba(20, 167, 184, 0.14);
    color: #c8f2f6;
}

.dark .prefs-status.is-success,
.dark-green .prefs-status.is-success {
    background: rgba(36, 143, 93, 0.18);
    color: #bff1d9;
}

.dark .prefs-status.is-danger,
.dark-green .prefs-status.is-danger {
    background: rgba(180, 35, 63, 0.18);
    color: #ffc1cc;
}

.dark .prefs-icon-button,
.dark-green .prefs-icon-button {
    color: #8bdded;
}

.dark .prefs-icon-button.is-danger,
.dark-green .prefs-icon-button.is-danger {
    color: #ff8ea4;
}

.dark .prefs-pill,
.dark .prefs-pill.is-muted,
.dark-green .prefs-pill,
.dark-green .prefs-pill.is-muted {
    background: rgba(255, 255, 255, 0.08);
    color: #c8d5d9;
}

.dark .prefs-pill.is-success,
.dark-green .prefs-pill.is-success {
    background: rgba(36, 143, 93, 0.2);
    color: #9ce9c1;
}

.dark .prefs-pill.is-warning,
.dark-green .prefs-pill.is-warning {
    background: rgba(242, 171, 45, 0.18);
    color: #ffd98b;
}

.dark .prefs-pill.is-danger,
.dark-green .prefs-pill.is-danger {
    background: rgba(180, 35, 63, 0.2);
    color: #ff9bad;
}

@media (max-width: 900px) {
    .prefs-header {
        align-items: stretch;
        flex-direction: column;
    }

    .prefs-tabs {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .prefs-workspace {
        grid-template-columns: 1fr;
    }

    .prefs-list-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .prefs-search {
        max-width: none;
        width: 100%;
    }

    .prefs-support-grid,
    .prefs-command-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .prefs-shell {
        padding: 12px;
    }

    .prefs-header {
        border-radius: 0;
        margin: -12px -12px 12px;
    }

    .prefs-tabs a {
        flex: 1 0 auto;
    }

    .prefs-panel {
        border-radius: 6px;
    }

    .prefs-actions,
    .prefs-recording {
        align-items: stretch;
        flex-direction: column;
    }

    .prefs-button {
        width: 100%;
    }

    .prefs-recording {
        align-items: center;
    }

    .prefs-modal-backdrop {
        align-items: flex-start;
        padding: 12px;
    }
}

/* Preserve the Augnito design while MudBlazor renders the controls. */
.augnito-preferences-page .mud-typography,
.augnito-dialog .mud-typography,
.augnito-preferences-page .mud-button-root,
.augnito-dialog .mud-button-root,
.augnito-preferences-page .mud-input,
.augnito-dialog .mud-input,
.augnito-dialog .mud-input-label {
    font-family: var(--augnito-font-family);
    letter-spacing: normal;
}
.augnito-preferences-page .mud-typography-body1,
.augnito-preferences-page .mud-typography-body2,
.augnito-dialog .mud-typography-body1,
.augnito-dialog .mud-typography-body2 {
    font-size: var(--augnito-font-size);
    line-height: 1.5;
}
.prefs-header .prefs-powered.mud-typography {
    font-size: var(--augnito-caption-size);
}
.prefs-tabs .mud-button-root,
.prefs-button.mud-button-root {
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    line-height: 1.5;
}
.prefs-button.mud-button-root { border-radius: 6px; padding: 8px 14px; font-size: var(--augnito-font-size); }
.prefs-tabs .mud-button-label { white-space: nowrap; }
.prefs-tabs .mud-button-icon-start { margin-right: 7px; margin-left: 0; }
.prefs-tabs .mud-icon-root,
.prefs-button .mud-icon-root,
.prefs-icon-button .mud-icon-root { font-size: 15px; }
.prefs-tabs .mud-button-root { min-width: 0; }
.prefs-header .prefs-tabs a { padding: 0 12px; }
.prefs-panel.mud-paper { background: var(--augnito-panel); color: var(--augnito-text); border-radius: 8px; box-shadow: 0 10px 26px rgba(18, 40, 49, 0.08); }
.prefs-button.mud-button-root.prefs-primary { background: var(--augnito-primary); color: white; }
.prefs-button.mud-button-root.prefs-primary:hover { background: var(--augnito-primary-strong); }
.prefs-button.mud-button-root.prefs-secondary { background: #eef3f5; border: 1px solid #cbd8dd; color: #1f2b32; }
.dark .prefs-button.mud-button-root.prefs-secondary,
.dark-green .prefs-button.mud-button-root.prefs-secondary { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: #eef5f6; }
.prefs-button.mud-button-root.prefs-danger { background: var(--augnito-danger); color: white; }
.prefs-button .mud-button-icon-start { margin-left: 0; margin-right: 8px; }
.prefs-list-toolbar .prefs-mud-search {
    flex: 1 1 360px;
    max-width: 520px;
    margin: 0;
}
.prefs-mud-search .mud-input {
    background: var(--augnito-surface-muted);
    border-radius: 6px;
    color: var(--augnito-text);
    font-size: var(--augnito-font-size);
    padding: 0 10px;
    min-height: 38px;
}
.prefs-mud-search .mud-input input.mud-input-root.mud-input-root-outlined { padding: 8px 0; height: 22px; }
.prefs-mud-search .mud-input.mud-input-outlined .mud-input-outlined-border { border-color: var(--augnito-border); border-radius: 6px; }
.prefs-mud-search .mud-input-adornment { margin-right: 8px; color: var(--augnito-muted); }
.prefs-mud-search .mud-input-adornment .mud-icon-root { font-size: 15px; }
.prefs-mud-search .mud-input-control-input-container { margin: 0; }
.prefs-mud-table.mud-table { background: var(--augnito-panel); border-radius: 0; color: var(--augnito-text); min-width: 0; }
.prefs-mud-table .mud-table-root { min-width: 620px; }
.prefs-mud-table.mud-table .mud-table-cell { font-family: var(--augnito-font-family); font-size: var(--augnito-font-size); line-height: 1.5; padding: 12px 14px; border-color: var(--augnito-border); vertical-align: middle; }
.prefs-mud-table .prefs-key,
.prefs-mud-table .prefs-icon-button { vertical-align: middle; }
.prefs-mud-table .mud-table-head .mud-table-cell { font-size: var(--augnito-caption-size); font-weight: 600; }
.prefs-mud-table .prefs-action-cell { text-align: right; width: 108px; }
.prefs-mud-table.mud-table .mud-table-empty-row > td { padding: 0; }
.prefs-mud-table .prefs-empty { min-height: 126px; }
.prefs-empty > .mud-icon-root { color: var(--augnito-primary); font-size: 24px; }
.prefs-page-note.mud-typography { font-size: var(--augnito-caption-size); color: var(--augnito-muted); margin-top: 12px; }
.augnito-dialog.mud-dialog {
    width: calc(100% - 40px);
    max-width: 620px;
    max-height: calc(100vh - 40px);
    border: 1px solid var(--augnito-border);
    border-radius: 8px;
    background: var(--augnito-panel);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}
.augnito-dialog .mud-dialog-title.prefs-mud-dialog-title {
    padding: 12px 16px;
    min-height: 58px;
    border-bottom: 1px solid var(--augnito-border);
}
.augnito-dialog .prefs-mud-dialog-title h2 {
    color: var(--augnito-heading);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 2px 0 0;
}
.augnito-dialog .prefs-eyebrow.mud-typography { font-size: var(--augnito-small-size); }
.augnito-dialog .mud-dialog-content.prefs-mud-dialog-content { padding: 16px 16px 0; }
.augnito-dialog .mud-dialog-actions.prefs-mud-dialog-actions { padding: 14px 16px 16px; gap: 10px; }
.augnito-dialog .mud-input-control { margin: 0; }
.augnito-dialog .mud-input-control > .mud-input-control-input-container { display: flex; flex-direction: column-reverse; }
.augnito-dialog .mud-input-control > .mud-input-control-input-container > .mud-input-label.mud-input-label-inputcontrol {
    position: static;
    transform: none !important;
    transition: none;
    max-width: none;
    align-self: flex-start;
    color: var(--augnito-muted);
    font-size: var(--augnito-caption-size);
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 6px;
    padding: 0 !important;
}
.augnito-dialog .mud-input {
    border-radius: 6px;
    background: var(--augnito-panel);
    color: var(--augnito-text);
    font-size: var(--augnito-font-size);
    line-height: 1.5;
}
.augnito-dialog .mud-input.mud-input-outlined .mud-input-outlined-border { border-color: var(--augnito-border-strong); border-radius: 6px; }
.augnito-dialog .mud-input-outlined-border legend { display: none; }
.augnito-dialog .mud-input input.mud-input-root { padding: 8px 10px; height: 24px; }
/* The MudBlazor wrapper supplies the outline; reset the legacy textarea focus glow. */
.augnito-dialog .mud-input textarea.mud-input-root {
    margin: 0;
    padding: 8px 10px;
    border: 0;
    box-shadow: none;
    min-height: 130px;
    resize: vertical;
}
.augnito-dialog .prefs-mud-check { background: var(--augnito-surface-muted); border: 1px solid var(--augnito-border); border-radius: 6px; min-height: 42px; }
.augnito-dialog .prefs-recording { margin-top: 0; }
.augnito-dialog .prefs-record-button { min-width: 46px; }
.augnito-dialog .prefs-recording .prefs-recording-state { flex: 1 1 0%; min-width: 0; width: 100%; }
.augnito-dialog .mud-input-error .mud-input-label { color: var(--mud-palette-error); }
.prefs-status.mud-alert .mud-alert-message { padding: 0; font-size: var(--augnito-caption-size); }
.prefs-status.mud-alert .mud-alert-position { padding: 0; }
.prefs-command-help-body .prefs-mud-command-list { padding: 0 0 0 20px; }
.prefs-command-help-body .prefs-mud-command-list .mud-list-item { display: list-item; list-style-type: disc; padding: 0 0 0 2px; min-height: 0; }
.prefs-command-help-body .prefs-mud-command-list .mud-list-item-text { margin: 0; }
.prefs-command-help-body .prefs-mud-command-list .mud-typography { font-size: var(--augnito-font-size); line-height: 1.4; }
.prefs-support-copy .prefs-eyebrow.mud-typography { font-size: var(--augnito-small-size); }
.prefs-mud-search .mud-input-outlined input::placeholder { color: var(--augnito-muted); opacity: 1; }
@media (max-width: 760px) {
    .prefs-list-toolbar .prefs-mud-search { max-width: none; flex-basis: auto; width: 100%; }
    .prefs-header .prefs-tabs { flex-wrap: wrap; }
}
