:root {
  --bg-1: #08111b;
  --bg-2: #0d1724;
  --bg-3: #142437;
  --panel: rgba(14, 24, 36, 0.62);
  --panel-strong: rgba(18, 31, 46, 0.82);
  --border: rgba(164, 195, 255, 0.14);
  --text: #eef4ff;
  --muted: #a9b7cb;
  --accent: #6ec1ff;
  --accent-2: #93ffd8;
  --danger: #ff7b7b;
  --success: #8cf7b6;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(110, 193, 255, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(147, 255, 216, 0.10), transparent 24%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
  color: var(--text);
}

body {
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(110, 193, 255, 0.10), transparent 30%),
    linear-gradient(160deg, #06101a, #0d1724 55%, #142437);
  animation: fadeIn 0.4s ease;
}

.splash-content {
  text-align: center;
  padding: 24px;
  max-width: 420px;
}

.splash-logo {
  width: min(170px, 42vw);
  height: auto;
  display: block;
  margin: 0 auto 16px;
  filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.45));
}

.splash-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.splash-tagline {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.app {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: calc(14px + var(--safe-top)) 18px 14px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(7, 15, 24, 0.64);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-left,
.topbar-center,
.topbar-right {
  display: flex;
  align-items: center;
}

.topbar-left {
  justify-content: flex-start;
}

.topbar-center {
  justify-content: center;
}

.topbar-right {
  justify-content: flex-end;
  position: relative;
}

.topbar-center h1 {
  margin: 0;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(147, 255, 216, 0.08);
  border: 1px solid rgba(147, 255, 216, 0.16);
  font-size: 0.88rem;
  font-weight: 600;
}

.contact-menu-wrapper {
  position: relative;
}

.contact-btn {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(110, 193, 255, 0.16);
  border-radius: 12px;
  background: rgba(110, 193, 255, 0.08);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.contact-btn:hover {
  transform: translateY(-1px);
  background: rgba(110, 193, 255, 0.14);
}

.contact-caret {
  margin-left: 6px;
}

.contact-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, calc(100vw - 28px));
  padding: 12px;
  border-radius: 18px;
  background: rgba(12, 21, 32, 0.94);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.contact-dropdown-header {
  padding: 6px 6px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.contact-link,
.dropdown-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
  transition: 0.2s ease;
}

.contact-link:hover,
.dropdown-action-btn:hover {
  background: rgba(110, 193, 255, 0.09);
  border-color: rgba(110, 193, 255, 0.18);
}

.dropdown-action-btn {
  cursor: pointer;
}

.main-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 22px auto 0;
  padding-bottom: calc(24px + var(--safe-bottom));
  display: grid;
  gap: 18px;
}

.glass-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(110, 193, 255, 0.06), transparent 35%),
    linear-gradient(315deg, rgba(147, 255, 216, 0.04), transparent 35%);
  pointer-events: none;
}

.hero-card,
.form-card {
  padding: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-text h2,
.card-header h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

.hero-text h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.hero-text p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 760px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.status-pill {
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(140, 247, 182, 0.10);
  border: 1px solid rgba(140, 247, 182, 0.18);
  color: var(--success);
  font-size: 0.84rem;
  font-weight: 700;
}

.case-form {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

label {
  color: #dce7f6;
  font-size: 0.92rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(167, 190, 222, 0.14);
  background: rgba(9, 18, 28, 0.72);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 14px;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #7d8da4;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(110, 193, 255, 0.46);
  box-shadow: 0 0 0 4px rgba(110, 193, 255, 0.10);
}

textarea {
  resize: vertical;
  min-height: 170px;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.form-note {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  flex: 1 1 240px;
}

.submit-btn {
  min-width: 168px;
  min-height: 50px;
  padding: 0 18px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #52aaff);
  color: #06121e;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(82, 170, 255, 0.20);
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 999;
  min-width: min(92vw, 300px);
  max-width: min(92vw, 480px);
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(10, 18, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-align: center;
  box-shadow: var(--shadow);
}

.toast.success {
  border-color: rgba(140, 247, 182, 0.22);
}

.toast.error {
  border-color: rgba(255, 123, 123, 0.22);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(1.01);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 840px) {
  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "left right"
      "center center";
    row-gap: 12px;
  }

  .topbar-left {
    grid-area: left;
  }

  .topbar-center {
    grid-area: center;
    justify-content: center;
  }

  .topbar-right {
    grid-area: right;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .form-card {
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .main-shell {
    width: min(100%, calc(100% - 16px));
    margin-top: 14px;
    gap: 14px;
  }

  .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar-badge {
    font-size: 0.79rem;
    min-height: 34px;
    padding: 0 10px;
  }

  .contact-btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .action-row {
    align-items: stretch;
  }

  .submit-btn {
    width: 100%;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}