:root {
  --ink: #1b1d22;
  --muted: #667085;
  --line: #dbe2ea;
  --card: #ffffff;
  --soft: #f4f7fa;
  --primary: #1d6f65;
  --secondary: #d9a441;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8f5f0 0%, #eef4f6 100%);
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(217,164,65,.22), transparent 22%),
    linear-gradient(180deg, #f7f1dc 0%, #eef4f6 100%);
}

a { color: var(--primary); }
img { max-width: 100%; display: block; }
textarea, input, select, button { font: inherit; }

.public-shell, .admin-shell {
  min-height: 100vh;
}

.login-shell {
  width: min(1220px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 26px;
  align-items: center;
}

.hero, .admin-content, .install-card, .login-card {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 42px 0 18px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow, .rrs-mini {
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--secondary);
  font-size: .8rem;
  font-weight: 700;
}

.widget-demo {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 40px;
}

.lang-switch {
  display: flex;
  gap: 8px;
}

.lang-switch a {
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
  border-radius: 999px;
}

.lang-switch a.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.lang-switch a {
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.panel, .rrs-widget {
  background: #fff;
  border: 1px solid rgba(19, 34, 57, .08);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(32, 55, 82, .08);
}

.panel {
  padding: 24px;
}

.flash {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 16px;
}

.flash-success {
  background: #e9fbef;
  color: #196a35;
}

.flash-error {
  background: #fdecec;
  color: #8f1d1d;
}

.rrs-widget {
  background: var(--rrs-bg);
  color: var(--rrs-text);
  padding: 24px;
}

.rrs-widget__top, .request-header, .inline-actions, .rrs-steps, .admin-shell {
  display: flex;
}

.rrs-widget__top, .request-header {
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.rrs-widget__top--compact {
  justify-content: flex-end;
  margin-bottom: 10px;
}

.rrs-steps {
  gap: 10px;
  margin: 22px 0;
  flex-wrap: wrap;
}

.rrs-steps button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(0,0,0,.06);
  color: inherit;
}

.rrs-steps button.is-active {
  background: var(--rrs-primary);
  color: #fff;
}

.rrs-step {
  display: none;
}

.rrs-step.is-active {
  display: grid;
  gap: 16px;
}

.rrs-widget.is-horizontal .rrs-step[data-step="1"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.rrs-widget.is-vertical .rrs-step[data-step="1"] {
  grid-template-columns: 1fr;
}

.rrs-widget label, .form-grid label {
  display: grid;
  gap: 8px;
}

.rrs-widget input, .rrs-widget select, .rrs-widget textarea,
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--rrs-surface, #fff);
}

.button-primary, .button-secondary {
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
}

.button-primary {
  background: var(--rrs-primary, var(--primary));
  color: #fff;
}

.button-secondary {
  background: rgba(0,0,0,.08);
  color: inherit;
}

.room-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.room-card {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 0;
  background: var(--rrs-surface);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
}

.room-card__gallery {
  padding: 16px;
  background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.05));
}

.room-card__gallery-main {
  aspect-ratio: 16 / 11;
  border-radius: 16px;
  overflow: hidden;
  background: #ddd;
  cursor: zoom-in;
}

.room-card__main-image,
.room-card__gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-card__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
}

.room-card__thumb {
  width: 76px;
  min-width: 76px;
  height: 60px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

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

.room-card__thumb.is-active {
  border-color: var(--rrs-primary, var(--primary));
}

.room-card__body {
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.feature-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.feature-list li, .status-pill {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
}

.summary-card, .stat-card {
  background: var(--rrs-surface);
  border-radius: 18px;
  padding: 16px;
}

.inline-actions {
  gap: 12px;
}

.admin-shell {
  align-items: stretch;
}

.admin-nav {
  width: 280px;
  min-height: 100vh;
  padding: 28px 22px;
  background: linear-gradient(180deg, #10202b 0%, #173445 100%);
  color: #fff;
  position: sticky;
  top: 0;
}

.admin-nav nav {
  display: grid;
  gap: 10px;
}

.admin-nav a {
  color: #fff;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
}

.admin-content {
  padding: 32px 24px;
}

.admin-content > section {
  margin-top: 26px;
}

.admin-content > section:first-of-type {
  margin-top: 18px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.admin-content h1 {
  margin-top: 0;
  font-size: 2rem;
}

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

.stat-card strong {
  display: block;
  font-size: 2rem;
}

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

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

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

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

.table-clean tbody tr:hover {
  background: #f8fbfc;
}

.table-muted {
  color: var(--muted);
  font-size: .92rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.danger-link {
  color: #b03333;
}

.request-card, .reply-log {
  display: grid;
  gap: 14px;
}

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

.reply-log article {
  background: var(--soft);
  border-radius: 16px;
  padding: 12px;
}

.request-layout,
.admin-two-col {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  margin-bottom: 18px;
}

.note-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: #f9fbfc;
  border: 1px solid var(--line);
}

.install-card, .login-card {
  padding: 48px 0;
}

.login-showcase {
  padding: 42px;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(217,164,65,.36), transparent 26%), linear-gradient(135deg, #173c46 0%, #1d6f65 55%, #0f2430 100%);
  border-radius: 30px;
  min-height: 520px;
  box-shadow: 0 30px 60px rgba(17, 42, 56, .18);
  display: grid;
  align-content: center;
}

.login-showcase h1 {
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 1;
  margin: 6px 0 16px;
}

.login-showcase p {
  max-width: 540px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.login-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.login-badges span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
}

.login-card {
  padding: 34px;
  max-width: 560px;
  width: 100%;
}

.login-card h2 {
  margin-top: 0;
  font-size: 2rem;
}

.login-card input {
  min-height: 56px;
  border-radius: 18px;
  border: 1px solid #d8d9bb;
  background: linear-gradient(180deg, #fffde6 0%, #fff7b8 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}

.login-card .button-primary {
  min-height: 60px;
  font-size: 1.1rem;
  border-radius: 18px;
}

.installer-hero {
  padding: 8px 0 18px;
}

.installer-panel {
  margin-bottom: 18px;
  padding: 22px;
}

.installer-form {
  padding: 22px;
}

.installer-stepper {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.installer-step {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.installer-step.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.installer-stage {
  display: none;
}

.installer-stage.is-active {
  display: block;
}

.installer-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.installer-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.installer-check {
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.installer-check.is-ok {
  background: #e9fbef;
  color: #196a35;
}

.installer-check.is-bad {
  background: #fdecec;
  color: #8f1d1d;
}

.admin-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.admin-thumb-card {
  margin: 0;
  background: var(--soft);
  border-radius: 18px;
  padding: 10px;
}

.admin-thumb-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.admin-thumb-card figcaption,
.field-label {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-top: 8px;
  word-break: break-word;
}

.room-admin-list {
  display: grid;
  gap: 14px;
}

.room-admin-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcfd;
}

.room-admin-row__info {
  display: grid;
  gap: 5px;
}

.compact-head {
  align-items: center;
  margin-bottom: 20px;
}

.lang-editor {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f9fbfc;
  overflow: hidden;
}

.lang-editor__tabs {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.lang-editor__tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.lang-editor__tab.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.lang-editor__panel {
  display: none;
  padding: 18px;
}

.lang-editor__panel.is-active {
  display: block;
}

.thumb-remove-toggle {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
}

.thumb-remove-toggle--danger {
  color: #b03333;
  font-weight: 600;
}

.thumb-delete-button {
  margin-top: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.user-list {
  display: grid;
  gap: 14px;
}

.user-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  background: #fbfcfd;
}

.card-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.email-doc-block {
  padding: 18px;
  border: 1px dashed #c8d4dc;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffefb 0%, #f9fbfc 100%);
}

.editor-title {
  margin-bottom: 10px;
}

.wysiwyg {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.wysiwyg__toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f7fafc;
}

.wysiwyg__subtoolbar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fcfdff;
}

.wysiwyg__subtoolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .92rem;
}

.wysiwyg__subtoolbar select,
.wysiwyg__subtoolbar input[type="color"] {
  border: 1px solid #d5dde5;
  border-radius: 10px;
  background: #fff;
}

.wysiwyg__helper {
  padding: 10px 16px 0;
  color: var(--muted);
  font-size: .9rem;
}

.wysiwyg__toolbar button {
  border: 1px solid #d5dde5;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.wysiwyg__page {
  margin: 18px;
  padding: 28px;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 32, 43, .06);
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

.wysiwyg__page:focus {
  outline: 2px solid rgba(29, 111, 101, .18);
}

.button-inline {
  text-decoration: none;
}

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

.embed-panel {
  display: grid;
  gap: 16px;
}

.code-box {
  width: 100%;
  min-height: 220px;
  padding: 18px 20px;
  border: 1px solid #cfd8e3;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbfd 0%, #eef4f7 100%);
  color: #173445;
  font-family: Consolas, "Courier New", monospace;
  font-size: .98rem;
  line-height: 1.7;
  resize: vertical;
}

.dashboard-grid {
  align-items: start;
}

.dashboard-calendar,
.dashboard-agenda {
  min-height: 100%;
}

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

.calendar-board__weekday {
  padding: 10px 12px;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.calendar-day {
  position: relative;
  min-height: 140px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfc 100%);
  overflow: hidden;
}

.calendar-day.is-muted {
  opacity: .55;
}

.calendar-day.is-today {
  border-color: var(--secondary);
  background: linear-gradient(180deg, #fff8e5 0%, #fff1c8 100%);
  box-shadow: inset 0 0 0 1px rgba(217, 164, 65, .28);
}

.calendar-day.has-requests {
  border-color: rgba(29, 111, 101, .22);
}

.calendar-day__top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.calendar-day__top strong {
  font-size: 1.05rem;
}

.calendar-day__body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 116px;
}

.calendar-day__marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(29, 111, 101, .08);
  color: var(--ink);
  text-align: center;
  max-width: calc(100% - 8px);
}

.calendar-day__marker small,
.dashboard-agenda__item small {
  color: var(--muted);
  font-size: .82rem;
}

.calendar-day__marker strong {
  font-size: .82rem;
  line-height: 1.2;
}

.dashboard-agenda__list {
  display: grid;
  gap: 12px;
}

.dashboard-agenda__item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
  text-decoration: none;
  color: var(--ink);
}

.dashboard-agenda__item strong {
  font-size: .95rem;
}

.rrs-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.rrs-lightbox.is-open {
  display: flex;
}

.rrs-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 14, .78);
  backdrop-filter: blur(5px);
}

.rrs-lightbox__image {
  position: relative;
  max-width: min(1200px, calc(100vw - 60px));
  max-height: calc(100vh - 60px);
  z-index: 2;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
}

.rrs-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 1.8rem;
  z-index: 3;
  cursor: pointer;
}

@media (max-width: 980px) {
  .admin-shell {
    display: block;
  }

  .admin-nav {
    width: 100%;
    min-height: auto;
    position: static;
  }

  .stats-grid, .form-grid, .rrs-widget.is-horizontal .rrs-step[data-step="1"], .request-meta-grid, .request-layout, .admin-two-col, .login-shell {
    grid-template-columns: 1fr;
  }

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

  .login-showcase {
    min-height: auto;
  }

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

  .calendar-board__weekday {
    display: none;
  }

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

@media (max-width: 640px) {
  .calendar-board {
    grid-template-columns: 1fr;
  }
}
