/* ==========================================================
   Design tokens
   ========================================================== */
:root {
  --ink-900: #0F1B33;
  --ink-800: #16264A;
  --ink-700: #2B3C63;
  --gold-500: #C79A45;
  --gold-400: #DDB668;
  --gold-100: #F6E9CE;
  --paper-0: #FFFFFF;
  --paper-50: #F5F6FA;
  --paper-100: #ECEEF4;
  --text-body: #3C4457;
  --text-muted: #6B7488;
  --danger: #D64545;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow-card: 0 24px 60px -20px rgba(15, 27, 51, 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  margin: 0;
  overflow-x: hidden;
  background-color: var(--paper-50);
  background-image:
    radial-gradient(900px 480px at 92% -8%, rgba(199, 154, 69, 0.16), transparent 60%),
    radial-gradient(700px 500px at -10% 100%, rgba(43, 60, 99, 0.10), transparent 55%),
    radial-gradient(circle, rgba(43, 60, 99, 0.08) 1px, transparent 1px);
  background-size: auto, auto, 26px 26px;
  background-repeat: no-repeat, no-repeat, repeat;
}

h1, h2 {
  font-family: var(--font-display);
  color: var(--ink-900);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink-900);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 2000;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

/* ==========================================================
   Layout
   ========================================================== */
.login-page {
  min-height: 100svh;
}

.login-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem clamp(1rem, 3vw, 2.5rem);
}

.login-col-inner {
  width: 100%;
  max-width: 400px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-bottom: 2.5rem;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-400), var(--gold-500));
  color: var(--ink-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  color: var(--ink-900);
  font-weight: 700;
  font-size: 0.95rem;
}

.brand-sub {
  color: var(--text-muted);
  font-size: 0.72rem;
}

/* ==========================================================
   Login card
   ========================================================== */
.login-card {
  background: var(--paper-0);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 3vw, 2.25rem);
  animation: cardIn 0.6s var(--ease) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.badge-pill {
  display: inline-block;
  background: var(--gold-100);
  color: #7A5A1E;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.login-card h1 {
  font-weight: 600;
  font-size: clamp(1.55rem, 2.6vw, 1.9rem);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.login-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ==========================================================
   Form
   ========================================================== */
.form-group {
  margin-bottom: 1.35rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-800);
  margin-bottom: 0.5rem;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.75rem;
  border: 1.5px solid var(--paper-100);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--ink-900);
  background: var(--paper-50);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

#password {
  padding-right: 2.75rem;
}

/* Strip native browser password reveal/clear controls so only the
   custom eye toggle is shown — prevents two overlapping icons and
   the "half visible" look those built-in controls can cause. */
.input-wrap input[type="password"]::-ms-reveal,
.input-wrap input[type="password"]::-ms-clear {
  display: none;
}

.input-wrap input::-webkit-textfield-decoration-container,
.input-wrap input::-webkit-credentials-auto-fill-button,
.input-wrap input::-webkit-strong-password-auto-fill-button {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.input-wrap input::placeholder {
  color: #A6ACBB;
}

.input-wrap input:focus {
  outline: none;
  border-color: var(--gold-500);
  background: var(--paper-0);
  box-shadow: 0 0 0 4px rgba(199, 154, 69, 0.14);
}

.input-wrap input.is-invalid {
  border-color: var(--danger);
  background: #FDF3F3;
}

.input-wrap input.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.12);
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  width: 2.1rem;
  height: 2.1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.toggle-password i {
  font-size: 1.05rem;
  line-height: 1;
}

.toggle-password:hover {
  color: var(--ink-900);
  background: var(--paper-100);
}

.field-error {
  display: none;
  min-height: 1.1rem;
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.remember-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-body);
  cursor: pointer;
  user-select: none;
}

.remember-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold-500);
  cursor: pointer;
}

.forgot-link {
  font-size: 0.88rem;
  color: var(--ink-700);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s var(--ease);
}

.forgot-link:hover {
  color: var(--gold-500);
}

.btn-custom {
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.96rem;
  border: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), opacity 0.2s var(--ease);
}

.btn-primary.btn-custom {
  background: var(--ink-900);
}

.btn-primary.btn-custom:hover:not(:disabled) {
  background: var(--ink-800);
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -12px rgba(15, 27, 51, 0.5);
}

.btn-primary.btn-custom:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.signup-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 1.75rem 0 0;
}

.signup-note a {
  color: var(--ink-900);
  font-weight: 600;
  text-decoration: none;
}

.signup-note a:hover {
  color: var(--gold-500);
}

/* ==========================================================
   Image column
   ========================================================== */
.login-image-col {
  position: relative;
}

.image-area {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.image-area::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(15, 27, 51, 0.15) 0%, rgba(15, 27, 51, 0.55) 60%, rgba(15, 27, 51, 0.92) 100%);
  z-index: 1;
}

.image-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-overlay-content {
  position: absolute;
  left: 2rem;
  right: 2rem;
  bottom: 2.5rem;
  z-index: 2;
  color: #fff;
}

.image-overlay-content .badge-pill {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(4px);
}

.image-overlay-content h2 {
  color: #fff;
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0.75rem 0 0.6rem;
}

.image-overlay-content .in-jntuk {
  color: var(--gold-400);
  font-style: italic;
}

.image-overlay-content p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
  margin: 0;
  max-width: 30ch;
}

/* ==========================================================
   Responsive — center card, hide image on mobile
   ========================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .login-col-inner {
    max-width: 320px;
  }

  .login-card h1 {
    font-size: 1.4rem;
  }
}

@media (max-width: 991.98px) {
  .login-col {
    min-height: 100svh;
    padding: 2rem 1.25rem;
  }

  .login-card {
    padding: 2.25rem 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .brand-sub {
    display: none;
  }

  .login-sub {
    display: none;
  }

  .login-card {
    padding: 2rem 1.25rem;
    border-radius: var(--radius-md);
  }

  .login-card h1 {
    font-size: 1.2rem;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================
   Motion preference
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  .login-card {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}