:root {
  --bg-1: #f4f3fb;
  --bg-2: #eceafd;
  --card: rgba(255,255,255,0.72);
  --line: #dfe3f2;
  --text: #27345b;
  --muted: #7580a3;
  --accent: #7aa6f8;
  --accent-2: #e5bc66;
  --shadow: 0 18px 44px rgba(107, 118, 166, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-1) 0%, #efeffb 35%, var(--bg-2) 100%);
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.8), transparent 30%),
    radial-gradient(circle at bottom right, rgba(123, 161, 255, 0.14), transparent 25%);
  pointer-events: none;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
  position: relative;
  z-index: 1;
}

.hero {
  text-align: center;
  margin-bottom: 26px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 auto;
  max-width: 760px;
  font-size: 1rem;
  color: var(--muted);
}

.config-card,
.summary-card,
.selected-list-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(223, 227, 242, 0.9);
  box-shadow: var(--shadow);
}

.config-card {
  border-radius: var(--radius-xl);
  padding: 22px;
}

.card-header,
.selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(122, 166, 248, 0.15), rgba(229, 188, 102, 0.12));
  color: #45609f;
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.card-header h2,
.selected-header h3,
.summary-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.header-note,
.summary-sub,
#chosenMeta {
  color: var(--muted);
  font-size: 0.95rem;
}

.notice {
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.notice.success {
  background: rgba(219, 245, 230, 0.92);
  border: 1px solid rgba(150, 210, 174, 0.95);
  color: #256145;
}

.notice.error {
  background: rgba(255, 235, 235, 0.92);
  border: 1px solid rgba(236, 183, 183, 0.95);
  color: #9e2f2f;
}

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

.field label {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 0.98rem;
  outline: none;
}

.field input:focus {
  border-color: rgba(122,166,248,0.85);
  box-shadow: 0 0 0 4px rgba(122,166,248,0.12);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 22px 0 18px;
  flex-wrap: wrap;
}

.search-wrap {
  flex: 1 1 320px;
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 0.98rem;
  outline: none;
}

.search-wrap input:focus {
  border-color: rgba(122,166,248,0.85);
  box-shadow: 0 0 0 4px rgba(122,166,248,0.12);
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-soft {
  background: rgba(255,255,255,0.9);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-soft:hover,
.btn-primary:hover {
  box-shadow: 0 12px 22px rgba(113, 123, 162, 0.12);
}

.btn-primary {
  background: linear-gradient(135deg, #7aa6f8, #8f79ff);
  color: white;
}

.table-wrap {
  border: 1px solid rgba(223, 227, 242, 0.9);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(248, 249, 255, 0.8);
}

.feature-table {
  width: 100%;
}

.row {
  display: grid;
  grid-template-columns: 70px minmax(250px, 1fr) 160px 120px;
  align-items: center;
}

.table-head {
  background: linear-gradient(90deg, rgba(218,223,244,0.95), rgba(231,234,250,0.95));
  font-weight: 800;
  color: #34416d;
}

.table-head .cell {
  padding: 16px 18px;
}

.feature-row {
  border-top: 1px solid rgba(223, 227, 242, 0.9);
  background: rgba(255,255,255,0.56);
  transition: background 0.18s ease, transform 0.18s ease;
}

.feature-row:nth-child(even) {
  background: rgba(246, 247, 253, 0.9);
}

.feature-row:hover {
  background: rgba(244, 247, 255, 0.98);
}

.cell {
  padding: 14px 18px;
}

.cell-no {
  color: #6d7797;
  font-weight: 700;
}

.cell-feature {
  font-weight: 600;
}

.cell-price {
  font-weight: 700;
  color: #4a5e97;
}

.cell-check {
  display: flex;
  justify-content: center;
}

.check-input {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid #b6bfdc;
  background: rgba(255,255,255,0.96);
  position: relative;
  cursor: pointer;
  transition: all 0.16s ease;
}

.check-input:checked {
  background: linear-gradient(135deg, var(--accent), #8c72ff);
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(122,166,248,0.28);
}

.check-input:checked::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

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

.summary-card {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.summary-big {
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
  margin-top: 12px;
  letter-spacing: -0.03em;
}

.selected-list-card {
  margin-top: 22px;
  border-radius: var(--radius-lg);
  padding: 22px;
}

.chosen-list {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chosen-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(243, 246, 255, 0.95);
  border: 1px solid rgba(223, 227, 242, 0.95);
  color: #39466f;
  font-weight: 600;
}

.chosen-pill span {
  color: #6b7697;
  font-weight: 700;
}

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

.submit-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.hidden-row {
  display: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: 70px 180px 170px 120px minmax(320px, 1fr) 180px;
}

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

.admin-empty {
  padding: 22px;
  color: var(--muted);
}

.strong {
  font-weight: 700;
}

.feature-list-cell {
  line-height: 1.55;
  color: #4b587f;
}

.admin-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.admin-login-card {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .row {
    grid-template-columns: 56px minmax(160px, 1fr) 110px 90px;
  }

  .customer-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .cell,
  .table-head .cell {
    padding: 12px 10px;
    font-size: 0.92rem;
  }

  .card-header,
  .selected-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 18px, 100%);
    padding-top: 20px;
  }

  .config-card,
  .summary-card,
  .selected-list-card {
    padding: 16px;
    border-radius: 18px;
  }

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

  .feature-table {
    min-width: 620px;
  }
}
