/* =========================================================
   Auth premium — calm sage, mist, cream
   ========================================================= */
:root {
  --ap-ink: #15241f;
  --ap-muted: #5d716b;
  --ap-line: rgba(21, 36, 31, 0.08);
  --ap-accent: #3d8b74;
  --ap-accent-deep: #2c6a58;
  --ap-accent-mid: #7eb9a6;
  --ap-sage: #cfe3db;
  --ap-cream: #f6f3ec;
  --ap-mist: #eef3f0;
  --ap-gold: #cbb99a;
  --ap-canvas: #eef3f0;
  --ap-font: 'Figtree', system-ui, sans-serif;
  --ap-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --ap-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.ap-auth {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ap-font);
  color: var(--ap-ink);
  background: var(--ap-canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.ap-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.ap-visual {
  position: relative;
  padding: clamp(1.6rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f6f3ec;
  overflow: hidden;
  background: #10221d;
}
.ap-visual__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  animation: apKen 28s ease-in-out infinite alternate;
  filter: saturate(0.92) contrast(1.05);
}
.ap-visual__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 27, 24, 0.28) 0%, rgba(13, 27, 24, 0.18) 36%, rgba(13, 27, 24, 0.72) 100%),
    linear-gradient(90deg, rgba(16, 34, 29, 0.35), transparent 55%);
  pointer-events: none;
}
@keyframes apKen {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); }
}
.ap-visual__mist {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 40%, rgba(246, 243, 236, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 40%);
  mix-blend-mode: soft-light;
}
.ap-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
  opacity: 0.55;
}
.ap-orb--a {
  width: 280px; height: 280px;
  left: -80px; top: 18%;
  background: radial-gradient(circle, rgba(203,185,154,0.45), transparent 68%);
  animation: apFloat 16s ease-in-out infinite;
}
.ap-orb--b {
  width: 220px; height: 220px;
  right: -40px; top: 8%;
  background: radial-gradient(circle, rgba(126,185,166,0.4), transparent 68%);
  animation: apFloat 20s ease-in-out infinite reverse;
}
.ap-orb--c {
  width: 340px; height: 340px;
  right: 8%; bottom: -120px;
  background: radial-gradient(circle, rgba(246,243,236,0.16), transparent 70%);
  animation: apFloat 22s ease-in-out infinite;
}

.ap-visual__brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: #f6f3ec;
  width: fit-content;
}
.ap-visual__brand img {
  width: 48px; height: 48px; object-fit: contain;
  background: rgba(246, 243, 236, 0.96);
  border-radius: 16px;
  padding: 7px;
  box-shadow: 0 12px 30px -16px rgba(0,0,0,0.45);
}
.ap-visual__brand strong {
  font-family: var(--ap-display);
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.ap-visual__copy {
  position: relative;
  z-index: 1;
  max-width: 30rem;
}
.ap-visual__kicker {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(246, 243, 236, 0.62);
}
.ap-visual__copy h1 {
  margin: 0 0 0.9rem;
  font-family: var(--ap-display);
  font-size: clamp(2rem, 1.5rem + 1.8vw, 2.85rem);
  letter-spacing: -0.045em;
  line-height: 1.12;
  font-weight: 700;
  color: #f6f3ec;
}
.ap-visual__copy > p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(246, 243, 236, 0.82);
  font-weight: 500;
  max-width: 28rem;
}
.ap-clock {
  font-family: var(--ap-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 1rem 0 .75rem;
  color: #f6f3ec;
}
.ap-weather {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem .85rem;
  border-radius: 16px;
  background: rgba(246, 243, 236, 0.14);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
  max-width: 22rem;
  animation: apRise .7s var(--ap-ease) .2s both;
}
.ap-weather i {
  font-size: 1.55rem;
  color: #f6e7c1;
}
.ap-weather strong {
  display: block;
  font-size: .95rem;
  font-weight: 800;
}
.ap-weather span {
  display: block;
  font-size: .75rem;
  opacity: .82;
  font-weight: 600;
}
.ap-weather--panel {
  background: rgba(61, 139, 116, 0.08);
  border: 1px solid rgba(61, 139, 116, 0.14);
  color: var(--ap-ink);
  max-width: none;
  margin: 0 0 1.1rem;
}
.ap-weather--panel i { color: var(--ap-accent); }
.ap-sso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  margin-top: .65rem;
  padding: .65rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(21, 36, 31, 0.1);
  background: rgba(255,255,255,0.72);
  color: var(--ap-ink) !important;
  font-weight: 800;
  font-size: .88rem;
  text-decoration: none !important;
  transition: transform .2s var(--ap-ease), box-shadow .2s ease;
}
.ap-sso:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -16px rgba(21,36,31,.4); }
  margin-top: 1.15rem;
  font-family: var(--ap-display);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  letter-spacing: -0.04em;
  font-weight: 700;
  color: #f6f3ec;
}
.ap-trust {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.ap-trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  background: rgba(246, 243, 236, 0.1);
  border: 1px solid rgba(246, 243, 236, 0.14);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(246, 243, 236, 0.88);
  backdrop-filter: blur(10px);
}
.ap-trust i { font-size: 0.95rem; opacity: 0.9; }
.ap-visual__meta {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  color: rgba(246, 243, 236, 0.58);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ap-panel {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 50% at 100% -10%, rgba(207, 227, 219, 0.7), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(203, 185, 154, 0.18), transparent 50%),
    linear-gradient(180deg, #f6f3ec 0%, #eef3f0 100%);
}
.ap-panel__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem clamp(1rem, 4vw, 2.5rem);
}
.ap-panel__nav a.ap-home {
  display: none;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ap-ink);
  font-weight: 700;
  font-family: var(--ap-display);
}
.ap-panel__nav a.ap-home img {
  width: 36px; height: 36px; object-fit: contain;
  background: #fff; border-radius: 12px; padding: 4px;
  border: 1px solid var(--ap-line);
}
.ap-panel__body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem clamp(1rem, 4vw, 2.5rem) 2rem;
}
.ap-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 24px 50px -28px rgba(21, 36, 31, 0.28);
  padding: 2rem 1.75rem 1.55rem;
  backdrop-filter: blur(18px) saturate(140%);
  animation: apRise .55s var(--ap-ease) both;
}
.ap-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ap-accent-deep);
}
.ap-card h2 {
  margin: 0 0 0.4rem;
  font-family: var(--ap-display);
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  color: var(--ap-ink);
}
.ap-card .ap-sub {
  margin: 0 0 1.35rem;
  color: var(--ap-muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}
.ap-alert {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #f8ece8;
  color: #7a3b32;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(122, 59, 50, 0.12);
}
.ap-card .form-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #3a4d47;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}
.ap-input {
  position: relative;
}
.ap-input > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #7a9089;
  font-size: 1.05rem;
  pointer-events: none;
  z-index: 2;
}
.ap-card .form-control {
  border-radius: 14px !important;
  border: 1px solid rgba(21, 36, 31, 0.1) !important;
  min-height: 50px;
  font-weight: 500;
  box-shadow: none !important;
  background: rgba(255,255,255,0.88) !important;
  color: var(--ap-ink) !important;
  padding-left: 0.95rem !important;
  padding-right: 0.95rem !important;
}
.ap-input .form-control {
  padding-left: 2.55rem !important;
  padding-right: 2.6rem !important;
}
.ap-card .form-control:focus {
  border-color: var(--ap-accent) !important;
  box-shadow: 0 0 0 4px rgba(61, 139, 116, 0.16) !important;
  background: #fff !important;
}
.ap-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #6d827b;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.ap-eye:hover { background: var(--ap-mist); color: var(--ap-ink); }
.ap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.15rem 0 0.85rem;
}
.ap-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ap-muted);
  margin: 0;
  cursor: pointer;
}
.ap-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--ap-accent);
}
.ap-card .btn-primary,
.ap-card .login_button {
  background: linear-gradient(160deg, #6fbfa8 0%, #3d8b74 48%, #2c6a58 100%) !important;
  border: 0 !important;
  border-radius: 14px !important;
  min-height: 50px;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 28px -14px rgba(44, 106, 88, 0.55);
  color: #fff !important;
}
.ap-card .btn-primary:hover,
.ap-card .login_button:hover {
  filter: brightness(1.04);
}
.ap-card .login_button.is-busy {
  opacity: 0.72;
  pointer-events: none;
}
.ap-card a.text-primary {
  color: var(--ap-accent-deep) !important;
  font-weight: 700;
  text-decoration: none;
}
.ap-card a.text-primary:hover { text-decoration: underline; }
.ap-alt { color: var(--ap-muted); font-size: 0.88rem; font-weight: 500; }
.ap-secure-note {
  margin: 1rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #7a8d87;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}
.ap-secure-note i { margin-top: 1px; color: var(--ap-accent); }
.ap-footer {
  text-align: center;
  padding: 0 1rem 1.25rem;
  font-size: 0.76rem;
  color: var(--ap-muted);
  font-weight: 600;
}

.ap-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ap-card > .card,
.ap-card .card {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.ap-card > .card > .card-body { padding: 0 !important; }

.ap-lang .btn,
.ap-lang .dash-head-link {
  border-radius: 999px !important;
  border: 1px solid rgba(21, 36, 31, 0.08) !important;
  background: rgba(255,255,255,0.8) !important;
  color: var(--ap-ink) !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  padding: 0.35rem 0.85rem !important;
  backdrop-filter: blur(8px);
}

@keyframes apRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes apFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(12px, -18px, 0); }
}

.ap-visual__brand { animation: apRise .55s var(--ap-ease) both; }
.ap-visual__copy h1 { animation: apRise .7s var(--ap-ease) .08s both; }
.ap-visual__copy > p { animation: apRise .7s var(--ap-ease) .16s both; }
.ap-trust { animation: apRise .7s var(--ap-ease) .24s both; }
.ap-visual__meta { animation: apRise .6s var(--ap-ease) .28s both; }
.ap-home img,
.ap-visual__brand img { transition: transform .35s var(--ap-ease); }
.ap-home:hover img,
.ap-visual__brand:hover img { transform: scale(1.05); }
.ap-card .btn,
.ap-card button[type="submit"] {
  transition: transform .2s var(--ap-ease), box-shadow .2s ease, filter .2s ease;
}
.ap-card .btn:hover,
.ap-card button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -14px rgba(44, 106, 88, 0.5);
}
.ap-card .form-control {
  transition: border-color .2s ease, box-shadow .25s ease;
}
.px-field-in { animation: apRise .45s var(--ap-ease) both; }
.px-btn-in { animation: apRise .4s var(--ap-ease) both; }

@media (max-width: 991.98px) {
  .ap-shell { grid-template-columns: 1fr; }
  .ap-visual { display: none; }
  .ap-panel__nav a.ap-home { display: inline-flex; }
  .ap-panel { min-height: 100vh; }
}
@media (max-width: 480px) {
  .ap-card { padding: 1.45rem 1.15rem 1.25rem; border-radius: 22px; }
  .ap-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .ap-orb,
  .ap-visual__brand,
  .ap-visual__copy h1,
  .ap-visual__copy > p,
  .ap-trust,
  .ap-visual__meta,
  .ap-card,
  .ap-visual__photo,
  .px-field-in,
  .px-btn-in {
    animation: none !important;
    transform: none !important;
  }
}
