﻿:root {
  --bg: #01010a;
  --card: rgba(20, 20, 24, 0.92);
  --border: rgba(220, 70, 0, 0.42);
  --accent: #dc4600;
  --accent-soft: rgba(220, 70, 0, 0.22);
  --text: #ffffff;
  --muted: #c6c6c9;
  --success: #d7b896;
  --danger: #ff7b53;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  background: radial-gradient(circle at 8% 10%, rgba(220, 70, 0, 0.2) 0%, transparent 35%),
    radial-gradient(circle at 92% 85%, rgba(220, 70, 0, 0.12) 0%, transparent 30%),
    var(--bg);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  position: relative;
  width: min(680px, 100%);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
  overflow: visible;
  animation: fadeInUp 500ms ease-out;
}

.card__glow {
  position: absolute;
  inset: -40% auto auto -20%;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--accent-soft), transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  margin-bottom: 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.brand-badge__sdk {
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.brand-badge__divider,
.card-header__divider {
  width: 1px;
  height: 14px;
  background: var(--accent);
  flex-shrink: 0;
}

.brand-badge__crm,
.card-header__workspace {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.card-header {
  position: relative;
  z-index: 1;
}

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

.app-card-header {
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 14px;
  padding: 7px 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.72rem;
  font-weight: 700;
}

.card-header__sdk {
  color: #ffffff;
  letter-spacing: 0.16em;
}

.card-header__title {
  margin: 0;
  line-height: 1.25;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  max-width: 100%;
}

h1 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.subtitle {
  margin: 8px 0 16px;
  color: var(--muted);
  line-height: 1.45;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
}

.logout-btn {
  margin-top: 4px;
}

.form {
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.form-section {
  display: grid;
  gap: 14px;
}

.form-section__title {
  margin: 0;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: #f1f1f1;
}

input,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.34);
  color: var(--text);
  padding: 0 12px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input {
  height: 44px;
}

textarea {
  padding: 12px;
  resize: vertical;
  min-height: 120px;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(220, 70, 0, 0.22);
}

input[type="file"] {
  padding: 10px 12px;
  height: auto;
}

.field-hint {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select__native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.custom-select__trigger {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 40px 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.34);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.custom-select__trigger:hover {
  border-color: rgba(220, 70, 0, 0.55);
}

.custom-select--open .custom-select__trigger,
.custom-select__trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(220, 70, 0, 0.22);
}

.custom-select__value--placeholder {
  color: var(--muted);
}

.custom-select__arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 180ms ease;
}

.custom-select--open .custom-select__arrow {
  transform: translateY(-30%) rotate(-135deg);
}

.custom-select__menu {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(12, 12, 16, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  max-height: 220px;
  overflow-y: auto;
}

.custom-select__option {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.custom-select__option:hover,
.custom-select__option--active {
  background: rgba(220, 70, 0, 0.18);
  color: #fff;
}

.custom-select__option--selected {
  background: rgba(220, 70, 0, 0.28);
  color: #fff;
}

button {
  margin-top: 8px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  color: #000000;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #dc4600, #ff6d2d);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(220, 70, 0, 0.4);
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.secondary {
  width: auto;
  min-width: 96px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.secondary:hover {
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: none;
  transform: none;
}

.status-message {
  margin: 16px 0 0;
  width: 100%;
  min-height: 1.4rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.status-message.success {
  color: var(--success);
}

.status-message.error {
  color: var(--danger);
  white-space: pre-line;
}

.hidden {
  display: none;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
