[hidden] { display: none !important; }

.login-view {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  overflow: hidden;
}

.login-view::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(760px, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 255, .18), rgba(0, 229, 255, .04) 42%, transparent 70%);
  filter: blur(12px);
  pointer-events: none;
}

.login-card {
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid rgba(37, 99, 255, .28);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 39, 71, .96), rgba(8, 18, 31, .98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .38);
  backdrop-filter: blur(20px);
}

.login-card .brand-mark { width: 58px; height: 58px; margin-bottom: 20px; }
.login-card h1 { margin-bottom: 12px; }
.login-card form { display: grid; gap: 16px; margin-top: 22px; }
.login-card form > button { width: 100%; }

label {
  display: grid;
  gap: 7px;
  color: #dbe7f3;
  font-size: 12px;
  font-weight: 720;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #294d72;
  border-radius: 10px;
  padding: 11px 12px;
  background: #08121f;
  color: #f8fafc;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input::placeholder, textarea::placeholder { color: #6f8aa3; }
textarea { resize: vertical; min-height: 132px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: #00e5ff;
  box-shadow: 0 0 0 4px rgba(0, 229, 255, .10);
}

button:disabled, input:disabled, select:disabled, textarea:disabled {
  cursor: not-allowed;
  opacity: .58;
}
button:disabled { transform: none !important; box-shadow: none !important; }

.form-hint {
  margin: -4px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(0, 229, 255, .14);
  border-radius: 10px;
  background: rgba(0, 229, 255, .04);
  color: #9fb9ce;
  font-size: 11px;
  line-height: 1.55;
}
.form-error { min-height: 20px; margin: 0; color: #ff9cac; font-size: 12px; }
.form-error:empty { visibility: hidden; }

#operation-dialog form { display: grid; gap: 14px; }
#operation-dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }

.row details { grid-column: 1 / -1; min-width: 0; }
.row summary { cursor: pointer; padding: 10px 0; color: #b8cadb; }
.row dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 16px; }
.row dt { font-weight: 700; color: #b8cadb; }
.row dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: #f8fafc; }
summary:focus-visible { outline: 2px solid #00e5ff; outline-offset: 4px; }
input[type="checkbox"] { width: 20px; min-height: 20px; justify-self: start; }
.panel form { display: grid; gap: 14px; margin-block: 16px; min-width: 0; }
.panel button { min-height: 44px; }
.panel .form-error { overflow-wrap: anywhere; }

@media (max-width: 480px) {
  .login-view { padding: 20px 12px; }
  .login-card { padding: 24px 18px; }
  #operation-dialog .dialog-actions { display: grid; grid-template-columns: 1fr; }
  .row dl { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-contrast: more) {
  .login-card, input, select, textarea { border-width: 2px; }
  input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #00e5ff; outline-offset: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  input, select, textarea { transition: none; }
}

/* Login and password reset: accessible visibility control, no change to auth. */
.password-field { position: relative; min-width: 0; }
.password-field input { padding-right: 54px; }
.password-visibility-toggle { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; padding: 8px; color: #dbe7f3; background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.password-visibility-toggle svg { width: 21px; height: 21px; }
.password-visibility-toggle:hover { color: #8ff5ff; background: rgba(37,99,255,.13); }
.password-visibility-toggle:focus-visible { outline: 2px solid #00e5ff; outline-offset: 2px; }
.password-guidance { margin: -5px 0 0; color: #b6c9dc; font-size: 12px; line-height: 1.6; }
.password-guidance strong { color: #e8f1ff; }
