.chart-value-compact { display: none; }
/* Desktop polish. The mobile layout retains its own composition. */
.chart-value-rounded { display:none; }
#todayView .modern-welcome p { text-transform:none; }
@media (min-width:721px) {
  .main:has(#todayView:not([hidden])) { padding-top:26px; }
  #todayView .today-mobile-dashboard { gap:20px 24px; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); }
  #todayView .modern-topbar { padding-bottom:16px; align-items:center; }

  #todayView .modern-demo-badge { border-radius:6px; padding:5px 8px; min-height:0; font-size:12px; line-height:1.4; letter-spacing:.04em; }
  #todayView .studio-add { min-height:40px; padding:10px 15px; border-radius:8px; background:var(--navy); border-color:var(--navy); color:#fff; font-size:14px; font-weight:600; }
  #todayView .studio-add:hover { background:var(--navy-soft); border-color:var(--navy-soft); }
  #todayView .modern-avatar { width:32px; height:32px; min-height:32px; background:transparent; color:var(--muted); border-color:var(--line); }
  #todayView .modern-welcome { display:flex; align-items:baseline; justify-content:space-between; gap:12px 24px; flex-wrap:wrap; margin:4px 0 2px; }
  #todayView .modern-welcome > .studio-eyebrow { display:none; }
  #todayView .modern-welcome h1 { font-size:clamp(32px,2.8vw,40px); line-height:1.18; letter-spacing:-.035em; }
  #todayView .modern-welcome p { margin:0; font-size:14px; color:var(--muted); }
  .main #todayView .modern-overview-card,
  .main #todayView .modern-overview-card:hover,
  .main #todayView .modern-overview-card:active { min-height:180px; padding:18px 24px; transform:none; align-self:start; }
  #todayView .modern-overview-card > strong { font-size:clamp(38px,3.4vw,48px); letter-spacing:-.035em; margin:10px 0 8px; }
  #todayView .modern-overview-card .modern-overview-label { font-size:15px; }
  #todayView .modern-overview-card .today-mobile-trend { font-size:14px; line-height:1.6; margin:0; gap:8px; flex-wrap:wrap; }
  #todayView .today-mobile-trend.is-neutral .modern-trend-icon { display:none; }
  #todayView .studio-revenue-foot { font-size:13px; padding-top:12px; }
  #todayView .studio-rhythm { padding:22px 24px 18px; }
  #todayView .studio-rhythm header > .studio-eyebrow { display:none; }
  #todayView .studio-rhythm h2 { font-size:24px; letter-spacing:-.025em; margin:0 0 6px; }
  #todayView .studio-rhythm header p { font-size:13px; }
  #todayView .studio-rhythm header p::after { content:' · bedragen in €'; }
  #todayView .studio-chart { height:116px; margin-top:16px; gap:12px; }
  #todayView .studio-chart-value { font-size:13px; font-variant-numeric:tabular-nums; }
  #todayView .chart-value-exact { display:none; }
  #todayView .chart-value-rounded { display:inline; }
  #todayView .studio-chart-column small { font-size:13px; }
  #todayView .studio-chart-column.is-current i { border:1px dashed var(--accent); background:color-mix(in srgb,var(--accent) 55%,var(--paper)); }
  #todayView .studio-chart-note { font-size:12px; line-height:1.5; margin-top:12px; }
  #todayView .modern-daily-briefing { padding-top:20px; margin:0; }
  #todayView .modern-focus-head { margin-bottom:14px; }
  #todayView .modern-focus-head strong { font-size:27px; letter-spacing:-.025em; }
  #todayView .modern-focus-head small { margin-top:4px; font-size:14px; }
  #todayView .modern-daily-briefing :is(.modern-attention-card,.modern-open-invoices) { min-height:72px; }
  #todayView .modern-month-panel { padding-top:20px; }
  #todayFocusCount { border-radius:6px; }
}
@media (min-width:721px) and (max-width:1100px) {
  #todayView .modern-welcome h1 { font-size:34px; }
  #todayView .today-mobile-dashboard { gap:18px; }
  #todayView .studio-rhythm { padding:20px 18px 16px; }
  #todayView .studio-chart { gap:6px; }
  #todayView .studio-chart-value { font-size:12px; }
  #todayView .studio-rhythm header p::after { content:' · €'; }
}
#todayView .modern-welcome #todayMobileDate::first-letter { text-transform:none; }
@media (min-width:721px) {
  #todayView .modern-daily-briefing { height:auto; min-height:0; }
  #todayView .modern-focus-head { min-height:0; padding-bottom:0; }
  #todayView .modern-overview-card > strong,
  #todayView .modern-overview-card .today-mobile-trend { max-width:100%; }
  #todayView .modern-financial-summary > div { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (min-width:721px) and (max-width:1100px) {
  #todayView .modern-financial-summary > div { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #todayView .modern-month-metric:nth-child(2n) { border-right:0; }
  #todayView .modern-month-metric:nth-child(-n+2) { border-bottom:1px solid var(--line); }
}

/* One aligned context label and one predictable create action. */
#todayView .modern-topbar .modern-brand { align-items:center; gap:10px; }
#todayView .modern-topbar .modern-brand::before { content:none; }
.studio-view-label { display:none; }
#todayView .modern-demo-badge { margin:0; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
#todayView .modern-demo-badge[hidden] { display:none; }
#todayNewMenu { position:relative; z-index:20; margin-left:auto; flex-shrink:0; }
#todayNewMenu > summary { display:flex; align-items:center; justify-content:center; width:44px; min-width:44px; height:44px; min-height:44px; margin:0; padding:0; border:1px solid var(--navy); border-radius:10px; background:var(--navy); color:#fff; font-size:14px; font-weight:600; list-style:none; cursor:pointer; box-shadow:none; transform:none; filter:none; transition:background .15s,border-color .15s; }
#todayNewMenu > summary::-webkit-details-marker { display:none; }
#todayNewMenu > summary:hover { background:var(--navy-soft); border-color:var(--navy-soft); }
#todayNewMenu > summary:focus-visible { outline:2px solid var(--focus); outline-offset:4px; box-shadow:none; }
#todayNewMenu .today-new-chevron { margin:0; transform:rotate(90deg); }
#todayNewMenu[open] .today-new-chevron { transform:rotate(-90deg); }
#todayNewMenu .today-new-popover { position:absolute; top:calc(100% + 10px); right:0; display:grid; width:270px; max-width:calc(100vw - 32px); padding:8px; border:1px solid var(--line); border-radius:10px; background:var(--paper); box-shadow:0 12px 32px #00000018; }
#todayNewMenu .today-new-popover button { display:grid; grid-template-columns:20px minmax(0,1fr); align-items:center; gap:12px; width:100%; min-height:58px; padding:10px 12px; border:0; border-radius:6px; background:transparent; color:var(--ink); text-align:left; }
#todayNewMenu .today-new-popover button:hover { background:var(--hover); }
#todayNewMenu .today-new-popover strong, #todayNewMenu .today-new-popover small { display:block; }
#todayNewMenu .today-new-popover strong { font-size:14px; font-weight:600; }
#todayNewMenu .today-new-popover small { margin-top:4px; font-size:13px; line-height:1.4; color:var(--muted); }
@media (min-width:721px) {
  .studio-view-label { display:block; font-size:12px; line-height:1.4; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); }
  .sidebar .nav-button { font-size:15px; }
  .sidebar .privacy-note strong, .sidebar .privacy-note small { font-size:12px; }
  .studio-nav-label { font-size:11px; }
  .main .page-head p { font-size:15px; }
  .main .page-header-action { font-size:14px; }
  .main :is(.invoice-table-head,.expense-table-head,.invoice-status) { font-size:12px; }
  .main :is(#invoicesView,#expensesView,#moneyView,#workView) > .invoice-metrics :is(.invoice-hero-card,.invoice-kpi-card) > span:not(.invoice-kpi-icon) { font-size:14px; }
  .main :is(#invoicesView,#expensesView,#moneyView,#workView) > .invoice-metrics :is(.invoice-hero-card,.invoice-kpi-card) > small { font-size:13px; }
  .main :is(.panel-note,.settings-panel-hero p,.setting-label small) { font-size:14px; }
  #settingsView .settings-nav strong { font-size:14px; }
  #settingsView .settings-nav small { font-size:13px; }
  #todayView .modern-daily-briefing :is(.modern-attention-card,.modern-open-invoices) strong { font-size:15px; }
  #todayView .modern-daily-briefing :is(.modern-attention-card,.modern-open-invoices) small { font-size:13px; }
  #todayView .modern-daily-briefing :is(.modern-focus-action,.modern-row-chevron),
  #todayView .modern-upcoming .modern-focus-action::before { font-size:13px; }
  #todayView .modern-upcoming .modern-focus-action { font-size:0; }
  #todayView .modern-financial-summary .modern-month-copy small { font-size:13px; }
  #todayFocusCount { font-size:12px; }
}
@media (max-width:720px) {
  #todayView .modern-topbar { align-items:center; }
  #todayView .modern-topbar .modern-brand { gap:6px; }
  #todayNewMenu > summary { width:44px; min-width:44px; height:44px; min-height:44px; padding:0; }
  #todayNewMenu .today-new-chevron { display:none; }
}
@media (max-width:359px) { #todayNewMenu > summary > span { display:none; } }

@media (min-width:721px) {
  #todayView .modern-daily-briefing .modern-focus-action[data-desktop-label] { font-size:0; }
  #todayView .modern-daily-briefing .modern-focus-action[data-desktop-label]::before { font-size:13px; }
}

.language-setting { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:24px 0; margin-bottom:24px; border-bottom:1px solid var(--line); }
.language-setting h3 { margin:0 0 8px; }
.language-setting p { margin:0; color:var(--muted); font-size:14px; line-height:1.5; }
.language-setting .theme-switch { flex-shrink:0; }
@media(max-width:720px) { .language-setting { align-items:stretch; flex-direction:column; } }
@media(min-width:721px) { html[lang=en] #todayView .studio-rhythm header p::after { content:' · amounts in €'; } }
@media(min-width:721px) and (max-width:1100px) { html[lang=en] #todayView .studio-rhythm header p::after { content:' · €'; } }

/* Language is available before the first setup step. */
.first-run-language { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.first-run-language .theme-switch { width: auto; }

.studio-revenue-foot > [data-i18n] { font: inherit; }

/* Payment summary: aligned header and footer, with the dashboard's display numerals. */
#detailPaymentPanel { padding:24px; }
#detailPaymentPanel .payment-main {
  display:grid; grid-template-columns:24px minmax(90px,1fr) minmax(0,auto);
  grid-template-areas:"icon status amount"; align-items:start;
  gap:16px; margin:0; text-align:left;
}
#detailPaymentPanel .payment-icon { grid-area:icon; width:24px; height:24px; margin:2px 0 0; }
#detailPaymentPanel .payment-icon .summa-icon { width:24px; height:24px; }
#detailPaymentPanel .payment-text { grid-area:status; align-self:start; }
#detailPaymentPanel .payment-text .panel-kicker { display:block; margin:0 0 8px; }
#detailPaymentPanel .payment-main h2 { margin:0; font-size:22px; line-height:1.25; }
#detailPaymentPanel .payment-amount {
  grid-area:amount; align-self:start; min-width:0; text-align:right;
  font:400 clamp(38px,3.4vw,48px)/1.1 var(--font-display);
  font-variant-numeric:tabular-nums; letter-spacing:-.035em; overflow-wrap:anywhere;
}
#detailPaymentPanel .payment-footer {
  display:flex; align-items:flex-end; flex-wrap:wrap; gap:20px 24px;
  margin-top:28px; padding-top:20px; border-top:1px solid var(--line);
}
#detailPaymentPanel .payment-footer .panel-note { flex:1 1 180px; margin:0; font-size:14px; line-height:1.6; }
#detailPaymentPanel .payment-actions { justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-left:auto; }
#detailPaymentPanel .payment-actions button { min-height:44px; }
@media (max-width:720px) {
  #detailPaymentPanel { padding:20px; }
  #detailPaymentPanel .payment-main { gap:12px; grid-template-columns:24px minmax(76px,1fr) minmax(0,auto); }
  #detailPaymentPanel .payment-amount { font-size:32px; }
  #detailPaymentPanel .payment-main h2 { font-size:18px; }
  #detailPaymentPanel .payment-footer { margin-top:20px; padding-top:16px; }
  #detailPaymentPanel .payment-actions { display:none; } /* Payment action lives in the mobile dock. */
}

/* One native button makes the complete upload surface keyboard and pointer accessible. */
#dropZone { display:block; width:100%; margin:0; font:inherit; font-weight:400; cursor:pointer; transform:none; box-shadow:none; }
#dropZone:hover, #dropZone.is-over { border-color:var(--accent); background:var(--hover); color:var(--muted); transform:none; }
#dropZone:focus-visible { outline:2px solid var(--focus); outline-offset:4px; }
#dropZone .upload-pick-button { display:inline-flex; align-items:center; gap:8px; padding:10px 12px; border-radius:8px; font-weight:600; }

/* Desktop actions stay within reach, centered in the workspace beside the sidebar. */
@media (min-width:721px) {
  html:has(#todayView:not([hidden])) { scroll-padding-block:88px 120px; }
  .main:has(#todayView:not([hidden])) { padding-bottom:120px; }
  #todayView .modern-topbar { min-height:59px; padding-right:132px; }
  #todayNewMenu {
    position:fixed; top:26px;
    right:max(var(--studio-page),calc((100% - var(--sidebar-width) - 1480px)/2 + var(--studio-page)));
    z-index:60; margin:0;
  }
  #todayNewMenu > summary { box-shadow:0 4px 16px #00000012; }
  #todayNewMenu .today-new-popover { max-height:calc(100dvh - 100px); overflow-y:auto; }
  #todayView .modern-month-panel .modern-quick-actions {
    position:fixed; z-index:50; top:auto; bottom:24px; right:auto;
    left:calc((100% + var(--sidebar-width))/2); transform:translateX(-50%);
    width:min(640px,calc(100% - var(--sidebar-width) - 2 * var(--studio-page))); max-width:none;
    margin:0; padding:8px; border:1px solid var(--line); border-radius:16px;
    background:color-mix(in srgb,var(--canvas) 94%,transparent);
    box-shadow:0 8px 28px #00000014,0 2px 6px #00000008;
    backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  }
  #todayView .modern-quick-actions > div { display:grid; grid-template-columns:1.15fr 1fr 1fr; gap:6px; }
  #todayView .modern-quick-actions button {
    display:flex; align-items:center; justify-content:center; flex-direction:row;
    gap:8px; min-width:0; min-height:46px; padding:10px 14px; margin:0;
    border:1px solid transparent; border-radius:9px; font-size:14px; line-height:1.35;
    background:transparent; color:var(--ink); transform:none; box-shadow:none;
  }
  #todayView .modern-quick-actions button:hover { background:var(--hover); }
  #todayView .modern-quick-actions #todayMobileAdd { background:var(--navy); border-color:var(--navy); color:#fff; }
  #todayView .modern-quick-actions #todayMobileAdd:hover { background:var(--navy-soft); border-color:var(--navy-soft); }
  #todayView .modern-quick-actions button .summa-icon { width:20px; height:20px; flex-shrink:0; color:currentColor; margin:0; }
}

/* Invoice-derived work rows retain readable actions on narrow screens. */
.work-entry .grow { min-width: 0; }
.work-entry .grow strong, .work-entry .grow small { overflow-wrap: anywhere; }
.work-entry .amount, .work-entry button { flex-shrink: 0; }
#workInvoiceNotes:not([hidden]) { margin-top: 20px; border-top: 1px solid var(--border); }
@media (max-width: 720px) {
  .work-entry { flex-wrap: wrap; }
  .work-entry .grow { flex-basis: 100%; }
  .work-entry button { margin-left: auto; }
}
@media (min-width: 721px) {
  :is(#invoicesView, #expensesView) .invoice-list-row,
  #expensesView .expense-list-row,
  #expensesView .expense-list-row:not(.has-subtitle),
  #expensesView .expense-list-row.has-subtitle {
    min-height: 78px;
  }

  :is(#invoicesView, #expensesView) .invoice-row-open,
  #expensesView .expense-row-open,
  #expensesView .expense-row-open:not(.has-subtitle),
  #expensesView .expense-row-open.has-subtitle {
    min-height: 76px;
  }
}
