:root {
  color-scheme: light;
  --ink: #1f2328;
  --muted: #667085;
  --line: #d7dce2;
  --panel: #ffffff;
  --soft: #f3f4f6;
  --accent: #5f786d;
  --accent-strong: #111315;
  --amber: #a16207;
  --red: #b42318;
  --blue: #5f786d;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: block;
}

.sidebar {
  background: #ffffff;
  color: var(--ink);
  padding: 22px 14px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 30px;
  display: block;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 10px;
  height: 29px;
  border-radius: 1px;
  transform-origin: bottom center;
}

.brand-mark::before {
  left: 6px;
  background: #08090b;
  transform: rotate(-28deg);
}

.brand-mark::after {
  right: 8px;
  background: linear-gradient(180deg, #7e968b, #557267);
  transform: rotate(28deg);
}

.brand-word {
  display: block;
  color: #111315;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.28em;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.horizontal-nav {
  min-width: 0;
  overflow-x: auto;
  padding: 0 2px;
}

.nav-item {
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 8px 10px;
  text-align: center;
  background: transparent;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.nav-item span {
  width: 22px;
  color: #53627a;
  text-align: center;
}

.nav-item.active,
.nav-item:hover {
  background: #edf2ef;
  border-color: #d9e2dd;
  color: #111315;
}

.nav-item.active span,
.nav-item:hover span {
  color: #111315;
}

.status-dot {
  width: 8px;
  height: 8px;
  margin: 0 6px 0 0;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: none;
}

.status-dot.muted {
  background: #94a3b8;
}

.status-dot.error {
  background: #dc2626;
}

.app-version {
  margin-top: auto;
  padding: 0 8px;
  color: var(--muted);
}

.workspace {
  padding: 0;
  overflow: hidden;
}

.app-topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.topbar-left {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.icon-button {
  position: relative;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0b1437;
  font-weight: 800;
}

.dashboard-menu {
  position: absolute;
  top: 44px;
  left: 0;
  z-index: 20;
  width: 210px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.dashboard-menu button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 700;
}

.dashboard-menu button:hover {
  background: #edf2ef;
  color: var(--accent-strong);
}

.icon-button:hover {
  background: #f1f5f9;
}

.icon-button span {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #111315;
  color: #ffffff;
  font-size: 10px;
}

.user-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-info {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 190px;
  color: var(--ink);
  line-height: 1.15;
}

.topbar-info strong,
.topbar-info a {
  display: block;
  white-space: nowrap;
}

.topbar-info strong {
  font-size: 13px;
  font-weight: 800;
}

.topbar-info a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f4f7f5;
}

.topbar-info a:hover {
  color: var(--accent-strong);
  text-decoration: none;
}

.topbar-info a[data-weather-tone="sun"] {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.topbar-info a[data-weather-tone="cloud"] {
  border-color: #d9e2dd;
  background: #f4f7f5;
  color: #42534c;
}

.topbar-info a[data-weather-tone="rain"] {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.topbar-info a[data-weather-tone="snow"] {
  border-color: #dbeafe;
  background: #f8fbff;
  color: #334155;
}

.topbar-info a[data-weather-tone="fog"],
.topbar-info a[data-weather-tone="muted"] {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: #4b5563;
}

.topbar-info a[data-weather-tone="warning"] {
  border-color: #fbbf24;
  background: #fffbeb;
  color: #7c2d12;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.user-chip > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #edf2ef;
  color: #111315;
  font-size: 12px;
  font-weight: 800;
}

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

.user-chip strong {
  font-size: 14px;
}

.user-chip small {
  color: var(--muted);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin: 0;
  padding: 24px 28px 16px;
  border-bottom: 0;
}

.dashboard-screen .topbar {
  display: none;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

h3 {
  margin: 10px 0 6px;
}

.top-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}

.search {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.search input {
  width: 260px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 10px;
  background: white;
}

.primary-action,
.login-panel button,
.row button,
.invoice-item button {
  border: 0;
  border-radius: 4px;
  padding: 10px 14px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.content {
  padding: 0 28px 28px;
}

.dashboard-screen .content {
  height: calc(100vh - 58px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 16px 16px;
}

.login-panel {
  min-height: 560px;
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: center;
  gap: 42px;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-panel h2 {
  font-size: 36px;
  line-height: 1.05;
  max-width: 720px;
}

.login-panel p {
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.login-panel form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
}

.login-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 13px 12px;
}

.hidden {
  display: none !important;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 16px;
}

.dashboard-screen .metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 102px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.large-status-panel {
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.large-status-panel div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.large-status-panel span,
.large-status-panel small {
  color: var(--muted);
}

.large-status-panel strong {
  font-size: 20px;
}

.large-status-panel p {
  margin: 0;
  color: var(--ink);
}

.metric i {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-style: normal;
  font-size: 22px;
  font-weight: 800;
}

.metric.blue i {
  background: #edf2ef;
  color: #5f786d;
}

.metric.green i {
  background: #dcfce7;
  color: #16a34a;
}

.metric.orange i {
  background: #ffedd5;
  color: #f97316;
}

.metric.purple i {
  background: #f3e8ff;
  color: #9333ea;
}

.metric span,
.metric small {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 5px 0 3px;
  font-size: 25px;
  letter-spacing: -0.02em;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.65fr);
  gap: 18px;
}

.dashboard-screen .layout-grid {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
  overflow: hidden;
}

.panel {
  padding: 16px;
  min-height: 360px;
}

.dashboard-screen .panel {
  min-height: 0;
}

.dashboard-screen #main-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 10px;
}

.dashboard-screen #action-panel {
  display: block;
  overflow-y: auto;
  padding: 12px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 12px;
}

.panel-header > span {
  color: var(--muted);
  font-weight: 800;
}

.project-list,
.invoice-stack,
.integration-list {
  display: grid;
  gap: 8px;
}

.year-calendar {
  display: grid;
  grid-template-rows: 8px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  overflow-x: auto;
  overflow-y: auto;
}

.dashboard-screen .year-calendar {
  min-height: 0;
  max-height: 100%;
}

.calendar-top-scroll {
  height: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
}

.calendar-top-scroll::-webkit-scrollbar {
  height: 8px;
}

.calendar-top-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.calendar-top-scroll div {
  width: 1458px;
  height: 1px;
}

.calendar-scroll {
  min-width: 1458px;
  min-height: 0;
}

.dashboard-screen .calendar-scroll {
  min-height: max-content;
}

.calendar-header {
  display: grid;
  grid-template-columns: 210px repeat(24, 52px);
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.calendar-header span {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.calendar-body {
  display: grid;
}

.calendar-row {
  border-bottom: 1px solid var(--line);
}

.calendar-row:hover {
  background: #f8fafc;
}

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

.calendar-row-toggle {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 210px 1248px;
  align-items: center;
  gap: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font-size: 13px;
}

.calendar-project {
  min-width: 0;
  min-height: 44px;
  display: grid;
  align-content: center;
  padding: 6px 10px;
}

.calendar-row.needs-attention .calendar-project {
  background: rgba(220, 38, 38, 0.12);
  box-shadow: inset 3px 0 0 rgba(220, 38, 38, 0.72);
}

.calendar-project strong,
.calendar-project small,
.calendar-project em {
  display: block;
}

.calendar-project strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
  font-weight: 700;
  font-size: 12px;
}

.calendar-project strong i {
  display: inline-block;
  width: 12px;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.calendar-project small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.calendar-project em {
  margin-top: 4px;
  color: #991b1b;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.calendar-track {
  position: relative;
  height: 44px;
  background: #ffffff;
}

.calendar-bar {
  position: absolute;
  top: 13px;
  min-width: 32px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
}

.calendar-bar {
  background: #d9e2dd;
  color: #0f172a;
  border: 1px solid #9cafaa;
}

.calendar-details {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.calendar-row.expanded .calendar-details {
  display: grid;
}

.attention-notice {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, auto) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fef2f2;
  color: #7f1d1d;
}

.attention-notice strong,
.attention-notice span,
.attention-notice small,
.attention-notice b {
  display: block;
}

.attention-notice strong {
  font-size: 14px;
}

.attention-notice span,
.attention-notice small {
  margin-top: 3px;
  color: #991b1b;
  font-size: 12px;
}

.attention-notice b {
  justify-self: end;
  padding: 5px 8px;
  border-radius: 3px;
  background: #ffffff;
  color: #991b1b;
  font-size: 12px;
  white-space: nowrap;
}

.attention-totals {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.attention-totals small {
  margin: 0;
  padding: 4px 7px;
  border: 1px solid #fecaca;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.72);
}

.economy-panel,
.deviation-type-panel {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  background: #ffffff;
}

.economy-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 12px;
}

.economy-header span,
.economy-header strong,
.economy-header small {
  display: block;
}

.economy-header span,
.economy-header small {
  color: var(--muted);
  font-size: 12px;
}

.economy-header strong {
  margin-top: 0;
  font-size: 17px;
}

.economy-chart {
  display: grid;
  gap: 8px;
}

.economy-row {
  display: grid;
  grid-template-columns: 90px minmax(180px, 1fr) 130px;
  gap: 10px;
  align-items: center;
}

.economy-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.economy-row div {
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f8fafc;
  overflow: hidden;
}

.economy-row i {
  display: block;
  height: 100%;
  background: #94a3b8;
}

.economy-row.invoiced i {
  background: var(--accent);
}

.economy-row strong {
  text-align: right;
}

.economy-empty {
  display: grid;
  gap: 4px;
  min-height: 150px;
  align-content: center;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: #f8fafc;
}

.economy-empty strong,
.economy-empty span {
  display: block;
}

.economy-empty span {
  color: var(--muted);
}

.deviation-type-list {
  display: grid;
  gap: 10px;
}

.deviation-type-list article {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(140px, auto) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
}

.deviation-type-list strong,
.deviation-type-list span {
  display: block;
}

.deviation-type-list strong {
  font-size: 14px;
}

.deviation-type-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.category-tags {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}

.category-tags b {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
}

.deviation-type-list small {
  padding: 4px 7px;
  border-radius: 3px;
  background: #eef2f6;
  color: var(--muted);
  white-space: nowrap;
}

.deviation-type-list small.open {
  background: #fff7ed;
  color: #c2410c;
}

.project-status-stack {
  display: grid;
  gap: 10px;
}

.project-status-card {
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #ffffff;
}

.project-status-card.empty {
  background: #ffffff;
}

.project-status-card.green {
  background: linear-gradient(90deg, #ecfdf3, #ffffff 46%);
}

.project-status-card.red {
  background: linear-gradient(90deg, #fef3f2, #ffffff 46%);
}

.project-status-card div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.project-status-card span,
.project-status-card small {
  color: var(--muted);
  font-size: 12px;
}

.project-status-card strong {
  font-size: 14px;
}

.project-status-card p {
  margin: 0;
  line-height: 1.4;
}

.project-status-card b {
  color: #991b1b;
  font-size: 12px;
}

.project-status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-status-tags small {
  padding: 4px 7px;
  border: 1px solid #fecaca;
  border-radius: 3px;
  background: #fff7f7;
  color: #b91c1c;
  white-space: nowrap;
}

.correct-hour-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.correct-hour-options span {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
}

.correct-hour-options button {
  padding: 5px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.correct-hour-options button:hover,
.correct-hour-options button.selected {
  border-color: #dc2626;
  background: #fee2e2;
  color: #7f1d1d;
}

.correct-hour-options button.confirm-hours {
  margin-left: 4px;
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
}

.correct-hour-options button.confirm-hours:hover {
  border-color: #15803d;
  background: #15803d;
  color: #ffffff;
}

.correct-hour-options button.confirm-hours:disabled {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.approval-command {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #d9e2dd;
  border-radius: 4px;
  background: #f4f7f5;
}

.approval-command span {
  color: #5f786d;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.approval-command strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
}

.approval-command small {
  color: var(--muted);
}

.approval-command.done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.approval-command.error {
  border-color: #fecaca;
  background: #fff7f7;
}

.integration-summary {
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.integration-summary h2 {
  margin: 0 0 4px;
  font-size: 13px;
}

.integration-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.integration-summary article {
  min-height: 38px;
  display: grid;
  grid-template-columns: 24px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
}

.integration-summary article.status-connected {
  border-color: #bbf7d0;
  background: rgba(240, 253, 244, 0.74);
}

.integration-summary article.status-error {
  border-color: #fecaca;
  background: rgba(254, 242, 242, 0.82);
}

.integration-summary article.status-muted {
  background: #f8fafc;
}

.integration-summary article div {
  display: contents;
}

.integration-summary strong {
  display: block;
  min-width: 116px;
  font-size: 13px;
}

.integration-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.integration-summary small {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-self: end;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #16a34a;
  font-size: 11px;
  white-space: nowrap;
}

.integration-summary small i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #16a34a;
}

.integration-summary small.muted {
  color: #667085;
}

.integration-summary small.muted i {
  background: #94a3b8;
}

.integration-summary small.error {
  color: #b42318;
}

.integration-summary small.error i {
  background: #dc2626;
}

.integration-summary button {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 9px;
  background: #ffffff;
  color: #0b1437;
  font-size: 12px;
  font-weight: 700;
}

.integration-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-weight: 900;
  font-size: 14px;
}

.integration-icon.tripletex {
  background: #edf2ef;
  color: #5f786d;
}

.integration-icon.kk {
  background: #f4f7f5;
  color: #0b1437;
  border: 1px solid #d9e2dd;
}

.integration-icon.smartkalk {
  background: #dcfce7;
  color: #10b981;
}

.project-card,
.invoice-item,
.integration {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: #ffffff;
}

.project-card {
  display: grid;
  gap: 10px;
}

.project-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.project-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.project-card dt {
  color: var(--muted);
  font-size: 12px;
}

.project-card dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.project-card footer,
.invoice-item,
.integration {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 3px;
  background: #eef2f6;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.pill.red {
  background: #f8e6e3;
  color: var(--red);
}

.pill.yellow {
  background: #fff1d6;
  color: var(--amber);
}

.pill.green {
  background: #dff3e7;
  color: var(--accent);
}

.actions {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.actions li {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
}

.actions strong,
.actions span {
  display: block;
}

.actions span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.table {
  display: grid;
  gap: 8px;
}

.attention-projects {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.attention-projects-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.attention-projects-header span {
  color: var(--muted);
  font-size: 12px;
}

.attention-project-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) minmax(210px, 1fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
}

.attention-project-name {
  height: 100%;
  display: grid;
  align-content: center;
  padding: 10px 12px;
  background: rgba(220, 38, 38, 0.12);
  box-shadow: inset 3px 0 0 rgba(220, 38, 38, 0.72);
}

.attention-project-row strong,
.attention-project-row span,
.attention-project-row small,
.attention-project-row b {
  display: block;
}

.attention-project-row > div:not(.attention-project-name) {
  padding: 8px 0;
}

.attention-project-row span,
.attention-project-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.attention-project-row b {
  margin-right: 12px;
  padding: 5px 8px;
  border-radius: 3px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
  white-space: nowrap;
}

.attention-totals.compact {
  justify-content: flex-start;
}

.attention-totals.compact small {
  background: #f8fafc;
}

.row {
  display: grid;
  grid-template-columns: 90px 150px minmax(220px, 1fr) 120px 140px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
}

.row span {
  color: var(--muted);
}

.invoice-item span,
.integration p {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
}

.integration > span {
  font-weight: 800;
  color: var(--accent-strong);
}

@media (max-width: 980px) {
  .login-panel,
  .layout-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .app-topbar,
  .topbar-left {
    align-items: stretch;
    flex-direction: column;
    height: auto;
  }

  .app-topbar {
    padding: 10px 14px;
  }

  .horizontal-nav {
    width: 100%;
  }

  .topbar,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search input {
    width: 100%;
  }

  .project-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .attention-project-row {
    grid-template-columns: 1fr;
  }

  .attention-project-row > div:not(.attention-project-name),
  .attention-project-row b {
    margin: 0 12px 10px;
  }

  .year-calendar {
    overflow-x: auto;
  }

  .calendar-scroll {
    min-width: 1236px;
  }

  .calendar-top-scroll div {
    width: 1236px;
  }

  .calendar-header {
    min-width: 1236px;
    grid-template-columns: 180px repeat(24, 44px);
  }

  .calendar-row-toggle {
    min-width: 1236px;
    grid-template-columns: 180px 1056px;
  }

  .calendar-details {
    grid-template-columns: 1fr;
    padding: 0 12px 14px;
  }

  .attention-notice {
    grid-template-columns: 1fr;
  }

  .attention-notice b,
  .attention-totals {
    justify-self: start;
    justify-content: flex-start;
  }

  .integration-summary-grid {
    grid-template-columns: 1fr;
  }

  .economy-row {
    grid-template-columns: 1fr;
  }

  .economy-row strong {
    text-align: left;
  }

  .deviation-type-list article {
    grid-template-columns: 1fr;
  }

  .category-tags {
    justify-content: flex-start;
  }
}
