:root {
  --bg: #090b10;
  --panel: rgba(18, 22, 31, 0.86);
  --panel-2: rgba(27, 33, 46, 0.92);
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(148, 163, 184, 0.38);
  --text: #f8fafc;
  --muted: #a7b0c0;
  --accent: #22c55e;
  --accent-2: #38bdf8;
  --warning: #f59e0b;
  --danger: #f43f5e;
  --radius: 8px;
}

body {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.12), transparent 30rem),
    linear-gradient(180deg, #0b0f16, #08090d 58%, #0c1118);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.app-shell {
  position: relative;
}

.topbar {
  align-items: center;
  padding: 14px 0;
}

.topbar h1 {
  letter-spacing: 0;
}

.tabs {
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 11, 18, 0.72);
  backdrop-filter: blur(18px);
}

.tab {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  background: #f8fafc;
  color: #111827;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero > div:first-child,
.panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--panel);
  border-radius: 12px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
}

.hero > div:first-child {
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.hero > div:first-child {
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
}

.intro {
  display: none;
}

.hero h2 {
  width: min(680px, 100%);
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
}

.hero p {
  max-width: 650px;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.65;
}

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

.status-strip {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 11, 18, 0.7);
  backdrop-filter: blur(18px);
}

.status-strip span {
  position: relative;
  min-height: 54px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 750;
}

.status-strip span::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}

.panel {
  padding: 22px;
}

.panel h3 {
  margin-bottom: 18px;
}

input,
select,
textarea {
  border-color: var(--line);
  background: rgba(4, 8, 15, 0.82);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.custom-select {
  position: relative;
}

.custom-select-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font-weight: 450;
  text-align: left;
}

.select-chevron {
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: transform 160ms ease;
}

.custom-select.open .select-chevron {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(16, 19, 25, 0.96);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.custom-select.open .custom-select-menu {
  display: grid;
  gap: 3px;
}

.custom-select-menu button {
  min-height: 36px;
  border-radius: 7px;
  background: transparent;
  color: #d7dbe2;
  text-align: left;
  padding: 0 10px;
  font-weight: 450;
}

.custom-select-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

.primary,
.secondary,
.filter,
.admin-actions button {
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary:hover,
.secondary:hover,
.filter:hover,
.admin-actions button:hover {
  transform: translateY(-1px);
}

.primary {
  background: linear-gradient(135deg, #22c55e, #86efac);
  color: #052e16;
  box-shadow: 0 14px 36px rgba(34, 197, 94, 0.2);
}

.secondary,
.filter,
.admin-actions button {
  background: rgba(255, 255, 255, 0.05);
}

.deal-card,
.deal-result {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(9, 13, 21, 0.88);
}

.deal-card-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.badge {
  border: 1px solid rgba(96, 165, 250, 0.24);
}

.admin-login {
  align-self: start;
}

.admin-panel {
  min-height: 420px;
}

.filters {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.filter.active {
  background: rgba(56, 189, 248, 0.16);
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.4);
}

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

  .hero > div:first-child {
    min-height: 0;
    padding: 24px;
  }

  .hero h2 {
    font-size: 38px;
  }

  .hero-actions {
    display: grid;
  }
}

/* Minimal mini-app mode */
.app-shell {
  width: min(760px, calc(100% - 28px));
}

.topbar {
  margin-bottom: 14px;
}

.topbar h1 {
  font-size: 24px;
}

.tabs {
  border-radius: 8px;
}

.hero {
  display: block;
}

.hero > div:first-child {
  min-height: 0;
  padding: 22px;
}

.hero h2 {
  max-width: 520px;
  font-size: clamp(30px, 7vw, 46px);
}

.hero p {
  max-width: 520px;
  font-size: 15px;
  line-height: 1.55;
}

.panel {
  padding: 18px;
}

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

.status-strip,
.admin-layout,
.filters,
.deal-list,
.deal-card {
  display: none;
}

/* Quiet, minimal finish */
:root {
  --bg: #0b0d10;
  --panel: rgba(255, 255, 255, 0.065);
  --panel-2: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f5f7fa;
  --muted: #a7adb7;
  --accent: #7dd3fc;
  --accent-2: #a7f3d0;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 24rem),
    #090b0f;
}

body::before {
  display: none;
}

.app-shell {
  padding-top: 18px;
}

.topbar {
  align-items: center;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.topbar h1 {
  font-size: 22px;
  font-weight: 560;
}

.tabs {
  padding: 3px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.tab {
  min-height: 36px;
  color: var(--muted);
  font-weight: 450;
}

.tab.active {
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
  font-weight: 520;
}

.hero {
  margin-bottom: 12px;
}

.hero > div:first-child,
.panel {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.hero > div:first-child {
  padding: 20px;
}

.hero h2 {
  max-width: 460px;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 540;
  line-height: 1.06;
}

.hero p {
  max-width: 480px;
  color: #b8bec8;
  font-size: 15px;
  line-height: 1.55;
}

.guarantor-line,
.panel-note {
  margin-top: 12px;
  color: #c7ccd4;
  font-size: 14px;
}

.guarantor-line strong,
.panel-note strong {
  color: #f5f7fa;
  font-weight: 520;
}

.panel-note {
  margin-bottom: 18px;
}

h3 {
  font-size: 18px;
  font-weight: 540;
}

label {
  color: #d7dbe2;
  font-weight: 450;
}

input,
select,
textarea {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.08);
}

.primary,
.secondary {
  font-weight: 520;
  box-shadow: none;
}

.primary {
  background: #f5f7fa;
  color: #0b0d10;
}

.secondary {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.primary:hover,
.secondary:hover,
.filter:hover,
.admin-actions button:hover {
  transform: none;
}

.deal-result {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.timeline-step {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.timeline-step.done {
  border-color: rgba(125, 211, 252, 0.35);
  color: #e0f2fe;
}

.hidden {
  display: none !important;
}

.room-panel {
  display: grid;
  gap: 18px;
}

#deal-form {
  border: 0;
}

.room-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.room-head h3 {
  margin: 0;
}

.room-status {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(125, 211, 252, 0.08);
  font-size: 13px;
}

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

.room-grid div {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.room-grid small {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
}

.room-grid strong {
  display: block;
  font-weight: 520;
  overflow-wrap: anywhere;
}

.room-details {
  color: #c7ccd4;
}

.room-details p {
  margin-bottom: 8px;
}

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

.payment-card {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.payment-card small {
  color: var(--muted);
}

.payment-card strong {
  font-size: 18px;
  font-weight: 520;
  letter-spacing: 0.03em;
}

.payment-card p {
  margin: 0;
  color: #c7ccd4;
}

.proof-form {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.proof-form label {
  margin: 0;
  color: #e7ebf1;
  font-size: 13px;
  font-weight: 460;
}

.proof-form input[type="file"] {
  min-height: auto;
  padding: 10px;
  cursor: pointer;
}

.proof-form .primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

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

  .room-actions {
    display: grid;
  }
}
