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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 15px;
  color: #1f2937;
  min-height: 100vh;
  background-color: #dce6ee;
  background-image:
    url("bg-top.png"),
    url("bg-bottom.png");
  background-position: top center, bottom center;
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
}

/* ── TOP BAR ─────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 52px;
  background: linear-gradient(90deg, #1059b8 0%, #1976d2 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,.28);
}

.aris-logo {
  height: 34px;
  width: auto;
  display: block;
}

/* Logout icon button */
.icon-btn {
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 5px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background .2s;
}
.icon-btn:hover { background: rgba(255,255,255,.28); }

/* The actual logout PNG image */
.logout-icon {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
  border-radius: 4px;
}

/* ── PAGE SHELL ── */
.page-shell {
  min-height: 100vh;
  padding-top: 52px;        
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 32px;
  padding-top: 72px;        
}

/* ── LOGIN CARD ─── */
.login-card {
  width: 320px;                
  max-width: calc(100vw - 28px);
  background: #ffffff;
  border-radius: 3px;
  box-shadow: 0 6px 40px rgba(0,0,0,.15);
  padding: 28px 24px 22px;      
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ── CREST ─── */
.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.crest-img {
  width: 190px;                 
  height: auto;
  display: block;
}

/* ── TITLE ─── */
.card-title {
  margin: 0 0 5px;
  text-align: center;
  font-size: 17px;
  font-weight: 400;
  color: #111827;
  line-height: 1.3;
}
.card-title strong { font-weight: 700; }

.card-sub {
  margin: 0 0 20px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

/* ── FORM ─── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.input-row {
  display: flex;
  align-items: stretch;
  border: 1px solid #c8d0da;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.input-row:focus-within {
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25,118,210,.13);
}
.has-error .input-row {
  border-color: #dc2626;
}

.input-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  background: #f3f4f6;
  border-right: 1px solid #c8d0da;
  color: #6b7280;
}
.input-icon svg {
  width: 16px;
  height: 16px;
}

/* Text field */
.input-row input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #111827;
  padding: 10px 11px;
  height: 44px;
}
.input-row input::placeholder { color: #9ca3af; }

/* Error text – orange-red as in screenshot */
.err-msg {
  display: none;
  font-size: 13px;
  color: #e05c00;
  font-weight: 500;
  padding-left: 2px;
}

/* ── FORGOT PASSWORD ─── */
.helper-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}
.forgot-link {
  font-size: 14px;
  color: #1976d2;
  text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

/* ── BUTTONS ── */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  letter-spacing: .3px;
  transition: filter .18s, transform .12s;
}
.btn:hover  { filter: brightness(1.07); }
.btn:active { transform: scale(.98); }

/* Blue login button */
.btn-login {
  background: #1ab0f0;
  color: #fff;
  box-shadow: 0 2px 10px rgba(26,176,240,.30);
}

.btn-signup {
  background: #3cac45;
  color: #fff;
}

/* ── DIVIDER ──── */
.divider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
}
.divider-line {
  flex: 1;
  height: 1px;
  background: #d1d5db;
}
.divider-text {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
}

/* ── TERMS ─── */
.terms-text {
  margin: 15px 0 0;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  line-height: 1.65;
}
.terms-text a { color: #1976d2; text-decoration: none; }
.terms-text a:hover { text-decoration: underline; }

/* ── LOADING OVERLAY ─── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(255,255,255,.72);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 15px;
  color: #1565c0;
  font-weight: 500;
}
.overlay.active { display: flex; }

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #bfdbfe;
  border-top-color: #1976d2;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ─── */
@media (max-width: 380px) {
  .login-card  { padding: 24px 16px 18px; }
  .crest-img   { width: 160px; }
  .card-title  { font-size: 15px; }
}
