/* ============================================================
   NEXORA · Components / Forms + Modal — Apple Minimal
   Flat inputs, no borders, no glows. Clean dialogs.
   ============================================================ */

.field { display: grid; gap: 0.5rem; }

.field-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  color: var(--text-1);
  background: #f5f5f7;
  border: none;
  border-radius: var(--radius-md);
  box-shadow: none;
  transition: background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

[data-theme="dark"] .input { background: #1c1c1e; }

.input::placeholder { color: var(--text-3); }

.input:focus {
  outline: none;
  border: none;
  background: #f5f5f7;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

[data-theme="dark"] .input:focus { background: #2c2c2e; box-shadow: 0 0 0 3px rgba(255,255,255,0.12); }

/* ---------- Modal ------------------------------------------ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  visibility: hidden;
  pointer-events: none;
}

.modal.is-open { visibility: visible; pointer-events: auto; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}

.modal.is-open .modal-backdrop { opacity: 1; }

.modal-card {
  position: relative;
  width: min(100%, 460px);
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: none;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform var(--dur) var(--ease-spring), opacity var(--dur) var(--ease-out);
}

.modal-card::before { content: none; display: none; }

.modal.is-open .modal-card { transform: none; opacity: 1; }

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  transition: color var(--dur-fast), background var(--dur-fast);
}

.modal-close:hover { color: var(--text-1); background: #f5f5f7; }
[data-theme="dark"] .modal-close:hover { background: #1c1c1e; }

.modal-head { display: grid; gap: 0.6rem; margin-bottom: 1.5rem; }
.modal-head .icon-tile { margin-bottom: 0.4rem; }
.modal-body form { display: grid; gap: 1rem; }
.modal-note { font-size: var(--fs-small); color: var(--text-3); text-align: center; }

/* Success state */
.modal-success { display: none; text-align: center; padding: 1rem 0 0.5rem; }

.modal-success .success-ring {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: #f5f5f7;
  border: none;
  color: var(--text-1);
}

[data-theme="dark"] .modal-success .success-ring { background: #1c1c1e; }

.modal.is-success .modal-body { display: none; }
.modal.is-success .modal-success { display: block; }
