/* Desktop public/style.css: page, tab, row and download-history rules. */
.workspace { --desktop-page: #f1f5f9; }
.workspace[data-theme="dark"] { --desktop-page: #101823; }
/* Button tokens and interaction states from the desktop app. */
.workspace { --accent-dark:#1b4d8a; --accent-line:#b8cfea; --focus:#3176c6; --focus-glow:rgba(49,118,198,.16); --violet:#76509a; --violet-soft:#f3edf9; --violet-line:#d4c3e6; }
.workspace[data-theme="dark"] { --accent-dark:#afd2ff; --accent-line:#3c628b; --focus:#94c4ff; --focus-glow:rgba(139,189,255,.18); }
.workspace .desktop-button, .workspace .filter-button, .workspace .search-submit,
.workspace[data-theme="dark"] .desktop-button, .workspace[data-theme="dark"] .filter-button, .workspace[data-theme="dark"] .search-submit {
  height:34px; min-height:34px; padding:7px 12px; border:1px solid var(--line-strong); border-radius:6px;
  background:var(--card); color:var(--text-secondary); font-family:inherit;
  font-size:.8125rem; font-weight:600; line-height:18px;
  transition:background-color .12s ease,border-color .12s ease,color .12s ease;
}
.workspace .desktop-button:hover:not(:disabled), .workspace .filter-button:hover:not(:disabled),
.workspace[data-theme="dark"] .desktop-button:hover:not(:disabled), .workspace[data-theme="dark"] .filter-button:hover:not(:disabled) {
  border-color:var(--accent-line); background:var(--surface-hover); color:var(--accent);
}
.workspace .filter-button:hover:not(:disabled), .workspace[data-theme="dark"] .filter-button:hover:not(:disabled) { color:var(--text-secondary); }
.workspace .search-submit:not(#search-button), .workspace[data-theme="dark"] .search-submit:not(#search-button) {
  border-color:var(--accent); background:var(--accent); color:var(--on-accent); box-shadow:0 1px 2px var(--focus-glow);
}
.workspace .search-submit:not(#search-button):hover:not(:disabled), .workspace[data-theme="dark"] .search-submit:not(#search-button):hover:not(:disabled) {
  border-color:var(--accent-dark); background:var(--accent-dark); color:var(--on-accent);
}
.workspace #search-button, .workspace[data-theme="dark"] #search-button { border-color:var(--accent-line); background:var(--accent-soft); color:var(--accent); box-shadow:none; }
.workspace #search-button:hover:not(:disabled), .workspace[data-theme="dark"] #search-button:hover:not(:disabled) { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); }
.workspace .filter-button[aria-expanded="true"], .workspace[data-theme="dark"] .filter-button[aria-expanded="true"] { border-color:var(--accent-line); background:var(--accent-soft); color:var(--accent); }
.workspace .filter-button[aria-expanded="true"]:hover:not(:disabled), .workspace[data-theme="dark"] .filter-button[aria-expanded="true"]:hover:not(:disabled) { border-color:var(--accent-line); background:var(--accent-soft); color:var(--accent); }
.workspace .refresh-button, .workspace[data-theme="dark"] .refresh-button { width:34px; padding:0; border:0; background:transparent; color:var(--text-secondary); font-size:1.05rem; line-height:1; }
.workspace .refresh-button:hover:not(:disabled), .workspace[data-theme="dark"] .refresh-button:hover:not(:disabled) { background:var(--accent-soft); color:var(--accent); }
.workspace .desktop-button.danger-button, .workspace[data-theme="dark"] .desktop-button.danger-button { border-color:var(--danger-line); background:var(--card); color:var(--danger); }
.workspace .desktop-button.danger-button:hover:not(:disabled), .workspace[data-theme="dark"] .desktop-button.danger-button:hover:not(:disabled) { border-color:var(--danger); background:var(--danger-soft); color:var(--danger); }
.workspace .desktop-button:disabled, .workspace .search-submit:disabled, .workspace .filter-button:disabled { opacity:.55; cursor:not-allowed; }
.workspace .desktop-button:focus-visible, .workspace .search-submit:focus-visible, .workspace .filter-button:focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
.workspace .derived-search .desktop-button, .workspace .parser-controls .desktop-button, .workspace .parser-controls .search-submit,
.workspace .account-heading .desktop-button, .workspace .history-periods .desktop-button { height:30px; min-height:30px; padding:5px 9px; font-size:.75rem; }
.workspace #show-filtered[aria-pressed="true"], .workspace[data-theme="dark"] #show-filtered[aria-pressed="true"] { border-color:var(--violet-line); background:var(--violet-soft); color:var(--violet); }
.workspace #show-filtered[aria-pressed="true"]:hover:not(:disabled), .workspace[data-theme="dark"] #show-filtered[aria-pressed="true"]:hover:not(:disabled) { border-color:var(--violet-line); background:var(--violet-soft); color:var(--violet); }
.workspace .history-periods .desktop-button[aria-pressed="true"], .workspace[data-theme="dark"] .history-periods .desktop-button[aria-pressed="true"] { border-color:var(--accent-line); background:var(--accent-soft); color:var(--accent); }
/* Match the desktop form focus states in both themes, replacing the web-only orange ring. */
.workspace input:focus, .workspace select:focus, .workspace textarea:focus,
.workspace[data-theme="dark"] input:focus, .workspace[data-theme="dark"] select:focus, .workspace[data-theme="dark"] textarea:focus {
  border-color:var(--focus);
}
.workspace .desktop-search input:focus { outline:none; }
.workspace input:focus-visible, .workspace select:focus-visible, .workspace textarea:focus-visible,
.workspace .desktop-search input:focus-visible,
.workspace[data-theme="dark"] input:focus-visible, .workspace[data-theme="dark"] select:focus-visible, .workspace[data-theme="dark"] textarea:focus-visible {
  outline:2px solid var(--focus); outline-offset:3px;
}
.workspace input[type="checkbox"], .workspace input[type="radio"] { accent-color:var(--accent); }
.auth-card input:focus { border-color:#3176c6; box-shadow:0 0 0 3px rgba(49,118,198,.16); }
.auth-card input:focus-visible { outline:2px solid #3176c6; outline-offset:3px; }
.workspace, .workspace .app-header { background: var(--desktop-page); }
.workspace .app-tabs { gap: 5px; padding: 0 4px; border-bottom-color: var(--line); }
.workspace .app-tabs .nav-item { min-width: 128px; gap: 10px; padding: 8px 12px; border-radius: 9px 9px 0 0; color: var(--muted); }
.workspace .app-tabs .nav-item:not(.active):hover { background: var(--surface-hover); color: var(--ink); }
.workspace .app-tabs .nav-item.active, .workspace .app-tabs .nav-item.active:hover,
.workspace[data-theme="dark"] .app-tabs .nav-item.active, .workspace[data-theme="dark"] .app-tabs .nav-item.active:hover { background: var(--card); border-color: var(--line); color: var(--accent); box-shadow: inset 0 2px var(--accent); }
.workspace .appearance-card:not(.fresh-server-reset-card) { background: var(--card); border-color: var(--line); }
.workspace .history-table td:not([class^="change-"]) { color: var(--text-secondary); }
.workspace .history-table th:not(:first-child), .workspace .history-table td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.workspace .history-table th:last-child, .workspace .history-table td:last-child { width: 100px; white-space: nowrap; }
.workspace .history-table tbody tr:hover { background: var(--surface-hover); }
/* Mail export disclosure, shared with the desktop Settings stylesheet. */
.workspace .export-settings { max-width: none; padding: 0; }
.workspace .export-settings-disclosure { width: 100%; }
.workspace .export-settings-disclosure > summary { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; color: var(--ink); cursor: pointer; list-style: none; }
.workspace .export-settings-disclosure > summary::-webkit-details-marker { display: none; }
.workspace .export-settings-disclosure > summary::before { flex: none; width: 7px; height: 7px; margin-right: 1px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; content: ''; transform: rotate(-45deg); transition: transform .16s ease; }
.workspace .export-settings-disclosure[open] > summary::before { transform: rotate(45deg); }
.workspace .export-settings-disclosure > summary > span:first-of-type { display: grid; min-width: 0; margin-right: auto; gap: 1px; }
.workspace .export-settings-disclosure > summary strong { font-size: .92rem; font-weight: 700; }
.workspace .export-settings-disclosure > summary small { color: var(--muted); font-size: .76rem; }
.workspace .export-settings-summary { flex: none; color: var(--muted); font-size: .76rem; white-space: nowrap; }
.workspace .export-settings-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.workspace .export-columns { display: grid; grid-template-columns: repeat(3,minmax(185px,1fr)); gap: 8px 12px; margin: 18px 0 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-subtle); }
.workspace .export-columns legend { padding: 0 5px; color: var(--text-secondary); font-size: .78rem; font-weight: 760; }
.workspace .export-columns label { display: flex; min-width: 0; align-items: flex-start; gap: 8px; padding: 8px 9px; border: 1px solid transparent; border-radius: 7px; color: var(--text-secondary); cursor: pointer; font-size: .8rem; font-weight: 650; line-height: 1.25; }
.workspace .export-columns label:hover { border-color: var(--line); background: var(--surface-hover); }
.workspace .export-columns input { flex: none; width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--accent); }
.workspace .derived-view[data-desktop-toolbar] .parser-controls:not([hidden]) { gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); margin-bottom: 8px; }
.workspace .derived-view[data-desktop-toolbar] .parser-controls #parser-job-status { margin-left: auto; text-align: right; }
.workspace .derived-view[data-desktop-toolbar="transactions"] #derived-secondary-button { display: none; }
.workspace .derived-view[data-desktop-toolbar="transactions"], .workspace .derived-view[data-desktop-toolbar="health"] { background: transparent; border: 0; overflow: visible; }
.workspace .derived-view[data-desktop-toolbar="transactions"] .derived-header, .workspace .derived-view[data-desktop-toolbar="health"] .derived-header { background: var(--card); border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; }
.workspace .derived-view[data-desktop-toolbar="transactions"] .derived-table-wrap, .workspace .derived-view[data-desktop-toolbar="health"] .derived-table-wrap { background: var(--card); border-inline: 1px solid var(--line); }
.workspace .derived-view[data-desktop-toolbar="transactions"] .derived-footer, .workspace .derived-view[data-desktop-toolbar="health"] .derived-footer { background: var(--card); border: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.workspace .derived-view[data-desktop-toolbar="transactions"]:has(#derived-more[hidden]) .derived-table-wrap, .workspace .derived-view[data-desktop-toolbar="health"]:has(#derived-more[hidden]) .derived-table-wrap { border-bottom: 1px solid var(--line); border-radius: 0 0 8px 8px; }
@media (max-width: 760px) { .workspace .app-tabs .nav-item { min-width: 0; } .workspace .export-settings-disclosure > summary { min-height: 50px; padding: 10px 12px; } .workspace .export-settings-summary { display: none; } .workspace .export-settings-body { padding: 0 12px 13px; } .workspace .export-columns { grid-template-columns: repeat(2,minmax(150px,1fr)); } }
@media (max-width: 430px) { .workspace .export-columns { grid-template-columns: 1fr; } }
