:root {
  --bv-blue: #071936;
  --bv-blue-2: #0a1f42;
  --bv-blue-3: #0d2a55;
  --bv-gold: #d9a840;
  --bv-gold-2: #f0c45c;

  --app-bg: #f4f7fb;
  --app-surface: #ffffff;
  --app-surface-soft: #f8fafc;
  --app-text: #0f172a;
  --app-muted: #64748b;
  --app-muted-2: #94a3b8;
  --app-border: #e2e8f0;
  --app-border-strong: #cbd5e1;
  --app-primary: #0f172a;
  --app-primary-hover: #1e293b;
  --app-danger: #dc2626;
  --app-danger-soft: #fef2f2;
  --app-success: #047857;
  --app-success-soft: #ecfdf5;
  --app-radius: 4px;
  --app-shadow: none;
  --app-focus: 0 0 0 3px rgba(15, 23, 42, 0.12);

  --page-x: clamp(28px, 4.5vw, 88px);
  --header-height: 134px;
  --calendar-shell-height: auto;

  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.theme-dark {
  --app-bg: var(--bv-blue);
  --app-surface: var(--bv-blue);
  --app-surface-soft: rgba(217, 168, 64, 0.08);
  --app-text: #f8fafc;
  --app-muted: rgba(226, 232, 240, 0.72);
  --app-muted-2: rgba(226, 232, 240, 0.52);
  --app-border: rgba(217, 168, 64, 0.22);
  --app-border-strong: rgba(217, 168, 64, 0.42);
  --app-primary: var(--bv-gold);
  --app-primary-hover: var(--bv-gold-2);
  --app-danger: #fb7185;
  --app-danger-soft: rgba(244, 63, 94, 0.14);
  --app-success: #86efac;
  --app-success-soft: rgba(34, 197, 94, 0.14);
  --app-focus: 0 0 0 3px rgba(217, 168, 64, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--app-bg);
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--app-bg) !important;
  color: var(--app-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--app-muted-2) 42%, transparent);
  border-radius: 999px;
}

input[type="checkbox"] {
  accent-color: var(--bv-gold);
}

/* App shell */
#app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--app-surface) !important;
  border-bottom: 1px solid var(--app-border) !important;
  box-shadow: none !important;
}

.app-header-inner {
  width: 100% !important;
  max-width: none !important;
  min-height: var(--header-height);
  padding: 10px var(--page-x) !important;
  display: grid !important;
  grid-template-columns: 88px 300px minmax(0, 1fr) 740px 164px;
  grid-template-areas:
    "brand period . nav logout"
    ". controls controls controls mode";
  grid-template-rows: 54px 52px;
  align-items: center;
  row-gap: 8px;
  column-gap: 22px;
}

.app-brand {
  grid-area: brand;
  min-width: 0;
  display: flex;
  align-items: center;
}

.app-brand-mark {
  width: 62px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.app-brand-mark img {
  width: 62px;
  height: 54px;
  object-fit: contain;
  display: block;
}

.header-period-summary {
  grid-area: period;
  align-self: center;
  min-width: 0;
  width: 300px;
  display: grid;
  gap: 3px;
}

.header-period-summary span {
  color: var(--bv-gold);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.header-period-summary strong {
  color: var(--app-text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 28px;
  line-height: 1;
  font-weight: 850;
  white-space: nowrap;
}

main {
  width: 100% !important;
  max-width: none !important;
  padding: 34px var(--page-x) !important;
  gap: 30px !important;
}

.app-view {
  width: 100%;
}

/* Header navigation */
.app-main-nav {
  grid-area: nav;
  justify-self: end;
  width: 740px !important;
  height: 48px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--app-border);
  background: transparent;
}

body.admin-only .app-main-nav {
  width: 220px !important;
  grid-template-columns: 1fr;
}

.app-nav-btn,
.app-logout,
#mode-dropdown-button,
#header-calendar-controls button,
.header-year-step,
.header-action-button,
.calendar-month-pill,
.dashboard-action-button,
.dashboard-settings-button,
.settings-card button {
  min-height: 46px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius) !important;
  background: transparent !important;
  color: var(--app-muted) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.app-nav-btn {
  width: 100%;
  border: 0;
  min-width: 0;
}

.app-nav-btn:hover,
.app-logout:hover,
#mode-dropdown-button:hover,
#header-calendar-controls button:hover,
.header-year-step:hover,
.header-action-button:hover,
.dashboard-action-button:hover,
.dashboard-settings-button:hover,
.settings-card button:hover {
  background: var(--app-surface-soft) !important;
  border-color: var(--app-border-strong) !important;
  color: var(--app-text) !important;
}

.app-nav-btn.is-active {
  background: var(--bv-gold) !important;
  color: var(--bv-blue) !important;
  box-shadow: none !important;
}

.app-nav-btn i,
.app-logout i,
#mode-dropdown-button i,
#header-calendar-controls button i,
.header-year-step i,
.header-action-button i,
.dashboard-action-button i,
.dashboard-settings-button i,
.settings-card button i,
.settings-modal-submit i {
  width: 18px;
  flex: 0 0 18px;
  text-align: center;
  color: currentColor !important;
}

.app-logout {
  grid-area: logout;
  justify-self: end;
  width: 100% !important;
}

body:not(.calendar-active) #header-calendar-controls,
body:not(.calendar-active) #header-calendar-mode {
  visibility: hidden;
  pointer-events: none;
}

#header-dashboard-controls,
#header-year-controls,
#header-settings-controls {
  grid-area: controls;
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0;
  display: grid;
  align-items: center;
  gap: 0;
  border: 1px solid var(--app-border);
  background: transparent;
  visibility: hidden;
  pointer-events: none;
}

body.dashboard-active #header-dashboard-controls,
body.year-active #header-year-controls {
  visibility: visible;
  pointer-events: auto;
}

body.settings-active #header-settings-controls {
  visibility: visible;
  pointer-events: auto;
}

#header-dashboard-controls {
  grid-template-columns: minmax(0, 1fr);
  border-color: var(--app-border);
  background: color-mix(in srgb, var(--app-surface) 18%, transparent);
  padding: 0 46px;
}

#header-year-controls {
  width: 760px;
  max-width: 100%;
  grid-template-columns: 54px 150px 54px minmax(190px, 1fr) minmax(190px, 1fr);
  justify-self: start;
}

#header-settings-controls {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  border: 1px solid var(--app-border);
  background: color-mix(in srgb, var(--app-surface) 34%, transparent);
  padding: 0 18px;
}

.header-greeting-row {
  justify-items: start;
}

.header-greeting-row span {
  color: var(--bv-gold);
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: none;
}

#header-year-controls > span,
#header-settings-controls > span,
.header-user-summary span {
  color: var(--bv-gold);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.header-user-summary span {
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.header-action-button {
  width: 100%;
  height: 100%;
  border: 0 !important;
  border-right: 1px solid var(--app-border) !important;
  min-height: 48px !important;
}

.header-action-button:last-child {
  border-right: 0 !important;
}

.header-year-step {
  width: 100%;
  height: 100%;
  min-height: 48px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--app-muted) !important;
}

#header-year-controls .header-year-prev {
  border-right: 1px solid var(--app-border) !important;
}

#header-year-controls .header-year-next {
  border-left: 1px solid var(--app-border) !important;
  border-right: 1px solid var(--app-border) !important;
}

.header-year-pdf:last-child {
  border-right: 0 !important;
}

.header-user-summary {
  min-width: 0;
  height: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
}

.header-user-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--app-text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-theme-switch.settings-theme-switch {
  align-self: center;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--app-muted-2);
}

.header-theme-switch.settings-theme-switch span {
  color: var(--app-border-strong);
  font-size: 13px;
  font-weight: 700;
}

.header-theme-switch .settings-theme-button {
  min-height: 0 !important;
  height: auto;
  width: auto;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--app-muted) !important;
  font-size: 14px;
  font-weight: 750;
}

.header-theme-switch .settings-theme-button i {
  width: 16px;
  text-align: center;
}

.theme-dark .header-theme-switch #theme-dark-btn,
.theme-light .header-theme-switch #theme-light-btn,
.header-theme-switch .settings-theme-button.is-active {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--bv-gold) !important;
  font-weight: 950;
  box-shadow: none !important;
}

.header-theme-switch .settings-theme-button:hover {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--app-text) !important;
}

.header-theme-switch .settings-theme-button:focus-visible {
  outline: 1px solid var(--bv-gold);
  outline-offset: 4px;
  box-shadow: none !important;
}

.theme-dark .header-theme-switch #theme-dark-btn:focus-visible,
.theme-light .header-theme-switch #theme-light-btn:focus-visible,
.header-theme-switch .settings-theme-button.is-active:focus-visible {
  box-shadow: none !important;
}

.calendar-active .app-header-inner {
  grid-template-columns: 88px 300px minmax(0, 1fr) 740px 164px;
  grid-template-areas:
    "brand period . nav logout"
    ". controls controls controls mode";
  grid-template-rows: 54px 52px;
  min-height: var(--header-height);
  row-gap: 8px;
}

.calendar-active .app-main-nav {
  width: 740px !important;
}

.calendar-active .app-logout {
  display: inline-flex !important;
}

#header-calendar-controls {
  grid-area: controls;
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0;
  display: grid !important;
  grid-template-columns: 48px 96px minmax(170px, 1fr) 48px minmax(168px, 0.9fr);
  align-items: center;
  gap: 0 !important;
  border: 1px solid var(--app-border);
  background: transparent;
}

#header-calendar-controls button,
.calendar-month-pill {
  width: 100%;
  height: 100%;
  min-height: 48px !important;
  border: 0 !important;
  padding: 0 12px;
}

#header-calendar-controls button:nth-child(2) {
  border-left: 1px solid var(--app-border) !important;
  border-right: 1px solid var(--app-border) !important;
  color: var(--bv-gold) !important;
}

#header-calendar-controls button:nth-child(4) {
  border-left: 1px solid var(--app-border) !important;
  border-right: 1px solid var(--app-border) !important;
}

.header-calendar-pdf {
  border-left: 0 !important;
  border-right: 0 !important;
}

.calendar-month-pill {
  min-width: 0;
}

#header-calendar-title {
  color: var(--app-text) !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  white-space: nowrap;
}

#header-calendar-mode {
  grid-area: mode;
  position: relative;
  width: 100% !important;
  justify-self: end;
}

#mode-dropdown-button {
  width: 100%;
  height: 52px;
  gap: 7px;
  padding-left: 10px;
  padding-right: 10px;
  font-size: 13px;
}

#mode-dropdown-button .text-indigo-500,
#mode-dropdown-button .text-slate-400 {
  color: currentColor !important;
}

#mode-dropdown-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#mode-dropdown-menu,
#modal-status-options,
.status-options,
.mobile-menu-panel {
  background: var(--app-surface) !important;
  border: 1px solid var(--app-border) !important;
  box-shadow: none !important;
}

#mode-dropdown-menu {
  top: calc(100% + 8px) !important;
  right: 0 !important;
  width: 320px !important;
  margin-top: 0 !important;
  padding: 10px !important;
  border-radius: var(--app-radius) !important;
}

#mode-click-btn,
#mode-paint-btn,
#paint-tools-panel button {
  border-radius: var(--app-radius) !important;
  box-shadow: none !important;
}

#paint-tools-panel {
  border-color: var(--app-border) !important;
}

/* Dashboard */
.dashboard-view {
  width: 100%;
  max-width: none;
  display: grid;
  gap: 34px;
}

.dashboard-hero {
  width: 100%;
  display: block;
  padding: 0 0 24px;
  border: 0 !important;
  border-bottom: 1px solid var(--app-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.dashboard-panel-header span,
.settings-card h3 {
  color: var(--bv-gold) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.dashboard-hero h2,
.settings-view h2 {
  margin: 0;
  color: var(--app-text) !important;
  font-size: clamp(36px, 4vw, 58px) !important;
  line-height: 0.96;
  font-weight: 850;
  letter-spacing: 0;
}

.settings-view > div:first-child p {
  color: var(--app-muted) !important;
  font-size: 16px !important;
  font-weight: 650;
}

.dashboard-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-action-button {
  min-width: 190px;
  padding: 0 18px;
}

.dashboard-action-primary {
  border-color: var(--bv-gold) !important;
  background: color-mix(in srgb, var(--bv-gold) 16%, transparent) !important;
  color: var(--bv-gold) !important;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  align-items: start;
}

.dashboard-panel {
  display: grid;
  gap: 20px;
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.dashboard-panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
  min-height: 66px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--app-border);
}

.dashboard-panel-header h3 {
  margin: 4px 0 0;
  color: var(--app-text) !important;
  font-size: 23px;
  line-height: 1.08;
  font-weight: 850;
}

.dashboard-ratio {
  min-width: 132px;
  padding-left: 20px;
  border-left: 1px solid var(--app-border);
  text-align: right;
}

.dashboard-ratio span {
  color: var(--bv-gold) !important;
  font-size: 34px;
  line-height: 1;
  font-weight: 850;
}

.dashboard-ratio small {
  display: block;
  margin-top: 5px;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-settings-button {
  min-width: 156px;
  padding: 0 16px;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  border: 0;
}

.dashboard-stat-grid-work {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-stat-grid-special {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-stat-grid-all {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-stat-grid-special .dashboard-stat-card {
  grid-column: auto;
}

.dashboard-stat-card {
  min-height: 142px;
  padding: 22px 22px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: start;
  gap: 18px;
  border: 1px solid var(--app-border);
  border-left: 4px solid var(--app-border);
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.dashboard-stat-card span {
  display: block;
  min-height: 28px;
  max-width: 150px;
  color: var(--app-muted-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

.dashboard-stat-card strong {
  display: block;
  margin-top: 12px;
  color: var(--app-text) !important;
  font-size: 42px;
  line-height: 0.9;
  font-weight: 850;
}

.dashboard-stat-card small,
.dashboard-stat-card small span {
  min-height: 0;
  margin-top: 10px;
  color: var(--app-muted) !important;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-stat-card > i {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 30px;
  justify-self: end;
}

.year-view {
  width: 100%;
}

.year-overview {
  display: grid;
  gap: 28px;
}

.year-select-control {
  position: relative;
  display: grid;
  gap: 9px;
}

#header-year-controls .year-select-control {
  height: 100%;
  gap: 0;
}

.year-select-control > button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--app-border);
  border-radius: 0;
  background: var(--app-surface-soft);
  color: var(--app-text);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
  font-weight: 850;
}

#header-year-controls .year-select-control > button {
  height: 100%;
  min-height: 50px;
  border: 0;
  background: transparent;
  justify-content: center;
}

#header-year-controls .year-select-control > button strong {
  font-size: 18px;
}

.year-select-control > button strong {
  color: currentColor;
  font-size: 18px;
  line-height: 1;
  font-weight: 850;
}

.year-select-control > button i {
  color: var(--bv-gold);
  font-size: 12px;
}

.year-select-control > button:hover {
  border-color: var(--app-border-strong);
  background: color-mix(in srgb, var(--bv-gold) 8%, transparent);
}

.year-select-control > button:focus-visible {
  outline: 2px solid var(--bv-gold);
  outline-offset: 2px;
}

.year-overview-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 100%;
  min-width: 220px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.year-overview-option {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--app-border);
  border-radius: 0 !important;
  background: transparent;
  color: var(--app-text);
  text-align: left;
}

.year-overview-option:last-child {
  border-bottom: 0;
}

.year-overview-option:hover,
.year-overview-option.is-active {
  background: var(--bv-gold);
  color: var(--bv-blue);
}

.year-overview-option span {
  color: currentColor;
  font-size: 15px;
  font-weight: 850;
}

.year-overview-option small {
  color: currentColor;
  opacity: 0.7;
  font-size: 12px;
  font-weight: 800;
}

.year-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.year-kpi {
  min-height: 150px;
  padding: 24px 22px;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--app-border);
  border-top: 4px solid var(--bv-gold);
}

.year-kpi span,
.year-panel-header span {
  color: var(--bv-gold);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.year-kpi strong {
  color: var(--app-text);
  font-size: clamp(38px, 4vw, 56px);
  line-height: 0.95;
  font-weight: 850;
}

.year-kpi small {
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
}

.year-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 34px;
  align-items: stretch;
}

.year-panel {
  min-width: 0;
  padding: 0;
  border-top: 1px solid var(--app-border);
}

.year-panel-header {
  min-height: 82px;
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--app-border);
}

.year-panel-header h3 {
  margin: 7px 0 0;
  color: var(--app-text);
  font-size: 24px;
  line-height: 1.05;
  font-weight: 850;
}

.year-distribution-bar {
  height: 38px;
  margin: 26px 0 18px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--app-border);
  background: var(--app-surface-soft);
}

.year-distribution-bar span,
.year-month-fill span {
  display: block;
  min-width: 3px;
  height: 100%;
}

.year-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  border-top: 1px solid var(--app-border);
}

.year-status-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 70px 46px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--app-border);
}

.year-status-dot {
  width: 10px;
  height: 10px;
}

.year-status-row strong {
  color: var(--app-text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.year-status-row em,
.year-status-row small {
  color: var(--app-muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.year-panel-focus {
  display: grid;
  align-content: start;
}

.year-focus-meter {
  --year-focus-ratio: 0%;
  min-height: 220px;
  margin-top: 26px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--app-border);
  background: conic-gradient(#38bdf8 var(--year-focus-ratio), transparent 0);
}

.year-focus-meter strong {
  color: var(--app-text);
  font-size: 54px;
  line-height: 1;
  font-weight: 850;
}

.year-focus-meter span {
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.year-focus-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-left: 1px solid var(--app-border);
  border-bottom: 1px solid var(--app-border);
}

.year-focus-details div {
  min-height: 78px;
  padding: 14px;
  border-right: 1px solid var(--app-border);
  display: grid;
  gap: 8px;
}

.year-focus-details span {
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.year-focus-details strong {
  color: var(--app-text);
  font-size: 26px;
  line-height: 1;
  font-weight: 850;
}

.year-month-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 34px;
  border-top: 1px solid var(--app-border);
}

.year-month-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--app-border);
}

.year-month-row strong {
  color: var(--app-text);
  font-size: 13px;
  font-weight: 850;
}

.year-month-row > span {
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

.year-month-track {
  height: 18px;
  border: 1px solid var(--app-border);
  background: var(--app-surface-soft);
}

.year-month-fill {
  height: 100%;
  display: flex;
  min-width: 18px;
}

.year-status-homeoffice { background: #38bdf8; }
.year-status-buero { background: #f59e0b; }
.year-status-aussendienst { background: #8b5cf6; }
.year-status-frei { background: #34d399; }
.year-status-urlaub { background: #2dd4bf; }
.year-status-feiertag { background: #facc15; }
.year-status-arbeitslos { background: #fb7185; }
.year-status-krank { background: #f87171; }
.year-status-empty { background: color-mix(in srgb, var(--app-muted-2) 26%, transparent); }

.dashboard-stat-home { border-left-color: #0ea5e9; }
.dashboard-stat-home > i { color: #38bdf8; }
.dashboard-stat-office { border-left-color: #f59e0b; }
.dashboard-stat-office > i { color: #f59e0b; }
.dashboard-stat-field { border-left-color: #8b5cf6; }
.dashboard-stat-field > i { color: #a78bfa; }
.dashboard-stat-free { border-left-color: #10b981; }
.dashboard-stat-free > i { color: #34d399; }
.dashboard-stat-vacation { border-left-color: #14b8a6; }
.dashboard-stat-vacation > i { color: #2dd4bf; }
.dashboard-stat-holiday { border-left-color: #eab308; }
.dashboard-stat-holiday > i { color: #facc15; }
.dashboard-stat-unemployed { border-left-color: #f43f5e; }
.dashboard-stat-unemployed > i { color: #fb7185; }
.dashboard-stat-sick { border-left-color: #ef4444; }
.dashboard-stat-sick > i { color: #f87171; }

/* Settings */
.settings-view {
  width: 100%;
  max-width: none !important;
  display: grid;
  gap: 0 !important;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 !important;
  align-items: stretch;
  max-width: none !important;
  border: 0 !important;
  border-top: 1px solid var(--app-border) !important;
}

.settings-card,
.settings-card-wide {
  width: 100%;
  min-height: 0;
  padding: 0 !important;
  display: grid;
  grid-template-columns: minmax(250px, 0.34fr) minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--app-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.settings-card-wide {
  grid-column: auto !important;
  grid-row: auto !important;
}

.settings-card-heading {
  min-height: 118px;
  padding: 24px 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  border-bottom: 0;
}

.settings-card-icon,
.settings-action-icon,
.settings-toggle-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--app-border);
  color: var(--bv-gold);
}

.settings-card h3 {
  min-height: 0;
  margin: 0 !important;
  color: var(--app-text) !important;
  font-size: 17px !important;
  line-height: 1.15;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.settings-card-heading p {
  margin: 6px 0 0;
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.settings-card-body {
  min-width: 0;
  padding: 24px 0;
  display: grid;
  align-content: start;
  gap: 14px;
}

.settings-card strong {
  color: var(--app-text) !important;
}

.settings-card button:focus-visible,
.settings-toggle-row:focus-within,
.app-nav-btn:focus-visible,
.app-logout:focus-visible,
#header-calendar-controls button:focus-visible,
#mode-dropdown-button:focus-visible {
  border-color: var(--app-border-strong) !important;
  box-shadow: var(--app-focus) !important;
  outline: none;
}

.settings-card button {
  width: 100%;
  color: var(--bv-gold) !important;
}

.settings-action-list {
  display: grid;
  gap: 10px;
}

.settings-card-account .settings-action-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-action-row {
  width: 100%;
  min-height: 68px !important;
  padding: 0 14px !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--app-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--app-text) !important;
  text-align: left;
}

.settings-action-row:hover {
  background: var(--app-surface-soft) !important;
}

.settings-action-row > i:last-child {
  color: var(--app-muted-2);
  font-size: 13px;
}

.settings-action-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.settings-action-copy strong {
  color: var(--app-text) !important;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 850;
}

.settings-action-copy small {
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
}

.admin-user-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--app-border);
  background: color-mix(in srgb, var(--app-surface) 82%, transparent);
  min-width: 0;
}

.settings-card-admin .settings-card-body {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.admin-users-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 12px;
  align-items: stretch;
}

.settings-card-admin .settings-action-row,
.admin-add-user-action {
  min-height: 60px !important;
  height: auto !important;
}

.admin-users-summary {
  min-height: 60px;
  padding: 10px 14px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--app-border);
  background: color-mix(in srgb, var(--app-surface-soft) 18%, transparent);
}

.admin-users-summary span {
  color: var(--app-gold);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-users-summary strong {
  color: var(--app-text);
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
}

.admin-user-row {
  min-height: 62px;
  padding: 0 18px;
  display: grid !important;
  grid-template-columns: minmax(260px, 1.2fr) 112px minmax(260px, 1fr) 28px;
  align-items: center;
  justify-content: stretch !important;
  gap: 20px;
  border-bottom: 1px solid var(--app-border);
  text-align: left;
}

.admin-user-list-head {
  min-height: 40px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) 112px minmax(260px, 1fr) 28px;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--app-border);
  color: var(--app-gold);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
}

.admin-user-list-head span,
.admin-user-row > span {
  min-width: 0;
}

.admin-user-list-head span:nth-child(2),
.admin-user-role {
  justify-content: center;
  text-align: center;
}

.admin-user-button {
  width: 100%;
  text-align: left;
  background: transparent;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  border-radius: 0 !important;
  justify-content: stretch !important;
}

.admin-user-button:nth-child(even) {
  background: color-mix(in srgb, var(--app-surface-soft) 16%, transparent);
}

.admin-user-button:hover {
  background: color-mix(in srgb, var(--app-surface-soft) 42%, transparent) !important;
}

.admin-user-row:last-child {
  border-bottom: 0;
}

.admin-user-name {
  min-width: 0;
  display: grid;
  gap: 4px;
  justify-items: start;
  text-align: left;
}

.admin-user-row strong,
.admin-user-row small,
.admin-user-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-row strong {
  color: var(--app-text);
  font-size: 13px;
  font-weight: 850;
}

.admin-user-row small,
.admin-user-email {
  color: var(--app-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
}

.admin-user-role,
.admin-user-chevron {
  display: inline-flex;
  align-items: center;
}

.admin-role-badge {
  min-width: 78px;
  height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--app-border);
  color: var(--app-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-role-badge.is-admin {
  border-color: rgba(216, 179, 85, .65);
  color: var(--app-gold);
}

.admin-user-chevron {
  justify-content: flex-end;
  color: var(--app-gold);
}

.admin-user-empty {
  min-height: 72px;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
  align-content: center;
}

.admin-user-empty strong {
  color: var(--app-text);
  font-size: 13px;
  font-weight: 850;
}

.admin-user-empty small {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 650;
}

.settings-card-account .settings-action-row {
  min-height: 64px !important;
}

.settings-theme-switch {
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border-bottom: 0;
}

.settings-theme-button {
  min-height: 52px !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--app-muted) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 850;
}

.settings-theme-button:hover {
  background: var(--app-surface-soft) !important;
  color: var(--app-text) !important;
}

.theme-dark #theme-dark-btn,
.theme-light #theme-light-btn,
.settings-theme-button.is-active {
  background: var(--bv-gold) !important;
  border-color: var(--bv-gold) !important;
  color: var(--bv-blue) !important;
}

.settings-toggle-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-toggle-row,
.settings-select-row,
.settings-sync-row {
  min-height: 62px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--app-border);
}

.settings-toggle-row {
  cursor: pointer;
}

.settings-toggle-row:hover,
.settings-select-row:hover,
.settings-sync-row:hover {
  background: var(--app-surface-soft);
}

.settings-toggle-copy {
  display: grid;
  gap: 4px;
}

.settings-toggle-copy strong {
  color: var(--app-text);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 850;
}

.settings-toggle-copy small {
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
}

.settings-toggle-row input {
  justify-self: end;
  width: 18px !important;
  height: 18px !important;
  margin: 0;
}

.settings-select-row {
  grid-template-columns: 34px minmax(0, 1fr) minmax(190px, 240px);
}

.settings-state-select {
  position: relative;
  width: 100%;
}

.settings-state-select > button {
  width: 100%;
  height: 38px;
  border: 1px solid var(--app-border);
  border-radius: 0;
  background: var(--app-surface);
  color: var(--app-text);
  padding: 0 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.settings-state-select > button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-state-select > button i {
  color: var(--bv-gold);
  font-size: 11px;
}

.settings-state-select > button:hover,
.settings-state-select > button[aria-expanded="true"] {
  border-color: var(--bv-gold);
  background: var(--app-surface-soft);
}

.settings-state-select > button:focus-visible {
  outline: 2px solid var(--bv-gold);
  outline-offset: 2px;
}

.settings-state-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: 282px;
  overflow-y: auto;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  box-shadow: 0 18px 45px rgba(3, 10, 28, .28);
}

.settings-state-menu button {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--app-border);
  background: transparent;
  color: var(--app-muted);
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.settings-state-menu button:last-child {
  border-bottom: 0;
}

.settings-state-menu button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-state-menu button i {
  display: none;
  color: var(--bv-gold);
  font-size: 12px;
}

.settings-state-menu button:hover {
  background: var(--app-surface-soft);
  color: var(--app-text);
}

.settings-state-menu button.is-active {
  background: rgba(215, 176, 82, .16);
  color: var(--app-text);
}

.settings-state-menu button.is-active i {
  display: inline-block;
}

.settings-sync-row {
  grid-column: 1 / -1;
  grid-template-columns: 34px minmax(0, 1fr) minmax(170px, 220px);
}

.settings-sync-row button {
  width: 100%;
  height: 40px;
  border: 1px solid var(--bv-gold);
  border-radius: 0;
  background: var(--bv-gold);
  color: var(--bv-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
}

.settings-sync-row button:disabled {
  cursor: wait;
  opacity: .65;
}

.settings-admin-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.settings-admin-stat {
  min-height: 96px;
  padding: 14px 16px;
  display: grid;
  align-content: space-between;
  border: 1px solid var(--app-border);
  background: color-mix(in srgb, var(--app-surface) 62%, transparent);
}

.settings-admin-stat span {
  color: var(--bv-gold);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-admin-stat strong {
  color: var(--app-text);
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.settings-admin-stat small {
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
}

.settings-admin-sync-panel {
  min-height: 66px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(190px, 240px);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--app-border);
}

.settings-admin-sync-panel button {
  width: 100%;
  height: 42px;
  border: 1px solid var(--bv-gold) !important;
  border-radius: 0 !important;
  background: var(--bv-gold) !important;
  color: var(--bv-blue) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
}

.settings-admin-sync-panel button:disabled {
  cursor: wait;
  opacity: .65;
}

@media (max-width: 1100px) {
  .settings-card-admin .settings-card-body {
    grid-template-columns: 1fr;
  }

  .settings-admin-status-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-users-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-users-summary {
    min-height: 58px;
  }

  .admin-user-row,
  .admin-user-list-head {
    grid-template-columns: minmax(180px, 1fr) 92px minmax(160px, .9fr) 24px;
    gap: 12px;
  }

  .settings-admin-sync-panel {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .settings-admin-sync-panel button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .settings-card-admin .settings-card-body,
  .settings-admin-status-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-row {
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .admin-user-list-head {
    display: none;
  }

  .admin-user-role,
  .admin-user-chevron {
    justify-content: flex-start;
  }
}

/* Calendar */
body.calendar-active {
  overflow: hidden;
}

.calendar-active main {
  height: calc(100vh - var(--header-height));
  padding: 14px 18px 18px !important;
}

.calendar-active #view-calendar {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

#calendar-shell {
  width: 100%;
  height: var(--calendar-shell-height);
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--app-border) !important;
  border-radius: 0 !important;
  background: var(--app-surface) !important;
  box-shadow: none !important;
}

#calendar-shell > .grid:first-child {
  background: transparent !important;
  border-color: var(--app-border) !important;
}

#calendar-shell > .grid:first-child > div {
  color: var(--app-muted-2) !important;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

#calendar-grid {
  height: calc(100% - 33px);
  grid-auto-rows: minmax(0, 1fr);
}

#calendar-grid > div {
  min-height: 0 !important;
  border-color: var(--app-border) !important;
}

.calendar-day-header {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 6px;
}

.calendar-day-number {
  flex: 0 0 auto;
  line-height: 1.35;
}

.calendar-auto-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 3px;
  overflow: hidden;
}

.calendar-auto-badge {
  min-width: 0;
  max-width: min(138px, 100%);
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--app-border);
  background: color-mix(in srgb, var(--app-surface-soft) 60%, transparent);
  color: var(--app-muted);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.calendar-auto-badge i {
  flex: 0 0 auto;
  font-size: 8px;
}

.calendar-auto-badge span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-auto-badge-holiday {
  border-color: color-mix(in srgb, #f43f5e 44%, var(--app-border));
  background: color-mix(in srgb, #f43f5e 10%, var(--app-surface));
  color: #fb7185;
}

.calendar-auto-badge-school {
  border-color: color-mix(in srgb, #f59e0b 42%, var(--app-border));
  background: color-mix(in srgb, #f59e0b 10%, var(--app-surface));
  color: #d97706;
}

#calendar-grid .rounded-lg,
#calendar-grid .rounded,
#calendar-grid .rounded-full {
  border-radius: 0 !important;
}

#calendar-grid .shadow-sm,
#calendar-grid .shadow-md {
  box-shadow: none !important;
}

.theme-dark #calendar-grid .bg-white,
.theme-dark #calendar-grid .bg-slate-50\/60,
.theme-dark #calendar-grid .bg-slate-50\/30 {
  background: var(--bv-blue) !important;
}

.theme-dark #calendar-grid .hover\:bg-slate-50\/80:hover {
  background: var(--bv-blue-2) !important;
}

.theme-dark #calendar-grid .bg-sky-50\/70,
.theme-dark #calendar-grid .bg-sky-50\/70:hover {
  background: rgba(14, 165, 233, 0.16) !important;
}

.theme-dark #calendar-grid .bg-amber-50\/70,
.theme-dark #calendar-grid .bg-amber-50\/70:hover {
  background: rgba(245, 158, 11, 0.17) !important;
}

.theme-dark #calendar-grid .bg-violet-50\/70,
.theme-dark #calendar-grid .bg-violet-50\/70:hover {
  background: rgba(139, 92, 246, 0.18) !important;
}

.theme-dark #calendar-grid .bg-emerald-50\/70,
.theme-dark #calendar-grid .bg-emerald-50\/70:hover {
  background: rgba(16, 185, 129, 0.18) !important;
}

.theme-dark #calendar-grid .bg-teal-50\/70,
.theme-dark #calendar-grid .bg-teal-50\/70:hover {
  background: rgba(20, 184, 166, 0.18) !important;
}

.theme-dark #calendar-grid .bg-yellow-50\/70,
.theme-dark #calendar-grid .bg-yellow-50\/70:hover {
  background: rgba(234, 179, 8, 0.17) !important;
}

.theme-dark #calendar-grid .bg-rose-50\/70,
.theme-dark #calendar-grid .bg-rose-50\/70:hover,
.theme-dark #calendar-grid .bg-red-50\/70,
.theme-dark #calendar-grid .bg-red-50\/70:hover {
  background: rgba(244, 63, 94, 0.18) !important;
}

.theme-dark #calendar-grid .bg-rose-50\/20 {
  background: rgba(244, 63, 94, 0.12) !important;
}

.theme-dark #calendar-grid .bg-amber-50\/15 {
  background: rgba(245, 158, 11, 0.1) !important;
}

.theme-dark #calendar-grid .text-slate-600,
.theme-dark #calendar-grid .text-slate-500,
.theme-dark #calendar-grid .text-slate-400 {
  color: var(--app-muted) !important;
}

.theme-dark #calendar-grid .bg-indigo-600 {
  background: var(--bv-gold) !important;
  color: var(--bv-blue) !important;
}

/* Modal and toast */
#toast {
  border-radius: var(--app-radius) !important;
  background: var(--app-text) !important;
  color: var(--app-surface) !important;
  box-shadow: none !important;
}

#day-modal > div:first-child {
  background: rgba(3, 12, 28, 0.62) !important;
}

#modal-box {
  border-radius: var(--app-radius) !important;
  border: 1px solid var(--app-border) !important;
  background: var(--app-surface) !important;
  color: var(--app-text) !important;
  box-shadow: none !important;
}

#modal-box h3,
#modal-box .text-slate-950,
#modal-box .text-slate-800,
#modal-box .text-slate-700 {
  color: var(--app-text) !important;
}

#modal-box .text-slate-500,
#modal-box .text-slate-400 {
  color: var(--app-muted) !important;
}

#modal-box input,
#modal-status-button {
  border-radius: var(--app-radius) !important;
  border-color: var(--app-border) !important;
  background: transparent !important;
  color: var(--app-text) !important;
}

#modal-status-options {
  border-radius: var(--app-radius) !important;
}

#modal-status-options button {
  border-radius: var(--app-radius) !important;
  color: var(--app-text) !important;
}

.entry-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.entry-choice {
  position: relative;
  min-height: 48px;
  border: 1px solid color-mix(in srgb, var(--app-border) 78%, transparent);
  background: color-mix(in srgb, var(--app-surface-soft) 22%, transparent);
  padding: 0 38px 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--app-text);
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.entry-choice:hover {
  border-color: var(--app-border-strong);
  background: color-mix(in srgb, var(--app-surface-soft) 52%, transparent);
}

.entry-choice.is-selected {
  border-color: color-mix(in srgb, var(--bv-gold) 58%, var(--app-border));
  background: color-mix(in srgb, var(--bv-gold) 10%, var(--app-surface));
  box-shadow: inset 3px 0 0 var(--bv-gold);
}

.entry-choice.is-selected::after {
  content: "\2713";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bv-gold);
  font-size: 15px;
  font-weight: 900;
}

.entry-choice em {
  margin-left: auto;
  color: var(--bv-gold);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.settings-modal-box {
  width: min(100%, 640px);
  border: 1px solid var(--app-border);
  border-radius: 0;
  background: var(--app-surface);
  color: var(--app-text);
  box-shadow: none;
  padding: 24px;
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--app-border);
}

.settings-modal-header p {
  margin: 0 0 8px;
  color: var(--bv-gold);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-modal-header h3 {
  margin: 0;
  color: var(--app-text);
  font-size: 24px;
  line-height: 1;
  font-weight: 850;
}

.settings-modal-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--app-border);
  background: transparent;
  color: var(--app-muted);
}

.settings-modal-close:hover {
  border-color: var(--app-border-strong);
  color: var(--app-text);
}

.settings-modal-panel {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.settings-modal-panel p {
  margin: 0 0 4px;
  color: var(--app-muted);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 650;
}

.settings-modal-panel label {
  display: grid;
  gap: 7px;
}

.settings-modal-panel label span {
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-modal-panel input,
.settings-modal-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--app-border);
  border-radius: 0;
  background: transparent;
  color: var(--app-text);
  padding: 0 14px;
  font-size: 15px;
  font-weight: 700;
  outline: none;
}

.settings-modal-panel input:focus,
.settings-modal-panel select:focus {
  border-color: var(--app-border-strong);
  box-shadow: var(--app-focus);
}

.settings-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-modal-check {
  min-height: 48px;
  padding: 0 14px;
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  border: 1px solid var(--app-border);
}

.settings-modal-check input {
  width: 18px !important;
  min-height: 18px !important;
  height: 18px !important;
  padding: 0 !important;
}

.settings-modal-check span {
  color: var(--app-text) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.settings-modal-grid .settings-modal-submit {
  grid-column: 1 / -1;
}

.settings-modal-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  border: 1px solid var(--bv-gold);
  border-radius: 0;
  background: var(--bv-gold);
  color: var(--bv-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 850;
}

.settings-modal-submit:hover {
  background: var(--bv-gold-2);
}

/* Utility color overrides for dark mode */
.theme-dark header.bg-white,
.theme-dark .bg-white,
.theme-dark .bg-slate-50,
.theme-dark .bg-slate-50\/30,
.theme-dark .bg-slate-50\/50,
.theme-dark .bg-slate-50\/60,
.theme-dark .bg-slate-50\/80 {
  background: var(--bv-blue) !important;
}

.theme-dark input,
.theme-dark select,
.theme-dark textarea {
  color-scheme: dark;
  background: transparent !important;
  color: var(--app-text) !important;
  border-color: var(--app-border) !important;
}

.theme-dark .border-slate-100,
.theme-dark .border-slate-200,
.theme-dark .border-slate-300 {
  border-color: var(--app-border) !important;
}

.theme-dark .text-slate-950,
.theme-dark .text-slate-900,
.theme-dark .text-slate-800,
.theme-dark .text-slate-700 {
  color: var(--app-text) !important;
}

.theme-dark .text-slate-600,
.theme-dark .text-slate-500,
.theme-dark .text-slate-400 {
  color: var(--app-muted) !important;
}

.theme-dark .text-indigo-500,
.theme-dark .text-indigo-600,
.theme-dark .text-indigo-700,
.theme-dark .text-indigo-800 {
  color: var(--bv-gold) !important;
}

.theme-dark .shadow-sm,
.theme-dark .shadow-xl,
.theme-dark .shadow-2xl {
  box-shadow: none !important;
}

/* Login */
.login-body {
  min-height: 100vh;
  margin: 0;
  background: var(--bv-blue) !important;
  color: #f8fafc;
}

.login-page {
  min-height: 100vh;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.login-shell {
  width: min(100%, 860px);
  min-height: 480px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 0.92fr);
  gap: 56px;
  align-items: center;
}

.login-brand {
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-logo {
  width: min(100%, 360px);
  height: auto;
  display: block;
}

.login-panel {
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.login-heading {
  margin-bottom: 10px;
}

.login-heading h1 {
  margin: 0;
  color: #f8fafc;
  font-size: 32px;
  line-height: 1.05;
  font-weight: 800;
}

.login-heading p {
  margin: 9px 0 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 14px;
  font-weight: 650;
}

.login-error {
  border: 1px solid rgba(248, 113, 113, 0.55);
  background: rgba(127, 29, 29, 0.32);
  color: #fecaca;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 650;
  border-radius: var(--app-radius);
}

.login-notice {
  border: 1px solid rgba(216, 179, 85, 0.55);
  background: rgba(216, 179, 85, 0.12);
  color: #f8e6b5;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 650;
  border-radius: var(--app-radius);
}

.login-field {
  display: grid;
  gap: 7px;
}

.login-field span {
  color: rgba(226, 232, 240, 0.86);
  font-size: 13px;
  font-weight: 800;
}

.login-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: var(--app-radius);
  background: rgba(3, 12, 28, 0.38);
  color: #f8fafc;
  padding: 0 13px;
  font-size: 16px;
  font-weight: 650;
  outline: none;
}

.login-input:focus {
  border-color: var(--bv-gold);
  box-shadow: 0 0 0 2px rgba(217, 168, 64, 0.18);
}

.login-input:-webkit-autofill {
  -webkit-text-fill-color: #f8fafc;
  box-shadow: 0 0 0 1000px var(--bv-blue) inset;
}

.login-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
  border: 1px solid var(--bv-gold);
  border-radius: var(--app-radius);
  background: var(--bv-gold);
  color: var(--bv-blue);
  padding: 0 18px;
  font-size: 15px;
  font-weight: 800;
}

.login-submit:hover {
  background: var(--bv-gold-2);
}

.login-secondary-link {
  color: rgba(216, 179, 85, .92);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.login-secondary-link:hover {
  color: var(--bv-gold-2);
}

.login-footer {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 650;
}

.login-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.login-footer a:hover {
  color: var(--bv-gold-2);
}

.login-footer span {
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.35);
}

.login-box-control {
  position: relative;
  width: fit-content;
  margin: 0 auto;
  display: block;
}

.login-box-input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  padding: 0;
  opacity: 0.02;
}

.login-box-grid {
  --login-box-size: 54px;
  display: grid;
  gap: 8px;
}

.login-box-grid-2 {
  grid-template-columns: repeat(2, var(--login-box-size));
}

.login-box-grid-4 {
  grid-template-columns: repeat(4, var(--login-box-size));
}

.login-box-cell {
  width: var(--login-box-size);
  height: 56px;
  border: 1px solid rgba(248, 250, 252, 0.2);
  border-radius: var(--app-radius);
  background: rgba(3, 12, 28, 0.42);
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 850;
  line-height: 1;
}

.login-box-control:focus-within .login-box-cell,
.login-box-cell.is-filled {
  border-color: rgba(217, 168, 64, 0.6);
  background: rgba(248, 250, 252, 0.08);
}

.login-box-cell.is-current {
  box-shadow: 0 0 0 2px rgba(217, 168, 64, 0.22);
}

.login-mobile-code-row {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 12px;
}

.login-mobile-field {
  gap: 6px;
}

.login-mobile-field .login-box-control {
  margin: 0;
}

.login-mobile-code-row .login-box-grid {
  --login-box-size: 46px;
  gap: 6px;
}

.login-mobile-code-row .login-box-cell {
  height: 50px;
}

/* Legal pages */
.legal-body {
  min-height: 100vh;
  margin: 0;
  background: var(--bv-blue) !important;
  color: #e2e8f0;
}

.legal-page {
  min-height: 100vh;
  width: min(100%, 1460px);
  margin: 0 auto;
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.legal-shell {
  display: block;
  align-items: start;
}

.legal-brand {
  min-height: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
}

.legal-brand img {
  width: min(100%, 124px);
  height: auto;
  display: block;
}

.legal-content {
  max-width: none;
  margin-left: 294px;
}

.legal-kicker {
  margin: 0 0 8px;
  color: var(--bv-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-content h1 {
  margin: 0 0 22px;
  color: #f8fafc;
  font-size: 32px;
  line-height: 1.05;
  font-weight: 800;
}

.legal-text {
  width: min(100%, 980px);
  display: grid;
  gap: 18px;
  color: rgba(226, 232, 240, 0.78);
  font-size: 14px;
  line-height: 1.7;
}

.legal-text p {
  margin: 0;
}

.legal-text h2 {
  margin: 12px 0 -6px;
  color: #f8fafc;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 800;
}

.legal-text strong {
  color: #f8fafc;
}

.legal-text a,
.legal-links a {
  color: var(--bv-gold-2);
  text-decoration: none;
}

.legal-text a:hover,
.legal-links a:hover {
  color: #ffe08a;
}

.legal-text ul {
  margin: 0;
  padding-left: 18px;
}

.legal-sidebar {
  position: fixed;
  top: 28px;
  bottom: 28px;
  width: 250px;
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 26px;
  align-items: start;
}

.legal-overview {
  display: grid;
  gap: 18px;
  border-left: 2px solid rgba(217, 168, 64, 0.8);
  padding-left: 18px;
  color: rgba(226, 232, 240, 0.56);
}

.legal-overview p {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
}

.legal-overview nav {
  display: grid;
  gap: 8px;
}

.legal-overview a {
  color: rgba(226, 232, 240, 0.74);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
}

.legal-note {
  display: grid;
  gap: 10px;
  color: rgba(226, 232, 240, 0.66);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.legal-note p {
  margin: 0;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-self: start;
}

.legal-links a {
  color: rgba(226, 232, 240, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.privacy-section,
.imprint-section {
  display: grid;
  gap: 10px;
  border-left: 2px solid rgba(217, 168, 64, 0.5);
  padding-left: 18px;
}

.privacy-intro,
.imprint-intro {
  max-width: 880px;
  color: rgba(226, 232, 240, 0.74);
  font-size: 16px;
}

.privacy-meta {
  color: rgba(226, 232, 240, 0.52);
  font-size: 12px;
  font-weight: 750;
}

/* Mobile entry */
.mobile-entry-body {
  --app-radius: 18px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--app-bg);
  color: var(--app-text);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: contain;
}

.mobile-entry {
  width: min(100%, 430px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) 18px calc(112px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
  touch-action: pan-y;
}

.mobile-entry-header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 100px;
  align-items: center;
  gap: 8px;
  padding: 0 0 5px;
  text-align: center;
}

.mobile-entry-title {
  margin: 0;
  color: var(--app-text);
  font-size: 27px;
  line-height: 1.05;
  font-weight: 900;
}

.mobile-entry-kicker {
  margin: 0 0 3px;
  color: var(--bv-gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mobile-entry-subtitle {
  margin: 6px 0 0;
  color: var(--app-muted);
  font-size: 15px;
  font-weight: 800;
}

.day-nav-button,
.mobile-menu-button {
  width: 46px;
  height: 46px;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--app-surface-soft) 35%, transparent);
  color: var(--app-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  font-size: 18px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.day-nav-button:active,
.mobile-menu-button:active {
  transform: scale(0.98);
}

.day-nav-button:hover,
.mobile-menu-button:hover {
  border-color: var(--app-border-strong);
  background: color-mix(in srgb, var(--bv-gold) 10%, var(--app-surface));
}

.mobile-header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.mobile-menu {
  position: relative;
}

.mobile-menu-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  right: 0;
  width: min(248px, calc(100vw - 34px));
  display: none;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--app-border);
  border-radius: 18px;
  background: var(--app-surface);
  text-align: left;
  box-shadow: 0 18px 42px rgba(3, 12, 28, 0.32);
}

.mobile-menu-panel.is-open {
  display: grid;
}

.mobile-menu-item,
.mobile-theme-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--app-text);
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.mobile-menu-item:hover,
.mobile-theme-button:hover,
.mobile-theme-button.is-active {
  border-color: var(--app-border);
  background: var(--app-surface-soft);
}

.mobile-menu-theme {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 0 7px;
  border-bottom: 1px solid var(--app-border);
}

.mobile-menu-logout,
.mobile-menu-logout i {
  color: var(--app-danger);
}

.mobile-card {
  background: color-mix(in srgb, var(--app-surface) 92%, transparent);
  border: 1px solid var(--app-border);
  border-radius: 20px;
  box-shadow: none;
}

.mobile-card-compact {
  padding: 12px;
}

.mobile-card-form {
  padding: 14px;
  min-height: 0;
}

.date-load-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 12px;
  align-items: center;
}

.date-load-form .form-control {
  border-radius: 17px;
  padding-left: 12px;
  padding-right: 12px;
}

.date-load-form .button-load {
  border-radius: 17px;
}

.entry-state {
  margin-top: 8px;
  color: var(--app-muted-2);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.form-stack {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: var(--app-muted);
  font-size: 14px;
  font-weight: 900;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-control,
.status-trigger {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  background: transparent;
  color: var(--app-text);
  padding: 0 14px;
  font-size: 15px;
  font-weight: 850;
  outline: none;
  box-shadow: none;
  text-align: center;
}

.form-control:focus,
.status-trigger:focus,
.status-trigger[aria-expanded="true"] {
  border-color: var(--app-border-strong);
  box-shadow: var(--app-focus);
}

.status-picker {
  position: relative;
}

.status-trigger {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
  text-align: left;
}

.status-trigger-label {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #f59e0b;
}

.status-options {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  display: none;
  padding: 7px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: 0 18px 42px rgba(3, 12, 28, 0.24);
}

.status-options.is-open {
  display: grid;
  gap: 4px;
}

.status-option {
  position: relative;
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--app-radius);
  background: transparent;
  color: var(--app-muted);
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 750;
  text-align: left;
}

.status-option:hover,
.status-option.is-selected {
  border-color: color-mix(in srgb, var(--bv-gold) 42%, var(--app-border));
  background: color-mix(in srgb, var(--bv-gold) 8%, var(--app-surface));
  color: var(--app-text);
  box-shadow: inset 3px 0 0 var(--bv-gold);
}

.status-trigger[data-status="frei"] .status-dot,
.status-option[data-status="frei"] .status-dot,
.mobile-status-choice[data-status="frei"] .status-dot { background: #10b981; }
.status-trigger[data-status="urlaub"] .status-dot,
.status-option[data-status="urlaub"] .status-dot,
.mobile-status-choice[data-status="urlaub"] .status-dot { background: #14b8a6; }
.status-trigger[data-status="feiertag"] .status-dot,
.status-option[data-status="feiertag"] .status-dot,
.mobile-status-choice[data-status="feiertag"] .status-dot { background: #eab308; }
.status-trigger[data-status="homeoffice"] .status-dot,
.status-option[data-status="homeoffice"] .status-dot,
.mobile-status-choice[data-status="homeoffice"] .status-dot { background: #0ea5e9; }
.status-trigger[data-status="buero"] .status-dot,
.status-option[data-status="buero"] .status-dot,
.mobile-status-choice[data-status="buero"] .status-dot { background: #f59e0b; }
.status-trigger[data-status="aussendienst"] .status-dot,
.status-option[data-status="aussendienst"] .status-dot,
.mobile-status-choice[data-status="aussendienst"] .status-dot { background: #8b5cf6; }
.status-trigger[data-status="arbeitslos"] .status-dot,
.status-option[data-status="arbeitslos"] .status-dot,
.mobile-status-choice[data-status="arbeitslos"] .status-dot { background: #f43f5e; }
.status-trigger[data-status="krank"] .status-dot,
.status-option[data-status="krank"] .status-dot,
.mobile-status-choice[data-status="krank"] .status-dot { background: #ef4444; }

.mobile-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-status-choice {
  position: relative;
  min-height: 52px;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--app-surface-soft) 14%, transparent);
  color: var(--app-text);
  padding: 0 34px 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 850;
  user-select: none;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.mobile-status-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mobile-status-choice.is-selected {
  border-color: var(--bv-gold);
  background: color-mix(in srgb, var(--bv-gold) 9%, var(--app-surface));
  box-shadow: none;
}

.mobile-status-choice.is-selected::after {
  content: "\2713";
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--bv-gold);
  color: var(--bv-blue);
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
}

.mobile-status-choice > span:last-child {
  min-width: 0;
  line-height: 1.08;
}

.entry-hint {
  margin: 8px 0 0;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.work-summary {
  border-radius: var(--app-radius);
  background: var(--app-surface-soft);
  padding: 10px 12px;
  color: var(--app-muted);
  font-size: 14px;
  font-weight: 650;
}

.work-summary strong {
  color: var(--app-text);
}

.button-primary,
.button-load {
  border: 0;
  border-radius: 16px;
  background: var(--app-primary);
  color: #fff;
  min-height: 52px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 850;
}

.theme-dark .button-primary,
.theme-dark .button-load {
  color: var(--bv-blue);
}

.button-primary {
  width: 100%;
  margin-top: 6px;
}

.button-primary:hover,
.button-load:hover {
  background: var(--app-primary-hover);
}

.button-danger-link {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--app-danger);
  margin-top: 10px;
  min-height: 38px;
  padding: 8px 0 0;
  font-size: 14px;
  font-weight: 800;
}

@media (max-height: 760px) and (max-width: 760px) {
  .mobile-entry {
    gap: 10px;
    padding-top: calc(8px + env(safe-area-inset-top));
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .mobile-entry-title {
    font-size: 24px;
  }

  .mobile-entry-subtitle {
    margin-top: 4px;
    font-size: 13px;
  }

  .day-nav-button,
  .mobile-menu-button {
    width: 42px;
    height: 42px;
  }

  .mobile-entry-header {
    grid-template-columns: 42px minmax(0, 1fr) 92px;
  }

  .mobile-card-form {
    padding: 12px;
  }

  .mobile-status-choice {
    min-height: 48px;
    font-size: 13px;
  }

  .button-primary,
  .button-load {
    min-height: 50px;
  }

  .date-load-form {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  .button-danger-link {
    margin-top: 8px;
    min-height: 36px;
  }
}

.notice {
  border-radius: var(--app-radius);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 750;
}

.notice-success {
  border: 1px solid #bbf7d0;
  background: var(--app-success-soft);
  color: var(--app-success);
}

.notice-error {
  border: 1px solid #fecaca;
  background: var(--app-danger-soft);
  color: var(--app-danger);
}

.mobile-footer-link {
  margin-top: auto;
  padding-top: 8px;
  color: var(--app-muted-2);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.desktop-links {
  display: none;
}

/* Desktop square corners */
@media (min-width: 761px) {
  #app-header,
  .app-main-nav,
  .app-nav-btn,
  .app-logout,
  #header-calendar-controls,
  #header-year-controls,
  #header-dashboard-controls,
  #header-settings-controls,
  #header-calendar-controls button,
  .header-action-button,
  .calendar-month-pill,
  #header-calendar-mode,
  #mode-dropdown-button,
  #mode-dropdown-menu,
  #mode-click-btn,
  #mode-paint-btn,
  #paint-tools-panel button,
  .dashboard-action-button,
  .dashboard-settings-button,
  .dashboard-stat-card,
  .settings-card,
  .settings-card input,
  .settings-card button,
  .settings-card label.relative,
  #calendar-shell,
  #modal-box,
	  #modal-box input,
	  #modal-status-button,
	  #modal-status-options,
	  #modal-status-options button,
	  .entry-choice,
	  .mobile-status-choice,
	  #toast {
    border-radius: 0 !important;
  }
}

/* Responsive */
@media (max-width: 1500px) {
  .app-header-inner,
  .calendar-active .app-header-inner {
    grid-template-columns: 78px 260px minmax(0, 1fr) 680px 154px;
    column-gap: 14px;
  }

  .header-period-summary {
    width: 260px;
  }

  .header-period-summary strong {
    font-size: 26px;
  }

  .app-main-nav,
  .calendar-active .app-main-nav {
    width: 680px !important;
  }
}

@media (max-width: 1320px) {
  :root {
    --page-x: 26px;
  }

  .app-header-inner,
  .calendar-active .app-header-inner {
    grid-template-columns: 78px 260px minmax(0, 1fr) 680px 154px;
    column-gap: 14px;
  }

  .app-header-inner {
    grid-template-areas:
      "brand period . nav logout"
      ". controls controls controls mode";
    grid-template-rows: 54px 52px;
    row-gap: 8px;
  }

  .calendar-active .app-header-inner {
    grid-template-areas:
      "brand period . nav logout"
      ". controls controls controls mode";
    grid-template-rows: 54px 52px;
    row-gap: 8px;
  }

  .header-period-summary {
    width: 260px;
  }

  .header-period-summary strong {
    font-size: 26px;
  }

  .app-main-nav,
  .calendar-active .app-main-nav {
    width: 680px !important;
  }

  .app-logout {
    width: 100% !important;
  }

  #header-year-controls {
    width: 760px;
    grid-template-columns: 54px 150px 54px minmax(190px, 1fr) minmax(190px, 1fr);
  }

  #header-dashboard-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  #header-settings-controls {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .settings-grid {
    grid-template-columns: 1fr;
    gap: 0 !important;
  }

  .settings-card-wide {
    grid-row: auto;
  }

  .dashboard-panels {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .dashboard-stat-grid-all {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

}

@media (max-width: 1180px) {
  .app-header-inner,
  .calendar-active .app-header-inner {
    grid-template-columns: 62px minmax(0, 1fr) !important;
    min-height: auto;
    row-gap: 9px;
  }

  .app-header-inner {
    grid-template-areas:
      "brand period"
      "nav nav"
      "controls controls"
      "mode mode" !important;
    grid-template-rows: auto;
  }

  .calendar-active .app-header-inner {
    grid-template-areas:
      "brand period"
      "nav nav"
      "controls controls"
      "mode mode" !important;
    grid-template-rows: auto;
  }

  .app-main-nav {
    width: 100% !important;
  }

  .header-period-summary {
    width: auto;
  }

  .header-period-summary strong {
    font-size: 24px;
  }

  .app-logout {
    display: none !important;
  }

  .settings-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .year-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .year-analysis-grid {
    grid-template-columns: 1fr;
  }

  .settings-card {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .settings-card-heading {
    min-height: 0;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--app-border);
  }

  #header-calendar-controls {
    grid-template-columns: 44px 90px minmax(140px, 1fr) 44px minmax(150px, 0.9fr);
  }

  #header-year-controls {
    width: 100%;
    grid-template-columns: 48px 140px 48px minmax(150px, 1fr) minmax(150px, 1fr);
  }

  #header-dashboard-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  #header-settings-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    height: 52px;
    padding: 0 14px;
  }

  .header-user-summary {
    display: grid;
  }

  #header-calendar-mode {
    width: min(100%, 240px) !important;
    justify-self: start;
  }

  .dashboard-stat-grid-all {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --page-x: 18px;
  }

  main {
    padding-top: 22px !important;
  }

  .dashboard-hero,
  .settings-view > div:first-child,
  .dashboard-panel-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .dashboard-hero-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .dashboard-action-button,
  .dashboard-settings-button {
    width: 100%;
    min-width: 0;
  }

  .dashboard-stat-grid,
  .dashboard-stat-grid-work,
  .dashboard-stat-grid-special,
  .dashboard-stat-grid-all {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-grid-special .dashboard-stat-card,
  .dashboard-stat-grid-special .dashboard-stat-card:nth-last-child(-n + 2) {
    grid-column: auto;
  }

  .year-kpi-grid,
  .year-status-list,
  .year-month-grid {
    grid-template-columns: 1fr;
  }

  #header-year-controls {
    width: 100%;
    grid-template-columns: 44px minmax(92px, 0.8fr) 44px minmax(132px, 1fr) minmax(132px, 1fr);
    height: 52px;
    padding: 0;
  }

  #header-dashboard-controls {
    grid-template-columns: minmax(0, 1fr);
    height: 52px;
    padding: 0 16px;
  }

  #header-settings-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: start;
    height: 52px;
    padding: 0 12px;
  }

  .header-user-summary {
    display: flex;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-toggle-list {
    grid-template-columns: 1fr;
  }

  .header-theme-switch {
    display: inline-flex;
  }

  .settings-card-account .settings-action-list,
  .settings-modal-grid {
    grid-template-columns: 1fr;
  }

  .settings-card-wide > .grid {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
}

@media (max-width: 760px) {
  .app-header-inner,
  .calendar-active .app-header-inner {
    padding: 10px 14px !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
  }

  .app-header-inner {
    grid-template-areas:
      "brand period"
      "nav nav"
      "controls controls"
      "mode mode" !important;
  }

  .calendar-active .app-header-inner {
    grid-template-areas:
      "brand period"
      "nav nav"
      "controls controls"
      "mode mode" !important;
  }

  .app-brand-mark,
  .app-brand-mark img {
    width: 44px;
    height: 40px;
  }

  .app-main-nav {
    width: 100% !important;
    height: 42px;
  }

  .app-nav-btn {
    min-height: 40px;
    padding: 0 7px;
    font-size: 12px;
  }

  .app-nav-btn i {
    display: none;
  }

  #header-calendar-controls {
    height: auto;
    grid-template-columns: 42px 1fr 42px;
  }

  #header-calendar-controls button:nth-child(2),
  .header-calendar-pdf {
    display: none !important;
  }

  #header-calendar-mode {
    width: 100% !important;
  }

  .calendar-active main {
    height: auto;
    overflow: auto;
  }

  body.calendar-active {
    overflow: auto;
  }

  #calendar-shell {
    height: auto;
  }

  #calendar-grid {
    height: auto;
    grid-auto-rows: minmax(112px, auto);
  }

  .login-page {
    justify-content: flex-start;
    padding: 24px 18px;
  }

  .login-shell {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .login-brand {
    min-height: 0;
    padding: 12px 0 0;
  }

  .login-logo {
    width: min(72vw, 230px);
  }

  .login-panel {
    padding: 0;
  }

  .login-heading {
    text-align: center;
  }

  .login-mobile-code-row {
    align-items: center;
    gap: 9px;
  }

  .login-mobile-code-row .login-box-grid {
    --login-box-size: 40px;
    gap: 5px;
  }

  .login-mobile-code-row .login-box-cell {
    height: 46px;
    font-size: 21px;
  }

  .legal-page {
    padding: 24px 20px;
  }

  .legal-shell {
    display: grid;
    gap: 24px;
  }

  .legal-content {
    margin-left: 0;
  }

  .legal-sidebar {
    position: static;
    width: auto;
    min-height: 0;
    grid-template-rows: auto;
    gap: 18px;
  }

  .legal-overview nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .login-box-grid {
    --login-box-size: 48px;
    gap: 7px;
  }

  .login-mobile-code-row {
    gap: 8px;
  }

  .login-mobile-code-row .login-box-grid {
    --login-box-size: 36px;
  }

  .login-mobile-code-row .login-box-cell {
    height: 42px;
    font-size: 20px;
  }
}
