:root {
  color-scheme: dark;
  --bg-app: #080a0f;
  --bg-card: #0d1117;
  --bg-input: #161b22;
  --border-subtle: #21262d;
  --border-focus: #58a6ff;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --accent-cyan: #39c5bb;
  --accent-blue: #388bfd;
  --accent-blue-hover: #1f6feb;
  --error: #ff7b72;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "JetBrains Mono", monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: var(--bg-app);
  background-image: radial-gradient(circle at 50% 15%, rgba(56, 139, 253, 0.08) 0%, transparent 60%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.15);
  flex-shrink: 0;
}

.ic-icon {
  width: 22px;
  height: 22px;
  overflow: visible;
}

.ic-body {
  fill: #0d1117;
  stroke: #58a6ff;
  stroke-width: 1.5;
}

.ic-core {
  fill: rgba(56, 189, 248, 0.2);
  stroke: #39c5bb;
  stroke-width: 1;
}

.ic-pin1 {
  fill: #39c5bb;
}

.ic-pins {
  stroke: #79c0ff;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f0f6fc;
}

.brand-title b {
  color: var(--accent-cyan);
}

.brand-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  /* 16px font-size prevents iOS Safari from automatically zooming into inputs */
  font-size: 16px;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.input-wrap input::placeholder {
  color: var(--text-muted);
  font-size: 14px;
}

button[type="submit"] {
  height: 44px;
  background: var(--accent-blue);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.15s, transform 0.1s;
}

button[type="submit"]:hover {
  background: var(--accent-blue-hover);
}

button[type="submit"]:active {
  transform: scale(0.99);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-arrow {
  font-size: 14px;
  transition: transform 0.15s;
}

button[type="submit"]:hover .btn-arrow {
  transform: translateX(2px);
}

.error {
  color: var(--error);
  font-size: 12px;
  background: rgba(255, 123, 114, 0.1);
  border: 1px solid rgba(255, 123, 114, 0.25);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.error[hidden] {
  display: none;
}
