html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #f8fbff 0%, #f1f5f9 100%);
}

.dark body {
  background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
}

.app-shell {
  min-height: 100vh;
}

.setup-body {
  background:
    radial-gradient(1100px 650px at 8% -10%, rgba(56, 189, 248, 0.55), transparent 60%),
    radial-gradient(1000px 700px at 95% 5%, rgba(52, 211, 153, 0.5), transparent 60%),
    radial-gradient(900px 900px at 50% 115%, rgba(99, 102, 241, 0.32), transparent 60%),
    linear-gradient(160deg, #eaf6ff 0%, #eafff5 55%, #eef2ff 100%);
}

.dark .setup-body {
  background:
    radial-gradient(1100px 650px at 8% -10%, rgba(14, 165, 233, 0.28), transparent 60%),
    radial-gradient(1000px 700px at 95% 5%, rgba(16, 185, 129, 0.22), transparent 60%),
    radial-gradient(900px 900px at 50% 115%, rgba(99, 102, 241, 0.28), transparent 60%),
    linear-gradient(160deg, #020617 0%, #0b1220 55%, #050914 100%);
}

.setup-shell {
  min-height: 100vh;
}

.setup-main {
  min-height: calc(100vh - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.ipados-frame {
  width: min(100%, 560px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ipados-card {
  width: 100%;
  border-radius: 44px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 40px 90px rgba(15, 23, 42, 0.25), 0 10px 30px rgba(15, 23, 42, 0.12);
}

.dark .ipados-card {
  background: #111827;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.ipados-hero {
  position: relative;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ipados-hero::before,
.ipados-hero::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  filter: blur(40px);
}

.ipados-hero::before {
  width: 220px;
  height: 220px;
  top: -70px;
  left: -50px;
  background: rgba(255, 255, 255, 0.5);
}

.ipados-hero::after {
  width: 260px;
  height: 260px;
  bottom: -90px;
  right: -60px;
  background: rgba(255, 255, 255, 0.3);
}

.ipados-hero-welcome {
  background: linear-gradient(135deg, #38bdf8, #34d399);
}

.ipados-hero-eula {
  background: linear-gradient(135deg, #818cf8, #38bdf8);
}

.ipados-hero-server {
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
}

.ipados-hero-admin {
  background: linear-gradient(135deg, #6366f1, #a855f7);
}

.ipados-hero-finished {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.ipados-hero-icon {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  color: white;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.ipados-hero-icon svg {
  width: 36px;
  height: 36px;
}

.ipados-nav-btn {
  position: absolute;
  top: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(8px);
  color: #1f2937;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15);
  transition: background 160ms ease;
}

.ipados-nav-btn:hover {
  background: rgba(255, 255, 255, 0.6);
}

.ipados-nav-btn.back {
  left: 16px;
}

.ipados-nav-btn.toggle {
  right: 16px;
}

.ipados-nav-btn svg {
  width: 16px;
  height: 16px;
}

.ipados-content {
  padding: 1.75rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ipados-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.ipados-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.4);
  transition: all 200ms ease;
}

.dark .ipados-dot {
  background: rgba(100, 116, 139, 0.5);
}

.ipados-dot.active {
  width: 18px;
  background: linear-gradient(90deg, #2563eb, #4f46e5);
}

.ipados-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.dark .ipados-title {
  color: #f8fafc;
}

.ipados-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #475569;
}

.dark .ipados-description {
  color: #cbd5e1;
}

.ipados-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
}

.dark .ipados-status {
  color: #94a3b8;
}

.ipados-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(100, 116, 139, 0.25);
  border-top-color: #64748b;
  animation: ipadosSpin 0.8s linear infinite;
}

@keyframes ipadosSpin {
  to {
    transform: rotate(360deg);
  }
}

.ipados-note {
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: #475569;
}

.dark .ipados-note {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(71, 85, 105, 0.4);
  color: #cbd5e1;
}

.ipados-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.ipados-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.ipados-pill.primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

.ipados-pill.primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.ipados-pill.secondary {
  background: rgba(148, 163, 184, 0.14);
  color: #334155;
}

.dark .ipados-pill.secondary {
  background: rgba(100, 116, 139, 0.25);
  color: #e2e8f0;
}

.ipados-pill.secondary:hover {
  background: rgba(148, 163, 184, 0.22);
}

@keyframes assistantFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: assistantFadeIn 420ms ease both;
}

.card-surface {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.card-surface.select-layer-active {
  z-index: 45;
}

.dark .card-surface {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 20px 55px rgba(2, 8, 23, 0.35);
}

.soft-pill {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.9);
}

.dark .soft-pill {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(71, 85, 105, 0.7);
}

.soft-input {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.9);
  transition: all 180ms ease;
}

select.soft-input {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364758b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1rem 1rem;
}

select.soft-input::-ms-expand {
  display: none;
}

.soft-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.dark .soft-input {
  background-color: rgba(15, 23, 42, 0.95);
  border-color: rgba(71, 85, 105, 0.7);
}

.dark select.soft-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1rem 1rem;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select.open {
  z-index: 60;
}

.custom-select-native {
  display: none;
}

.custom-select-trigger {
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding-right: 2.75rem;
  position: relative;
}

.custom-select-trigger::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364758b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1rem 1rem;
}

.custom-select.open .custom-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.dark .custom-select-trigger::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
}

.custom-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 70;
  max-height: 16rem;
  overflow-y: auto;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px);
  padding: 0.35rem;
}

.dark .custom-select-menu {
  border-color: rgba(71, 85, 105, 0.7);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 20px 45px rgba(2, 8, 23, 0.45);
}

.custom-select-option {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 0.8rem;
  padding: 0.6rem 0.75rem;
  text-align: left;
  color: #0f172a;
  font-size: 0.92rem;
  cursor: pointer;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  outline: none;
  background: rgba(226, 232, 240, 0.9);
}

.dark .custom-select-option {
  color: #e2e8f0;
}

.dark .custom-select-option:hover,
.dark .custom-select-option:focus-visible {
  background: rgba(51, 65, 85, 0.9);
}

.custom-select-option.selected {
  background: rgba(14, 165, 233, 0.16);
  color: #0c4a6e;
  font-weight: 600;
}

.dark .custom-select-option.selected {
  background: rgba(14, 165, 233, 0.24);
  color: #bae6fd;
}

.custom-select-placeholder {
  color: #64748b;
}

.dark .custom-select-placeholder {
  color: #94a3b8;
}

.modal-window {
  max-height: 94vh;
}

.modal-topbar {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.94) 100%);
}

.dark .modal-topbar {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.94) 100%);
}

.modal-topbar-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}