/* Shared styling for the per-person budget pages (apps/budget/ethan/ and apps/budget/hannah/).
   Extracted from what used to be two near-identical inline <style> blocks so the two pages can't
   drift apart visually. Up-specific rules (.up-badge, .goal-bar-fill.actual) are harmless on a
   page without the Up integration — those elements simply never render there. */

    .app-content { max-width: 700px; }

    /* ── Tab bar ── */
    .budget-tab-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
    .budget-tab-btn {
      padding: 8px 18px; border-radius: 0; border: 1px solid var(--border); background: var(--card-bg);
      color: var(--text-secondary); font-size: 0.85rem; font-weight: 500; font-family: var(--font);
      cursor: pointer; transition: all 0.15s;
    }
    .budget-tab-btn:hover { border-color: var(--accent); color: var(--accent); }
    .budget-tab-btn.active { background: var(--accent); color: var(--white); border-color: var(--accent); }

    /* ── Shared modal chrome ── */
    .modal-overlay { display: none; position: fixed; inset: 0; z-index: 200; align-items: center; justify-content: center; }
    .modal-overlay.visible { display: flex; }
    .modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.3); }
    .modal-content {
      position: relative; background: var(--card-bg); border: 1px solid var(--border); border-top: 3px solid var(--accent);
      border-radius: var(--radius-md); padding: 32px; width: 90%; max-width: 460px; box-shadow: var(--shadow-md);
      max-height: 90vh; overflow-y: auto;
    }
    .modal-content-wide { max-width: 640px; padding: 28px; }
    .modal-content h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 20px; color: var(--text); }
    .modal-content .form-group { margin-bottom: 14px; }
    .modal-content .form-group label { display: block; font-size: 0.82rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
    .modal-content .form-group input, .modal-content .form-group select {
      width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
      font-size: 0.95rem; font-family: var(--font); color: var(--text); background: var(--card-bg);
      outline: none; transition: border-color 0.15s, box-shadow 0.15s; box-sizing: border-box;
    }
    .modal-content .form-group input:focus, .modal-content .form-group select:focus {
      border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,107,53,0.12);
    }
    .modal-footer { display: flex; gap: 8px; margin-top: 24px; align-items: center; }
    .btn-modal-save {
      padding: 10px 24px; background: var(--accent); color: var(--white); border: none; border-radius: var(--radius-sm);
      font-size: 0.88rem; font-weight: 600; font-family: var(--font); cursor: pointer; transition: background 0.15s;
    }
    .btn-modal-save:hover { background: var(--accent-hover); }
    .btn-modal-cancel {
      padding: 10px 20px; background: var(--card-bg); color: var(--text-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm);
      font-size: 0.88rem; font-weight: 500; font-family: var(--font); cursor: pointer; transition: all 0.15s;
    }
    .btn-modal-cancel:hover { border-color: var(--text-muted); color: var(--text); }
    .btn-modal-delete {
      margin-left: auto; padding: 10px 16px; background: var(--card-bg); color: var(--error, #c0392b); border: 1px solid var(--error, #c0392b);
      border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 500; font-family: var(--font); cursor: pointer; transition: all 0.15s;
    }
    .btn-modal-delete:hover { background: var(--error-bg); }
    .btn-see-hidden {
      padding: 6px 14px; background: var(--card-bg); color: var(--text-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm);
      font-size: 0.78rem; font-weight: 600; font-family: var(--font); cursor: pointer; transition: all 0.15s; white-space: nowrap;
    }
    .btn-see-hidden:hover { border-color: var(--accent); color: var(--accent); }
    .list-empty { text-align: center; padding: 50px 20px; color: var(--text-muted); font-size: 0.88rem; }
    .list-empty strong { display: block; color: var(--text-secondary); margin-bottom: 4px; }

    @media (max-width: 560px) { .modal-content { padding: 24px 20px; } }

    /* ══════ Living Expenses tab ══════ */
    .budget-section {
      border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 16px; overflow: hidden;
    }
    .budget-section-header {
      display: flex; align-items: center; justify-content: space-between; padding: 14px 20px;
      background: var(--card-bg); border-bottom: 1px solid var(--border); cursor: pointer; user-select: none;
    }
    .budget-section-header:hover { background: var(--body-bg); }
    .budget-section.collapsed .budget-section-header { border-bottom: none; }
    .budget-section-title { font-size: 0.88rem; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: 0.04em; }
    .budget-section-controls { display: flex; align-items: center; gap: 10px; }
    .btn-section-action {
      padding: 5px 14px; background: var(--accent); color: var(--white); border: none; border-radius: var(--radius-sm);
      font-size: 0.78rem; font-weight: 600; font-family: var(--font); cursor: pointer; transition: background 0.15s; white-space: nowrap;
    }
    .btn-section-action:hover { background: var(--accent-hover); }
    .chevron { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-muted); transition: transform 0.2s; }
    .budget-section.collapsed .chevron { transform: rotate(-90deg); }
    .budget-section-body { background: var(--card-bg); padding: 20px; }
    .budget-section.collapsed .budget-section-body { display: none; }

    .income-row { display: flex; flex-direction: column; gap: 6px; max-width: 260px; }
    .income-label { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
    .income-input-wrap { position: relative; }
    .income-input-wrap::before {
      content: '$'; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.95rem; pointer-events: none;
    }
    .income-input {
      width: 100%; padding: 10px 12px 10px 22px; border: 1px solid var(--border); border-radius: var(--radius-sm);
      font-size: 1rem; font-family: var(--font); font-weight: 600; color: var(--text); background: var(--card-bg);
      outline: none; transition: border-color 0.15s, box-shadow 0.15s; box-sizing: border-box;
    }
    .income-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,107,53,0.12); }

    .expense-list { display: flex; flex-direction: column; gap: 8px; }
    .expense-row {
      display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card-bg);
      border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm);
    }
    .expense-row.computed { border-left-color: var(--text-muted); background: var(--body-bg); }
    .expense-info { flex: 1; min-width: 0; }
    .expense-name { font-size: 0.9rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .expense-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
    .expense-amounts { text-align: right; flex-shrink: 0; }
    .expense-amount-main { font-size: 0.9rem; font-weight: 600; color: var(--text); }
    .expense-amount-fn { font-size: 0.75rem; color: var(--text-muted); margin-top: 1px; }
    .btn-expense-edit {
      padding: 4px 10px; border-radius: var(--radius-sm); font-size: 0.75rem; font-family: var(--font); font-weight: 500;
      border: 1px solid var(--border); background: var(--card-bg); color: var(--text-secondary); cursor: pointer; transition: all 0.15s; flex-shrink: 0;
    }
    .btn-expense-edit:hover { border-color: var(--accent); color: var(--accent); }
    .section-subtotal {
      display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; padding-top: 12px;
      border-top: 1px solid var(--border-light); margin-top: 4px;
    }
    .section-subtotal-label { font-size: 0.8rem; color: var(--text-muted); }
    .section-subtotal-value { font-size: 1rem; font-weight: 700; color: var(--text); }

    .summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .stat-box { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; text-align: center; }
    .stat-box-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
    .stat-box-value { font-size: 1.05rem; font-weight: 700; color: var(--text); }
    .stat-box-value.positive { color: var(--accent); }
    .stat-box-value.negative { color: var(--error, #c0392b); }

    /* ══════ Money Plan tab ══════ */
    .mp-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
    .mp-top-title { font-size: 0.88rem; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.05em; }
    .mp-top-actions { display: flex; gap: 8px; align-items: center; }
    .btn-add-fortnight {
      padding: 6px 16px; background: var(--accent); color: var(--white); border: none; border-radius: var(--radius-sm);
      font-size: 0.78rem; font-weight: 600; font-family: var(--font); cursor: pointer; transition: background 0.15s; white-space: nowrap;
    }
    .btn-add-fortnight:hover { background: var(--accent-hover); }

    .fortnight-list { display: flex; flex-direction: column; gap: 16px; }
    .fortnight-card {
      background: var(--card-bg); border: 1px solid var(--border); border-left: 3px solid var(--accent);
      border-radius: var(--radius-md); padding: 18px 20px;
    }
    .fortnight-header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
    .fortnight-dates { font-size: 0.95rem; font-weight: 700; color: var(--text); }
    .fortnight-dates input[type=date] {
      border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 8px; font-size: 0.85rem;
      font-family: var(--font); color: var(--text); background: var(--card-bg);
    }
    .fortnight-header-actions { display: flex; align-items: baseline; gap: 12px; flex-shrink: 0; }
    .btn-delete-fortnight {
      background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.74rem;
      font-family: var(--font); text-decoration: underline; padding: 0;
    }
    .btn-delete-fortnight:hover { color: var(--error); }
    .btn-hide-fortnight {
      background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.74rem;
      font-family: var(--font); text-decoration: underline; padding: 0;
    }
    .btn-hide-fortnight:hover { color: var(--accent); }
    .fortnight-carried { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px; }
    .fortnight-carried strong { color: var(--text-secondary); }

    .fortnight-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
    .ff-field { display: flex; flex-direction: column; gap: 4px; }
    .ff-field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
    .ff-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
    .btn-prefill {
      background: none; border: none; color: var(--accent); font-size: 0.68rem; font-family: var(--font);
      cursor: pointer; padding: 0; text-decoration: underline;
    }
    .btn-prefill:hover { opacity: 0.7; }
    .ff-input-wrap { position: relative; }
    .ff-input-wrap::before {
      content: '$'; position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; pointer-events: none;
    }
    .ff-input {
      width: 100%; padding: 8px 10px 8px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm);
      font-size: 0.9rem; font-family: var(--font); color: var(--text); background: var(--card-bg); box-sizing: border-box;
      transition: border-color 0.15s;
    }
    .ff-input:focus { outline: none; border-color: var(--accent); }

    .item-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
    .item-list:empty { margin-bottom: 0; }
    .item-row {
      display: flex; align-items: center; gap: 9px; padding: 6px 8px 6px 10px; background: var(--card-bg);
      border: 1px solid var(--border-light); border-radius: var(--radius-sm); font-size: 0.82rem;
    }
    .item-row-label { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--text); cursor: pointer; }
    .item-row-done { background: var(--accent-subtle); border-color: color-mix(in srgb, var(--accent) 40%, var(--accent-light)); }
    .item-row-done .item-row-label { color: var(--text-muted); }
    .item-done-tick {
      display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px;
      margin-right: 5px; background: var(--accent); color: var(--white); border-radius: 50%;
      vertical-align: middle; flex-shrink: 0;
    }
    .item-happened-row { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 0.85rem; color: var(--text); }
    .item-happened-row input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
    .item-row-label:hover { text-decoration: underline; text-decoration-color: var(--border); }
    .item-goal-badge {
      display: inline-block; padding: 1px 7px; background: var(--accent-light); color: var(--accent);
      border-radius: 0; font-size: 0.68rem; font-weight: 600; vertical-align: middle;
    }
    .item-info-btn {
      display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px;
      margin-left: 5px; padding: 0; background: var(--accent-light); color: var(--accent); border: none;
      border-radius: 50%; font-size: 0.66rem; font-weight: 700; font-family: var(--font); line-height: 1;
      cursor: pointer; vertical-align: middle;
    }
    .item-info-btn:hover { background: color-mix(in srgb, var(--accent) 25%, var(--accent-light)); }
    .item-row-amount { font-weight: 600; flex-shrink: 0; }
    .item-row-amount.positive { color: var(--accent); }
    .item-row-amount.negative { color: var(--error); }
    .item-row-remove {
      background: none; border: none; padding: 0; cursor: pointer; color: var(--text-muted);
      font-size: 1.1rem; line-height: 1; opacity: 0.55; flex-shrink: 0;
    }
    .item-row-remove:hover { opacity: 1; color: var(--error); }
    .btn-add-item {
      padding: 6px 14px; background: var(--accent-light); color: var(--accent); border: none; border-radius: var(--radius-sm);
      font-size: 0.76rem; font-weight: 600; font-family: var(--font); cursor: pointer; transition: background 0.15s;
    }
    .btn-add-item:hover { background: color-mix(in srgb, var(--accent) 25%, var(--accent-light)); }
    .field-hint { font-size: 0.7rem; color: var(--text-muted); margin: 4px 0 12px; }

    .fortnight-footer {
      display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px;
      border-top: 1px solid var(--border-light); margin-top: 4px;
    }
    .fortnight-footer-label { font-size: 0.8rem; color: var(--text-muted); }
    .fortnight-footer-value { font-size: 1.05rem; font-weight: 700; }
    .fortnight-footer-value.positive { color: var(--accent); }
    .fortnight-footer-value.negative { color: var(--error); }

    /* ══════ Savings Goals tab ══════ */
    .sg-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
    .sg-top-title { font-size: 0.88rem; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.05em; }
    .sg-top-actions { display: flex; gap: 8px; align-items: center; }
    .btn-add-goal {
      padding: 6px 16px; background: var(--accent); color: var(--white); border: none; border-radius: var(--radius-sm);
      font-size: 0.78rem; font-weight: 600; font-family: var(--font); cursor: pointer; transition: background 0.15s; white-space: nowrap;
    }
    .btn-add-goal:hover { background: var(--accent-hover); }

    .goal-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .goal-column-header {
      font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
      padding: 6px 10px; border-radius: var(--radius-sm); margin-bottom: 10px; text-align: center;
    }
    .goal-column-header.priority-now    { background: var(--error-bg); color: var(--error); }
    .goal-column-header.priority-later  { background: var(--badge-amber-bg); color: var(--badge-amber-text); }
    .goal-column-header.priority-future { background: var(--badge-blue-bg); color: var(--badge-blue-text); }
    .goal-column-list { display: flex; flex-direction: column; gap: 10px; }
    .goal-column-empty {
      text-align: center; padding: 16px 8px; color: var(--text-muted); font-size: 0.78rem;
      border: 1px dashed var(--border); border-radius: var(--radius-sm);
    }

    .goal-card {
      background: var(--card-bg); border: 1px solid var(--border); border-left: 3px solid var(--accent);
      border-radius: var(--radius-md); padding: 14px 16px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
    }
    .goal-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
    /* A debt reads red-edged rather than the accent green of a true savings goal. */
    .goal-card.debt { border-left-color: var(--error); }
    .goal-card.debt:hover { border-color: var(--error); }
    .debt-badge {
      display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px; vertical-align: middle;
      background: var(--error-bg); color: var(--error); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    }
    .goal-link-head {
      display: flex; gap: 8px; margin-bottom: 6px; padding-right: 34px;
      font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
      color: var(--text-secondary);
    }
    .goal-link-head span:first-child { flex: 1; }
    .goal-link-head span:last-child { flex: 1.4; }
    .goal-link-row { display: flex; gap: 8px; align-items: center; margin-bottom: 7px; }
    .goal-link-row .gl-label { flex: 1; }
    .goal-link-row .gl-url { flex: 1.4; }
    .goal-link-row input {
      padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
      font-size: 0.85rem; font-family: var(--font); color: var(--text); background: var(--card-bg);
      box-sizing: border-box; min-width: 0;
    }
    .goal-link-row input:focus { outline: none; border-color: var(--accent); }
    .gl-remove {
      flex-shrink: 0; width: 26px; height: 26px; border: 1px solid var(--border); background: none;
      border-radius: var(--radius-sm); color: var(--text-muted); font-size: 1rem; line-height: 1; cursor: pointer;
    }
    .gl-remove:hover { background: var(--error-bg); color: var(--error); border-color: var(--error-border); }
    .btn-add-goal-link {
      padding: 5px 11px; background: var(--accent-light); color: var(--accent); border: none;
      border-radius: var(--radius-sm); font-size: 0.74rem; font-weight: 600; font-family: var(--font); cursor: pointer;
    }
    .btn-add-goal-link:hover { background: color-mix(in srgb, var(--accent) 25%, var(--accent-light)); }
    .goal-detail-btn {
      display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px;
      margin-left: 5px; padding: 0; background: var(--accent-light); color: var(--accent); border: none;
      border-radius: 50%; font-size: 0.62rem; font-weight: 700; cursor: pointer; vertical-align: middle;
    }
    .goal-detail-link { display: block; font-size: 0.82rem; margin-bottom: 4px; overflow-wrap: anywhere; }
    .goal-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
    .goal-name { font-size: 0.94rem; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
    .btn-hide-goal {
      background: none; border: none; padding: 1px; color: var(--text-muted); cursor: pointer;
      display: flex; align-items: center; flex-shrink: 0; transition: color 0.15s;
    }
    .btn-hide-goal:hover { color: var(--accent); }
    .goal-card-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
    .btn-move-goal {
      background: none; border: none; padding: 1px 3px; color: var(--text-muted); cursor: pointer;
      font-size: 0.7rem; line-height: 1; transition: color 0.15s;
    }
    .btn-move-goal:hover:not(:disabled) { color: var(--accent); }
    .btn-move-goal:disabled { opacity: 0.25; cursor: default; }
    .goal-amounts { font-size: 0.8rem; color: var(--text-muted); display: block; margin-bottom: 6px; }
    .goal-amounts strong { color: var(--text); }
    .up-badge {
      display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; vertical-align: middle;
      background: #ff7a64; color: #fff; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    }
    .goal-progress + .goal-progress { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
    .goal-progress-label { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 4px; }
    .goal-bar-fill.actual { background: #ff7a64; }
    .goal-bar-track { width: 100%; height: 8px; background: var(--body-bg); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
    .goal-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.2s; }
    .goal-bar-fill.over { background: var(--error); }
    .goal-meta { font-size: 0.76rem; color: var(--text-muted); }
    .goal-meta.positive { color: var(--accent); font-weight: 600; }

    .hidden-goal-list { display: flex; flex-direction: column; gap: 8px; }
    .hidden-goal-row {
      display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px;
      border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card-bg);
    }
    .hidden-goal-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .hidden-goal-name { font-size: 0.82rem; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
    .hidden-goal-priority { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }

    @media (max-width: 600px) {
      .goal-columns { grid-template-columns: 1fr; }
    }
    @media (max-width: 480px) {
      .fortnight-fields { grid-template-columns: 1fr; }
    }

    /* ══════ Work From Home tab ══════ */
    .wfh-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
    .wfh-top-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .wfh-top select { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.82rem; background: var(--card-bg); color: var(--text); }
    .wfh-year-total { font-size: 0.82rem; color: var(--text-light); }
    .wfh-year-total strong { color: var(--text); font-size: 0.95rem; }
    .btn-wfh-export {
      padding: 6px 16px; background: var(--card-bg); color: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-sm);
      font-size: 0.78rem; font-weight: 600; font-family: var(--font); cursor: pointer; transition: all 0.15s; white-space: nowrap;
    }
    .btn-wfh-export:hover { background: var(--accent); color: var(--white); }
    .wfh-table-wrap { overflow-x: auto; }
    table.wfh-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
    table.wfh-table th, table.wfh-table td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
    table.wfh-table th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-light); font-weight: 700; }
    table.wfh-table th:first-child, table.wfh-table td:first-child,
    table.wfh-table th:nth-child(2), table.wfh-table td:nth-child(2) { text-align: left; }
    table.wfh-table tbody tr { cursor: pointer; }
    table.wfh-table tbody tr:hover { background: var(--accent-light); }
    table.wfh-table td.wfh-zero { color: var(--border); }
    table.wfh-table td.wfh-total { font-weight: 700; color: var(--text); }
    table.wfh-table tr.wfh-current td { background: var(--accent-light); }
    table.wfh-table tfoot td { border-top: 2px solid var(--text); border-bottom: none; font-weight: 700; padding-top: 9px; }
    .wfh-week-fields { display: grid; grid-template-columns: 1fr; gap: 12px; }
    .wfh-week-fields .form-group { margin: 0; }
    .wfh-week-fields input { width: 100%; }
    .wfh-modal-weektotal { margin-top: 12px; font-size: 0.85rem; color: var(--text-light); }
    .wfh-modal-weektotal strong { color: var(--text); }
    .btn-wfh-standard {
      margin-top: 10px; padding: 5px 12px; background: var(--accent-light); color: var(--accent); border: 1px solid var(--border);
      border-radius: var(--radius-sm); font-size: 0.74rem; font-weight: 600; font-family: var(--font); cursor: pointer;
    }
    .btn-wfh-standard:hover { border-color: var(--accent); }
    @media (max-width: 560px) {
      table.wfh-table th:nth-child(2), table.wfh-table td:nth-child(2) { display: none; }
    }