:root {
  --green-950: #03291d;
  --green-900: #073f2b;
  --green-800: #0b5239;
  --cream-50: #fffaf1;
  --cream-100: #f8efe2;
  --gold-300: #dcb870;
  --gold-400: #c99843;
  --gold-500: #b7832c;
  --ink: #153329;
  --muted: #6c6257;
  --line: rgba(183, 131, 44, 0.28);
  --danger: #984b41;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(201, 152, 67, 0.12), transparent 24rem),
    linear-gradient(145deg, #fdf8f0, #eadbc9);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
select,
input[type="date"] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(201, 152, 67, 0.42);
  outline-offset: 3px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--gold-500);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(220, 184, 112, 0.45);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--green-800), var(--green-950));
  box-shadow: 0 13px 28px rgba(7, 63, 43, 0.22);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
}

.login-view {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.login-card {
  width: min(440px, 100%);
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 250, 241, 0.88);
  box-shadow: 0 30px 90px rgba(65, 40, 18, 0.17);
  text-align: center;
}

.login-card .brand-mark {
  margin: 0 auto 25px;
}

.login-card h1,
.dashboard-intro h1,
.edit-dialog h2 {
  margin: 0;
  color: var(--green-900);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.login-card h1 {
  font-size: 46px;
  line-height: 1;
}

.login-card > p:not(.eyebrow) {
  margin: 17px 0 25px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.login-card label,
.filters label,
.edit-grid label,
.wide-field {
  display: grid;
  gap: 6px;
  text-align: left;
}

label > span,
.filters label > span {
  color: var(--green-900);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(7, 63, 43, 0.18);
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

input,
select {
  min-height: 46px;
  padding: 0 12px;
}

textarea {
  padding: 11px 12px;
  resize: vertical;
}

.primary-button,
.refresh-button {
  border: 1px solid rgba(220, 184, 112, 0.42);
  border-radius: 12px;
  color: #fffaf1;
  background: linear-gradient(145deg, var(--green-800), var(--green-950));
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.login-card .primary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
}

.login-card a {
  display: inline-block;
  margin-top: 18px;
  color: var(--gold-500);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.login-error,
.dialog-error {
  min-height: 18px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 11px;
}

.dashboard {
  width: min(1480px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 50px;
}

.dashboard-header {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-brand .brand-mark {
  width: 46px;
  height: 46px;
  font-size: 23px;
}

.admin-brand strong,
.admin-brand small {
  display: block;
}

.admin-brand strong {
  color: var(--green-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  text-transform: uppercase;
}

.admin-brand small {
  color: var(--gold-500);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.header-actions a,
.header-actions button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-900);
  background: rgba(255, 250, 241, 0.58);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 38px;
  text-decoration: none;
  text-transform: uppercase;
}

.dashboard-intro {
  display: flex;
  min-height: 200px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 18px;
  padding: 34px 44px;
  border: 1px solid rgba(220, 184, 112, 0.3);
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(220, 184, 112, 0.2), transparent 18rem),
    linear-gradient(145deg, var(--green-950), var(--green-800));
  box-shadow: 0 25px 65px rgba(7, 63, 43, 0.2);
}

.dashboard-intro .eyebrow {
  color: var(--gold-300);
}

.dashboard-intro h1 {
  color: #fffaf1;
  font-size: clamp(45px, 7vw, 78px);
  line-height: 0.95;
}

.dashboard-intro > p {
  color: rgba(255, 250, 241, 0.65);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stats-grid article {
  display: flex;
  min-height: 105px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 250, 241, 0.75);
  box-shadow: 0 13px 35px rgba(70, 45, 20, 0.07);
}

.stats-grid span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stats-grid strong {
  color: var(--green-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 400;
}

.reservations-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: rgba(255, 250, 241, 0.78);
  box-shadow: 0 20px 55px rgba(70, 45, 20, 0.1);
}

.filters {
  display: grid;
  align-items: end;
  grid-template-columns: 170px 180px minmax(220px, 1fr) auto;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.refresh-button {
  min-height: 46px;
  padding: 0 18px;
}

.table-scroll {
  position: relative;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1050px;
}

th,
td {
  padding: 15px 13px;
  border-bottom: 1px solid rgba(183, 131, 44, 0.13);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--gold-500);
  background: rgba(248, 239, 226, 0.66);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

td strong {
  display: block;
  color: var(--green-900);
  font-size: 12px;
}

td small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.status-pill {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status-pending {
  color: #7a561c;
  background: rgba(201, 152, 67, 0.16);
}

.status-confirmed {
  color: #196543;
  background: rgba(46, 125, 88, 0.13);
}

.status-completed {
  color: #3e6175;
  background: rgba(74, 125, 154, 0.13);
}

.status-cancelled {
  color: #8b4037;
  background: rgba(152, 75, 65, 0.12);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.row-actions button {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(7, 63, 43, 0.15);
  border-radius: 8px;
  color: var(--green-900);
  background: rgba(255, 255, 255, 0.7);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.row-actions .confirm-action {
  color: #fff;
  background: var(--green-800);
}

.row-actions .cancel-action {
  color: var(--danger);
  border-color: rgba(152, 75, 65, 0.22);
}

.empty-state {
  display: grid;
  min-height: 240px;
  place-content: center;
  color: var(--muted);
  text-align: center;
}

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

.empty-state strong {
  color: var(--green-900);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 400;
}

.empty-state span {
  margin-top: 6px;
  font-size: 11px;
}

.edit-dialog {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: #fffaf1;
  box-shadow: 0 35px 100px rgba(3, 41, 29, 0.4);
}

.edit-dialog::backdrop {
  background: rgba(3, 27, 19, 0.72);
  backdrop-filter: blur(7px);
}

.edit-dialog form {
  padding: 27px;
}

.dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.edit-dialog h2 {
  font-size: 35px;
}

.dialog-header button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green-900);
  background: var(--cream-100);
  font-size: 24px;
}

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

.wide-field {
  margin-top: 12px;
}

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

.dialog-actions button {
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.dialog-actions .primary-button {
  min-width: 170px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  width: min(390px, calc(100% - 36px));
  padding: 14px 16px;
  border-radius: 13px;
  color: #fff;
  background: var(--green-900);
  box-shadow: 0 20px 50px rgba(3, 41, 29, 0.3);
  font-size: 11px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.admin-tabs {
  display: inline-flex;
  gap: 6px;
  margin: 6px 0 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.72);
}

.admin-tabs button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: var(--green-900);
  background: transparent;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-tabs button.is-active {
  color: #fffaf1;
  background: var(--green-900);
  box-shadow: 0 8px 20px rgba(7, 63, 43, 0.18);
}

.editor-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 18px;
  padding: 32px 38px;
  border: 1px solid rgba(220, 184, 112, 0.3);
  border-radius: 28px;
  color: #fffaf1;
  background:
    radial-gradient(circle at 90% 10%, rgba(220, 184, 112, 0.22), transparent 18rem),
    linear-gradient(145deg, var(--green-950), var(--green-800));
  box-shadow: 0 22px 60px rgba(7, 63, 43, 0.18);
}

.editor-hero h1,
.property-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.editor-hero h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
}

.editor-hero > div > p:last-child {
  max-width: 720px;
  margin: 14px 0 0;
  color: rgba(255, 250, 241, 0.72);
  font-size: 12px;
  line-height: 1.65;
}

.editor-save {
  min-width: 170px;
  min-height: 52px;
  padding: 0 20px;
  background: linear-gradient(145deg, #d5ab61, #ad7924);
}

.salon-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.plan-panel,
.property-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 241, 0.82);
  box-shadow: 0 18px 50px rgba(70, 45, 20, 0.09);
}

.plan-panel {
  overflow: hidden;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.editor-toolbar button,
.danger-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(7, 63, 43, 0.18);
  border-radius: 10px;
  color: var(--green-900);
  background: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.editor-toolbar span {
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
}

.plan-shell {
  padding: 18px;
  background:
    linear-gradient(rgba(7, 63, 43, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 63, 43, 0.035) 1px, transparent 1px),
    #f4eadc;
  background-size: 24px 24px;
}

.salon-plan {
  position: relative;
  width: 100%;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid rgba(7, 63, 43, 0.18);
  border-radius: 18px;
  background: #e7dbc9;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.28);
  touch-action: none;
  user-select: none;
}

.plan-area {
  position: absolute;
  display: grid;
  min-width: 10px;
  min-height: 10px;
  place-items: center;
  border: 2px solid rgba(7, 63, 43, 0.38);
  border-radius: 7px;
  pointer-events: none;
}

.plan-area span {
  color: rgba(7, 63, 43, 0.48);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.plan-interior {
  background: rgba(255, 250, 241, 0.8);
}

.plan-terrace {
  border-style: dashed;
  border-color: rgba(183, 131, 44, 0.62);
  background:
    repeating-linear-gradient(45deg, rgba(183, 131, 44, 0.09) 0 8px, transparent 8px 16px),
    rgba(245, 226, 194, 0.82);
}

.plan-table {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 28px;
  min-height: 28px;
  padding: 2px;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 250, 241, 0.88);
  border-radius: 7px;
  color: #fff;
  background: var(--green-800);
  box-shadow: 0 6px 14px rgba(3, 41, 29, 0.25);
  font-size: 7px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  touch-action: none;
}

.plan-table.shape-round {
  border-radius: 50%;
}

.plan-table.is-selected {
  z-index: 3;
  border-color: #fff6d8;
  background: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(201, 152, 67, 0.25), 0 10px 20px rgba(70, 45, 20, 0.25);
}

.plan-help {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.editor-properties {
  display: grid;
  gap: 12px;
}

.property-card {
  padding: 20px;
}

.property-card h2 {
  color: var(--green-900);
  font-size: 28px;
}

.property-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.property-grid {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.property-grid.two-columns {
  grid-template-columns: 1fr 1fr;
}

.property-grid.three-columns {
  grid-template-columns: repeat(3, 1fr);
}

.property-grid label,
.table-properties .wide-field {
  display: grid;
  gap: 5px;
}

.property-grid label > span,
.table-properties .wide-field > span {
  font-size: 8px;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.switch-label input {
  width: 20px;
  min-height: 20px;
}

.danger-button {
  color: var(--danger);
  border-color: rgba(152, 75, 65, 0.22);
}

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

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

  .search-field {
    grid-column: 1 / -1;
  }

  .salon-editor-grid {
    grid-template-columns: 1fr;
  }

  .salon-plan {
    min-height: 520px;
  }
}

@media (max-width: 560px) {
  .login-card {
    padding: 32px 21px;
  }

  .login-card h1 {
    font-size: 39px;
  }

  .dashboard {
    width: min(100% - 20px, 1480px);
  }

  .dashboard-header {
    align-items: flex-start;
    padding: 13px 0;
  }

  .header-actions {
    display: grid;
  }

  .header-actions a,
  .header-actions button {
    min-height: 30px;
    padding: 0 9px;
    line-height: 30px;
    font-size: 7px;
  }

  .dashboard-intro {
    min-height: 180px;
    display: block;
    padding: 27px 22px;
  }

  .dashboard-intro > p {
    margin-top: 18px;
  }

  .admin-tabs {
    display: flex;
  }

  .admin-tabs button {
    flex: 1;
    padding: 0 10px;
  }

  .stats-grid {
    gap: 8px;
  }

  .stats-grid article {
    min-height: 90px;
    display: grid;
    padding: 15px;
  }

  .stats-grid strong {
    font-size: 34px;
  }

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

  .search-field {
    grid-column: auto;
  }

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

  .edit-dialog form {
    padding: 20px;
  }

  .dialog-actions {
    display: grid;
  }

  .editor-hero {
    display: grid;
    padding: 25px 21px;
  }

  .editor-save {
    width: 100%;
  }

  .editor-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .editor-toolbar span {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .plan-shell {
    padding: 10px;
  }

  .salon-plan {
    min-height: 430px;
  }

  .property-grid.three-columns {
    grid-template-columns: 1fr 1fr;
  }
}
