:root {
  --slate-400: #94a3b8;
  --slate-500: #5b697d;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --rose-600: #e11d48;
  --border: #e2e8f0;
  --muted: #5b697d;
  --radius-sm: 8px;
  --bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--page-bg);
  color: var(--slate-900);
  font-family: var(--font-sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input {
  font: inherit;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: var(--text-body);
  cursor: pointer;
  text-decoration: none;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:active {
  transform: translateY(1px);
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  pointer-events: none;
}
.primary {
  background: var(--accent) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 2px 4px rgba(52, 76, 99, 0.25), 0 1px 2px rgba(52, 76, 99, 0.15) !important;
}

.primary:hover {
  box-shadow: 0 4px 10px rgba(52, 76, 99, 0.35) !important;
  transform: none;
}
label {
  display: block;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 18px;
}

label > .icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -2px;
  color: var(--slate-400);
}

input {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--slate-900);
  font-weight: 400;
  line-height: 1.4;
  transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  background: #ffffff;
}

input:user-invalid {
  border-color: var(--rose-600);
  background: #fffafb;
}
section#login-view:not([hidden]) {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  min-height: 100vh !important;
  max-width: 440px !important;
  margin: 0 auto !important;
  padding: 40px 24px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.brand {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: #ffffff;
  font-size: var(--text-page);
  letter-spacing: -0.05em;
}

.login-brand strong {
  display: block;
  letter-spacing: -0.03em;
  color: var(--slate-900);
}

.login-brand span {
  display: block;
  font-size: var(--text-small);
  color: var(--muted);
  margin-top: 2px;
}

.login .primary {
  width: 100%;
  margin-top: 14px;
  min-height: 52px;
  font-size: var(--text-body);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-field button {
  position: absolute;
  right: 4px;
  bottom: 4px;
  min-width: 42px;
  height: 40px;
  background: transparent;
  border: none;
  padding: 8px;
}

.password-field button:hover {
  color: var(--slate-700);
}
#message {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: calc(96px + var(--bottom));
  z-index: 50;
  max-width: 680px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 18px;
  background: var(--slate-900);
  color: #ffffff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-size: var(--text-small);
  line-height: 1.5;
}

#message-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

#dismiss-message {
  background: transparent;
  color: #ffffff;
  border: none;
  width: 36px;
  height: 36px;
  padding: 8px;
}

@media (min-width: 900px) {
  #message {
    left: 260px;
    bottom: 28px;
  }
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
body { overflow-x: visible; }
section, form, label { min-width: 0; }
input { min-width: 0; max-width: 100%; }
button { max-width: 100%; overflow-wrap: anywhere; }
#dismiss-message { min-width: 44px; min-height: 44px; }
input::placeholder { color: var(--slate-500); }
.skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { position: fixed; z-index: 100; top: 8px; left: 8px; width: auto; height: auto; clip-path: none; padding: 12px 18px; background: white; color: var(--accent-dark); border-radius: 8px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
button { transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s; }
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-small: .8125rem;
  --text-body: .875rem;
  --text-page: 1.25rem;
  --text-input: 1rem;
  --page-bg: #f5f6f8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .035);
  --shadow-lg: 0 6px 16px rgba(15, 23, 42, .07);
}
body { font-size: var(--text-body); line-height: 1.5; }
button { font-weight: 600; letter-spacing: 0; }
.primary, .primary:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)) !important;
  border-color: var(--accent) !important;
  box-shadow: var(--shadow-sm) !important;
}
.primary:hover { background: var(--accent-dark) !important; }
.brand { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); box-shadow: none; font-weight: 650; }
.login-brand strong { font-size: var(--text-page); font-weight: 600; }
input { font-size: var(--text-input); }
@media (min-width: 900px) {
  :root { --text-input: .875rem; }
}
@media (max-width: 599px) {
  :root { --text-page: 1.125rem; }
}
html { scroll-padding-block: 24px 112px; }
input { border-color: #8291a5; }
input, button { scroll-margin-block: 24px 120px; }
@media (max-width: 899px) {
  body.keyboard-open #message { bottom: 16px; }
}
.password-field button { color: var(--slate-600); }

#message[data-kind="error"] { background: #be123c; }
[hidden] { display: none !important; }

.login-brand .brand{background:none;box-shadow:none;overflow:hidden;padding:0}
.login-brand .brand img{display:block;width:100%;height:100%;object-fit:contain}
