﻿:root {
  --bg: #f6f7f5;
  --panel: #ffffff;
  --ink: #1c2328;
  --muted: #5e6a70;
  --accent: #0f7f6d;
  --accent-2: #f2b879;
  --border: #d8d6d0;
  --shadow: 0 12px 28px rgba(15, 24, 28, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #fbfaf7 0%, #f1efea 100%);
  color: var(--ink);
}

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #f9f7f2;
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.brand-text {
  font-size: 14px;
}

.side-actions {
  display: grid;
}

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

.nav-item {
  text-decoration: none;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  transition: all 0.2s ease;
}

.nav-item.active,
.nav-item:hover {
  background: #e7f1ee;
  color: var(--accent);
}

.prototype-note {
  margin-top: auto;
  font-size: 11px;
  color: var(--muted);
}

.main {
  padding: 20px 28px 40px;
}

.hero-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(120deg, #0f7f6d 0%, #1a9c88 55%, #f2b879 110%);
  color: #fff;
  border-radius: 18px;
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.hero-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
  opacity: 0.8;
}

.hero-title {
  font-size: 20px;
  font-weight: 700;
}

.hero-chip {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.date-line {
  font-size: 14px;
  color: var(--muted);
}

.greeting {
  font-size: 28px;
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
}

.search input {
  border: none;
  outline: none;
  font-size: 13px;
}

.icon-pill {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  background: #fff;
  font-size: 12px;
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(15, 24, 28, 0.12);
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.workflow-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #fffdf8;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.workflow-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.workflow-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.workflow-value {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.workflow-sub {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.workflow-sub .money {
  color: var(--accent);
  font-weight: 700;
}

.grid-two {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.appointments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.appt-metric {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.appt-metric .label {
  font-size: 12px;
  color: var(--muted);
}

.appt-metric .value {
  font-size: 18px;
  font-weight: 700;
}

.appt-list {
  display: grid;
  gap: 8px;
}

.appt-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  background: #fff;
}

.appt-item strong {
  font-size: 13px;
}

.appt-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.performance {
  display: grid;
  gap: 12px;
}

.perf-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.perf-title {
  font-size: 12px;
  color: var(--muted);
}

.perf-value {
  font-size: 20px;
  font-weight: 700;
  margin: 6px 0;
}

.perf-sub {
  font-size: 12px;
  color: var(--muted);
}

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

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

.field input,
.field textarea,
.field select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  background: #fff;
}

.field.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 24, 28, 0.12);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.ghost {
  background: transparent;
}

.btn.tiny {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
}

.btn.full {
  width: 100%;
}

.app {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

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

.hint {
  font-size: 12px;
  color: var(--muted);
}

.legend {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}

.dot.completed {
  background: var(--accent);
}

.dot.pending {
  background: var(--accent-2);
}

.job-list {
  display: grid;
  gap: 10px;
  min-height: 120px;
}

.job-card {
  background: #fffdf8;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: grab;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.job-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 24, 28, 0.12);
}

.job-card.completed {
  border-color: var(--accent);
  opacity: 0.7;
}

.job-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.job-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.job-site {
  font-size: 12px;
  font-weight: 700;
  color: #2a3d3c;
  margin-bottom: 2px;
}

.job-sub {
  color: var(--muted);
  font-size: 12px;
}

.job-duration {
  background: var(--accent-2);
  color: #3b2b00;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  height: fit-content;
}

.job-notes {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.job-tags span {
  background: #e9f1ef;
  color: var(--accent);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
}

.job-flag {
  margin-top: 8px;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffe4c4;
  color: #6b3b00;
  display: inline-block;
}

.job-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.runs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.run-column {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #fefdfb;
  min-height: 220px;
}

.run-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.run-name {
  font-weight: 700;
}

.run-meta {
  font-size: 12px;
  color: var(--muted);
}

.run-cap {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e9f1ef;
  color: var(--accent);
}

.empty {
  color: var(--muted);
  font-size: 12px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 24, 28, 0.4);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-card {
  background: #fff;
  padding: 18px;
  border-radius: 16px;
  width: min(420px, 90vw);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-form {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

@media (max-width: 1100px) {
  .grid-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }
  .nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 6px;
  }
  .main {
    padding: 16px;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .app {
    grid-template-columns: 1fr;
  }
}

@media print {
  .sidebar,
  .topbar,
  .hero-banner,
  .workflow,
  .grid-two,
  .controls,
  .modal {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .main {
    padding: 0;
  }
  .panel,
  .card {
    box-shadow: none;
  }
}
