﻿:root {
  color-scheme: light;
  --bg: #f4f7f4;
  --ink: #101820;
  --muted: #69747f;
  --panel: rgba(255, 255, 255, 0.9);
  --line: rgba(16, 24, 32, 0.1);
  --green: #0b8f78;
  --green-dark: #066555;
  --blue: #2867d6;
  --yellow: #f0b84c;
  --red: #d85a68;
  --shadow: 0 18px 48px rgba(16, 24, 32, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(140deg, rgba(11, 143, 120, 0.16), transparent 32%),
    linear-gradient(315deg, rgba(40, 103, 214, 0.12), transparent 36%),
    linear-gradient(25deg, rgba(240, 184, 76, 0.16), transparent 28%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.app {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 32px;
}

.topbar {
  min-height: 184px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-radius: 0 0 30px 30px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(12, 20, 26, 0.12), rgba(12, 20, 26, 0.82)),
    url("https://images.unsplash.com/photo-1600566753190-17f0baa2a6c3?auto=format&fit=crop&w=1200&q=80") center/cover;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: #d7fff6;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2.35rem, 13vw, 4.6rem); line-height: 0.9; letter-spacing: 0; }
h2 { margin-bottom: 12px; font-size: 1.16rem; }
h3 { margin-bottom: 4px; font-size: 0.98rem; }

.round-button {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--green-dark);
  font-size: 1.65rem;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

.filters, .metric-strip, .object-card, .object-details__hero, .room-card, .empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(16, 24, 32, 0.08);
  backdrop-filter: blur(18px);
}

.filters { display: grid; gap: 12px; margin-top: 14px; padding: 14px; }
label, .label { display: block; color: var(--muted); font-size: 0.76rem; font-weight: 850; }

input, select {
  width: 100%;
  min-height: 44px;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #fbfcfd;
  color: var(--ink);
}

input:focus, select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(11, 143, 120, 0.14);
}

.date-grid, .metric-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.date-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-strip { margin-top: 10px; }
.metric-strip article { min-height: 78px; padding: 12px; }
.metric-strip span, .meta { color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.metric-strip strong { display: block; margin-top: 8px; font-size: clamp(1rem, 5vw, 1.45rem); line-height: 1.05; }

.object-list { display: grid; gap: 12px; margin-top: 14px; }
.object-card { width: 100%; padding: 15px; border-color: var(--line); text-align: left; color: var(--ink); cursor: pointer; }
.object-card:focus-visible { outline: 4px solid rgba(11, 143, 120, 0.2); outline-offset: 2px; }
.object-card__top, .room-card__top, .wall-card__top, .object-details__actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.object-card p, .room-card p, .wall-card p { margin-bottom: 0; }
.object-card__customer { margin-top: 10px; color: var(--muted); font-size: 0.88rem; line-height: 1.35; }

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
  white-space: nowrap;
}
.status-1 { background: #edf5ff; color: #2452a4; }
.status-2 { background: #eef8f5; color: var(--green-dark); }
.status-3 { background: #eef8ed; color: #37712d; }
.status-4 { background: #fff1f3; color: var(--red); }

.object-card__stats, .object-details__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.stat { min-height: 62px; padding: 10px; border-radius: 8px; background: #f7fafb; }
.stat span { display: block; color: var(--muted); font-size: 0.7rem; font-weight: 850; }
.stat strong { display: block; margin-top: 5px; font-size: 0.98rem; }
.stat small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.7rem; font-weight: 800; }

.back-button, .secondary-button, .primary-button, .close-button, .ghost-tool, .danger-tool, .pill-action { border: 0; border-radius: 8px; }
.back-button { margin: 14px 0; background: rgba(255,255,255,0.9); color: var(--ink); }
.object-details { display: grid; gap: 12px; }
.object-details__hero, .room-card, .empty-state { padding: 15px; }
.object-details__hero h2 { margin-bottom: 6px; }
.object-details__hero p { margin-bottom: 5px; color: var(--muted); }
.object-details__actions { align-items: center; }
.title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.title-row h2 { margin-bottom: 0; }

.primary-button, .secondary-button, .compact-button {
  min-height: 38px;
  padding: 0 11px;
  font-size: 0.82rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.primary-button { background: var(--green); color: #fff; }
.secondary-button { background: #edf5ff; color: var(--blue); }

.action-stack { display: grid; gap: 8px; }
.inline-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ghost-tool, .danger-tool {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 900;
}
.ghost-tool { background: #edf5ff; color: var(--blue); }
.danger-tool { background: #fff1f3; color: var(--red); }

.room-card { display: grid; gap: 12px; }
.wall-list { display: grid; gap: 8px; }
.wall-card { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.opening-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.opening-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px 5px 9px;
  border-radius: 999px;
  background: #fff5df;
  color: #755018;
  font-size: 0.74rem;
  font-weight: 850;
}
.pill-action {
  width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,0.72);
  color: inherit;
  font-size: 0.74rem;
  font-weight: 950;
}

.modal { width: min(calc(100% - 28px), 460px); border: 0; border-radius: 16px; padding: 0; background: #fff; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(16, 24, 32, 0.48); backdrop-filter: blur(5px); }
.modal form { display: grid; gap: 12px; padding: 16px; }
.modal header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal h2 { margin-bottom: 0; }
.close-button { width: 38px; height: 38px; background: #fff1f3; color: var(--red); font-size: 1.25rem; font-weight: 900; }
.empty-state { color: var(--muted); line-height: 1.45; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(90px); min-width: min(320px, calc(100% - 28px)); padding: 12px 14px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 800; opacity: 0; transition: transform 0.22s ease, opacity 0.22s ease; }
.toast.is-visible { transform: translateX(-50%) translateY(0); opacity: 1; }
.hidden { display: none !important; }
.phone-link { color: var(--blue); font-weight: 900; text-decoration: none; }
.phone-link:focus-visible { outline: 3px solid rgba(40, 103, 214, 0.2); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 420px) {
  .app { padding-inline: 10px; }
  .topbar { min-height: 168px; padding: 20px; }
  .date-grid, .metric-strip, .object-card__stats, .object-details__stats { grid-template-columns: 1fr; }
  .object-card__top, .room-card__top, .wall-card__top, .object-details__actions { align-items: stretch; flex-direction: column; }
  .inline-actions { justify-content: flex-start; }
}

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

.small-round {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  font-size: 1.15rem;
}

.settings-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(16, 24, 32, 0.08);
}

.settings-panel form {
  display: grid;
  gap: 12px;
}

.photo-list {
  margin-top: 6px;
}

.photo-pill {
  background: #edf5ff;
  color: #2452a4;
}
