html { overflow-y: scroll; }
@supports (scrollbar-gutter: stable) { html { overflow-y: auto; scrollbar-gutter: stable; } }
.periods-dashboard {
  --ink: #202326; --muted: #5e656a; --surface: #fff; --surface-2: #f3f4f2;
  --black: #f7f8f6; --line: #dce0db; --red: #ad292b; --red-dark: #8e2022;
  --lime: #275844; --panel-radius: 12px;
  display: block; min-height: 100vh; margin: 0; background: var(--black); color: var(--ink);
  font: 15px/1.5 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums;
}
.periods-dashboard *, .periods-dashboard *::before, .periods-dashboard *::after { box-sizing: border-box; }
.periods-dashboard [hidden] { display: none !important; }
.periods-dashboard button, .periods-dashboard input, .periods-dashboard select { font: inherit; }
.periods-dashboard :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.app-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-inner, .periods-dashboard .month-main { width: min(100%, 1280px); margin-inline: auto; padding-inline: clamp(16px, 4vw, 56px); }
.bar-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.035em; }
.brand-lockup img { object-fit: contain; }
.report-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 20px; }
.periods-dashboard .month-main { padding-block: 34px 64px; }
.report-heading h1, .login-card h1 { margin: 0; font-size: clamp(29px, 4vw, 42px); line-height: 1.12; letter-spacing: -.055em; }
.report-heading p, .login-card > p { color: var(--muted); margin: 6px 0 0; }
.account-menu, .period-menu { position: relative; }
.account-menu summary, .period-menu summary {
  display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; min-height: 40px; padding: 7px 12px;
  border-radius: 8px; color: var(--ink); font-size: 14px; font-weight: 600;
}
.account-menu summary::-webkit-details-marker, .period-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after, .period-menu summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: translateY(-2px) rotate(45deg); }
.period-menu summary { border: 1px solid var(--line); background: var(--surface); }
.period-menu summary > span { font-weight: 400; color: var(--muted); }
.account-menu > div, .period-menu form {
  position: absolute; z-index: 10; top: calc(100% + 8px); right: 0; padding: 18px; width: min(270px, calc(100vw - 32px));
  display: grid; gap: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 32px #14201615;
}
.account-menu > div { width: 170px; padding: 6px; }
.account-menu button { padding: 8px 12px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--ink); }
.account-menu button:hover { background: var(--surface-2); }
#logout-status:empty { display: none; }
.period-menu label, .login-card label { display: grid; gap: 6px; font-weight: 550; font-size: 14px; }
.period-menu input, .period-menu select, .login-card input, [data-utm-filter] input, [data-utm-filter] select {
  width: 100%; min-width: 0; height: 42px; padding: 0 11px; background: var(--surface);
  color: var(--ink); border: 1px solid #c7cdc8; border-radius: 7px;
}
.periods-dashboard .primary-action, [data-utm-filter] button { border: 0; border-radius: 7px; background: var(--ink); color: white; padding: 10px 16px; font-weight: 600; cursor: pointer; }
.primary-action:disabled { opacity: .6; }
.report-tabs { display: flex; gap: clamp(14px, 3vw, 34px); overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.report-tabs button { flex: 0 0 auto; min-height: 44px; padding: 6px 1px 10px; margin: 0; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font-weight: 600; cursor: pointer; }
.report-tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--red); }
.periods-dashboard .month-pane { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.periods-dashboard .panel, .storage-stats {
  min-width: 0; margin: 0; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--panel-radius); box-shadow: none;
}
.periods-dashboard .month-chart-card, .expenses-panel { padding: clamp(14px, 2.2vw, 26px); }
.periods-dashboard .records-table-shell { padding: 0; overflow: hidden; }
.periods-dashboard .records-table-shell > .month-card-heading { padding: 18px 20px 10px; }
.periods-dashboard .month-card-heading, .periods-dashboard .month-section-title { margin: 0; }
.periods-dashboard .month-card-heading h2, .periods-dashboard .month-section-title h2 { margin: 0; color: var(--ink); font-size: 19px; line-height: 1.3; letter-spacing: -.025em; }
.periods-dashboard .month-card-heading p, .periods-dashboard .month-section-title p, .periods-dashboard .month-muted { color: var(--muted); font-size: 13px; }
.periods-dashboard .month-section-title { margin-top: 4px; }
.periods-dashboard .records-table th { background: #f5f6f4; color: var(--muted); font-size: 12px; text-transform: none; letter-spacing: 0; }
.periods-dashboard .records-table td, .periods-dashboard .records-table tfoot th { color: var(--ink); font-size: 14px; }
.periods-dashboard .records-table td, .periods-dashboard .records-table th { padding: 10px 16px; border-color: var(--line); }
.periods-dashboard .month-table-scroll, .periods-dashboard .period-chart-scroll { overflow-x: auto; max-width: 100%; }
.periods-dashboard .month-legend-button { font-size: 13px; }
.periods-dashboard .month-chart-legend { margin-top: 12px; }
.periods-dashboard .month-chart { min-height: 190px; }
[data-utm-filter] { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
[data-utm-filter] > label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.expenses-amount, .storage-stats strong { margin: 4px 0; font-size: clamp(23px, 3vw, 34px); font-weight: 650; letter-spacing: -.04em; }
.storage-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.storage-stats > div { padding: 18px; display: flex; flex-direction: column; }
.storage-stats > div + div { border-left: 1px solid var(--line); }
.storage-stats span, .storage-stats small { color: var(--muted); font-size: 13px; }
.login-main { max-width: 500px; padding: clamp(30px, 10vh, 100px) 16px; margin: auto; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(22px, 4vw, 38px); }
.login-card h1 { font-size: 32px; }
.login-card form { display: grid; gap: 16px; margin-top: 25px; }
#login-status { margin: 0; color: var(--red-dark); font-size: 14px; }
@media (max-width: 600px) {
  .bar-inner { min-height: 56px; }
  .periods-dashboard .month-main { padding-top: 23px; }
  .report-heading { flex-wrap: wrap; align-items: start; gap: 12px; }
  .period-menu summary > span { display: none; }
  .period-menu form { position: fixed; top: auto; left: 16px; right: 16px; width: auto; margin-top: 6px; }
  .report-tabs { gap: 20px; }
  .storage-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storage-stats > div { padding: 14px; }
  .storage-stats > div:nth-child(3) { border-left: 0; }
  .storage-stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

.periods-dashboard .plate-number { white-space: nowrap; }
.periods-dashboard .visit-services { min-width: 14em; white-space: pre-line; overflow-wrap: anywhere; }
