:root {
  --navy-deep: #07111f;
  --navy: #0d2847;
  --royal: #1e5aa8;
  --royal-light: #2a6fc9;
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #0b1220;
  --muted: #5c6578;
  --line: #dde3ec;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-h: 64px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
}
.app-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--navy), var(--royal));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
}
.app-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-btn, .install-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.install-btn {
  background: var(--royal);
  border-color: var(--royal);
  color: #fff;
}
.install-btn[hidden] { display: none; }

.install-banner {
  margin: 12px 16px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--royal));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.install-banner[hidden] { display: none; }
.install-banner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.92;
}
.install-banner button {
  flex-shrink: 0;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
}

.app-main { flex: 1; }
.app-view { display: none; padding: 16px; }
.app-view.is-active { display: block; }

.hero-card {
  padding: 24px 20px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--navy-deep), var(--navy));
  color: #fff;
  margin-bottom: 16px;
}
.hero-card .eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}
.hero-card h1 {
  margin: 10px 0 12px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  opacity: 0.82;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.quick-card {
  padding: 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(11, 18, 32, 0.04);
}
.quick-card .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--royal);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}
.quick-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.quick-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.section-title {
  margin: 8px 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--royal);
}

.list-card {
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 16px;
}
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
.list-item:last-child { border-bottom: 0; }
.list-item span:last-child { color: var(--royal); font-size: 18px; }

.contact-card {
  padding: 20px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.form-field label {
  font-size: 12px;
  font-weight: 700;
}
.form-field input, .form-field select, .form-field textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.form-field textarea { min-height: 100px; resize: vertical; }
.submit-btn {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--royal);
  color: #fff;
  padding: 14px;
  font-weight: 800;
  font-size: 14px;
}
.info-block {
  margin-top: 16px;
  padding: 14px;
  border-radius: 10px;
  background: var(--bg);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.info-block strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.app-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: var(--tab-h);
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.tab-btn {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}
.tab-btn.is-active { color: var(--royal); }
.tab-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}
.tab-btn.is-active .tab-icon {
  background: rgba(30, 90, 168, 0.12);
}

.install-guide {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}
.install-guide h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
.install-step {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.install-step:last-child { border-bottom: 0; }
.install-step strong {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--royal);
}
.install-step p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + 12px);
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 40;
}
.toast.is-visible { opacity: 1; }

@media (min-width: 768px) {
  .app-shell {
    max-width: 480px;
    margin: 0 auto;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
  .app-tabbar {
    max-width: 480px;
    margin: 0 auto;
  }
}
