/* Workspace visual language shared with the exercise catalogue. */
:root {
  --workspace-ink: #203128;
  --workspace-muted: #71816a;
  --workspace-border: #dce3d5;
  --workspace-paper: #fff;
  --workspace-bg: #f4f6f0;
  --workspace-accent: #456c37;
  --workspace-lime: #c8f79a;
  --workspace-danger: #b43c42;
}
#maintenanceSebField { display: flex; align-items: center; gap: 10px; }
#maintenanceSebField input[type='checkbox'] { width: 18px; height: 18px; }
body:not(.auth-screen):not(.catalog-screen) { background: var(--workspace-bg); color: var(--workspace-ink); font-family: 'Segoe UI', Arial, sans-serif; }
#applicationShell { color: var(--workspace-ink); font-family: 'Segoe UI', Arial, sans-serif; }
#applicationShell button, #applicationShell input, #applicationShell select { font-family: inherit; }
#applicationShell button:focus-visible, #applicationShell input:focus-visible, #applicationShell select:focus-visible { outline: 3px solid #779b57; outline-offset: 2px; }
#applicationShell button:disabled { opacity: .6; cursor: default; }
#applicationShell .workspace-context { background: #fff; padding: 12px 18px; border-bottom: 1px solid var(--workspace-border); gap: 12px; }
.workspace-exercise-name strong { font-size: 14px; letter-spacing: -.2px; }
#backExercises::before, .parameter-breadcrumb .breadcrumb-root::before { content: 'w+'; display: inline-grid; place-items: center; margin-right: 9px; width: 24px; height: 24px; border-radius: 7px; background: var(--workspace-lime); color: #304425; font-weight: 800; }
#applicationShell #backExercises { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-left: 4px; border-color: transparent; }
#applicationShell #finishExercise { background: #edf4e5; border-color: #c6d8b6; font-weight: 600; }
#postingSaveStatus { color: var(--workspace-muted); font-size: 11px; }
#postingSaveStatus[data-save-state='saved'] { color: var(--workspace-accent); }
#postingSaveStatus[data-save-state='saved']::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #83a967; margin-right: 6px; }
#upperbar { align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
#msgbox { flex: 1 1 100%; flex-wrap: wrap; align-items: center; margin: 0; min-height: 30px; height: auto; gap: 6px; color: var(--workspace-muted); font-size: 12px; }
#controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; min-width: 0; margin: 0; }
#viewNavigation, #workspaceActions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
#workspaceActions { margin-left: auto; }
#controls button, .report-toolbar button { margin: 0; min-height: 34px; padding: 6px 11px; border: 1px solid var(--workspace-border); border-radius: 8px; background: #fff; color: #49603d; font-size: 12px; font-weight: 600; cursor: pointer; }
#controls button:hover, .report-toolbar button:hover { border-color: #aabd98; background: #edf3e6; }
#controls #viewNavigation button { background: var(--workspace-lime); border-color: #b7d58e; color: #304425; }
#controls #languageToggle { padding: 6px 8px; }
#viewport { border: 1px solid var(--workspace-border); border-radius: 14px; background: #f1f4ec; box-shadow: 0 4px 24px #31472709; }
#sceneContainer { background-color: #f1f4ec; background-image: radial-gradient(#cfdbc4 1px, transparent 1px); background-size: 24px 24px; }
.object { box-sizing: border-box; overflow: hidden; border: 1px solid #d0dcc7; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px #2e4a2520; }
.object .account-heading { box-sizing: border-box; grid-template-columns: 14px minmax(0, 1fr) 14px; gap: 4px; padding: 5px 6px; border-bottom: 1px solid #d9e4d1; border-radius: 11px 11px 0 0; background: #eaf2e2; color: #3e5b30; }
.object[data-account-type='E'] .account-heading { background: #e7f1e9; color: #365d48; }
.object[data-account-type='T'] .account-heading { background: #e5eef7; color: #365b7d; }
.object[data-account-type='B'] .account-heading { background: #f4efdc; color: #78612b; }
.object[data-account-type='R'] .account-heading { background: #eeeaf3; color: #655079; }
.account-heading > span:first-child, .account-heading > span:last-child { display: grid; place-items: center; height: 19px; border-radius: 5px; background: #ffffff80; font-size: 10px; font-weight: 650; }
.object .account-name { font-size: 11.5px; line-height: 14px; font-weight: 650; letter-spacing: -.15px; display: block; overflow-wrap: normal; }
.object .konyvoldal { box-sizing: border-box; color: #354b39; scrollbar-width: thin; scrollbar-color: #c7d5bb transparent; }
.object .t_oldal { border-right: 1px solid #e1e8db; }
.object .k_oldal { border-left: 0; }
.object .row, .object .row-kiindulas { font-size: 12px; font-variant-numeric: tabular-nums; }
.object .row, .object .row-kiindulas { position: relative; padding-right: 10px; }
.object .k_oldal .row, .object .k_oldal .row-kiindulas { padding-left: 10px; }
.object .row > .account-delete { box-sizing: border-box; position: fixed; inset: auto; margin: 0; transform-origin: center; opacity: 1; }
.object .row > .account-delete:not(:popover-open) { display: none; }
.object .row-kiindulas { color: #89947f; background: #f6f8f2; }
.object .row:hover { background: #eef5e7; }
.object .editor { background: #eef5e7; }
.object .editor input { border-color: #a9c493; border-radius: 5px; color: var(--workspace-ink); }
.editor-tools { border-color: #d0dcc7; border-radius: 9px; box-shadow: 0 6px 20px #263b2526; }
.hiba { min-width: 26px; height: 25px; padding: 1px 6px; box-sizing: border-box; border: 1px solid #efc6c4; border-radius: 6px; background: #fff0ec; box-shadow: none; color: var(--workspace-danger); font-size: 11px; font-weight: 600; }
.hiba:hover { background: #fbe0dc; border: 1px solid #d49a96; }
.panel, #overlayPanel { background: #f7f9f3; border-color: var(--workspace-border); scrollbar-width: thin; scrollbar-color: #c7d5bb transparent; }
.report-toolbar { box-sizing: border-box; background: #f7f9f3 !important; padding: 10px !important; gap: 6px !important; border-bottom: 1px solid var(--workspace-border); }
.report-toolbar .closeButton { margin-left: auto; min-width: 30px; }
.panel:has(#fokKivonat) #btnFokKiv1, .panel:has(#forgKimutatas) #btnForgKim1, .panel:has(#beszamolo) #btnBeszamolo1,
#overlayPanel:has(#fokKivonat) #btnFokKiv2, #overlayPanel:has(#forgKimutatas) #btnForgKim2, #overlayPanel:has(#beszamolo) #btnBeszamolo2 { background: #456c37; border-color: #456c37; color: #fff; }
#panelContent, #overlayContent { padding: 16px; }
.fok-table { border: 1px solid var(--workspace-border); border-radius: 10px; overflow: hidden; font-family: inherit; font-size: 13px; background: #fff; }
.fok-table caption, .beszamolo-caption { padding: 2px 0 14px; margin: 0; text-align: left; font-size: 20px; letter-spacing: -.5px; font-weight: 650; color: var(--workspace-ink); }
.fok-table th, .fok-table td { padding: 11px 12px; border: 0; border-bottom: 1px solid #e8ede3; }
.fok-table thead th { padding: 11px 12px; background: #eaf0e2; color: #607253; font-size: 11px; font-weight: 650; }
.fok-table tbody tr:nth-child(even) { background: #fafbf7; }
.fok-table tbody tr:hover { background: #f0f5e9; }
.fok-table tfoot { background: #eaf2e2; color: #3e5b30; font-weight: 650; }
.tables-wrap { font-family: inherit; gap: 14px; }
.balancesheet-table { border-color: var(--workspace-border); border-radius: 10px; background: #fff; }
.balancesheet-row { border-color: #e8ede3; font-size: 13px; color: #46573b; }
.balancesheet-header { background: #eaf0e2; color: #607253; }
.szint1 { color: var(--workspace-accent); background: #eaf2e2; font-weight: 650; }
.szint2 { color: #4d653d; background: #f7f9f2; font-weight: 600; }
.szint3 { color: #64745a; }
.balancesheet-num { font-variant-numeric: tabular-nums; }
#journalView { padding: 22px; background: #f7f9f3; scrollbar-width: thin; scrollbar-color: #c7d5bb transparent; }
.journal-table { border: 1px solid var(--workspace-border); border-collapse: separate; border-spacing: 0; border-radius: 12px; background: #fff; font-size: 13px; }
.journal-table caption { padding: 0 0 18px; font-size: 24px; letter-spacing: -.7px; font-weight: 650; color: var(--workspace-ink); }
.journal-table th, .journal-table td { padding: 11px 10px; border: 0; border-bottom: 1px solid #e5ecde; }
.journal-table th { background: #eaf0e2; color: #637456; font-size: 11px; font-weight: 650; }
.journal-table th:first-child { border-radius: 11px 0 0 0; }
.journal-table th:last-child { border-radius: 0 11px 0 0; }
.journal-table tbody tr:nth-child(even) { background: #fcfdf9; }
.journal-table tbody tr.journal-initial { background: #f5f7f0; color: #859078; }
.journal-table .journal-editable:hover, .journal-table .journal-editable:focus { background: #f0f7e8; }
.journal-table tfoot { background: #f0f5e9; }
.journal-table input, .journal-table select { border-color: #cfdbc4; border-radius: 6px; background: #fff; color: var(--workspace-ink); }
.journal-table .journal-editing { background: #f0f7e8; }
.journal-editing td { padding: 2px; }
.journal-editing input, .journal-editing select { height: min(34px, calc(var(--journal-row-height) - 5px)); }
.journal-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.journal-actions > button { min-height: 38px; padding: 8px 20px; border: 1px solid #b7d58e; border-radius: 8px; background: var(--workspace-lime); color: #304425; font-size: 13px; font-weight: 650; cursor: pointer; }
#tooltip { border-color: var(--workspace-border); border-radius: 10px; box-shadow: 0 8px 30px #263b2526; color: var(--workspace-ink); font-family: 'Segoe UI', Arial, sans-serif; }
#tooltip td, #tooltip th { border-color: #e2e9da; padding: 6px 8px; }
#tooltip th { background: #edf3e5; color: #617451; }
.delete-confirmation { border-color: var(--workspace-border); color: var(--workspace-ink); font-family: 'Segoe UI', Arial, sans-serif; }
.delete-confirmation p { color: var(--workspace-muted); }
@media (max-width: 700px) {
  #applicationShell .workspace-context { padding: 10px 12px; flex-wrap: wrap; }
  #upperbar { padding: 8px 12px; }
  #msgbox { flex-basis: 100%; min-height: 22px; }
  #controls { justify-content: flex-start; }
  #controls button { padding: 6px 9px; }
  #journalView { padding: 14px; }
  #panelContent, #overlayContent { padding: 12px; }
}

/* Float the journal action across the cell edge, clear of right-aligned amounts. */
.journal-table button.delete-row { right: -8px; }

/* Keep account edit fields and their focus indicator inside the 26px row. */
.object .editor input { box-sizing: border-box; }
#applicationShell .object .editor input:focus { outline: none; outline-offset: 0; box-shadow: inset 0 0 0 2px #779b57; }
#applicationShell .object .editor input[aria-invalid='true']:focus { box-shadow: inset 0 0 0 2px var(--workspace-danger); }

.workspace-loading { box-sizing: border-box; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: #f4f6f0; color: #607253; font-family: 'Segoe UI', Arial, sans-serif; }
.workspace-loading p { margin: 0; font-size: 14px; }
.workspace-loading-spinner { width: 20px; height: 20px; border: 2px solid #dce6d2; border-top-color: #668b45; border-radius: 50%; animation: login-spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .workspace-loading-spinner { animation: none; } }

/* Match every leg/row of a hovered unbalanced marker in both views. */
.object [data-posting-marker].transaction-highlight,
#applicationShell .journal-table tbody tr.transaction-highlight {
  background: #fff0e8;
  color: var(--workspace-danger);
  box-shadow: inset 3px 0 0 #d58a76;
}

/* Confirmation uses the same card, surface and control language as the workspace. */
.delete-confirmation { box-sizing: border-box; width: min(420px, calc(100vw - 32px)); padding: 28px; overflow: hidden; border: 1px solid #d6e1cc; border-radius: 20px; background: #fafcf7; box-shadow: 0 24px 80px #20312830; }
.delete-confirmation::backdrop { background: #20312866; backdrop-filter: blur(5px); }
.confirmation-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px; border: 1px solid #f0d6ca; border-radius: 14px; background: #fff0e8; color: var(--workspace-danger); }
.confirmation-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.delete-confirmation h2 { margin: 0 0 12px; font-size: 22px; font-weight: 650; letter-spacing: -.6px; line-height: 1.25; }
.delete-confirmation p { margin: 0 0 26px; color: #71816a; font-size: 14px; line-height: 1.65; }
.delete-dialog-actions { margin: 0 -28px -28px; padding: 18px 28px; gap: 10px; border-top: 1px solid #e0e8d8; background: #f0f4e9; }
.delete-dialog-actions button { min-height: 40px; min-width: 94px; padding: 9px 18px; border: 1px solid #cfdbc4; border-radius: 9px; background: #fff; color: #49603d; font-family: inherit; font-size: 13px; font-weight: 600; }
.delete-dialog-actions .cancel-delete:hover { background: #e8f0df; border-color: #aabd98; }
.delete-dialog-actions .confirm-delete { border-color: #ae3e42; background: #b43c42; color: #fff; }
.delete-dialog-actions .confirm-delete:hover { background: #983239; border-color: #983239; }
.delete-confirmation button:focus-visible { outline: 2px solid #779b57; outline-offset: 3px; }
.delete-confirmation .confirm-delete:focus-visible { outline-color: #b43c42; }

/* Keep the new-entry line in place but unavailable while an existing row is edited. */
#journalForm.is-row-editing tfoot td, #journalForm.is-row-editing .journal-actions { position: relative; }
#journalForm.is-row-editing tfoot td::after, #journalForm.is-row-editing .journal-actions::after {
  content: ''; position: absolute; inset: 0; z-index: 1; background: #f0f5e9dc; cursor: not-allowed;
}
#journalForm.is-row-editing .journal-actions::after { background: #f7f9f3c9; border-radius: 8px; }
.is-inventory-editing tfoot td, .is-inventory-editing > .journal-actions { position: relative; }
.is-inventory-editing tfoot td::after, .is-inventory-editing > .journal-actions::after {
  content: ''; position: absolute; inset: 0; z-index: 1; background: #f0f5e9dc; cursor: not-allowed;
}
.is-inventory-editing > .journal-actions::after { background: #f7f9f3c9; border-radius: 8px; }
.inventory-editing { height: var(--inventory-row-height); background: #f0f7e8; }
.inventory-editing td { padding: 2px; }
.inventory-table .inventory-editing input { height: min(34px, calc(var(--inventory-row-height) - 5px)); padding: 2px 4px; }
#auxiliaryToolButtons { display: contents; }
#auxiliaryToolView { box-sizing: border-box; padding: 22px; overflow: auto; height: 100%; background: #f7f9f3; }
.inventory-ledger h2 { color: var(--workspace-ink); }
.inventory-ledger p { color: var(--workspace-muted); }
.inventory-table { width: 100%; min-width: 740px; table-layout: fixed; }
.inventory-table th:first-child { width: 64px; white-space: nowrap; overflow-wrap: normal; }
.inventory-table th:nth-child(2) { width: 20%; }
.inventory-table input { width: 100%; min-width: 0; box-sizing: border-box; padding: 8px 4px; }
.inventory-table .amount, .inventory-table output { text-align: right; font-variant-numeric: tabular-nums; }
.inventory-table td { overflow-wrap: anywhere; }
#auxiliaryToolButtons button[aria-pressed="true"] { background: var(--workspace-lime); }
#auxiliaryToolView { flex: 1 1 auto; min-width: 0; touch-action: pan-x pan-y pinch-zoom; }
.equity-changes h2 { color: var(--workspace-ink); }
.equity-changes p { color: var(--workspace-muted); }
.equity-table { width: 100%; min-width: 580px; }
.equity-table-caption { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.equity-table th:first-child { width: 32%; }
.equity-table th:nth-child(n+2) { width: auto; }
.equity-table .amount { text-align: right; font-variant-numeric: tabular-nums; }
.equity-table input, .equity-table select { box-sizing: border-box; width: 100%; min-width: 0; }
.equity-table input { padding: 9px 6px; font: inherit; text-align: right; }
.equity-table input[aria-invalid='true'] { border-color: var(--workspace-danger); }
.equity-table .equity-opening { background: #f5f7f0; color: #637456; }
.equity-table .equity-summary { font-weight: 650; }
.equity-table .equity-entry { height: 56px; }
.equity-table .equity-editing { background: #f0f7e8; }
.equity-table .equity-recorded { cursor: pointer; }
.equity-actions { justify-content: flex-start; }
.equity-actions button:disabled { opacity: .5; cursor: default; }
.equity-changes .equity-error { color: var(--workspace-danger); }

#workspaceStatusRow {display:flex;align-items:center;gap:8px;flex:1 1 100%;min-width:0;height:34px;}
#workspaceStatusRow #msgbox {display:flex;flex:1 1 auto;min-width:0;min-height:0;height:34px;flex-wrap:nowrap;white-space:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;}
#workspaceStatusRow #msgbox::-webkit-scrollbar {height:4px;}
#msgbox .hibafelirat {flex-shrink:0;}
#workspaceHelpControl {position:relative;flex:0 0 auto;}
#workspaceHelpToggle {display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:26px;height:26px;min-height:26px;padding:0;border:1px solid var(--workspace-border);border-radius:50%;background:#fff;color:#49603d;font:600 15px 'Segoe UI',sans-serif;cursor:help;}
#workspaceHelpToggle:hover,#workspaceHelpToggle:focus-visible {background:#edf3e6;border-color:#aabd98;}
#workspaceHelpControl #workspaceHelp {display:none;position:absolute;top:100%;right:0;z-index:10010;box-sizing:border-box;width:min(360px,calc(100vw - 32px));margin:0;padding:12px;border:1px solid var(--workspace-border);border-radius:8px;background:#fff;color:var(--workspace-ink);font-size:12px;line-height:1.5;box-shadow:0 4px 16px #20312826;}
#workspaceHelpControl:hover #workspaceHelp,#workspaceHelpControl:focus-within #workspaceHelp {display:block;}
