@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --bg: #f2ece3;
  --paper: rgba(255, 252, 247, 0.86);
  --panel: rgba(255, 255, 255, 0.94);
  --line: rgba(97, 78, 53, 0.18);
  --ink: #1f1711;
  --ink-soft: #675746;
  --accent: #14110d;
  --accent-soft: #b59670;
  --chip: #f5eee5;
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-soft: 0 26px 60px rgba(43, 28, 13, 0.1);
  --shadow-card: 0 14px 34px rgba(32, 20, 8, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: #130005;
}

.site-home {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 91, 121, 0.44), transparent 34%),
    radial-gradient(circle at 86% 14%, rgba(253, 33, 33, 0.4), transparent 34%),
    radial-gradient(circle at 40% 92%, rgba(128, 6, 22, 0.42), transparent 46%),
    linear-gradient(135deg, #1f0006 0%, #58000f 38%, #2a0108 74%, #090003 100%);
}

.admin-page {
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 86, 105, 0.22), transparent 34%),
    linear-gradient(135deg, #1a0407, #2c0a0e 45%, #190308 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  backdrop-filter: blur(2px);
  background: linear-gradient(180deg, rgba(255, 235, 238, 0.08), rgba(21, 0, 6, 0.28));
}

.layout {
  width: min(1060px, 92vw);
  margin: 0 auto;
  padding: 36px 0 46px;
}

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

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 0.95;
  color: #fff1f3;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
}

.brand-sub {
  color: rgba(255, 225, 225, 0.84);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.link-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 40px;
  padding: 0 16px;
  color: #ffe8ea;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  background: rgba(53, 5, 13, 0.72);
  border-color: rgba(255, 173, 190, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-admin:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.hero {
  background: linear-gradient(140deg, rgba(83, 6, 19, 0.74), rgba(126, 12, 29, 0.66));
  border: 1px solid rgba(255, 160, 180, 0.28);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 22px 54px rgba(26, 3, 9, 0.42);
}

.hero p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 229, 233, 0.9);
  line-height: 1.65;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
}

.hero-copy strong {
  color: #fff;
}

.hero-media {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 176, 191, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.hero-media img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.controls {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 220, 227, 0.88);
}

.select,
.input,
.textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 10px 12px;
}

.textarea {
  min-height: 110px;
  resize: vertical;
}

.select:focus,
.input:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(20, 17, 13, 0.5);
  box-shadow: 0 0 0 3px rgba(181, 150, 112, 0.2);
}

.cards {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: linear-gradient(135deg, #1f4f88, #1a477c);
  border: 1px solid rgba(147, 181, 220, 0.35);
  border-radius: 26px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(250px, 44%) 1fr;
  gap: 0;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(15, 26, 44, 0.25);
  animation: rise 0.35s ease;
}

.card-photo {
  border-radius: 0;
  overflow: hidden;
  min-height: 420px;
  position: relative;
}

.card-photo-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumbs {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 74px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
}

.photo-thumb {
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  padding: 0;
  background: rgba(7, 16, 26, 0.3);
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  overflow: hidden;
  cursor: pointer;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb.active {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
}

.card-status {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #10a63b, #008d26);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(0, 57, 14, 0.34);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #f0f6ff;
  padding: 20px 20px 18px;
  background: linear-gradient(180deg, rgba(27, 70, 120, 0.94), rgba(23, 61, 106, 0.98));
}

.card-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.card-name {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 50px);
  line-height: 1;
  color: #fff;
}

.tariff-table {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.tariff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
  color: #f0f6ff;
  font-size: 22px;
  font-weight: 600;
}

.tariff-row strong {
  font-weight: 600;
  white-space: nowrap;
}

.tariff-row.plain {
  font-size: 20px;
  color: rgba(242, 248, 255, 0.95);
}

.tariff-row.no-border {
  border-bottom: none;
}

.tariff-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tariff-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.tariff-icon.sun {
  background: linear-gradient(135deg, #ffcf3a, #f7b60f);
  color: #fff5d1;
}

.tariff-icon.moon {
  background: linear-gradient(135deg, #ced9e9, #adbcd2);
  color: #eef5ff;
}

.location-list {
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 17px;
  background: linear-gradient(135deg, #2f84d0, #256fb3);
  color: #eff6ff;
  border: 1px solid rgba(171, 212, 248, 0.3);
}

.pin {
  font-size: 17px;
}

.card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chip {
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(188, 216, 244, 0.35);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(231, 241, 255, 0.9);
}

.description {
  margin: 0;
  color: rgba(228, 239, 253, 0.88);
  font-size: 14px;
  line-height: 1.55;
}

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

.card-book {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #36a0ff, #1c7fda);
  border-color: rgba(181, 220, 255, 0.45);
  min-width: 130px;
}

.badge {
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  color: #584838;
}

.badge-city {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(199, 224, 248, 0.38);
  color: #f2f8ff;
  padding: 8px 12px;
  font-size: 13px;
}

.button {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 17, 13, 0.22);
}

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

.button-dark {
  color: #fff;
  background: linear-gradient(135deg, #1c1712, #0f0c09);
}

.button-light {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--line);
}

.empty {
  padding: 22px;
  text-align: center;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.footer {
  margin-top: 26px;
  font-size: 13px;
  color: var(--ink-soft);
}

.admin-layout {
  width: min(1100px, 94vw);
  margin: 0 auto;
  padding: 30px 0 40px;
}

.panel {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.admin-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 14px;
}

.items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
}

.item {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
}

.item.active {
  border-color: rgba(20, 17, 13, 0.6);
  box-shadow: 0 8px 20px rgba(20, 17, 13, 0.12);
}

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

.item-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.item-city {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

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

.hidden {
  display: none !important;
}

.note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}

.photo-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-preview-item {
  position: relative;
  width: 94px;
  height: 94px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(90, 75, 56, 0.25);
  background: rgba(255, 255, 255, 0.8);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .hero-media {
    max-width: 520px;
  }

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

  .card-photo {
    min-height: 290px;
  }

  .photo-thumbs {
    bottom: 70px;
  }

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

@media (max-width: 640px) {
  .layout,
  .admin-layout {
    width: min(1100px, 94vw);
    padding-top: 20px;
  }

  .hero {
    padding: 20px;
  }

  .hero-media {
    max-width: 100%;
  }

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

  .card-name {
    font-size: 29px;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}
