/* ── AUTH ── */
#auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}
.auth-card {
  background: white; border-radius: var(--radius-lg); padding: 40px 36px;
  width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { height: 48px; }
.auth-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 4px; text-align: center; }
.auth-sub { font-size: 13px; color: var(--text2); text-align: center; margin-bottom: 28px; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.auth-field input { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border2); border-radius: var(--radius); font-size: 14px; font-family: inherit; outline: none; transition: border-color .15s; }
.auth-field input:focus { border-color: var(--accent); }
.auth-err { background: var(--red-bg); color: var(--red); padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 14px; display: none; }
.btn-auth { width: 100%; padding: 12px; background: var(--accent); color: white; border: none; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .15s; }
.btn-auth:hover { background: var(--accent-hover); }

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal { background: white; border-radius: var(--radius-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 25px 60px rgba(0,0,0,.25); }
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text2); line-height: 1; padding: 2px 6px; }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
.form-input { width: 100%; padding: 9px 12px; border: 1.5px solid var(--border2); border-radius: var(--radius); font-size: 13px; font-family: inherit; outline: none; transition: border-color .15s; }
.form-input:focus { border-color: var(--accent); }
.search-results { border: 1.5px solid var(--border2); border-top: none; border-radius: 0 0 var(--radius) var(--radius); max-height: 200px; overflow-y: auto; }
.search-result-item { padding: 9px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--border); transition: background .1s; }
.search-result-item:hover { background: var(--accent-light); }
.search-result-item:last-child { border-bottom: none; }

/* ── MOBILE RESPONSIVE — Forms ── */
@media (max-width: 768px) {
  /* Auth screen */
  .auth-card { width: 95%; padding: 28px 20px; }
  .auth-title { font-size: 18px; }

  /* Prevent iOS auto-zoom on focus (inputs must be ≥16px) */
  .form-input, .auth-field input, input, select, textarea {
    font-size: 16px !important;
  }

  /* Form groups */
  .form-group { margin: 0 0 12px 0; width: 100%; }
  .form-group input, .form-group select { width: 100%; }

  /* Modals — slide up from bottom on mobile */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow-y: auto;
  }
  .modal-header {
    padding: 16px 16px 12px;
    position: sticky; top: 0;
    background: white; z-index: 1;
  }
  .modal-body { padding: 14px 16px; }
  .modal-footer {
    padding: 12px 16px;
    flex-wrap: wrap; gap: 8px;
    position: sticky; bottom: 0;
    background: white;
    border-top: 1px solid var(--border);
  }
  .modal-footer .btn { flex: 1; justify-content: center; min-height: 44px; }

  /* Search results — take more height on mobile */
  .search-results { max-height: 160px; }
}
