/* Access / sign-in page styles. Loaded after platform.css and scoped to .access-page. */

.access-page {
  --access-brand: #0f4c81;
  --access-brand-dark: #0c3d69;
  --access-accent: #0ea5e9;
  --access-amber: #f59e0b;
  --access-ink: #0f172a;
  --access-muted: #64748b;
  --access-line: #e2e8f0;
  --access-surface: #ffffff;
  --access-shadow: 0 24px 45px -22px rgba(15, 23, 42, 0.38);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 12% 0%, #e0f2fe 0%, transparent 38%),
    radial-gradient(circle at 88% 12%, #ccfbf1 0%, transparent 42%),
    #f3f6fa;
  color: var(--access-ink);
}

/* Header */
.access-page .access-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  color: var(--access-ink);
  border-bottom: 1px solid var(--access-line);
  padding: 14px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.access-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--access-ink);
}

.access-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 6px 14px -6px rgba(15, 76, 129, 0.5);
}

.access-brand-text {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--access-brand) 0%, var(--access-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.access-home {
  color: var(--access-muted) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.access-home:hover {
  color: var(--access-brand) !important;
}

/* Layout */
.access-shell {
  flex: 1;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 3rem 1rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.access-card {
  background: var(--access-surface);
  border: 1px solid var(--access-line);
  border-radius: 22px;
  padding: 2rem;
  box-shadow: var(--access-shadow);
}

.access-intro {
  text-align: center;
  margin-bottom: 1.5rem;
}

.access-intro h1 {
  margin: 0 0 0.4rem;
  font-size: 1.6rem;
  color: var(--access-brand);
  letter-spacing: -0.02em;
}

.access-intro p {
  margin: 0;
  color: var(--access-muted);
  font-size: 0.95rem;
}

.access-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
}

.access-panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  color: var(--access-ink);
}

.access-panel h2:focus {
  outline: none;
}

.access-panel .muted {
  margin: 0 0 1.1rem;
  color: var(--access-muted);
  font-size: 0.92rem;
}

/* Form controls */
.access-page label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--access-ink);
  margin: 0.9rem 0 0.35rem;
}

.access-page input {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--access-line);
  border-radius: 10px;
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.access-page input::placeholder {
  color: #94a3b8;
}

.access-page input:focus {
  outline: none;
  background: #fff;
  border-color: var(--access-accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

/* Buttons */
.btn-block {
  display: block;
  width: 100%;
  margin: 1.3rem 0 0;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--access-brand) 0%, var(--access-accent) 100%);
  box-shadow: 0 10px 20px -10px rgba(15, 76, 129, 0.7);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-block:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -12px rgba(15, 76, 129, 0.75);
}

.btn-block:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--access-brand);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.link-button:hover {
  text-decoration: underline;
}

.switch {
  margin: 1.25rem 0 0;
  text-align: center;
  color: var(--access-muted);
  font-size: 0.92rem;
}

.link-button.back {
  display: block;
  margin: 1.1rem auto 0;
  text-align: center;
}

/* Password field + reveal toggle */
.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  padding-right: 4.5rem;
}

.toggle-password {
  position: absolute;
  right: 0.5rem;
  margin: 0;
  padding: 0.4rem 0.6rem;
  background: #eef2f7;
  color: var(--access-brand);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.toggle-password:hover {
  background: #e2e8f0;
}

.hint {
  margin: 0.55rem 0 0;
  color: var(--access-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* OTP input */
.otp-input {
  text-align: center;
  letter-spacing: 0.5em;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding-left: 0.5em;
}

/* Verify actions */
.verify-actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

/* Notice states */
.notice {
  min-height: 0;
  margin: 0;
  font-size: 0.9rem;
  border-radius: 10px;
}

.notice:empty {
  display: none;
}

.notice-error,
.notice-success,
.notice-info {
  padding: 0.75rem 0.9rem;
  margin-bottom: 1.1rem;
  border: 1px solid transparent;
  line-height: 1.45;
}

.notice-error {
  color: #8b241b;
  background: #fef2f2;
  border-color: #fecaca;
}

.notice-success {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.notice-info {
  color: #0369a1;
  background: #e0f2fe;
  border-color: #bae6fd;
}

/* Footnote */
.access-footnote {
  margin: 1.5rem 0 0;
  text-align: center;
  color: var(--access-muted);
  font-size: 0.82rem;
}

.access-footnote a {
  color: var(--access-brand);
  font-weight: 600;
  text-decoration: none;
}

.access-footnote a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 520px) {
  .access-shell {
    padding: 1.5rem 0.85rem 2rem;
  }

  .access-card {
    padding: 1.5rem;
    border-radius: 18px;
  }

  .access-intro h1 {
    font-size: 1.4rem;
  }
}