:root {
  color-scheme: light;
  --green: #12805c;
  --green-soft: #eefaf5;
  --ink: #000000;
  --muted: rgba(0, 0, 0, 0.7);
  --subtle: rgba(0, 0, 0, 0.55);
  --hairline: rgba(0, 0, 0, 0.1);
  --faint: rgba(0, 0, 0, 0.05);
  --panel: #ffffff;
  --canvas: #fcfcfc;
  --green: #2fbe38;
  --red: #ef5a5a;
  --radius: 8px;
  --card-radius: 16px;
  --shadow: 0 5px 20px 4px rgba(0, 0, 0, 0.02);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

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

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: 100px 1fr 114px;
  height: 100vh;
  border-right: 1px solid var(--faint);
  background: #fff;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--faint);
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.nav {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 24px;
  overflow-y: auto;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  padding: 12px;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
}

.nav-button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav-button:hover,
.nav-button.is-active {
  background: var(--green-soft);
  color: var(--ink);
  font-weight: 600;
}

.nav-button.is-active svg {
  color: var(--green);
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 32px 24px;
  border-top: 1px solid var(--faint);
}

.avatar,
.logo-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
}

.avatar {
  width: 50px;
  height: 50px;
  overflow: hidden;
  font-size: 13px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-copy {
  min-width: 0;
  flex: 1;
}

.profile-copy strong {
  display: block;
  overflow: hidden;
  color: #000;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy span {
  display: block;
  color: rgba(0, 0, 0, 0.6);
  font-size: 14px;
  line-height: 22px;
}

.main {
  min-width: 0;
  background: var(--canvas);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 100px;
  padding: 24px;
  border-bottom: 1px solid var(--faint);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.mobile-menu {
  display: none;
}

.page-title {
  flex: 1 1 auto;
  min-width: 160px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.property-select,
.control,
.search-control {
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  background: #fff;
  color: #000;
}

.property-select {
  gap: 12px;
  padding-left: 16px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.property-select .divider {
  align-self: stretch;
  width: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.property-select button {
  display: grid;
  place-items: center;
  width: 52px;
  align-self: stretch;
  border: 0;
  background: transparent;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green);
}

.badge {
  position: absolute;
  top: -12px;
  right: -12px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.content {
  padding: 24px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
}

.stat-card,
.panel,
.feature-card {
  border-radius: var(--card-radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.stat-card {
  grid-column: span 2;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}

.stat-main {
  display: flex;
  align-items: end;
  gap: 12px;
  min-height: 136px;
  padding: 24px;
}

.stat-copy {
  flex: 1;
  min-width: 0;
}

.stat-value {
  display: block;
  margin-bottom: 4px;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
}

.stat-label,
.field-label,
.muted {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

.trend {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 16px;
  font-weight: 600;
}

.trend.down {
  color: var(--red);
}

.stat-link {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 24px;
  border-top: 1px solid var(--hairline);
  color: #000;
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-position: from-font;
}

.panel {
  grid-column: span 3;
  min-width: 0;
  overflow: hidden;
}

.panel.wide {
  grid-column: span 4;
}

.panel.narrow {
  grid-column: span 2;
}

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

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 77px;
  padding: 24px;
  border-bottom: 1px solid var(--hairline);
}

.panel-header.tall {
  min-height: 100px;
}

.panel-title {
  min-width: 0;
  font-size: 21px;
  font-weight: 600;
  line-height: 26px;
}

.panel-link {
  border: 0;
  background: transparent;
  color: #000;
  padding: 0;
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-position: from-font;
  white-space: nowrap;
}

.invoice-form {
  display: grid;
  grid-template-columns: minmax(138px, 1fr) 96px 96px minmax(116px, 141px);
  gap: 8px;
  padding: 24px;
}

.search-control {
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  color: var(--subtle);
  font-size: 14px;
  font-style: italic;
}

.control {
  justify-content: space-between;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
}

.primary-button,
.outline-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border-radius: var(--radius);
  padding: 0 16px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.primary-button {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
}

.outline-button {
  border: 1px dashed var(--green);
  background: #fff;
  color: var(--green);
}

.text-button {
  min-height: 29px;
  border: 0;
  background: transparent;
  color: #000;
  padding: 0;
  text-decoration: underline;
}

.charge-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px;
}

.list {
  display: grid;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  gap: 24px;
  align-items: center;
  min-height: 98px;
  padding: 24px;
  border-bottom: 1px solid var(--hairline);
  background: #fff;
}

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

.entity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.entity-copy {
  min-width: 0;
}

.entity-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.entity-title strong,
.amount strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.entity-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-copy span,
.amount span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

.amount {
  min-width: 90px;
  text-align: right;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border: 1px solid rgba(18, 128, 92, 0.3);
  border-radius: 6px;
  color: var(--green);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.logo-avatar {
  width: 50px;
  height: 50px;
  font-size: 12px;
}

.avatar.sophia {
  background: linear-gradient(135deg, #f2c3aa, #513322);
}

.avatar.bogdan {
  background: linear-gradient(135deg, #2e7b53, #e5bf89);
}

.avatar.radu {
  background: linear-gradient(135deg, #1f2a38, #d3d9df);
}

.avatar.mia {
  background: linear-gradient(135deg, #e0b99b, #f8efe6);
}

.avatar.ana {
  background: linear-gradient(135deg, #805138, #f0d3b6);
}

.feature-card {
  grid-column: span 3;
  display: grid;
  align-content: space-between;
  min-height: 250px;
  padding: 24px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
}

.feature-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.feature-copy h3 {
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 600;
}

.feature-copy p {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 100px;
  padding: 24px;
  border-bottom: 1px solid var(--hairline);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.segmented {
  display: flex;
  min-height: 52px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.segmented button {
  min-width: 72px;
  border: 0;
  border-right: 1px solid var(--hairline);
  background: #fff;
  padding: 0 16px;
  font-weight: 500;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.is-active {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}

.table {
  min-width: 980px;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) 140px 100px 190px 100px 190px 190px 120px 24px;
  align-items: center;
}

.table-head {
  min-height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid var(--hairline);
  color: var(--subtle);
  font-size: 13px;
  font-weight: 600;
}

.table-row {
  min-height: 98px;
  padding: 0 24px;
  border-bottom: 1px solid var(--hairline);
  background: #fff;
  font-size: 14px;
  font-weight: 500;
}

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

.property-cell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.property-thumb {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: linear-gradient(135deg, #cfd9df, #e2ebf0);
}

.property-thumb.alt {
  background: linear-gradient(135deg, #ddd1c1, #a7b4b7);
}

.property-thumb.green {
  background: linear-gradient(135deg, #bccdbb, #e6e1ca);
}

.property-cell strong,
.table-row strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-cell span,
.table-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.status {
  display: inline-flex;
  justify-content: center;
  min-width: 88px;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
}

.status.paid,
.status.ready,
.status.synced {
  border: 1px solid rgba(47, 190, 56, 0.28);
  color: #218229;
  background: #f4fff5;
}

.status.pending,
.status.review {
  border: 1px solid rgba(239, 90, 90, 0.28);
  color: #c43f3f;
  background: #fff7f7;
}

.calendar {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
}

.mini-month {
  padding: 24px;
}

.mini-month h3 {
  margin-bottom: 18px;
  font-size: 21px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.month-grid span,
.month-grid button {
  display: grid;
  place-items: center;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}

.month-grid .day-name {
  color: #000;
  font-size: 12px;
  font-weight: 700;
}

.month-grid button.is-active,
.month-grid button:hover {
  background: var(--green);
  color: #fff;
}

.schedule {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.booking-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 92px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: #fff;
  padding: 18px;
}

.booking-time {
  color: var(--green);
  font-weight: 700;
}

.booking-card h3 {
  font-size: 18px;
  font-weight: 600;
}

.booking-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.report-card {
  min-height: 180px;
  border-radius: var(--card-radius);
  background: #fff;
  padding: 24px;
  box-shadow: var(--shadow);
}

.report-card strong {
  display: block;
  margin: 18px 0 8px;
  font-size: 28px;
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 180px;
  padding: 24px;
}

.bar-chart span {
  flex: 1;
  min-width: 18px;
  border-radius: 8px 8px 0 0;
  background: var(--green);
  opacity: var(--alpha, 1);
  height: var(--height);
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 24px;
}

.form-grid {
  display: grid;
  gap: 16px;
  padding: 24px;
}

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

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

.field span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 14px;
  color: #000;
}

.field textarea {
  min-height: 132px;
  padding-top: 14px;
  resize: vertical;
}

.summary-box {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.summary-line strong {
  color: #000;
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed var(--green);
  border-radius: 12px;
  color: var(--green);
  text-align: center;
}

.cleaning-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 24px;
}

.kanban-column {
  min-width: 0;
  border-radius: var(--card-radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.kanban-column h2 {
  padding: 24px;
  border-bottom: 1px solid var(--hairline);
  font-size: 21px;
}

.task-card {
  display: grid;
  gap: 12px;
  margin: 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px;
}

.task-card strong {
  font-size: 17px;
}

.task-card span {
  color: var(--muted);
  font-size: 14px;
}

.dropdown-preview {
  position: absolute;
  z-index: 50;
  right: 132px;
  top: 82px;
  width: 260px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.dropdown-preview button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-bottom: 1px solid var(--faint);
  background: #fff;
  padding: 0 16px;
  text-align: left;
}

.dropdown-preview button:last-child {
  border-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

svg.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

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

  .sidebar {
    grid-template-rows: 82px 1fr 96px;
  }

  .nav {
    padding: 18px;
  }

  .nav-button {
    font-size: 14px;
  }

  .profile {
    padding: 22px 18px;
  }

  .profile-copy strong {
    font-size: 15px;
  }

  .stat-card,
  .panel,
  .feature-card {
    grid-column: span 6;
  }

  .panel.wide,
  .panel.narrow {
    grid-column: span 6;
  }

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

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

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

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

  .mobile-menu {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: #fff;
  }

  .topbar {
    min-height: 76px;
    padding: 16px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .property-select {
    display: none;
  }

  .content {
    padding: 16px;
  }

  .dashboard-grid,
  .report-grid,
  .form-layout,
  .calendar,
  .cleaning-board {
    grid-template-columns: 1fr;
  }

  .invoice-form,
  .charge-actions,
  .feature-bottom,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .toolbar-left,
  .toolbar-right {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-left,
  .toolbar-right,
  .primary-button,
  .outline-button {
    width: 100%;
  }

  .panel {
    overflow-x: auto;
  }
}

@media (max-width: 620px) {
  .page-title {
    font-size: 20px;
  }

  .topbar {
    gap: 10px;
  }

  .topbar-actions .icon-button:last-child {
    display: none;
  }

  .stat-main {
    min-height: 120px;
  }

  .stat-value {
    font-size: 32px;
  }

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

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

  .amount {
    grid-column: 1 / -1;
    text-align: left;
  }

  .booking-card {
    grid-template-columns: 1fr;
  }
}
