/* V0.21.0 Desktop Business UI
   Desktop-only presentation layer. Tablet/Mobile remain on the V0.20 adaptive layers.
   The existing income/expense segmented control is intentionally inherited unchanged. */

@media (min-width: 1024px) {
  :root {
    background: #f6f8fb;
    color: #182230;
  }

  body {
    background: #f6f8fb;
    color: #182230;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    min-height: 68px;
    padding: 11px 32px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid #e6eaf0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
    backdrop-filter: blur(12px);
  }

  .topbar h1 {
    color: #162033;
    font-size: 21px;
    font-weight: 720;
    letter-spacing: -.02em;
  }

  .topbar p {
    margin-top: 2px;
    color: #7a8697;
    font-size: 12px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .current-user {
    max-width: 220px;
    padding: 6px 10px;
    overflow: hidden;
    border: 1px solid #e7ebf1;
    border-radius: 999px;
    background: #f8fafc;
    color: #526071;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .status {
    position: relative;
    min-height: 30px;
    padding: 6px 10px 6px 24px;
    border: 1px solid #e7ebf1;
    background: #fff;
    color: #667386;
    font-size: 12px;
  }

  .status::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #98a2b3;
    transform: translateY(-50%);
  }

  .status.ok {
    border-color: #d8eee0;
    background: #f7fcf8;
    color: #35694a;
  }

  .status.ok::before {
    background: #3aa76d;
  }

  .status.warn::before {
    background: #d99a2b;
  }

  .topbar .secondary.compact {
    min-height: 32px;
    padding: 5px 11px;
    border-color: #e1e6ed;
    border-radius: 8px;
    background: #fff;
    color: #42526a;
    font-weight: 600;
  }

  .topbar .secondary.compact:hover {
    border-color: #cfd7e3;
    background: #f8fafc;
  }

  .shell {
    width: min(1320px, calc(100% - 48px));
    margin: 24px auto 44px;
    gap: 20px;
  }

  .card {
    border: 1px solid #e6eaf0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .035);
  }

  .entry-card {
    padding: 20px 22px 18px;
  }

  .entry-card.entry-income,
  .entry-card.entry-expense {
    border-color: #e6eaf0;
    background: #fff;
  }

  .entry-card .section-title {
    margin-bottom: 16px;
  }

  .section-title h2 {
    color: #1b2637;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
  }

  .save-message {
    font-weight: 600;
  }

  label > span,
  legend {
    margin-bottom: 6px;
    color: #6d798a;
    font-size: 11.5px;
    font-weight: 650;
  }

  .entry-grid {
    grid-template-columns: 145px 160px 190px minmax(260px, 1fr) 145px 96px;
    gap: 12px;
  }

  input,
  select {
    height: 40px;
    padding: 7px 10px;
    border: 1px solid #d6dde7;
    border-radius: 8px;
    background: #fbfcfe;
    color: #1d2939;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
  }

  input:hover,
  select:hover {
    border-color: #c7d0dc;
    background: #fff;
  }

  input:focus,
  select:focus {
    outline: none;
    border-color: #7aa7e8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 111, 209, .10);
  }

  .primary,
  .secondary {
    border-radius: 8px;
    font-weight: 650;
    transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
  }

  .primary {
    border: 1px solid #2563c9;
    background: #2f6fd2;
    box-shadow: 0 1px 2px rgba(27, 78, 155, .16);
  }

  .primary:hover:not(:disabled) {
    border-color: #1e57b5;
    background: #2865c5;
  }

  .primary:active:not(:disabled) {
    transform: translateY(1px);
  }

  .secondary {
    border-color: #d8dee8;
    background: #fff;
    color: #42526a;
  }

  .secondary:hover:not(:disabled) {
    border-color: #c7d0dc;
    background: #f8fafc;
  }

  .quick-entry-tools {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #f0f2f5;
  }

  .quick-tool-label {
    color: #8792a2;
    font-size: 11px;
    font-weight: 650;
  }

  .quick-chip {
    border-color: #e0e6ee;
    border-radius: 999px;
    background: #f7f9fc;
    color: #45566d;
  }

  .quick-chip:hover {
    border-color: #c9d6e8;
    background: #eef4fc;
    color: #2d5f9e;
  }

  .keyboard-hint {
    margin-top: 11px;
    color: #8a95a5;
    font-size: 11px;
  }

  .keyboard-hint kbd {
    border: 1px solid #d9e0e8;
    border-bottom-color: #c7d0dc;
    border-radius: 5px;
    background: #f8fafc;
    box-shadow: 0 1px 0 #dce2ea;
    color: #42526a;
  }

  .ledger-card {
    overflow: hidden;
  }

  .ledger-title {
    padding: 17px 20px 12px;
  }

  .ledger-title h2 {
    font-size: 17px;
  }

  #monthSummary {
    gap: 5px 14px;
    margin-top: 6px;
  }

  .ledger-summary-item {
    color: #758195;
    font-size: 12px;
  }

  .ledger-summary-item strong {
    color: #344054;
    font-weight: 700;
  }

  .ledger-desktop-tools {
    gap: 10px;
    padding: 9px 14px;
    border-top: 1px solid #edf0f4;
    border-bottom: 1px solid #e7ebf0;
    background: #fafbfd;
  }

  .ledger-period-tools,
  .ledger-view-tools {
    gap: 6px;
    border: 0;
  }

  .ledger-period-tools {
    padding-right: 4px;
  }

  .ledger-view-tools {
    padding-left: 4px;
  }

  .ledger-desktop-tools input,
  .ledger-desktop-tools .secondary.compact {
    height: 34px;
    min-height: 34px;
    border-radius: 7px;
  }

  .ledger-search input {
    background: #fff;
  }

  .ledger-tool-button.emphasis {
    border-color: #cdd7e5;
    background: #fff;
    color: #355d92;
  }

  .table-wrap {
    border-top: 0;
  }

  table {
    background: #fff;
  }

  th {
    padding: 9px 13px;
    border-bottom: 1px solid #e5eaf0;
    background: #f8fafc;
    color: #697586;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .01em;
  }

  td {
    padding: 11px 13px;
    border-bottom: 1px solid #eef1f4;
    color: #344054;
    font-size: 13px;
  }

  tbody tr:hover td {
    background: #f8fbff;
  }

  tbody tr:last-child td {
    border-bottom: 0;
  }

  td.num,
  .ledger-balance {
    color: #24364b;
    font-weight: 650;
  }

  .kind-tag {
    min-width: 46px;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 650;
  }

  .kind-tag.income {
    background: #edf8f0;
    color: #2d6a42;
  }

  .kind-tag.expense {
    background: #fff1f0;
    color: #9a3f37;
  }

  .row-action {
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #3569aa;
    font-weight: 600;
  }

  .row-action:hover:not(:disabled) {
    border-color: #d9e4f2;
    background: #f2f7fd;
  }

  .row-action.delete:hover:not(:disabled) {
    border-color: #f0d7d4;
    background: #fff6f5;
  }

  .account-group-row td {
    background: #f8fafc;
    color: #415166;
  }

  .modal {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
  }

  .modal::backdrop {
    background: rgba(21, 31, 44, .36);
    backdrop-filter: blur(2px);
  }

  .settings-modal > .modal-header {
    padding: 20px 22px 15px;
    border-bottom: 1px solid #edf0f4;
  }

  .modal-header h2 {
    color: #1c2738;
    font-size: 20px;
    font-weight: 720;
  }

  .settings-layout {
    grid-template-columns: 178px minmax(0, 1fr);
  }

  .settings-nav {
    gap: 5px;
    padding: 14px 12px;
    border-right: 1px solid #e8ecf1;
    background: #f8fafc;
  }

  .settings-tab {
    min-height: 38px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #5d6b7d;
    font-weight: 600;
  }

  .settings-tab:hover {
    background: #f1f5f9;
    color: #344054;
  }

  .settings-tab.active {
    border-color: #e1e7ef;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    color: #285b99;
  }

  .settings-content {
    padding: 22px 24px 24px;
  }

  .settings-pane h3 {
    color: #202b3c;
    font-size: 16px;
    font-weight: 700;
  }

  .hint {
    color: #7a8697;
  }

  .manager-list {
    gap: 7px;
  }

  .manager-row {
    min-height: 48px;
    padding: 9px 11px;
    border-color: #e7ebf0;
    border-radius: 9px;
    background: #fbfcfe;
  }

  .manager-row:hover {
    border-color: #d8e0ea;
    background: #fff;
  }

  .mini-button {
    min-height: 29px;
    padding: 4px 8px;
    border-color: #dbe2ea;
    border-radius: 6px;
    background: #fff;
    color: #526174;
    font-weight: 600;
  }

  .mini-button:hover:not(:disabled) {
    border-color: #cbd5e1;
    background: #f8fafc;
  }

  .category-group {
    border-color: #e5eaf0;
    border-radius: 10px;
    background: #fff;
  }

  .category-group-head {
    padding: 10px 12px;
    background: #f8fafc;
  }

  .category-items {
    padding: 6px 12px 9px;
  }

  .category-item {
    border-bottom-color: #eef1f4;
  }

  .opening-modal,
  .small-modal {
    padding: 22px;
  }

  .opening-row {
    padding: 6px 0;
    border-bottom: 1px solid #f0f2f5;
  }

  .confirmation-drawer {
    border-left-color: #e3e8ef;
    background: #fff;
    box-shadow: -18px 0 48px rgba(15, 23, 42, .12);
  }

  .confirmation-drawer .confirmation-list {
    background: #f8fafc;
  }

  .confirmation-edge-open {
    border-color: #dce3eb;
    border-right: 0;
    background: #fff;
    color: #4d5d70;
    box-shadow: -4px 2px 14px rgba(15, 23, 42, .08);
  }

  .confirmation-drawer-collapse {
    border-color: #dce3eb;
    border-right: 0;
    background: #fff;
    color: #5b6878;
  }

  .lock-badge,
  .badge {
    border-radius: 999px;
  }
}
