:root {
  color-scheme: dark;
  --bg: #08090d;
  --panel: rgba(255, 255, 255, 0.105);
  --panel-strong: rgba(255, 255, 255, 0.16);
  --stroke: rgba(255, 255, 255, 0.16);
  --stroke-strong: rgba(255, 255, 255, 0.25);
  --text: #f7f8fb;
  --muted: #adb2bf;
  --muted2: #737989;
  --red: #ff2a32;
  --red2: #a80e18;
  --ok: #46d981;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

img,
video {
  max-width: 100%;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 82% -8%, rgba(255, 42, 50, 0.36), transparent 21rem),
    radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.12), transparent 15rem),
    linear-gradient(150deg, #06070b 0%, #17090d 52%, #050507 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 74%);
}

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

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#app {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 12px max(24px, env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 12px;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brandLogo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 17px;
  object-fit: cover;
  box-shadow: 0 0 30px rgba(255, 42, 50, 0.24);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 8vw, 42px);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(21px, 5.8vw, 28px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-top: 18px;
  margin-bottom: 10px;
  color: #fff;
  font-size: 15px;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.muted {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.38;
}

.mono {
  margin-top: 10px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.hero,
.panel {
  position: relative;
  overflow: hidden;
  margin: 12px 0;
  border: 1px solid var(--stroke);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.135), rgba(255, 255, 255, 0.055));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.25);
}

.hero::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.23), transparent 38%, rgba(255, 42, 50, 0.09));
  opacity: 0.75;
}

.hero > *,
.panel > * {
  position: relative;
}

.hero {
  padding: 20px;
  min-height: 132px;
  display: flex;
  align-items: flex-end;
}

.hero h2 {
  max-width: 12em;
}

.panel {
  padding: 16px;
}

.hidden {
  display: none !important;
}

.split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.status {
  min-width: 78px;
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--muted);
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.status.online {
  color: #061109;
  border-color: transparent;
  background: var(--ok);
}

label {
  display: block;
  margin-top: 14px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  outline: 0;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  padding: 13px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

input[type="file"] {
  padding: 12px;
  color: var(--muted);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(255, 42, 50, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 42, 50, 0.12);
}

textarea {
  min-height: 102px;
  resize: vertical;
}

.avatar {
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  border: 1px solid var(--stroke);
  border-radius: 24px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 0 0 28px rgba(255, 42, 50, 0.18);
}

.carBox {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 21px;
  background: rgba(0, 0, 0, 0.12);
}

.carBox select,
.carBox input,
.carBox textarea {
  margin: 0;
}

#saveRegistrationBtn,
#loginBtn,
#editProfileBtn,
#addAccessBtn,
#createCallBtn {
  width: 100%;
  margin-top: 14px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.primary,
.ghost,
.danger,
.sos,
.iconBtn {
  min-height: 52px;
  border-radius: 18px;
  color: #fff;
  font-weight: 900;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.primary:active,
.ghost:active,
.danger:active,
.sos:active,
.iconBtn:active,
.mini:active,
.tab:active {
  transform: scale(0.985);
}

.primary {
  background: linear-gradient(135deg, var(--red), #ff6d72);
  box-shadow: 0 14px 28px rgba(255, 42, 50, 0.24);
}

.ghost {
  border: 1px solid var(--stroke-strong);
  background: rgba(255, 255, 255, 0.105);
}

.danger,
.sos {
  background: linear-gradient(135deg, var(--red2), var(--red));
}

.sos {
  width: 100%;
  min-height: 76px;
  margin-top: 12px;
  border-radius: 24px;
  font-size: 24px;
  letter-spacing: 0.12em;
  box-shadow: 0 0 36px rgba(255, 42, 50, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.iconBtn {
  width: 48px;
  min-height: 48px;
  flex: 0 0 auto;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.09);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.consents {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 17px;
  background: rgba(0, 0, 0, 0.13);
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}

.check input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--red);
}

.pulseDot {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #555965;
}

.pulseDot.active {
  background: var(--ok);
  box-shadow: 0 0 0 8px rgba(70, 217, 129, 0.12), 0 0 22px rgba(70, 217, 129, 0.5);
}

#preview {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 420px;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: #000;
  object-fit: cover;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.15);
}

.tab {
  min-height: 42px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.tab.active {
  background: rgba(255, 42, 50, 0.94);
  color: #fff;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.item {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 19px;
  background: rgba(0, 0, 0, 0.18);
}

.item strong {
  display: block;
  margin-bottom: 5px;
}

.item .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mini {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 430px) {
  #app {
    padding-left: 10px;
    padding-right: 10px;
  }

  .brandLogo {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .status {
    min-width: 68px;
    padding-inline: 8px;
  }

  .hero,
  .panel {
    border-radius: 23px;
  }

  .hero {
    min-height: 122px;
    padding: 17px;
  }

  .panel {
    padding: 14px;
  }

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

  .split {
    gap: 10px;
  }

  .avatar {
    width: 62px;
    height: 62px;
    border-radius: 20px;
  }

  input,
  textarea,
  select,
  .primary,
  .ghost,
  .danger,
  .sos,
  .iconBtn {
    min-height: 50px;
  }

  #preview {
    max-height: 340px;
  }
}
