@font-face {
  font-family: "Poppins";
  src: url("/assets/font/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/font/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Fontello";
  src: url("/assets/font/fontello.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --accent: #359c37;
  --accent-strong: #26822a;
  --accent-soft: rgba(53, 156, 55, 0.12);
  --accent-glow: rgba(53, 156, 55, 0.26);
  --ink: #15211a;
  --ink-soft: #516057;
  --surface: #ffffff;
  --surface-soft: #f3f6f4;
  --surface-muted: #e9efeb;
  --line: #dce5df;
  --danger: #c94545;
  --warning: #d88b1b;
  --info: #357dc0;
  --nav: #111a16;
  --nav-soft: #1b2821;
  --shadow: 0 22px 60px rgba(21, 38, 27, 0.11);
  --shadow-soft: 0 10px 30px rgba(21, 38, 27, 0.07);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
input[type="radio"],
input[type="checkbox"],
select {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: default;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.icon::before,
[class^="icon-"]::before,
[class*=" icon-"]::before {
  display: inline-block;
  font-family: "Fontello";
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.icon-add::before { content: "\e800"; }
.icon-1::before { content: "\e801"; }
.icon-2::before { content: "\e802"; }
.icon-3::before { content: "\e803"; }
.icon-4::before { content: "\e804"; }
.icon-5::before { content: "\e805"; }
.icon-back::before { content: "\e806"; }
.icon-document::before { content: "\e807"; }
.icon-database::before { content: "\e808"; }
.icon-file::before { content: "\e80a"; }
.icon-home::before { content: "\e80d"; }
.icon-settings::before { content: "\e80e"; }
.icon-pencil::before { content: "\e80f"; }
.icon-trash::before { content: "\e810"; }
.icon-search::before { content: "\e811"; }
.icon-mail::before { content: "\e812"; }
.icon-attach::before { content: "\e813"; }
.icon-refresh::before { content: "\e817"; }
.icon-users::before { content: "\e820"; }
.icon-warning::before { content: "\e821"; }
.icon-lock::before { content: "\e822"; }
.icon-download::before { content: "\e814"; }
.icon-eye::before { content: "\e833"; }
.icon-checklist::before { content: "\e839"; }
.icon-copy::before { content: "\f0c5"; }
.icon-pdf::before { content: "\f1c1"; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease,
    color 150ms ease, box-shadow 150ms ease;
}

.button:hover:not(:disabled) {
  background: var(--accent-strong);
  box-shadow: 0 9px 24px var(--accent-glow);
  transform: translateY(-1px);
}

.button:focus-visible,
.icon-button:focus-visible,
.nav-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(53, 156, 55, 0.24);
  outline-offset: 2px;
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.button.secondary:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.button.danger {
  background: var(--danger);
}

.button.small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
}

.button:disabled {
  opacity: 0.45;
  box-shadow: none;
  transform: none;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-soft);
  transition: 150ms ease;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-button.danger {
  color: var(--danger);
}

.icon-button.danger:hover:not(:disabled) {
  border-color: var(--danger);
  background: rgba(201, 69, 69, 0.09);
  color: var(--danger);
}

.table-actions {
  width: 72px;
  text-align: center;
  white-space: nowrap;
}

.table-actions .icon-button {
  margin-inline: auto;
}

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

.field label,
.field-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea,
.text-input,
.select-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus,
.text-input:focus,
.select-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

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

.helper,
.muted {
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 24px;
  height: 2px;
  background: currentColor;
  content: "";
}

.badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.badge.success {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.badge.warning {
  background: rgba(216, 139, 27, 0.13);
  color: #9b5c00;
}

.badge.info {
  background: rgba(53, 125, 192, 0.12);
  color: #245f96;
}

.badge.danger {
  background: rgba(201, 69, 69, 0.12);
  color: var(--danger);
}

/* Public website */

.public-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 74% 9%, rgba(53, 156, 55, 0.18), transparent 30rem),
    linear-gradient(180deg, #101914 0, #15231b 720px, var(--surface-soft) 720px);
}

.public-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  max-width: 1240px;
  height: 78px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  margin: 0 auto;
  background: rgba(16, 25, 20, 0.86);
  backdrop-filter: blur(18px);
}

.brand-logo {
  width: 178px;
  height: auto;
  object-fit: contain;
}

.public-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.public-links > a:not(.button) {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  transition: color 150ms ease;
}

.public-links > a:not(.button):hover {
  color: #fff;
}

.hero {
  display: grid;
  max-width: 1240px;
  min-height: 640px;
  align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 70px;
  padding: 72px 24px 110px;
  margin: 0 auto;
  color: #fff;
}

.hero h1 {
  max-width: 760px;
  margin: 22px 0 24px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero h1 span {
  color: #72ca73;
}

.hero-lead {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.hero-note .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #72ca73;
  box-shadow: 0 0 0 6px rgba(114, 202, 115, 0.13);
}

.hero-window {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: #f8faf9;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.35);
  color: var(--ink);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
}

.window-bar {
  display: flex;
  height: 48px;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.window-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface-muted);
}

.window-dot.active {
  background: var(--accent);
}

.window-content {
  display: grid;
  min-height: 385px;
  grid-template-columns: 72px 1fr;
}

.window-sidebar {
  display: grid;
  align-content: start;
  gap: 11px;
  padding: 20px 14px;
  background: #17231c;
}

.window-sidebar span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 19px;
}

.window-sidebar span.active {
  background: rgba(53, 156, 55, 0.22);
  color: #72ca73;
}

.window-main {
  padding: 24px;
}

.window-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
}

.window-heading strong {
  font-size: 18px;
}

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

.window-card {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.window-card strong,
.window-card small {
  display: block;
}

.window-card small {
  margin-top: 6px;
  color: var(--ink-soft);
}

.progress-line {
  overflow: hidden;
  height: 6px;
  margin-top: 16px;
  border-radius: 99px;
  background: var(--surface-muted);
}

.progress-line::before {
  display: block;
  width: var(--progress, 60%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  content: "";
}

.progress-line.progress-45::before { width: 45%; }
.progress-line.progress-28::before { width: 28%; }
.progress-line.progress-72::before { width: 72%; }

.public-section {
  max-width: 1240px;
  padding: 96px 24px;
  margin: 0 auto;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 38px;
}

.section-heading h2 {
  max-width: 720px;
  margin: 12px 0 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-heading p {
  max-width: 430px;
  margin: 0;
  color: var(--ink-soft);
}

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

.feature-card,
.module-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.feature-icon,
.module-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 25px;
}

.feature-card h3,
.module-card h3 {
  margin: 20px 0 8px;
  font-size: 18px;
}

.feature-card p,
.module-card p {
  margin: 0;
  color: var(--ink-soft);
}

.module-card.included {
  border-color: rgba(53, 156, 55, 0.34);
  background: linear-gradient(145deg, #fff, #f2faf3);
}

.configurator-wrap {
  background: #eaf0ec;
}

.configurator {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 24px;
}

.config-panel,
.config-summary {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.config-step + .config-step {
  padding-top: 26px;
  border-top: 1px solid var(--line);
  margin-top: 26px;
}

.step-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}

.step-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

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

.module-option {
  position: relative;
  display: grid;
  min-height: 124px;
  grid-template-columns: 44px 1fr;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  transition: 150ms ease;
}

.module-option:hover,
.module-option.selected {
  border-color: var(--accent);
  background: #f5fbf6;
}

.module-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.module-option-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  background: var(--surface);
  color: var(--accent);
  font-size: 22px;
}

.module-option strong,
.module-option small {
  display: block;
}

.module-option small {
  margin-top: 5px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.seat-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.seat-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seat-stepper button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
}

.seat-value {
  min-width: 34px;
  text-align: center;
  font-size: 19px;
  font-weight: 700;
}

.config-summary {
  position: sticky;
  top: 104px;
  align-self: start;
  background: #17231c;
  color: #fff;
}

.summary-price {
  margin: 18px 0 4px;
  color: #72ca73;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.summary-list {
  display: grid;
  gap: 13px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 22px 0;
}

.summary-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-soft);
}

.config-summary .summary-list {
  border-color: rgba(255, 255, 255, 0.12);
}

.config-summary .summary-item {
  color: rgba(255, 255, 255, 0.72);
}

.summary-item::before {
  color: #72ca73;
  content: "✓";
  font-weight: 700;
}

.summary-note {
  margin: 13px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
}

.public-footer {
  padding: 56px 24px;
  background: #101914;
  color: rgba(255, 255, 255, 0.62);
}

.footer-inner {
  display: flex;
  max-width: 1192px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin: 0 auto;
}

.footer-inner img {
  width: 150px;
}

/* Authentication */

.auth-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
  background: #111a16;
}

.auth-visual {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 46px;
  background:
    radial-gradient(circle at 75% 22%, rgba(53, 156, 55, 0.34), transparent 24rem),
    linear-gradient(150deg, #132018, #0e1511);
  color: #fff;
}

.auth-visual::after {
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.02), 0 0 0 140px rgba(255, 255, 255, 0.018);
  content: "";
}

.auth-copy {
  position: relative;
  z-index: 1;
  max-width: 550px;
}

.auth-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.auth-copy p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 17px;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 40px;
  background: var(--surface-soft);
}

.auth-card {
  width: min(460px, 100%);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.auth-card > p {
  margin: 0 0 28px;
  color: var(--ink-soft);
}

.auth-form {
  display: grid;
  gap: 17px;
}

.form-message {
  padding: 11px 13px;
  border-radius: 9px;
  background: rgba(201, 69, 69, 0.09);
  color: #a83232;
  font-size: 13px;
}

/* Portal shell */

.portal-page {
  min-height: 100vh;
  background: #edf2ee;
}

.portal-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px minmax(0, 1fr);
}

.portal-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 26px 18px 20px;
  background: var(--nav);
  color: #fff;
  overflow-y: auto;
}

.portal-sidebar .brand-logo {
  width: 168px;
  margin: 0 10px 33px;
}

.sidebar-label {
  margin: 18px 12px 8px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.portal-nav {
  display: grid;
  gap: 5px;
}

.nav-link {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  text-align: left;
  transition: 150ms ease;
}

.nav-link .icon {
  width: 21px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(53, 156, 55, 0.16);
  color: #fff;
}

.nav-link.active .icon {
  color: #72ca73;
}

.sidebar-user {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  padding: 14px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong {
  font-size: 13px;
}

.sidebar-user small {
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
}

.portal-main {
  min-width: 0;
}

.portal-topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.portal-topbar h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.portal-topbar p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

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

.portal-content {
  padding: 30px 32px 50px;
}

.view-section {
  display: grid;
  gap: 22px;
}

.content-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.content-heading h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.content-heading p {
  margin: 5px 0 0;
  color: var(--ink-soft);
}

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

.stat-card {
  min-height: 132px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
}

.stat-value {
  margin-top: 16px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat-label {
  color: var(--ink-soft);
  font-size: 12px;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

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

.panel-header h3 {
  margin: 0;
  font-size: 16px;
}

.panel-header p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.panel-body {
  padding: 20px;
}

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

.module-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.module-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.module-chip .icon {
  color: var(--accent);
}

.release-tabs {
  display: flex;
  gap: 8px;
}

.tab-button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 700;
}

.tab-button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.release-list {
  display: grid;
  gap: 12px;
}

.release-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 15px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.release-card:hover {
  border-color: #b8c9bd;
  box-shadow: var(--shadow-soft);
}

.release-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 22px;
}

.release-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.release-title-row strong {
  font-size: 16px;
}

.release-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 12px;
}

.release-notes {
  margin: 10px 0 0;
  color: var(--ink-soft);
  white-space: pre-line;
}

.checksum {
  display: flex;
  max-width: 620px;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #718077;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.checksum code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.empty-state {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 40px;
  text-align: center;
}

.empty-state .icon {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border-radius: 16px;
  background: var(--surface-soft);
  color: #89978e;
  font-size: 26px;
  margin: 0 auto 14px;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state p {
  max-width: 440px;
  margin-top: 7px;
  color: var(--ink-soft);
}

.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table th {
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.table-primary,
.table-secondary {
  display: block;
}

.table-primary {
  font-weight: 700;
}

.table-secondary {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 12px;
}

.upload-dropzone {
  display: grid;
  min-height: 146px;
  place-items: center;
  padding: 24px;
  border: 1px dashed #aebdb3;
  border-radius: 13px;
  background: var(--surface-soft);
  text-align: center;
  transition: 150ms ease;
}

.upload-dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-dropzone .icon {
  display: block;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 29px;
}

.upload-file-name {
  margin-top: 7px;
  color: var(--accent-strong);
  font-weight: 700;
}

.upload-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--surface-muted);
  appearance: none;
}

.upload-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--surface-muted);
}

.upload-progress::-webkit-progress-value,
.upload-progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--accent);
}

.detail-list {
  display: grid;
}

.detail-row {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.detail-row span {
  color: var(--ink-soft);
}

.detail-row strong {
  text-align: right;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.search-box {
  position: relative;
  min-width: 230px;
}

.search-box .icon {
  position: absolute;
  top: 50%;
  left: 13px;
  color: var(--ink-soft);
  transform: translateY(-50%);
}

.search-box input {
  padding-left: 39px;
}

.loading-block {
  display: grid;
  min-height: 190px;
  place-items: center;
  color: var(--ink-soft);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--surface-muted);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: min(390px, calc(100vw - 48px));
  gap: 10px;
}

.toast {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 11px;
  padding: 14px;
  border: 1px solid #cdd8d0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(16, 31, 21, 0.2);
  animation: toast-in 180ms ease-out;
}

.toast .toast-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.toast.error .toast-icon {
  background: rgba(201, 69, 69, 0.11);
  color: var(--danger);
}

.toast strong,
.toast small {
  display: block;
}

.toast small {
  margin-top: 2px;
  color: var(--ink-soft);
}

.toast button {
  align-self: start;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 15, 11, 0.62);
  backdrop-filter: blur(5px);
}

.modal-card {
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.28);
}

.modal-header,
.modal-body,
.modal-actions {
  padding: 20px 24px;
}

.site-notice {
  max-width: 1180px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  margin: 18px auto 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-align: center;
  backdrop-filter: blur(10px);
}

.news-card .eyebrow {
  margin-bottom: 10px;
}

.module-price {
  display: block;
  margin-top: 14px;
  color: var(--accent-strong);
}

.promotion-summary {
  border-color: rgba(216, 139, 27, 0.35);
  background: rgba(216, 139, 27, 0.1);
  color: #8f5700;
}

.check-field {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.check-field input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.compact-form {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

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

.management-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.management-card h3,
.management-card p {
  margin: 0;
}

.compact-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.admin-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.admin-control-card {
  min-width: 0;
  background: var(--surface);
  box-shadow: 0 7px 22px rgba(21, 38, 27, 0.045);
}

[data-admin-capability][hidden] {
  display: none !important;
}

.management-card-header,
.inline-control-row,
.inline-actions,
.control-summary,
.compact-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.management-card-header {
  justify-content: space-between;
}

.management-card-header > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.management-card-header strong,
.management-card-header small {
  overflow-wrap: anywhere;
}

.control-summary {
  flex-wrap: wrap;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 12px;
}

.control-summary span:not(:last-child)::after {
  padding-left: 10px;
  color: var(--line);
  content: "•";
}

.account-chips,
.wrap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
}

.inline-control-row {
  align-items: stretch;
  flex-wrap: wrap;
}

.inline-control-row > input,
.inline-control-row > select {
  min-width: 130px;
  flex: 1 1 150px;
}

.compact-input,
.wide-control-input,
.table-input,
.table-select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
}

.compact-input {
  max-width: 190px;
}

.wide-control-input {
  width: 100%;
}

textarea.wide-control-input {
  min-height: 82px;
  resize: vertical;
}

.table-input,
.table-select {
  width: min(220px, 100%);
}

.table-subline {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
}

.wide-card {
  grid-column: 1 / -1;
}

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

.license-settings .field {
  margin: 0;
}

.license-module-settings {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.license-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 7px;
}

.compact-check {
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface);
}

.compact-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.compact-list-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(150px, auto);
  padding: 9px 11px;
  background: var(--surface-soft);
}

.ticket-history {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.support-message {
  padding: 11px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface-soft);
}

.support-message.internal {
  border-left-color: var(--warning);
  background: rgba(216, 139, 27, 0.08);
}

.support-message p {
  margin: 6px 0;
  white-space: pre-wrap;
}

.diagnostic-details {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.diagnostic-details summary {
  cursor: pointer;
  font-weight: 700;
}

.diagnostic-log {
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.support-attachment a {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-strong);
  text-decoration: none;
}

.template-form .field {
  min-width: 0;
}

.template-form textarea {
  min-height: 150px;
}

.promo-code {
  font-size: 18px;
  letter-spacing: 0.05em;
}

.release-rollout {
  display: grid;
  min-width: min(310px, 100%);
  grid-template-columns: minmax(90px, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
}

.mfa-setup {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.mfa-setup input[readonly] {
  font-family: ui-monospace, Consolas, monospace;
}

.button.warning {
  border-color: var(--warning);
  background: rgba(216, 139, 27, 0.1);
  color: #8f5700;
}

@media (max-width: 1260px) {
  .compact-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-card-grid,
  .compact-stats {
    grid-template-columns: 1fr;
  }

  .compact-list-row,
  .release-rollout {
    grid-template-columns: 1fr;
  }
}

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

.management-form .wide {
  grid-column: 1 / -1;
}

.card-actions,
.request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.request-status-select {
  min-width: 145px;
  margin-bottom: 8px;
}

.request-approve {
  display: flex;
  width: 100%;
  white-space: nowrap;
}

.analytics-chart {
  display: grid;
  min-height: 250px;
  grid-template-columns: repeat(14, minmax(26px, 1fr));
  align-items: end;
  gap: 10px;
  overflow-x: auto;
}

.analytics-column {
  display: grid;
  min-width: 30px;
  justify-items: center;
  gap: 7px;
  font-size: 11px;
}

.analytics-column progress {
  width: 18px;
  height: 170px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-muted);
  appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
}

.analytics-column progress::-webkit-progress-bar {
  border-radius: 7px;
  background: var(--surface-muted);
}

.analytics-column progress::-webkit-progress-value {
  border-radius: 7px;
  background: linear-gradient(180deg, #73c875, var(--accent));
}

.ranking-list {
  display: grid;
  gap: 4px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
}

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

.ranking-index {
  color: var(--ink-soft);
  font-size: 12px;
}

.ranking-label {
  overflow-wrap: anywhere;
}

#smtp-test-button {
  margin-top: 18px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3,
.modal-body p {
  margin: 0;
}

.modal-body p {
  color: var(--ink-soft);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
}

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

  .hero-window {
    max-width: 720px;
    transform: none;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .config-summary {
    position: static;
  }

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

  .release-actions {
    grid-column: 2;
  }
}

@media (max-width: 860px) {
  .public-links > a:not(.button) {
    display: none;
  }

  .feature-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 320px;
  }

  .portal-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .portal-sidebar {
    padding: 20px 10px;
  }

  .portal-sidebar .brand-logo {
    width: 48px;
    height: 48px;
    object-fit: cover;
    object-position: left;
    margin: 0 4px 26px;
  }

  .sidebar-label,
  .nav-link span:not(.icon),
  .sidebar-user > div:last-child {
    display: none;
  }

  .nav-link {
    justify-content: center;
  }

  .nav-link .icon {
    width: auto;
  }

  .sidebar-user {
    display: block;
    padding: 12px 8px;
  }

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

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

@media (max-width: 640px) {
  .public-nav,
  .hero,
  .public-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .brand-logo {
    width: 145px;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .window-content {
    grid-template-columns: 54px 1fr;
  }

  .window-sidebar {
    padding: 16px 7px;
  }

  .window-sidebar span {
    width: 40px;
  }

  .window-grid,
  .module-options,
  .form-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .config-panel,
  .config-summary,
  .auth-card {
    padding: 22px;
  }

  .auth-visual,
  .auth-panel {
    padding: 28px 20px;
  }

  .portal-shell {
    display: block;
  }

  .portal-sidebar {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    top: auto;
    display: block;
    width: 100%;
    height: 66px;
    padding: 8px;
  }

  .portal-sidebar .brand-logo,
  .sidebar-label,
  .sidebar-user {
    display: none;
  }

  .portal-nav {
    display: flex;
    justify-content: start;
    overflow-x: auto;
  }

  .nav-link {
    width: 54px;
    min-height: 50px;
  }

  .portal-topbar {
    height: auto;
    min-height: 70px;
    padding: 12px 18px;
  }

  .portal-content {
    padding: 22px 16px 92px;
  }

  .content-heading {
    align-items: start;
    flex-direction: column;
  }

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

  .release-icon {
    width: 44px;
    height: 44px;
  }

  .release-actions {
    grid-column: 1 / -1;
  }

  .footer-inner {
    align-items: start;
    flex-direction: column;
  }
}
