/*
 * Agenda Prink V2.
 * This layer replaces the application shell and presentation while preserving
 * the existing forms, IDs and application behavior.
 */

:root {
  --v2-red: #e3062e;
  --v2-red-dark: #b90024;
  --v2-ink: #17191d;
  --v2-ink-soft: #292c31;
  --v2-muted: #656b75;
  --v2-subtle: #8b919b;
  --v2-line: #dde1e6;
  --v2-line-strong: #c9ced5;
  --v2-canvas: #f3f5f7;
  --v2-surface: #ffffff;
  --v2-surface-soft: #f7f8fa;
  --v2-sidebar: #15171a;
  --v2-sidebar-soft: #202329;
  --v2-green: #137a43;
  --v2-green-soft: #e6f5ec;
  --v2-amber: #a86600;
  --v2-amber-soft: #fff3d7;
  --v2-blue: #1f67b7;
  --v2-blue-soft: #eaf3ff;
  --v2-shadow: 0 1px 2px rgba(23, 25, 29, 0.04), 0 10px 28px rgba(23, 25, 29, 0.06);
  --v2-shadow-high: 0 18px 54px rgba(10, 12, 15, 0.18);
  --v2-sidebar-width: 210px;
  --v2-topbar-height: 72px;
}

html {
  background: var(--v2-canvas);
}

body {
  background: var(--v2-canvas);
  color: var(--v2-ink);
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

button {
  touch-action: manipulation;
}

/* Login */

.login-screen {
  align-items: center;
  background: var(--v2-sidebar);
  display: grid;
  min-height: 100dvh;
  overflow: hidden;
  padding: 28px;
  place-items: center;
}

.login-screen::before {
  background: var(--v2-red);
  bottom: 0;
  content: "";
  height: auto;
  left: 0;
  position: absolute;
  right: auto;
  top: 0;
  width: 7px;
}

.login-screen::after {
  background: #1d2024;
  border: 0;
  bottom: -18vh;
  content: "";
  height: 52vh;
  left: -8vw;
  opacity: 0.5;
  position: absolute;
  right: auto;
  top: auto;
  transform: rotate(-7deg);
  width: 116vw;
}

.login-box {
  background: #fff;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--v2-shadow-high);
  gap: 17px;
  max-width: 430px;
  padding: 38px;
  width: min(100%, 430px);
}

.login-box::before {
  background: url("/prink-logo.png") left center / contain no-repeat;
  height: 51px;
  margin-bottom: 8px;
  width: 160px;
}

.login-box::after {
  background: var(--v2-red);
  height: 5px;
  left: 0;
  right: 0;
  top: 0;
}

.login-box .eyebrow {
  color: var(--v2-muted);
  font-size: 11px;
  margin-bottom: -8px;
}

.login-box h1 {
  color: var(--v2-ink);
  font-size: 32px;
  margin-bottom: 4px;
}

.login-box input,
.login-box select {
  background: var(--v2-surface-soft);
  border-color: var(--v2-line);
  min-height: 50px;
}

.login-box .primary-button {
  min-height: 50px;
}

.login-version {
  color: #7d838d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  text-align: center;
  text-transform: uppercase;
}

.login-signature {
  border-top: 1px solid var(--v2-line);
  display: grid;
  gap: 3px;
  margin-top: 3px;
  padding-top: 12px;
  text-align: center;
}

.login-signature > p:last-child {
  color: #989da5;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.35;
  margin: 0;
}

/* New application shell */

.app-shell {
  background: var(--v2-canvas);
  min-height: 100dvh;
  padding: 0 !important;
}

.v2-sidebar {
  background: var(--v2-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  bottom: 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  left: 0;
  padding: 22px 14px 16px;
  position: fixed;
  top: 0;
  width: var(--v2-sidebar-width);
  z-index: 34;
}

.v2-sidebar {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #34373d transparent;
}

.v2-sidebar-brand {
  align-items: center;
  display: flex;
  gap: 7px;
  min-height: 42px;
  padding: 0 4px;
}

.v2-brand-mark {
  display: block;
  height: 34px;
  overflow: hidden;
  width: 92px;
}

.v2-brand-mark img {
  display: block;
  height: 34px;
  object-fit: contain;
  object-position: left center;
  width: 92px;
}

.v2-brand-place {
  color: #fff;
  font-size: 20px;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
}

.v2-sidebar-date {
  color: #818790;
  font-size: 10px;
  font-weight: 750;
  margin: 4px 4px 0;
  text-transform: capitalize;
}

.v2-sidebar-label {
  color: #777e88;
  font-size: 10px;
  font-weight: 900;
  margin: 27px 8px 9px;
  text-transform: uppercase;
}

.v2-tools-label {
  margin-top: 18px;
}

.v2-tools-nav .v2-nav-item {
  min-height: 49px;
}

.v2-tools-nav .v2-nav-icon {
  background: #202329;
}

.v2-sidebar-nav {
  display: grid;
  gap: 5px;
}

.v2-nav-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #b9bec6;
  cursor: pointer;
  display: grid;
  gap: 9px;
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 54px;
  padding: 7px 8px;
  position: relative;
  text-align: left;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.v2-nav-item:hover {
  background: var(--v2-sidebar-soft);
  color: #fff;
}

.v2-nav-item.active {
  background: #282b31;
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.v2-nav-item.active::before {
  background: var(--v2-red);
  border-radius: 0 3px 3px 0;
  bottom: 9px;
  content: "";
  left: -15px;
  position: absolute;
  top: 9px;
  width: 4px;
}

.v2-nav-icon {
  align-items: center;
  background: #282b31;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #d8dbe0;
  display: inline-flex;
  font-size: 17px;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.v2-nav-icon svg {
  display: block;
  height: 17px;
  width: 17px;
}

.v2-nav-item.active .v2-nav-icon {
  background: var(--v2-red);
  border-color: var(--v2-red);
  color: #fff;
}

.v2-nav-item strong,
.v2-nav-item small {
  display: block;
}

.v2-nav-item strong {
  font-size: 12px;
  line-height: 1.2;
}

.v2-nav-item small {
  color: #7f858e;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.25;
  margin-top: 3px;
}

.v2-nav-item.active small {
  color: #b8bdc5;
}

.v2-quick-action {
  align-items: center;
  background: var(--v2-red);
  border: 1px solid var(--v2-red);
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 850;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
  min-height: 44px;
  padding: 9px 12px;
}

.v2-quick-action:hover,
.v2-quick-action.active {
  background: #ff1743;
  border-color: #ff1743;
}

.v2-quick-action span {
  align-items: center;
  display: inline-flex;
  font-size: 21px;
  font-weight: 400;
  justify-content: center;
  line-height: 1;
}

.v2-quick-action span svg {
  height: 20px;
  width: 20px;
}

.v2-sidebar-summary {
  margin-top: 27px;
}

.v2-sidebar-summary-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin: 0 7px 9px;
}

.v2-sidebar-summary-heading span,
.v2-sidebar-summary-heading strong {
  display: block;
}

.v2-sidebar-summary-heading > div > span {
  color: #737983;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.v2-sidebar-summary-heading strong {
  color: #f4f5f7;
  font-size: 12px;
  margin-top: 3px;
}

.v2-sidebar-summary-live {
  background: #2fc16f;
  border: 3px solid #29342f;
  border-radius: 50%;
  height: 11px;
  margin-bottom: 1px;
  width: 11px;
}

.v2-sidebar-summary-list {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
}

.v2-sidebar-summary-list button {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 0;
  color: #b8bdc5;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 8px;
  grid-template-columns: 25px minmax(0, 1fr) 25px;
  min-height: 39px;
  padding: 5px 7px;
  text-align: left;
}

.v2-sidebar-summary-list button:last-child {
  border-bottom: 0;
}

.v2-sidebar-summary-list button:hover,
.v2-sidebar-summary-list button.active {
  background: #202329;
  color: #fff;
}

.v2-sidebar-summary-list button.active {
  box-shadow: inset 3px 0 0 var(--v2-red);
}

.v2-sidebar-summary-list button > span:nth-child(2) {
  font-size: 11px;
  font-weight: 750;
}

.v2-sidebar-summary-list button > strong {
  align-items: center;
  background: #292c32;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  height: 23px;
  justify-content: center;
  min-width: 23px;
}

.v2-summary-icon {
  align-items: center;
  border-radius: 5px;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.v2-summary-icon svg {
  height: 14px;
  width: 14px;
}

.v2-summary-icon.is-pending {
  background: rgba(245, 183, 48, 0.14);
  color: #f1bf50;
}

.v2-summary-icon.is-progress {
  background: rgba(47, 193, 111, 0.14);
  color: #5ed48e;
}

.v2-summary-icon.is-urgent {
  background: rgba(228, 0, 43, 0.17);
  color: #ff5c78;
}

.v2-summary-icon.is-workshop {
  background: rgba(87, 153, 231, 0.15);
  color: #7db7f6;
}

.v2-sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 11px;
  margin-top: auto;
  padding: 14px 5px 0;
}

.v2-sidebar-user {
  align-items: center;
  display: flex;
  gap: 9px;
}

.v2-sidebar-user-dot {
  background: #2fc16f;
  border: 3px solid #29342f;
  border-radius: 50%;
  height: 13px;
  width: 13px;
}

.v2-sidebar-user small,
.v2-sidebar-user strong {
  display: block;
}

.v2-sidebar-user small {
  color: #7f858e;
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.v2-sidebar-user strong {
  color: #fff;
  font-size: 13px;
  margin-top: 2px;
}

.v2-sidebar-connection {
  align-items: center;
  color: #8d939c;
  display: flex;
  font-size: 10px;
  font-weight: 750;
  gap: 7px;
  padding-left: 2px;
}

.v2-sidebar-connection-dot {
  background: #8d939c;
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.v2-sidebar-connection.online {
  color: #6ad497;
}

.v2-sidebar-connection.online .v2-sidebar-connection-dot {
  background: #2fc16f;
  box-shadow: 0 0 0 3px rgba(47, 193, 111, 0.12);
}

.v2-sidebar-controls {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
}

.v2-sidebar-controls button {
  align-items: center;
  background: #202329;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #b9bec6;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  gap: 6px;
  justify-content: center;
  min-height: 34px;
  padding: 6px;
}

.v2-sidebar-controls button:hover {
  background: #292c32;
  color: #fff;
}

.v2-sidebar-controls button.active {
  color: #66d694;
}

.v2-sidebar-controls svg {
  height: 14px;
  width: 14px;
}

.v2-sidebar-controls .sound-off {
  display: none;
}

.v2-sidebar-controls #sidebarNotificationToggle:not(.active) .sound-on {
  display: none;
}

.v2-sidebar-controls #sidebarNotificationToggle:not(.active) .sound-off {
  display: block;
}

.v2-mobile-nav {
  display: none;
}

/* Top bar */

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--v2-line);
  box-shadow: none;
  color: var(--v2-ink);
  display: none;
  gap: 18px;
  height: var(--v2-topbar-height);
  justify-content: space-between;
  left: var(--v2-sidebar-width);
  min-height: var(--v2-topbar-height);
  padding: 10px 28px;
  position: fixed;
  right: 0;
  top: 0;
  width: auto;
  z-index: 30;
}

.topbar::after {
  display: none;
}

.topbar-brand {
  display: none;
}

.v2-topbar-heading {
  display: grid;
  gap: 2px;
}

.v2-topbar-heading p {
  color: var(--v2-subtle);
  font-size: 10px;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
}

.topbar-title {
  color: var(--v2-ink);
  font-size: 21px !important;
  font-weight: 900;
  line-height: 1.1;
  text-align: left;
}

.topbar-actions {
  display: none;
  flex-wrap: nowrap;
  gap: 7px;
}

.topbar-home-button {
  display: none !important;
}

.status-pill {
  background: var(--v2-surface-soft);
  border: 1px solid var(--v2-line);
  color: var(--v2-ink);
  font-size: 11px;
  min-height: 34px;
  padding: 6px 11px;
}

#connectionStatus {
  color: var(--v2-muted);
}

#connectionStatus::before {
  background: #a7adb6;
}

#connectionStatus.online {
  background: var(--v2-green-soft);
  border-color: #bddfc9;
  color: var(--v2-green);
}

#connectionStatus.online::before {
  background: var(--v2-green);
}

.topbar-notification-toggle {
  background: var(--v2-surface-soft);
  border: 1px solid var(--v2-line);
  color: var(--v2-muted);
  height: 36px;
  min-height: 36px;
  width: 36px;
}

.topbar-notification-toggle.active {
  background: #fff0f3;
  border-color: #f2c0ca;
  color: var(--v2-red);
}

.logout-button {
  background: var(--v2-ink);
  border: 1px solid var(--v2-ink);
  color: #fff;
  min-height: 36px;
  padding: 7px 13px;
}

.logout-button:hover {
  background: #30333a;
}

.notification-toast {
  border-left-color: var(--v2-red);
  right: 22px;
  top: 22px;
}

/* Workspace structure */

.layout,
.finance-layout,
.tool-layout,
.tools-layout {
  margin: 0 0 0 var(--v2-sidebar-width);
  max-width: none;
  padding: 28px clamp(22px, 2.8vw, 42px) 54px;
  width: calc(100% - var(--v2-sidebar-width));
}

.layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(440px, 1.17fr) minmax(360px, 0.83fr);
}

.finance-layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(360px, 0.72fr) minmax(560px, 1.28fr);
}

.tool-layout,
.tools-layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}

.tool-frame-shell {
  grid-column: 1 / -1;
  isolation: isolate;
  min-width: 0;
  overflow: visible;
  width: 100%;
}

.tool-frame-shell iframe {
  background: transparent;
  border: 0;
  display: block;
  height: 660px;
  min-height: 560px;
  overflow-anchor: none;
  overflow: hidden;
  width: 100%;
}

.tool-switcher {
  background: #eceef1;
  border: 1px solid var(--v2-line);
  border-radius: 7px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
}

.tool-switcher button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--v2-muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  min-height: 36px;
  padding: 7px 13px;
  white-space: nowrap;
}

.tool-switcher button.active {
  background: var(--v2-ink);
  color: #fff;
}

.tool-picker {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1180px;
  width: 100%;
}

.tool-picker-card {
  align-items: center;
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow);
  color: var(--v2-ink);
  cursor: pointer;
  display: grid;
  gap: 18px;
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 150px;
  padding: 24px;
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease;
}

.tool-picker-card:hover {
  border-color: #ef9aaa;
  transform: translateY(-2px);
}

.tool-picker-icon {
  align-items: center;
  background: #fff0f3;
  border: 1px solid #f4c3cd;
  border-radius: 8px;
  color: var(--v2-red);
  display: inline-flex;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.tool-picker-icon svg {
  height: 25px;
  width: 25px;
}

.tool-picker-card small,
.tool-picker-card strong,
.tool-picker-card span {
  display: block;
}

.tool-picker-card small {
  color: var(--v2-red);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-picker-card strong {
  font-size: 21px;
  line-height: 1.15;
  margin-top: 3px;
}

.tool-picker-card > span:last-child > span {
  color: var(--v2-muted);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 7px;
}

.v2-workspace-header {
  align-items: end;
  border-bottom: 1px solid var(--v2-line);
  display: flex;
  gap: 24px;
  grid-column: 1 / -1;
  justify-content: space-between;
  margin-bottom: 2px;
  padding: 0 2px 20px;
}

.v2-workspace-header .eyebrow {
  font-size: 10px;
  margin-bottom: 7px;
}

.v2-workspace-header h2 {
  color: var(--v2-ink);
  font-size: clamp(27px, 2.3vw, 34px);
  font-weight: 900;
  line-height: 1;
  margin: 0;
}

.v2-workspace-copy {
  color: var(--v2-muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 8px 0 0;
}

.v2-workspace-date {
  border-left: 2px solid var(--v2-red);
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
  min-width: 138px;
  padding: 3px 0 3px 13px;
}

.v2-workspace-date span {
  color: var(--v2-subtle);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.v2-workspace-date strong {
  color: var(--v2-ink);
  font-size: 14px;
  text-transform: capitalize;
}

.panel {
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  box-shadow: var(--v2-shadow);
  overflow: visible;
}

.task-form-panel,
.task-list-panel,
.finance-entry-panel,
.finance-dashboard .panel,
.finance-recent-panel,
.workshop-panel {
  padding: 20px;
}

.task-list-panel {
  position: relative;
}

.mobile-filters-toggle {
  display: none;
}

.mobile-filters-toggle svg {
  height: 17px;
  width: 17px;
}

.task-list-panel::before,
.task-form-panel::before,
.workshop-panel::before,
.finance-entry-panel::before {
  background: var(--v2-red);
  content: "";
  height: 3px;
  left: -1px;
  position: absolute;
  right: -1px;
  top: -1px;
}

.task-form-panel,
.workshop-panel,
.finance-entry-panel {
  position: relative;
}

.panel-heading {
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.panel h2 {
  color: var(--v2-ink);
  font-size: 20px;
  font-weight: 900;
}

.eyebrow {
  color: var(--v2-red);
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 5px;
}

.count-badge {
  background: var(--v2-ink);
  border: 0;
  border-radius: 6px;
  color: #fff;
  min-height: 36px;
  min-width: 40px;
}

.primary-button,
.secondary-button,
.ghost-button,
.filter,
.icon-button,
.notification-toggle,
.logout-button {
  border-radius: 6px;
  font-weight: 800;
}

.primary-button {
  background: var(--v2-red);
  box-shadow: none;
}

.primary-button:hover {
  background: var(--v2-red-dark);
}

.secondary-button,
.ghost-button,
.icon-button {
  background: var(--v2-surface-soft);
  border: 1px solid var(--v2-line);
  color: var(--v2-ink);
}

.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  background: #eceff2;
}

/* Agenda toolbar */

.filters {
  background: #eff1f3;
  border: 1px solid var(--v2-line);
  border-radius: 7px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 13px;
  padding: 4px;
}

.filters.assignee-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filter {
  background: transparent;
  border: 1px solid transparent;
  color: var(--v2-muted);
  min-height: 36px;
  padding: 7px 8px;
}

.filter:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--v2-ink);
}

.filter.active {
  background: var(--v2-ink);
  border-color: var(--v2-ink);
  box-shadow: 0 3px 9px rgba(23, 25, 29, 0.13);
  color: #fff;
}

.date-filter,
.search-filter,
.sort-filter {
  color: var(--v2-muted);
  margin-bottom: 13px;
}

.task-list-panel input,
.task-list-panel select {
  background: var(--v2-surface-soft);
}

.route-summary {
  background: var(--v2-surface-soft);
  border: 1px solid var(--v2-line);
  border-left: 3px solid var(--v2-red);
  border-radius: 6px;
  color: var(--v2-muted);
  margin-bottom: 15px;
  padding: 10px 12px;
}

.route-summary:empty {
  display: none;
}

/* Forms */

.task-form {
  gap: 14px;
}

.task-form-panel > .panel-heading,
.workshop-panel > .panel-heading {
  border-bottom: 1px solid var(--v2-line);
  gap: 14px;
  margin: 0 0 18px;
  min-height: 0;
  padding-bottom: 17px;
}

.task-form-panel > .panel-heading > div:first-child,
.workshop-panel > .panel-heading > div:first-child {
  min-height: 0;
}

.task-form-panel > .panel-heading .panel-tools,
.workshop-panel > .panel-heading .panel-tools {
  background: #eff1f3;
  border: 1px solid var(--v2-line);
  border-radius: 7px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
  width: 100%;
}

.task-form-panel > .panel-heading .mode-button,
.workshop-panel > .panel-heading .mode-button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--v2-muted);
  font-size: 11px;
  min-height: 34px;
  overflow: hidden;
  padding: 6px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-form-panel > .panel-heading .mode-button.active,
.workshop-panel > .panel-heading .mode-button.active {
  background: #fff;
  border-color: #d7dbe1;
  box-shadow: 0 2px 5px rgba(23, 25, 29, 0.07);
  color: var(--v2-ink);
}

.form-section-title {
  border-top: 1px solid #e7e9ed;
  color: var(--v2-red);
  font-size: 10px;
  margin-top: 3px;
  padding-top: 15px;
}

label {
  color: #30343a;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--v2-line-strong);
  border-radius: 6px;
  box-shadow: none;
  color: var(--v2-ink);
  min-height: 44px;
  padding: 10px 11px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aeb4bd;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--v2-red);
  box-shadow: 0 0 0 3px rgba(227, 6, 46, 0.11);
}

input::placeholder,
textarea::placeholder {
  color: #9a9fa7;
}

.checkbox-label {
  background: var(--v2-surface-soft);
  border: 1px solid var(--v2-line);
  border-radius: 6px;
}

.form-actions {
  border-top: 1px solid var(--v2-line);
  gap: 8px;
  margin-top: 4px;
  padding-top: 17px;
}

.form-actions .primary-button {
  min-height: 44px;
}

/* Task list */

.tasks {
  gap: 13px;
}

.task-section {
  gap: 8px;
}

.task-section + .task-section {
  margin-top: 17px;
}

.task-section-heading {
  border-bottom: 1px solid var(--v2-line);
  padding: 0 1px 8px;
}

.task-section-heading h3 {
  color: var(--v2-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.task-section-heading span {
  background: #e8ebee;
  border-radius: 5px;
  color: #515761;
  font-size: 10px;
  min-height: 22px;
}

.task-section-list {
  gap: 9px;
}

.task-card {
  background: #fff;
  border: 1px solid var(--v2-line);
  border-left: 5px solid #aeb4bd;
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(23, 25, 29, 0.03);
  gap: 14px;
  padding: 13px 13px 13px 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.task-card:hover {
  box-shadow: 0 8px 22px rgba(23, 25, 29, 0.08);
  transform: translateY(-1px);
}

.task-card h3 {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.23;
}

.task-status-pendiente {
  background: #fff9eb;
  border-color: #ecdcae;
  border-left-color: #d59008;
}

.task-card.overdue,
.task-card.carried-over {
  background: #ffe8ed;
  border-color: #ecb7c2;
  border-left-color: var(--v2-red);
}

.task-card.task-status-en-curso,
.task-card.task-status-en-curso.carried-over,
.task-card.task-status-en-curso.overdue {
  background: #e5f5eb !important;
  border-color: #add6bc;
  border-left-color: var(--v2-green) !important;
}

.task-card.task-assignee-dolores {
  background: #eaf3ff;
  border-color: #b9d2ef;
  border-left-color: var(--v2-blue);
}

.task-card.task-assignee-dolores.carried-over,
.task-card.task-assignee-dolores.overdue {
  background: #cfe3fb;
  border-color: #87b4e5;
  border-left-color: #174f94;
}

.task-card.task-assignee-dolores.task-status-en-curso,
.task-card.task-assignee-dolores.task-status-en-curso.carried-over,
.task-card.task-assignee-dolores.task-status-en-curso.overdue {
  background: #e2f3e9 !important;
  border-color: #a9d3b8;
  border-left-color: var(--v2-green) !important;
}

.task-title-row {
  gap: 10px;
}

.priority {
  background: var(--v2-red);
  border-radius: 5px;
  box-shadow: none;
  font-size: 9px;
  padding: 4px 7px;
}

.task-tags {
  gap: 5px;
  margin-top: 7px;
}

.tag {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(23, 25, 29, 0.11);
  border-radius: 5px;
  color: #545a64;
  font-size: 10px;
  min-height: 22px;
  padding: 3px 7px;
}

.type-tag {
  background: #fff;
  border-color: rgba(23, 25, 29, 0.2);
  color: var(--v2-ink);
}

.time-tag {
  background: var(--v2-ink);
  border-color: var(--v2-ink);
}

.status-pendiente {
  background: #ffe7a8;
  border-color: #e3c56e;
  color: #714500;
}

.status-en-curso {
  background: #ccebd7;
  border-color: #9bcaac;
  color: #145d34;
}

.client {
  font-size: 13px;
  margin-top: 8px;
}

.address,
.meta,
.notes {
  color: #606670;
  font-size: 12px;
  line-height: 1.4;
}

.notes:not(:empty) {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(23, 25, 29, 0.09);
  border-radius: 6px;
  padding: 8px 9px;
}

.task-comment {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(23, 25, 29, 0.1);
}

.task-actions {
  gap: 5px;
  min-width: 102px;
}

.task-actions .icon-button,
.quick-status {
  border-radius: 5px;
  font-size: 11px;
  min-height: 34px;
  padding: 6px 8px;
}

.task-actions .icon-button {
  border-color: rgba(23, 25, 29, 0.16);
}

.icon-button.done {
  background: var(--v2-ink);
  border-color: var(--v2-ink);
}

.icon-button.postpone {
  background: #fff5d8;
  border-color: #e3ca7f;
  color: #6f4700;
}

.icon-button.comment {
  background: #eaf3ff;
  border-color: #b8d0ee;
  color: #194f8f;
}

.icon-button.edit {
  background: #f5f6f7;
}

.empty {
  background: var(--v2-surface-soft);
  border: 1px dashed var(--v2-line-strong);
  border-radius: 6px;
  color: var(--v2-muted);
}

/* Agenda workspaces */

#agendaView[data-workspace="agenda"],
#agendaView[data-workspace="new"],
#agendaView[data-workspace="workshop"],
#agendaView[data-workspace="history"] {
  grid-template-columns: minmax(0, 1fr);
}

#agendaView[data-workspace="agenda"] .task-form-panel,
#agendaView[data-workspace="new"] .task-list-panel,
#agendaView[data-workspace="workshop"] .task-list-panel,
#agendaView[data-workspace="history"] .task-list-panel,
#agendaView[data-workspace="workshop"] .task-form-panel,
#agendaView[data-workspace="history"] .task-form-panel,
#agendaView[data-workspace="workshop"] > .floating-new-task,
#agendaView[data-workspace="history"] > .floating-new-task {
  display: none !important;
}

#agendaView[data-workspace="agenda"] .task-list-panel,
#agendaView[data-workspace="new"] .task-form-panel,
#agendaView[data-workspace="workshop"] .workshop-panel,
#agendaView[data-workspace="history"] .workshop-panel {
  display: block;
  grid-column: 1 / -1;
  max-width: 1280px;
  width: 100%;
}

#agendaView[data-workspace="new"] .task-form-panel {
  max-width: 1080px;
}

#agendaView[data-workspace="workshop"] .workshop-form {
  max-width: 980px;
}

@media (min-width: 921px) {
  #agendaView[data-workspace="agenda"],
  #agendaView[data-workspace="new"],
  #agendaView[data-workspace="workshop"],
  #agendaView[data-workspace="history"] {
    grid-template-columns: minmax(0, 1.17fr) minmax(330px, 0.83fr);
  }

  #agendaView[data-workspace="agenda"] .task-list-panel,
  #agendaView[data-workspace="new"] .task-list-panel,
  #agendaView[data-workspace="workshop"] .task-list-panel,
  #agendaView[data-workspace="history"] .task-list-panel {
    display: block !important;
    grid-column: 1;
    max-width: none;
  }

  #agendaView[data-workspace="agenda"] .task-form-panel,
  #agendaView[data-workspace="new"] .task-form-panel {
    display: block !important;
    grid-column: 2;
    max-width: none;
  }

  #agendaView[data-workspace="workshop"] .workshop-panel,
  #agendaView[data-workspace="history"] .workshop-panel {
    display: block;
    grid-column: 2;
    max-width: none;
  }
}

.workshop-panel::before {
  background: var(--v2-ink);
}

.workshop-history {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.mobile-workshop-tabs {
  display: none;
}

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

.repair-card {
  background: var(--v2-surface-soft);
  border: 1px solid var(--v2-line);
  border-left: 4px solid var(--v2-red);
  border-radius: 7px;
  box-shadow: none;
  gap: 12px;
  padding: 15px;
}

.repair-number {
  background: var(--v2-ink);
  border-color: var(--v2-ink);
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.action-svg {
  flex: 0 0 auto;
  height: 17px;
  width: 17px;
}

.repair-card-actions {
  align-self: start;
  display: grid;
  gap: 6px;
  min-width: 112px;
}

.repair-card-actions .icon-button {
  justify-content: flex-start;
  min-height: 36px;
  width: 100%;
}

.repair-card-actions .share-repair {
  background: #fff;
  border-color: #b8c1cc;
  color: var(--v2-ink);
  display: none;
}

.repair-card-actions .share-repair:hover {
  background: #eef4fb;
  border-color: #7f8b99;
}

/* Finance */

.v2-finance-header {
  grid-column: 1 / -1;
}

.finance-dashboard {
  display: grid;
  gap: 20px;
}

.finance-recent-panel {
  grid-column: 1 / -1;
}

.finance-entry-panel {
  position: sticky;
  top: 22px;
}

.finance-entry-panel::before {
  background: var(--v2-green);
}

.finance-form-section {
  border: 1px solid var(--v2-line);
  border-radius: 7px;
  padding: 15px;
}

.finance-section-income {
  background: #edf8f1;
  border-color: #c9e4d3;
}

.finance-section-expense {
  background: #fff1f3;
  border-color: #edcfd5;
}

.finance-form-section h3 {
  color: var(--v2-ink);
  font-size: 15px;
}

.finance-field-grid {
  gap: 10px;
}

.finance-form-section input {
  background: rgba(255, 255, 255, 0.92);
}

.finance-variable-group {
  border-top: 1px solid rgba(185, 0, 36, 0.14);
  display: grid;
  gap: 11px;
  padding-top: 13px;
}

.finance-variable-heading {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-width: 0;
}

.finance-variable-heading > div {
  min-width: 0;
}

.finance-variable-heading h3,
.finance-variable-heading h4 {
  color: var(--v2-ink);
  margin: 0;
}

.finance-variable-heading h4 {
  font-size: 14px;
}

.finance-variable-heading p:not(.eyebrow) {
  color: var(--v2-muted);
  font-size: 11px;
  line-height: 1.45;
  margin: 4px 0 0;
}

.finance-add-row {
  align-items: center;
  background: #fff;
  border: 1px solid #d5aab2;
  border-radius: 6px;
  color: var(--v2-red-dark);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 850;
  gap: 6px;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  width: auto;
}

.finance-add-row:hover {
  background: #fff7f8;
  border-color: var(--v2-red);
}

.finance-add-row svg {
  height: 15px;
  width: 15px;
}

.finance-variable-rows {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.finance-variable-row {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(115px, 0.38fr) 36px;
  min-width: 0;
}

.finance-variable-row label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.finance-variable-row label > span {
  color: var(--v2-ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.finance-variable-row input {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

.finance-variable-amount {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.finance-remove-row {
  align-items: center;
  align-self: end;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #ddbac1;
  border-radius: 6px;
  color: var(--v2-red-dark);
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.finance-remove-row:hover {
  background: #fff;
  border-color: var(--v2-red);
}

.finance-remove-row svg {
  height: 16px;
  width: 16px;
}

.finance-fixed-progress {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid #e5c9cf;
  border-radius: 7px;
  display: grid;
  gap: 8px;
  padding: 11px 12px;
}

.finance-fixed-progress-heading {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.finance-fixed-progress-heading span {
  color: var(--v2-ink);
  font-size: 12px;
  font-weight: 850;
}

.finance-fixed-progress-heading strong {
  color: var(--v2-muted);
  font-size: 10px;
  white-space: nowrap;
}

.finance-fixed-progress-track {
  background: #e7e9ed;
  border-radius: 3px;
  height: 6px;
  overflow: hidden;
}

.finance-fixed-progress-track i {
  background: var(--v2-green);
  display: block;
  height: 100%;
  transition: width 180ms ease;
  width: 0;
}

.finance-fixed-progress p {
  color: var(--v2-muted);
  font-size: 10px;
  line-height: 1.45;
  margin: 0;
}

.finance-fixed-field {
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid transparent;
  border-radius: 6px;
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
}

.finance-fixed-field > div {
  align-items: start;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.finance-fixed-field label {
  color: var(--v2-ink-soft);
  font-size: 11px;
  font-weight: 850;
  min-width: 0;
}

.finance-fixed-field [data-finance-fixed-status] {
  background: #eceff2;
  border: 0;
  border-radius: 4px;
  color: var(--v2-muted);
  cursor: default;
  font-size: 9px;
  font-weight: 850;
  justify-self: start;
  line-height: 1.3;
  min-height: 22px;
  padding: 4px 6px;
  text-align: left;
  width: auto;
}

.finance-fixed-field.is-complete {
  background: #eff8f2;
  border-color: #c2ddcb;
}

.finance-fixed-field.is-complete [data-finance-fixed-status] {
  background: #d9efe1;
  color: #0d6836;
  cursor: pointer;
}

.finance-fixed-field.is-duplicate {
  background: var(--v2-amber-soft);
  border-color: #e6c570;
}

.finance-fixed-field.is-duplicate [data-finance-fixed-status] {
  background: #f5d887;
  color: #674000;
}

.finance-fixed-field input {
  box-sizing: border-box;
  min-width: 0;
  text-align: right;
  width: 100%;
}

.finance-fixed-field input:disabled {
  background: #edf1f3;
  color: var(--v2-muted);
  cursor: not-allowed;
  opacity: 1;
}

.finance-section-occasional {
  background: #fff6f7;
}

.finance-record.finance-occasional {
  border-left-color: var(--v2-red);
}

.finance-metrics {
  gap: 9px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finance-metrics article {
  background: var(--v2-surface-soft);
  border: 1px solid var(--v2-line);
  border-radius: 7px;
  box-shadow: none;
  min-height: 116px;
  padding: 15px 14px;
  position: relative;
}

.finance-metrics article::before {
  background: #9298a2;
  height: 3px;
  left: -1px;
  right: -1px;
  top: -1px;
}

.finance-metrics article:nth-child(1)::before,
.finance-metrics article:nth-child(5)::before,
.finance-metrics article:nth-child(6)::before {
  background: var(--v2-green);
}

.finance-metrics article:nth-child(2)::before {
  background: #f08a24;
}

.finance-metrics article:nth-child(3)::before,
.finance-metrics article:nth-child(4)::before {
  background: var(--v2-red);
}

.finance-metrics article:nth-child(7)::before,
.finance-metrics article:nth-child(8)::before {
  background: var(--v2-blue);
}

.finance-metrics span {
  color: var(--v2-muted);
  font-size: 9px;
  font-weight: 900;
}

.finance-metrics strong {
  color: var(--v2-ink);
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.05;
}

.finance-metrics small {
  color: var(--v2-muted);
  font-size: 9px;
}

.finance-balance-visual,
.finance-day-detail,
.finance-chart-column,
.cumulative-chart-wrap {
  background: var(--v2-surface-soft);
  border: 1px solid var(--v2-line);
  border-radius: 7px;
}

.finance-calendar {
  gap: 5px;
}

.calendar-weekday {
  color: var(--v2-subtle);
  font-size: 9px;
  font-weight: 900;
}

.calendar-day {
  background: var(--v2-surface-soft);
  border-color: var(--v2-line);
  border-radius: 6px;
}

.calendar-day.has-records {
  border-color: #a9d5b9;
}

.calendar-day.selected {
  background: var(--v2-ink);
  border-color: var(--v2-ink);
  color: #fff;
}

.finance-charts {
  gap: 12px;
}

.bar-chart {
  gap: 7px;
}

.finance-disclosure summary {
  background: var(--v2-surface-soft);
  border-radius: 6px;
}

.annual-view,
.finance-list {
  color: var(--v2-ink);
}

.finance-layout.finance-limited {
  grid-template-columns: minmax(0, 1.17fr) minmax(280px, 0.83fr);
  max-width: none;
}

.finance-layout.finance-limited .finance-entry-panel {
  grid-column: 1;
}

.finance-layout.finance-limited .finance-recent-panel {
  grid-column: 2;
}

.finance-layout.finance-limited .finance-entry-panel {
  position: static;
}

.finance-layout.finance-limited .finance-field-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Dialogs */

.modal-backdrop {
  backdrop-filter: blur(4px);
  background: rgba(15, 17, 20, 0.68);
}

.modal-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: var(--v2-shadow-high);
  padding: 24px;
}

.repair-action-card {
  max-width: 500px;
}

.repair-action-options {
  display: grid;
  gap: 9px;
}

.repair-action-options button {
  align-items: center;
  display: flex;
  gap: 9px;
  justify-content: center;
  min-height: 46px;
  width: 100%;
}

.repair-action-options .share-pdf-button {
  background: var(--v2-ink);
  border-color: var(--v2-ink);
  color: #fff;
}

.repair-action-options .share-pdf-button:hover {
  background: #30333a;
  border-color: #30333a;
}

/* Intermediate desktop */

@media (max-width: 1240px) and (min-width: 921px) {
  :root {
    --v2-sidebar-width: 204px;
  }

  .v2-sidebar {
    padding-inline: 13px;
  }

  .v2-nav-item {
    gap: 8px;
    padding-inline: 8px;
  }

  .layout {
    grid-template-columns: minmax(390px, 1.08fr) minmax(340px, 0.92fr);
  }

  .finance-layout {
    grid-template-columns: minmax(330px, 0.76fr) minmax(470px, 1.24fr);
  }

  .finance-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

/* Tablet and mobile application */

@media (max-width: 920px) {
  :root {
    --v2-topbar-height: 64px;
  }

  body {
    background: var(--v2-canvas);
  }

  .app-shell {
    padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
  }

  .v2-sidebar {
    display: none;
  }

  .topbar {
    background: #111214;
    border-bottom-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
    color: #fff;
    display: grid;
    gap: 6px 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    height: var(--v2-topbar-height);
    left: 0;
    min-height: var(--v2-topbar-height);
    padding: 7px 12px;
    position: sticky;
    right: auto;
    top: 0;
    width: 100%;
  }

  .topbar-brand {
    align-items: center;
    display: flex;
    gap: 5px;
    min-width: 0;
  }

  .topbar-brand img {
    height: 28px;
    max-width: 78px;
  }

  .topbar-brand span {
    color: #fff;
    display: block;
    font-size: 16px;
    font-style: italic;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
  }

  .v2-topbar-heading {
    display: block;
    min-width: 0;
  }

  .v2-topbar-heading p {
    display: none;
  }

  .topbar-title {
    color: #fff;
    font-size: 18px !important;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    display: flex;
    gap: 5px;
    grid-column: auto;
    justify-content: flex-end;
    min-width: 0;
    width: auto;
  }

  #currentUser {
    display: none;
  }

  #connectionStatus {
    background: #24262b;
    border-color: #3a3d43;
    color: #aeb3bb;
    font-size: 0;
    height: 34px;
    min-height: 34px;
    min-width: 34px;
    padding: 0;
    width: 34px;
  }

  #connectionStatus::before {
    background: #8f959e;
    margin: 0;
  }

  #connectionStatus.online {
    background: #173122;
    border-color: #315e42;
    color: #6ad497;
  }

  #connectionStatus.online::before {
    background: #4fd080;
  }

  .topbar-notification-toggle,
  .logout-button {
    height: 34px;
    min-height: 34px;
  }

  .topbar-notification-toggle {
    background: #24262b;
    border-color: #3a3d43;
    color: #fff;
    padding: 0;
    width: 34px;
  }

  .topbar-notification-toggle.active {
    background: #3a1720;
    border-color: #6f2938;
    color: #ff6d86;
  }

  .logout-button {
    background: #fff;
    border-color: #fff;
    color: #111214;
    font-size: 10px;
    padding: 5px 8px;
  }

  .logout-button:hover {
    background: #eceef1;
  }

  .notification-toast {
    left: 10px;
    right: 10px;
    top: 73px;
  }

  .layout,
  .finance-layout,
  .tool-layout,
  .tools-layout {
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
    max-width: none;
    padding: 14px 12px 24px;
    width: 100%;
  }

  .tool-layout,
  .tools-layout {
    padding-top: 12px;
  }

  .tool-layout {
    padding-top: 8px;
  }

  .tool-layout > .tool-workspace-header {
    display: none;
  }

  .tool-switcher {
    width: 100%;
  }

  .tool-picker {
    grid-template-columns: 1fr;
  }

  .tool-frame-shell iframe {
    min-height: 560px;
  }

  .finance-layout.finance-limited {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-layout.finance-limited .finance-entry-panel,
  .finance-layout.finance-limited .finance-recent-panel {
    grid-column: 1;
  }

  #agendaView {
    padding-top: 8px;
  }

  #agendaView > .v2-workspace-header {
    display: none;
  }

  .v2-workspace-header {
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    padding: 5px 2px 14px;
  }

  .v2-workspace-header h2 {
    font-size: 24px;
  }

  .v2-workspace-copy {
    display: none;
  }

  .v2-workspace-date {
    min-width: 104px;
  }

  .v2-workspace-date strong {
    font-size: 12px;
  }

  .task-form-panel,
  .task-list-panel,
  .finance-entry-panel,
  .finance-dashboard .panel,
  .finance-recent-panel,
  .workshop-panel {
    padding: 16px;
  }

  .mobile-filters-toggle {
    align-items: center;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    min-height: 34px;
    padding: 0;
    width: 34px;
  }

  .mobile-filters-toggle.active {
    background: var(--v2-ink);
    border-color: var(--v2-ink);
    color: #fff;
  }

  .task-list-panel .date-filter,
  .task-list-panel .search-filter,
  .task-list-panel .sort-filter {
    display: none;
  }

  .task-list-panel.mobile-filters-expanded .date-filter,
  .task-list-panel.mobile-filters-expanded .search-filter,
  .task-list-panel.mobile-filters-expanded .sort-filter {
    display: grid;
  }

  .task-list-panel .route-summary {
    display: none;
  }

  .task-list-panel.route-mode .route-summary {
    display: block;
  }

  #agendaView[data-workspace="agenda"] .task-form-panel {
    display: none;
  }

  #agendaView[data-workspace="new"] .task-list-panel {
    display: none;
  }

  #agendaView[data-workspace="new"] .task-form-panel {
    display: block;
  }

  #agendaView[data-workspace="workshop"] .workshop-panel,
  #agendaView[data-workspace="history"] .workshop-panel {
    max-width: none;
  }

  .mobile-workshop-tabs {
    background: #eff1f3;
    border: 1px solid var(--v2-line);
    border-radius: 7px;
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
    padding: 4px;
  }

  .mobile-workshop-tab {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--v2-muted);
    display: flex;
    font-size: 12px;
    font-weight: 850;
    gap: 7px;
    justify-content: center;
    min-height: 40px;
    min-width: 0;
    padding: 7px 8px;
  }

  .mobile-workshop-tab svg {
    flex: 0 0 auto;
    height: 17px;
    width: 17px;
  }

  .mobile-workshop-tab.active {
    background: #fff;
    border-color: #d7dbe1;
    box-shadow: 0 2px 6px rgba(23, 25, 29, 0.08);
    color: var(--v2-ink);
  }

  .floating-new-task {
    display: none !important;
  }

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

  .repair-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .repair-card-actions .icon-button {
    justify-content: center;
  }

  .repair-card-actions .share-repair {
    display: flex;
  }

  .finance-entry-panel {
    position: static;
  }

  .finance-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .v2-mobile-nav {
    align-items: end;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--v2-line);
    bottom: 0;
    box-shadow: 0 -8px 24px rgba(23, 25, 29, 0.08);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    left: 0;
    min-height: calc(65px + env(safe-area-inset-bottom) + 2mm);
    padding: 6px 5px calc(5px + env(safe-area-inset-bottom) + 2mm);
    position: fixed;
    right: 0;
    z-index: 36;
  }

  .v2-mobile-nav-item {
    align-items: center;
    align-self: stretch;
    background: transparent;
    border: 0;
    color: #777d86;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-weight: 800;
    gap: 3px;
    justify-content: center;
    min-width: 0;
    padding: 3px 2px;
  }

  .v2-mobile-nav-item:focus-visible {
    outline: 2px solid rgba(227, 6, 46, 0.36);
    outline-offset: -2px;
  }

  .v2-mobile-nav-item > span {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-size: 18px;
    height: 27px;
    justify-content: center;
    width: 32px;
  }

  .v2-mobile-nav-item > span svg {
    display: block;
    height: 19px;
    width: 19px;
  }

  .v2-mobile-nav-item small {
    font-size: 9px;
    line-height: 1;
  }

  .v2-mobile-nav-item.active {
    color: var(--v2-red);
    font-weight: 900;
  }

  .v2-mobile-nav-item.active > span {
    background: #ffe7ec;
    box-shadow: inset 0 0 0 1px rgba(227, 6, 46, 0.16);
  }

  .v2-mobile-nav-item.active small {
    color: var(--v2-red);
    font-weight: 900;
  }

  .v2-mobile-create {
    color: var(--v2-red);
  }

  .v2-mobile-create > span {
    background: var(--v2-red);
    border-radius: 50%;
    color: #fff;
    font-size: 25px;
    height: 42px;
    margin-top: -15px;
    width: 42px;
  }

  .v2-mobile-create > span svg {
    height: 23px;
    width: 23px;
  }

  .v2-mobile-create.active > span {
    background: var(--v2-red-dark);
  }

  .v2-mobile-create small {
    color: var(--v2-red);
  }
}

@media (max-width: 620px) {
  .layout,
  .finance-layout,
  .tool-layout,
  .tools-layout {
    padding-inline: 8px;
  }

  .tool-picker-card {
    gap: 14px;
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 126px;
    padding: 18px;
  }

  .tool-picker-icon {
    height: 48px;
    width: 48px;
  }

  .tool-picker-card strong {
    font-size: 18px;
  }

  .tool-frame-shell iframe {
    min-height: 620px;
  }

  .v2-mobile-nav-item small {
    font-size: 8px;
  }

  .v2-workspace-header {
    padding-inline: 6px;
  }

  .v2-workspace-header .eyebrow {
    font-size: 9px;
  }

  .v2-workspace-header h2 {
    font-size: 22px;
  }

  .v2-workspace-date {
    min-width: 94px;
    padding-left: 10px;
  }

  .task-form-panel,
  .task-list-panel,
  .finance-entry-panel,
  .finance-dashboard .panel,
  .finance-recent-panel,
  .workshop-panel {
    padding: 13px;
  }

  .panel-heading {
    align-items: center;
    flex-direction: row;
    gap: 9px;
    margin-bottom: 10px;
  }

  .finance-month-heading {
    align-items: stretch;
    display: grid;
    flex-direction: column;
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .finance-month-heading > * {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .finance-month-heading .month-filter {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    width: 100%;
  }

  .finance-month-heading .month-filter input {
    box-sizing: border-box;
    display: block;
    inline-size: 100%;
    max-inline-size: 100%;
    max-width: 100%;
    min-inline-size: 0;
    min-width: 0;
    width: 100%;
    width: -webkit-fill-available;
  }

  .finance-form-top {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .finance-form-top > label {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .finance-form-top #financeDate {
    box-sizing: border-box;
    display: block;
    inline-size: 100%;
    max-inline-size: 100%;
    max-width: 100%;
    min-inline-size: 0;
    min-width: 0;
    width: 100%;
    width: -webkit-fill-available;
  }

  .task-form .grid,
  .task-form .grid > label {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  #dueDate,
  #repairEntryDate {
    box-sizing: border-box;
    display: block;
    inline-size: 100%;
    max-inline-size: 100%;
    max-width: 100%;
    min-inline-size: 0;
    min-width: 0;
    width: 100%;
    width: -webkit-fill-available;
  }

  #financeView {
    contain: inline-size paint;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
    overscroll-behavior-inline: none;
    touch-action: pan-y;
    width: 100%;
  }

  #financeView > *,
  #financeView .finance-dashboard,
  #financeView .finance-dashboard > *,
  #financeView .finance-metrics,
  #financeView .finance-charts,
  #financeView .finance-chart-column,
  #financeView .annual-view,
  #financeView .annual-row,
  #financeView .finance-disclosure {
    max-width: 100%;
    min-width: 0;
  }

  .task-list-panel > .panel-heading .eyebrow {
    display: none;
  }

  .task-list-panel > .panel-heading h2 {
    font-size: 17px;
  }

  .panel h2 {
    font-size: 18px;
  }

  .panel-tools {
    justify-content: flex-end;
  }

  .filters {
    gap: 2px;
    margin-bottom: 9px;
    padding: 3px;
  }

  .filter {
    font-size: 12px;
    min-height: 35px;
    padding: 6px 3px;
  }

  .route-mode-toggle,
  .compact-toggle {
    font-size: 11px;
    min-height: 34px;
    padding: 6px 8px;
  }

  .route-mode-toggle.active,
  .route-mode-toggle.active:hover {
    background: var(--v2-red);
    border-color: var(--v2-red);
    box-shadow: 0 3px 9px rgba(227, 6, 46, 0.2);
    color: #fff;
  }

  .compact-toggle.active,
  .compact-toggle.active:hover {
    background: var(--v2-ink);
    border-color: var(--v2-ink);
    box-shadow: 0 3px 9px rgba(23, 25, 29, 0.18);
    color: #fff;
  }

  .count-badge {
    min-height: 34px;
    min-width: 36px;
  }

  .task-card {
    gap: 10px;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .task-card:hover {
    box-shadow: 0 1px 2px rgba(23, 25, 29, 0.03);
    transform: none;
  }

  .task-card h3 {
    font-size: 16px;
  }

  .task-actions {
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(23, 25, 29, 0.08);
    border-radius: 6px;
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    padding: 5px;
  }

  .task-actions .icon-button,
  .quick-status {
    font-size: 12px;
    min-height: 38px;
    width: auto;
  }

  .task-actions > * {
    min-width: 0;
  }

  .task-list-panel.route-mode .task-actions > * {
    min-height: 44px;
  }

  .task-form-panel > .panel-heading,
  .workshop-panel > .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-form-panel > .panel-heading .panel-tools,
  .workshop-panel > .panel-heading .panel-tools {
    display: none;
  }

  .grid.two,
  .grid.three,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

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

  .finance-metrics article {
    min-height: 105px;
    padding: 13px;
  }

  .finance-metrics strong {
    font-size: clamp(18px, 5.5vw, 23px);
  }

  .finance-charts {
    grid-template-columns: 1fr;
  }

  .finance-field-grid,
  .finance-layout.finance-limited .finance-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-form-section {
    padding: 12px;
  }

  .finance-variable-heading {
    align-items: stretch;
    display: grid;
    gap: 9px;
  }

  .finance-add-row {
    justify-self: start;
  }

  .finance-variable-row {
    grid-template-columns: minmax(0, 1fr) minmax(92px, 0.44fr) 36px;
  }

  .finance-fixed-progress-heading {
    align-items: flex-start;
    display: grid;
    gap: 3px;
  }

  .calendar-day {
    min-height: 54px;
    padding: 5px;
  }

  .modal-card {
    padding: 19px;
  }
}

@media (max-width: 420px) {
  .topbar {
    gap: 5px 7px;
    padding-inline: 9px;
  }

  .topbar-brand img {
    height: 25px;
    max-width: 69px;
  }

  .topbar-brand span {
    font-size: 14px;
  }

  .topbar-title {
    font-size: 16px !important;
  }

  .logout-button {
    font-size: 0;
    padding: 0;
    width: 34px;
  }

  .logout-button::before {
    content: "↪";
    font-size: 17px;
  }

  .v2-workspace-date {
    display: none;
  }

  .finance-field-grid,
  .finance-layout.finance-limited .finance-field-grid {
    grid-template-columns: 1fr;
  }

  .finance-variable-row {
    grid-template-columns: minmax(0, 1fr) 36px;
  }

  .finance-variable-row label:first-child {
    grid-column: 1 / -1;
  }

  .finance-variable-row label:nth-child(2) {
    grid-column: 1;
  }

  .finance-variable-row .finance-remove-row {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .task-card {
    transition: none;
  }
}
