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

:root {
  --bg: #f4f6fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --line: #d6deef;
  --text: #182338;
  --muted: #64708c;
  --accent: #4669f2;
  --accent-2: #ea74ab;
  --accent-soft: #ecf1ff;
  --danger: #d65075;
  --success: #3d9d78;
  --warning: #bd7f19;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 18px 48px rgba(33, 56, 112, 0.13);
  --shadow-soft: 0 10px 24px rgba(33, 56, 112, 0.08);
  --surface-elev: rgba(255, 255, 255, 0.9);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 620px at -8% -10%, #dfe9ff 0, transparent 62%),
    radial-gradient(980px 580px at 108% -10%, #ffe2ef 0, transparent 60%),
    radial-gradient(900px 380px at 50% 118%, #e9f0ff 0, transparent 60%),
    linear-gradient(180deg, #f7f9ff 0%, #f4f6fb 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(214, 222, 239, 0.65);
  background: rgba(250, 252, 255, 0.74);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px) saturate(1.1);
}

.brand {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.01em;
}

.tenant-badge,
.user-label {
  margin-left: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

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

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.lang-switch label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.lang-switch select {
  width: auto;
  min-width: 76px;
  padding: 7px 10px;
  border-radius: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
}

.layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: calc(100vh - 73px);
}

.layout-full {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar {
  padding: 20px 14px;
  border-right: 1px solid rgba(214, 222, 239, 0.6);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, rgba(249, 252, 255, 0.72), rgba(245, 248, 255, 0.62));
  backdrop-filter: blur(14px);
}

.sidebar a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid transparent;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.sidebar a:hover {
  background: rgba(236, 241, 255, 0.78);
  border-color: rgba(159, 183, 248, 0.35);
  transform: translateY(-1px);
  text-decoration: none;
}

.sidebar a.active {
  position: relative;
  background: linear-gradient(135deg, rgba(70, 105, 242, 0.16), rgba(234, 116, 171, 0.11));
  border-color: rgba(124, 151, 233, 0.5);
  color: #1c2d63;
  box-shadow: var(--shadow-soft);
}

.sidebar a.active::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 4px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: 99px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent-2) 70%, var(--accent)));
}

.content {
  padding: 28px 24px;
}

.content-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.layout-full .content {
  display: flex;
  justify-content: center;
}

.layout-full .content-inner {
  width: min(980px, 100%);
}

.card,
.stat-card,
.tenant-card,
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.card,
.stat-card,
.tenant-card {
  padding: 22px;
}

.card.narrow {
  max-width: 560px;
  margin: 48px auto;
}

.muted {
  color: var(--muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

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

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
  color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

textarea {
  line-height: 1.44;
}

button,
.button-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 13px;
  border: 1px solid transparent;
  padding: 11px 16px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 78%, #93acff));
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(70, 105, 242, 0.22);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

button:hover,
.button-link:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(70, 105, 242, 0.28);
}

.button-link.secondary,
button.secondary,
.ghost-button {
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  border-color: var(--line);
  box-shadow: 0 6px 16px rgba(40, 62, 120, 0.08);
}

.ghost-button {
  font-weight: 700;
}

.alert {
  margin-bottom: 18px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
}

.alert-error {
  background: #fff0f4;
  color: var(--danger);
  border-color: #ffd3df;
}

.alert-success {
  background: #eaf8f2;
  color: var(--success);
  border-color: #cdebdc;
}

.page-head,
.actions-row,
.search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(1.65rem, 2.4vw, 2.25rem);
  letter-spacing: -0.01em;
}

.page-head p {
  margin: 6px 0 0;
}

.tenant-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.tenant-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tenant-card strong {
  font-size: 1.06rem;
}

.tenant-card:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  transform: translateY(-2px);
}

.stat-card span {
  color: var(--muted);
  font-weight: 600;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-active {
  background: #e9f8f1;
  color: var(--success);
}

.status-pending {
  background: #fff5e4;
  color: var(--warning);
}

.status-rejected,
.status-blocked {
  background: #ffeef4;
  color: var(--danger);
}

form.compact {
  gap: 10px;
}

.search-bar input {
  max-width: 420px;
}

.search-bar select {
  max-width: 220px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface-elev);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 880px;
}

thead th {
  position: sticky;
  top: 0;
  background: rgba(248, 251, 255, 0.96);
  z-index: 1;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

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

tbody tr:nth-child(2n) {
  background: rgba(242, 246, 255, 0.35);
}

tbody tr:hover {
  background: rgba(231, 239, 255, 0.46);
}

tbody tr:last-child td {
  border-bottom: none;
}

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

.actions-inline form {
  margin: 0;
}

.bouquet-thumb-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.bouquet-thumb {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 6px 18px rgba(38, 44, 65, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.bouquet-thumb-link:hover .bouquet-thumb {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(38, 44, 65, 0.14);
}

.bouquet-thumb-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(242, 246, 255, 0.45);
}

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

.checkbox-row {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding-top: 28px;
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  inline-size: 18px;
  block-size: 18px;
}

.auth-hero {
  margin-bottom: 20px;
}

.empty-state {
  text-align: center;
  padding: 38px 22px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.helper {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 2px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(176, 196, 245, 0.35);
  background:
    radial-gradient(860px 220px at 8% -45%, rgba(76, 116, 244, 0.18), transparent 55%),
    radial-gradient(720px 240px at 92% -40%, rgba(234, 116, 171, 0.18), transparent 58%),
    rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 22px;
  margin-bottom: 18px;
}

.hero-kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f76bf;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(175, 192, 237, 0.55);
  background: rgba(255, 255, 255, 0.8);
  color: #445270;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-search {
  margin-bottom: 18px;
}

.hero-search input {
  max-width: 560px;
}

.catalog-shell {
  border-radius: var(--radius);
  padding: 8px;
  border: 1px solid rgba(214, 222, 239, 0.8);
  background: rgba(255, 255, 255, 0.5);
}

.bouquet-name {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.bouquet-name strong {
  font-size: 0.98rem;
}

.price-tag {
  font-weight: 800;
  color: #1f2f5c;
}

.table-actions {
  white-space: nowrap;
}

.code-snippet {
  display: inline-block;
  max-width: 460px;
  max-height: 68px;
  overflow: auto;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(247, 250, 255, 0.92);
  font-size: 0.78rem;
  line-height: 1.35;
  color: #33425f;
}

.auth-hero-panel {
  margin-bottom: 14px;
}

.auth-card {
  margin-top: 0;
}

.auth-form {
  gap: 14px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 118px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1;
}

.auth-help-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-note {
  margin: 0;
}

.legal-note {
  margin: 2px 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

.legal-note a {
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid rgba(214, 222, 239, 0.7);
  background: rgba(250, 252, 255, 0.7);
  backdrop-filter: blur(12px);
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.84rem;
}

.site-footer-inner span {
  opacity: 0.55;
}

.tenant-grid-spotlight .tenant-card {
  background: rgba(255, 255, 255, 0.88);
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.field-title {
  font-weight: 700;
}

.field-generate {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.1;
}

.card-subtle {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.preview-title {
  margin-top: 0;
  margin-bottom: 10px;
}

.preview-image {
  display: block;
  max-width: 100%;
  width: min(460px, 100%);
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.preview-file {
  margin-bottom: 0;
}

.legal-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.legal-hero {
  align-items: flex-start;
}

.legal-eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-subtitle {
  max-width: 760px;
}

.legal-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  font-size: 0.92rem;
  min-width: 260px;
}

.legal-meta strong {
  color: var(--text);
  font-weight: 700;
}

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

.legal-section + .legal-section {
  padding-top: 18px;
  border-top: 1px solid rgba(214, 222, 239, 0.78);
}

.legal-section h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.legal-section p {
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.7;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-list {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.7;
}

.legal-list li + li {
  margin-top: 6px;
}

.table-wrap-gap,
.empty-state-gap {
  margin-top: 14px;
}

.compact-gap-top {
  margin-top: 8px;
}

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

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    overflow-x: auto;
    padding: 12px 16px;
  }

  .content {
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .lang-switch {
    width: 100%;
    justify-content: flex-start;
  }

  .card,
  .stat-card,
  .tenant-card {
    padding: 16px;
  }

  .card.narrow {
    margin: 18px auto;
  }

  .legal-card {
    padding: 18px;
  }

  .legal-meta {
    width: 100%;
    min-width: 0;
  }

  .site-footer-inner {
    padding: 12px 14px 16px;
    justify-content: flex-start;
    gap: 8px;
  }
}
