:root {
  --bg: #f4f6f1;
  --surface: #ffffff;
  --surface-soft: #eef2ea;
  --ink: #18211d;
  --muted: #6e776f;
  --line: #dde5dc;
  --accent: #2f7d57;
  --accent-strong: #215c42;
  --sky: #5d8ecb;
  --coral: #d86b54;
  --gold: #c9952d;
  --shadow: 0 18px 55px rgba(42, 58, 47, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(47, 125, 87, 0.08), transparent 38%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.is-hidden {
  display: none !important;
}

.auth-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 22px;
}

.auth-card {
  display: grid;
  gap: 14px;
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: clamp(2rem, 8vw, 3rem);
}

.auth-card > p:not(.eyebrow):not(.auth-error) {
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-card label,
.user-form label {
  display: grid;
  gap: 7px;
  color: #465148;
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-card input,
.user-form input,
.user-form select,
.project-card input,
.project-card select,
.project-card textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fbfcf9;
  color: var(--ink);
  outline: 0;
}

.auth-card input:focus,
.user-form input:focus,
.user-form select:focus,
.project-card input:focus,
.project-card select:focus,
.project-card textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 125, 87, 0.14);
}

.auth-card .primary-action {
  width: 100%;
  margin-top: 2px;
}

.auth-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.auth-error {
  min-height: 20px;
  margin: 0;
  color: #a23f2d;
  font-size: 0.84rem;
  font-weight: 750;
}

.public-check-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-top: 20px;
  border-top: 5px solid #c0392b;
}

.public-check-card .secondary-action {
  width: 100%;
  justify-content: center;
}

.public-check-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

.public-check-card > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.public-check-result:empty {
  display: none;
}

.public-result-card {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf9;
}

.public-result-card.is-error {
  border-color: rgba(216, 107, 84, 0.45);
  background: rgba(216, 107, 84, 0.08);
}

.public-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.public-result-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.public-result-card dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.public-result-card dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 750;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 26px 18px;
  background: #fbfcf9;
  border-right: 1px solid var(--line);
}

.brand,
.nav-item,
.profile,
.team-row,
.project-row,
.topbar,
.panel-header,
.hero,
.hero-actions,
.chart-stats,
.legend,
.tracker-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-size: 1.18rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

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

.nav-label {
  margin: 0 0 6px 10px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-item {
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: #465148;
  font-weight: 650;
}

.nav-item svg,
.icon-button svg,
.ghost-button svg,
.primary-action svg,
.secondary-action svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.25;
}

.nav-item strong {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dfe9df;
  color: var(--accent-strong);
  font-size: 0.74rem;
}

.nav-item:hover,
.nav-item.is-active {
  background: var(--ink);
  color: #fff;
}

.nav-item.is-active strong,
.nav-item:hover strong {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.profile {
  gap: 12px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.profile strong,
.team-row strong {
  display: block;
  font-size: 0.9rem;
}

.profile p,
.team-row p,
.panel-header p,
.hero p,
.project-row small,
.meeting-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: #d8eadf;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.main {
  min-width: 0;
  padding: 22px 28px;
}

.topbar {
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(520px, 100%);
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(38, 53, 43, 0.06);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

kbd {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 4px 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.icon-button,
.ghost-button,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 750;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.icon-button.menu-button {
  display: none;
}

.ghost-button,
.secondary-action {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.primary-action {
  min-height: 42px;
  padding: 0 15px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 24px rgba(24, 33, 29, 0.18);
}

button:hover {
  transform: translateY(-1px);
}

.hero {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--accent-strong) !important;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0;
  line-height: 1;
}

.hero p {
  max-width: 620px;
  margin-top: 12px;
  font-size: 1rem;
}

.hero-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

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

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

.metric-card {
  min-width: 0;
  padding: 16px;
}

.metric-card span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.metric-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 9px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: dense;
  gap: 18px;
  width: 100%;
}

.panel {
  min-width: 0;
  padding: 22px;
}

.panel-header {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-header h2 {
  margin: 0 0 5px;
  font-size: 1.05rem;
}

.analytics-panel,
.projects-panel {
  grid-column: 1 / -1;
}

.chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(32px, 1fr));
  align-items: end;
  gap: 10px;
  height: 250px;
  padding: 14px 8px 0;
  border-radius: var(--radius);
  background:
    linear-gradient(to top, rgba(110, 119, 111, 0.14) 1px, transparent 1px) 0 0 / 100% 25%,
    #f8faf6;
}

.bar {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  min-width: 0;
}

.bar::before {
  content: "";
  width: 100%;
  max-width: 42px;
  height: var(--value);
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--accent), #8fb86d);
}

.bar:nth-child(2)::before,
.bar:nth-child(5)::before {
  background: linear-gradient(180deg, var(--sky), #8ab1df);
}

.bar:nth-child(4)::before {
  background: linear-gradient(180deg, var(--coral), #e3a074);
}

.bar span {
  position: absolute;
  bottom: -25px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.chart-stats {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 42px;
  color: var(--muted);
  font-size: 0.86rem;
}

.chart-stats strong {
  color: var(--ink);
}

.team-list,
.project-list {
  display: grid;
  gap: 10px;
}

.team-row {
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf9;
}

.team-row div,
.project-row span {
  min-width: 0;
}

.cool {
  background: #dce8f8;
  color: #245783;
}

.warm {
  background: #fae0d6;
  color: #9d402c;
}

.mint {
  background: #d8eadf;
  color: var(--accent-strong);
}

.status {
  margin-left: auto;
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.done {
  background: #dcf0df;
  color: #24633c;
}

.progress {
  background: #ddeafa;
  color: #285b91;
}

.pending {
  background: #faead0;
  color: #876022;
}

.meeting-card {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

.meeting-card span {
  color: #b9d8c7;
  font-size: 0.78rem;
  font-weight: 800;
}

.meeting-card h3 {
  margin: 10px 0 8px;
  font-size: 1.15rem;
}

.meeting-card p {
  color: rgba(255, 255, 255, 0.72);
}

.meeting-card .primary-action {
  width: 100%;
  margin-top: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.progress-panel {
  display: grid;
}

.donut {
  display: grid;
  place-items: center;
  width: 178px;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 52%, transparent 53%),
    conic-gradient(var(--accent) 0 55%, var(--sky) 55% 84%, var(--gold) 84% 100%);
}

.donut span {
  font-size: 1.55rem;
  font-weight: 800;
}

.legend {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 999px;
}

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

.progress-dot {
  background: var(--sky);
}

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

.project-row {
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf9;
  cursor: pointer;
}

.project-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

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

.project-row svg {
  margin-left: auto;
  color: var(--accent);
  width: 18px;
}

.project-row.is-complete strong {
  color: var(--muted);
  text-decoration: line-through;
}

.project-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf9;
}

.project-card.is-collapsed {
  gap: 0;
}

.project-card.is-collapsed .project-body {
  display: none;
}

.project-body {
  display: grid;
  gap: 18px;
}

.project-card-head,
.project-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-card-head {
  min-width: 0;
}

.project-card-head div {
  min-width: 0;
}

.project-card-head strong,
.project-card-head small {
  display: block;
}

.project-card-head small {
  color: var(--muted);
  font-size: 0.82rem;
}

.project-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.project-card-head .status {
  margin-left: auto;
}

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

.project-fields label {
  display: grid;
  gap: 7px;
  color: #465148;
  font-size: 0.82rem;
  font-weight: 800;
}

.project-card textarea {
  min-height: 86px;
  padding-block: 10px;
  resize: vertical;
}

.project-notes {
  grid-column: 1 / -1;
}

.project-technicians {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.project-technicians > div:first-child strong {
  display: block;
  margin-bottom: 3px;
}

.project-technicians p,
.muted-inline {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.project-technicians label {
  display: grid;
  gap: 7px;
  color: #465148;
  font-size: 0.82rem;
  font-weight: 800;
}

.technician-chips {
  display: grid;
  gap: 8px;
}

.technician-create-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.technician-account {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(180px, 1fr) minmax(150px, 0.8fr) auto auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf9;
}

.technician-account strong,
.technician-account small {
  display: block;
}

.technician-account small {
  color: var(--muted);
  font-size: 0.78rem;
}

.technician-account input {
  min-height: 36px;
}

.technician-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border-radius: 999px;
  padding: 4px 5px 4px 10px;
  background: #ddeafa;
  color: #285b91;
  font-size: 0.78rem;
  font-weight: 800;
}

.technician-chip button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(40, 91, 145, 0.14);
  color: #285b91;
  cursor: pointer;
  font-weight: 900;
}

.project-technicians .secondary-action:disabled,
.project-technicians select:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.project-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 700;
}

.timer {
  margin: 8px 0 20px;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 0;
}

.tracker-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.tracker-actions button {
  flex: 1;
  min-width: 120px;
}

.users-panel {
  grid-column: 1 / -1;
}

.service-products-panel {
  grid-column: 1 / -1;
}

.service-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.service-form label {
  display: grid;
  gap: 7px;
  color: #465148;
  font-size: 0.82rem;
  font-weight: 800;
}

.service-form input,
.service-form select,
.service-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fbfcf9;
  color: var(--ink);
  outline: 0;
}

.service-form textarea {
  padding-block: 10px;
  resize: vertical;
}

.service-form input:focus,
.service-form select:focus,
.service-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 125, 87, 0.14);
}

.service-form small {
  color: var(--muted);
  font-weight: 600;
}

.service-wide {
  grid-column: 1 / -1;
}

.service-list {
  display: grid;
  gap: 12px;
}

.service-search {
  width: 100%;
  margin-bottom: 14px;
}

.service-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.service-filters .is-selected {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.service-client-filter {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #465148;
  font-size: 0.82rem;
  font-weight: 800;
}

.service-client-filter select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: #fbfcf9;
}

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

.client-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf9;
}

.client-card strong,
.client-card small {
  display: block;
}

.client-card small,
.client-card p {
  color: var(--muted);
  font-size: 0.84rem;
}

.client-card p {
  grid-column: 1 / -1;
  margin: 0;
}

.service-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf9;
}

.service-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.service-card-head strong,
.service-card-head small {
  display: block;
}

.service-card-head small {
  color: var(--muted);
  font-size: 0.82rem;
}

.service-product-name {
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  color: #fff;
  line-height: 1.2;
}

.service-product-name.is-working {
  background: #c0392b;
}

.service-product-name.is-waiting {
  background: #2563eb;
}

.service-product-name.is-final {
  background: #16803c;
}

.service-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.service-details div {
  min-width: 0;
}

.service-details dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.service-details dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 700;
}

.service-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-photos img {
  width: 86px;
  height: 86px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
}

.bulk-service-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.bulk-service-actions label,
.service-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #465148;
  font-size: 0.84rem;
  font-weight: 800;
}

.bulk-service-actions input,
.service-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.service-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.client-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

.service-status-editor {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.8fr) auto;
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.service-resolution-field {
  grid-column: 1 / -1;
}

.service-status-editor label {
  display: grid;
  gap: 7px;
  color: #465148;
  font-size: 0.82rem;
  font-weight: 800;
}

.service-status-editor select,
.service-status-editor textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #fbfcf9;
}

.service-status-editor textarea {
  resize: vertical;
}

.warranty-print-note {
  display: none;
}

.warranty-company {
  display: none;
}

.stamp-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fbfcf9;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.stamp-preview img {
  max-width: 120px;
  max-height: 70px;
  object-fit: contain;
}

.warranty-stamp {
  display: none;
}

.service-print-form {
  display: none;
}

.user-count {
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 11px;
  background: #dfe9df;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.user-form {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr 1fr auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
}

.user-form .primary-action {
  min-height: 44px;
  white-space: nowrap;
}

.users-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.users-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fbfcf9;
}

.users-table th,
.users-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.users-table th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.users-table tr:last-child td {
  border-bottom: 0;
}

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

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

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

.table-actions {
  display: flex;
  gap: 8px;
}

.reset-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.reset-form input {
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: #fff;
  outline: 0;
}

.reset-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 125, 87, 0.14);
}

.reset-form.is-saved input {
  border-color: var(--accent);
  background: #f1faf4;
}

.reset-form .secondary-action {
  min-height: 36px;
  white-space: nowrap;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid #f0c6bb;
  border-radius: var(--radius);
  padding: 0 10px;
  background: #fff8f5;
  color: #a23f2d;
  cursor: pointer;
  font-weight: 800;
}

.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.role-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: #ddeafa;
  color: #285b91;
  font-size: 0.76rem;
  font-weight: 800;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 14px;
  }

  .brand span:last-child,
  .nav-label,
  .nav-item span,
  .nav-item strong,
  .profile div {
    display: none;
  }

  .brand,
  .nav-item {
    justify-content: center;
  }

  .profile {
    justify-content: center;
    padding: 10px;
  }

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

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

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

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

@media (max-width: 760px) {
  .auth-screen {
    grid-template-columns: minmax(0, 440px);
    align-content: center;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .brand span:last-child,
  .nav-label,
  .nav-item span,
  .nav-item strong,
  .profile div {
    display: block;
  }

  .brand,
  .nav-item {
    justify-content: flex-start;
  }

  .profile {
    justify-content: flex-start;
  }

  .main {
    padding: 16px;
  }

  .icon-button.menu-button {
    display: inline-flex;
  }

  .topbar {
    align-items: flex-start;
  }

  .search {
    order: 3;
    flex-basis: 100%;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions {
    width: 100%;
    justify-content: stretch;
  }

  .hero-actions button {
    flex: 1;
  }

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

  .panel {
    padding: 14px;
  }

  .panel-header {
    align-items: flex-start;
  }

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

  .technician-create-grid,
  .technician-account {
    grid-template-columns: 1fr;
  }

  .team-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .status {
    margin-left: 52px;
  }

  .chart {
    gap: 7px;
    height: 220px;
  }

  .auth-card {
    padding: 20px;
  }

  .user-form {
    grid-template-columns: 1fr;
  }

  .service-form,
  .service-details,
  .service-status-editor {
    grid-template-columns: 1fr;
  }

  .users-table {
    min-width: 760px;
  }

  kbd {
    display: none;
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: #fff;
    color: #111;
  }

  body[data-print-service-id] .sidebar,
  body[data-print-service-id] .topbar,
  body[data-print-service-id] .hero,
  body[data-print-service-id] .metrics,
  body[data-print-service-id] .panel:not(.service-products-panel),
  body[data-print-service-id] #service-products,
  body[data-print-service-id] #service-products-list .panel-header,
  body[data-print-service-id] #service-products-list .search,
  body[data-print-service-id] #service-products-list .service-client-filter,
  body[data-print-service-id] #service-products-list .service-filters,
  body[data-print-service-id] #service-products-list .bulk-service-actions,
  body[data-print-service-id] .service-card:not(.is-print-target),
  body[data-print-service-id] .service-card-actions,
  body[data-print-service-id] .service-status-editor,
  body[data-print-service-id] .service-select,
  body[data-print-service-id] .service-photos,
  body[data-print-service-id] .warranty-company,
  body[data-print-service-id] .service-card-head,
  body[data-print-service-id] .service-details,
  body[data-print-service-id] .warranty-print-note {
    display: none !important;
  }

  body[data-print-service-id] .app-shell,
  body[data-print-service-id] .main,
  body[data-print-service-id] .dashboard-grid,
  body[data-print-service-id] #service-products-list,
  body[data-print-service-id] .service-list {
    display: block !important;
    min-height: auto;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: 0;
    background: #fff;
  }

  body[data-print-service-id] .service-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body[data-print-service-id] .service-card.is-print-target {
    display: block !important;
    box-sizing: border-box;
    width: 210mm;
    min-height: 297mm;
    max-height: 297mm;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    padding: 5mm 8mm;
    font-family: Arial, sans-serif;
  }

  body[data-print-service-id] .service-print-form {
    display: block;
    color: #3b3b3b;
    font-family: Arial, sans-serif;
    font-size: 11px;
  }

  body[data-print-service-id] .print-company-line {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    min-height: 11mm;
    padding: 1.5mm 4mm;
    border: 1px solid #bdbdbd;
    border-bottom: 0;
  }

  body[data-print-service-id] .print-company-line strong {
    color: #111;
    font-size: 13px;
    text-transform: uppercase;
  }

  body[data-print-service-id] .service-print-form h1 {
    margin: 0;
    padding: 5mm 4mm;
    background: #696565;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
  }

  body[data-print-service-id] .print-flow {
    display: grid;
    grid-template-columns: 1.55fr 0.45fr;
    min-height: 33mm;
    border: 1px solid #d5d5d5;
    border-top: 0;
  }

  body[data-print-service-id] .print-flow > div {
    position: relative;
    padding: 3mm 4mm;
    border-right: 1px solid #d5d5d5;
  }

  body[data-print-service-id] .print-flow > div:last-child {
    border-right: 0;
  }

  body[data-print-service-id] .print-info-stack {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.85fr;
    gap: 3mm;
    align-items: stretch;
  }

  body[data-print-service-id] .print-info-stack > div {
    border-right: 1px solid #e1e1e1;
    padding-right: 3mm;
  }

  body[data-print-service-id] .print-info-stack > div:last-child {
    border-right: 0;
    padding-right: 0;
  }

  body[data-print-service-id] .print-date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3mm;
  }

  body[data-print-service-id] .print-flow strong,
  body[data-print-service-id] .print-section h2,
  body[data-print-service-id] .print-bottom-grid strong {
    display: block;
    margin: 0 0 1.5mm;
    color: #3b3b3b;
    font-size: 13px;
    font-weight: 500;
  }

  body[data-print-service-id] .print-flow label {
    display: block;
    margin: 1mm 0;
    color: #858585;
    font-size: 13px;
  }

  body[data-print-service-id] .print-flow input,
  body[data-print-service-id] .equipment-grid input {
    width: 12px;
    height: 12px;
    margin: 0 2mm 0 0;
    vertical-align: middle;
    accent-color: #333;
  }

  body[data-print-service-id] .print-section {
    margin-top: 3mm;
  }

  body[data-print-service-id] .print-section h2 {
    margin-bottom: 1mm;
  }

  body[data-print-service-id] .equipment-grid {
    display: grid;
    grid-template-columns: 0.65fr 1.7fr 0.75fr 0.95fr;
    min-height: 19mm;
    border: 2px solid #333;
  }

  body[data-print-service-id] .equipment-grid > div,
  body[data-print-service-id] .report-grid > div,
  body[data-print-service-id] .print-bottom-grid > div {
    padding: 2mm;
    border-right: 1px solid #e0e0e0;
  }

  body[data-print-service-id] .equipment-grid > div:last-child,
  body[data-print-service-id] .report-grid > div:last-child,
  body[data-print-service-id] .print-bottom-grid > div:last-child {
    border-right: 0;
  }

  body[data-print-service-id] .service-print-form em {
    display: block;
    color: #8b8b8b;
    font-size: 10px;
    font-style: italic;
  }

  body[data-print-service-id] .equipment-grid strong,
  body[data-print-service-id] .print-bottom-grid p,
  body[data-print-service-id] .report-grid p {
    margin: 2mm 0 0;
    color: #111;
    font-size: 12px;
    font-weight: 700;
  }

  body[data-print-service-id] .equipment-grid small {
    display: block;
    margin-top: 11mm;
    color: #777;
    font-size: 9px;
  }

  body[data-print-service-id] .print-product-photo-cell {
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: start;
  }

  body[data-print-service-id] .print-product-photo-cell .print-product-photo {
    display: grid;
    place-items: center;
    width: 100%;
    height: 24mm;
    margin-top: 1mm;
    overflow: hidden;
  }

  body[data-print-service-id] .print-product-photo-cell .print-product-photo img {
    max-width: 100%;
    max-height: 24mm;
    object-fit: contain;
  }

  body[data-print-service-id] .print-box {
    min-height: 13mm;
    border: 2px solid #333;
    padding: 3mm;
    color: #111;
    font-size: 12px;
    line-height: 1.35;
  }

  body[data-print-service-id] .print-box-large {
    min-height: 24mm;
  }

  body[data-print-service-id] .report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.45fr;
    min-height: 42mm;
    border: 2px solid #333;
  }

  body[data-print-service-id] .report-grid ol {
    margin: 2mm 0 0;
    padding-left: 5mm;
  }

  body[data-print-service-id] .report-grid li {
    min-height: 8mm;
    border-bottom: 1px solid #e5e5e5;
  }

  body[data-print-service-id] .print-bottom-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 3mm;
    border: 2px solid #333;
  }

  body[data-print-service-id] .print-warranty-text {
    margin: 3mm 0 0;
    color: #333;
    font-size: 10px;
    line-height: 1.35;
  }

  body[data-print-service-id] .print-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26mm;
    align-items: end;
    margin-top: 6mm;
  }

  body[data-print-service-id] .print-signatures span {
    position: relative;
    border-top: 1px solid #111;
    padding-top: 3mm;
    color: #111;
    font-size: 11px;
    font-weight: 700;
  }

  body[data-print-service-id] .technician-signature {
    display: grid;
    gap: 3mm;
    color: #111;
    font-size: 11px;
    font-weight: 700;
  }

  body[data-print-service-id] .stamp-box {
    position: relative;
    display: grid;
    place-items: center;
    width: 46mm;
    height: 34mm;
    border: 1px dotted #b8b8b8;
  }

  body[data-print-service-id] .warranty-stamp {
    display: block;
    max-width: 42mm;
    max-height: 30mm;
    object-fit: contain;
    opacity: 0.92;
  }
}
