/* ════════════════════════════════════════════════════════════════════════════════
   LOGIN PAGE STYLES — Complete redesign with proper responsive design
   Breakpoints: 1200 → 768 → 480 → 360
   ════════════════════════════════════════════════════════════════════════════════ */

:root {
  --primary-color: #00094f;
  --secondary-color: #f5a623;
  --danger-color: #e53935;
  --white-color: #ffffff;
  --light-bg: #f8faff;
  --dark-text: #07154d;
  --gray-text: #5c6a9d;
  --border-color: rgba(85, 95, 150, 0.16);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 32px 80px rgba(12, 35, 102, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  min-height: 100vh;
  position: relative;
  color: var(--dark-text);
  padding: 20px;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #07154d;
}

.login-video {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1920px;
  height: 1000px;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.video-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    135deg,
    rgba(3, 10, 45, 0.78) 0%,
    rgba(3, 10, 45, 0.55) 100%
  );
  backdrop-filter: blur(2px);
}

/* ──────────────────────────────────────────────────────────────────────────────
   LAYOUT STRUCTURE
   ────────────────────────────────────────────────────────────────────────────── */

.login-hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  animation: fadeInUp 0.6s ease-out;
}

.login-card {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.85) 100%
  );
  border: 1px solid rgba(6, 24, 76, 0.08);
  border-radius: 32px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.login-card-topbar {
  height: 8px;
  background: linear-gradient(
    90deg,
    var(--secondary-color) 0%,
    var(--primary-color) 100%
  );
}

.login-card-inner {
  padding: 40px 36px 32px;
}

/* ──────────────────────────────────────────────────────────────────────────────
   BRAND SECTION
   ────────────────────────────────────────────────────────────────────────────── */

.login-card-brand {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 32px;
}

.brand-logo {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.2);
  object-fit: contain;
  background: rgba(245, 166, 35, 0.1);
  padding: 4px;
}

.brand-overline {
  margin-bottom: 8px;
  color: #6278e8;
  letter-spacing: 0.15em;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
}

.login-card-brand h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.2;
  color: var(--dark-text);
  font-weight: 800;
}

.brand-subtitle {
  margin: 0;
  color: var(--gray-text);
  font-size: 14px;
  line-height: 1.6;
}

/* ──────────────────────────────────────────────────────────────────────────────
   LOGIN TYPE TOGGLE
   ────────────────────────────────────────────────────────────────────────────── */

.login-type-toggle {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}

.login-type-toggle a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  background: var(--white-color);
  color: var(--gray-text);
  border: 1.5px solid rgba(51, 65, 122, 0.15);
  font-size: 12.5px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  min-height: 44px;
}

.login-type-toggle a:hover {
  transform: translateY(-2px);
  border-color: var(--secondary-color);
  background: #fffbf7;
  box-shadow: var(--shadow-md);
}

.login-type-toggle a.active {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--white-color);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(0, 9, 79, 0.18);
}

/* ──────────────────────────────────────────────────────────────────────────────
   LOGIN VISUAL (Background Image)
   ────────────────────────────────────────────────────────────────────────────── */

.login-visual {
  flex: 1;
  height: 600px;
  overflow: hidden;
  z-index: 0;
}

.login-visual-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.95;
  border-radius: 0 32px 32px 0;
  box-shadow: none;
}

/* ──────────────────────────────────────────────────────────────────────────────
   ALERT MESSAGE
   ────────────────────────────────────────────────────────────────────────────── */

.alert {
  padding: 14px 16px;
  margin-bottom: 24px;
  border-radius: 16px;
  border: 1px solid rgba(229, 57, 53, 0.2);
  background: #fff1f2;
  color: #c53030;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  animation: slideDown 0.3s ease-out;
}

.alert i {
  font-size: 16px;
  flex-shrink: 0;
}

.alert-danger {
  background: #fff1f2;
  border-color: rgba(229, 57, 53, 0.2);
  color: #c53030;
}

/* ──────────────────────────────────────────────────────────────────────────────
   FORM SECTION
   ────────────────────────────────────────────────────────────────────────────── */

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-text);
  letter-spacing: 0.3px;
}

.input-wrap {
  position: relative;
}

.input-wrap i {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: var(--gray-text);
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}

.input-wrap input {
  width: 100%;
  padding: 12px 44px 12px 44px;
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  background: var(--light-bg);
  color: var(--dark-text);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  line-height: 1.5;
  min-height: 46px;
}

.input-wrap input::placeholder {
  color: rgba(92, 106, 157, 0.6);
}

.input-wrap input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--white-color);
  box-shadow: 0 0 0 4px rgba(0, 9, 79, 0.08);
}

/* ──────────────────────────────────────────────────────────────────────────────
   PASSWORD TOGGLE BUTTON
   ────────────────────────────────────────────────────────────────────────────── */

.password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--secondary-color);
  font-size: 16px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: var(--transition);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.password-toggle:hover {
  color: var(--secondary-color);
  background: rgba(245, 166, 35, 0.1);
  opacity: 1;
}

.password-toggle:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
  background: rgba(245, 166, 35, 0.1);
  opacity: 1;
}

.password-toggle:active {
  background: rgba(245, 166, 35, 0.2);
  opacity: 1;
}

.password-toggle i {
  font-size: inherit;
  color: inherit;
}

/* ──────────────────────────────────────────────────────────────────────────────
   FORM FOOTER (Remember me + Forgot Password)
   ────────────────────────────────────────────────────────────────────────────── */

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.checkbox-wrap input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--secondary-color);
  border-radius: 4px;
}

.checkbox-wrap input:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

.text-link {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.text-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.text-link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ──────────────────────────────────────────────────────────────────────────────
   SUBMIT BUTTON
   ────────────────────────────────────────────────────────────────────────────── */

.btn {
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  text-decoration: none;
  min-height: 48px;
  letter-spacing: 0.3px;
}

.btn-primary {
  color: var(--white-color);
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  box-shadow: 0 12px 32px rgba(0, 9, 79, 0.18);
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 9, 79, 0.24);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(0, 9, 79, 0.12);
}

.btn-primary:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn i {
  font-size: 16px;
}

/* ──────────────────────────────────────────────────────────────────────────────
   SECURE PANEL
   ────────────────────────────────────────────────────────────────────────────── */

.secure-panel {
  margin-top: 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(6, 24, 76, 0.08);
  border-radius: 20px;
  padding: 18px 20px;
  backdrop-filter: blur(5px);
}

.secure-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: grid;
  place-items: center;
  color: var(--white-color);
  font-size: 20px;
  flex-shrink: 0;
}

.secure-panel h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark-text);
}

.secure-panel p {
  margin: 0;
  color: var(--gray-text);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════════════════════ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤768px)
   ══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  body {
    padding: 16px;
  }
  .login-hero {
    min-height: auto;
    padding: 0;
  }
  .login-card-inner {
    padding: 32px 28px 24px;
  }
  .login-card-brand {
    grid-template-columns: 60px 1fr;
    gap: 16px;
    margin-bottom: 28px;
  }
  .brand-logo {
    width: 60px;
    height: 60px;
  }
  .brand-circle {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }
  .login-card-brand h1 {
    font-size: 28px;
  }
  .brand-subtitle {
    font-size: 13px;
  }
  .login-type-toggle {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 28px;
  }
  .login-type-toggle a {
    padding: 11px 12px;
    font-size: 12px;
    min-height: 42px;
  }
  .form-footer {
    gap: 12px;
  }
  .checkbox-wrap {
    font-size: 12.5px;
  }
  .text-link {
    font-size: 12.5px;
  }
  .secure-panel {
    padding: 16px 18px;
    gap: 14px;
    margin-top: 24px;
  }
  .secure-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  .secure-panel h3 {
    font-size: 13px;
    margin-bottom: 2px;
  }
  .secure-panel p {
    font-size: 12px;
  }
  .login-visual {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — PHONE (≤480px)
   ══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  body {
    padding: 12px;
  }
  .login-hero {
    min-height: auto;
    padding: 0;
  }
  .login-card {
    border-radius: 24px;
  }
  .login-card-inner {
    padding: 24px 20px 20px;
  }
  .login-card-brand {
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: center;
    margin-bottom: 24px;
  }
  .brand-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto;
  }
  .brand-circle {
    width: 56px;
    height: 56px;
    font-size: 26px;
    margin: 0 auto;
  }
  .brand-overline {
    font-size: 10px;
    margin-bottom: 6px;
  }
  .login-card-brand h1 {
    font-size: 24px;
    margin: 0 0 4px;
  }
  .brand-subtitle {
    font-size: 12.5px;
    margin-bottom: 0;
  }
  .login-type-toggle {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 22px;
  }
  .login-type-toggle a {
    padding: 10px 12px;
    font-size: 11.5px;
    min-height: 40px;
  }
  .login-form {
    gap: 18px;
  }
  .form-group label {
    font-size: 12.5px;
  }
  .input-wrap input {
    padding: 11px 40px 11px 40px;
    font-size: 13px;
    min-height: 44px;
  }
  .input-wrap i {
    left: 14px;
    font-size: 15px;
  }
  .password-toggle {
    right: 12px;
    padding: 5px 6px;
    font-size: 15px;
  }
  .form-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 2px;
  }
  .checkbox-wrap {
    width: 100%;
    justify-content: flex-start;
    font-size: 12.5px;
  }
  .text-link {
    width: 100%;
    text-align: center;
    font-size: 12.5px;
    padding: 8px 0;
  }
  .btn {
    padding: 12px 16px;
    font-size: 13px;
    min-height: 44px;
    gap: 8px;
  }
  .btn i {
    font-size: 15px;
  }
  .secure-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 16px;
    margin-top: 20px;
    text-align: center;
  }
  .secure-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
    margin: 0 auto;
  }
  .secure-panel h3 {
    font-size: 12.5px;
    margin-bottom: 2px;
  }
  .secure-panel p {
    font-size: 11.5px;
  }
  .alert {
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 12.5px;
    gap: 10px;
  }
  .alert i {
    font-size: 15px;
    min-width: 15px;
  }
  .login-visual {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   SMALL PHONE (≤360px)
   ══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 360px) {
  .login-card-inner {
    padding: 20px 16px 16px;
  }
  .login-card-brand {
    gap: 10px;
  }
  .brand-logo {
    width: 50px;
    height: 50px;
  }
  .brand-circle {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  .login-card-brand h1 {
    font-size: 20px;
    margin: 0;
  }
  .brand-overline {
    font-size: 9px;
  }
  .brand-subtitle {
    font-size: 11.5px;
  }
  .login-type-toggle a {
    padding: 8px 10px;
    font-size: 10px;
  }
  .input-wrap input {
    padding: 10px 38px 10px 38px;
    font-size: 12px;
  }
  .input-wrap i {
    left: 12px;
    font-size: 14px;
  }
  .password-toggle {
    right: 10px;
    padding: 4px 5px;
    font-size: 14px;
  }
  .btn {
    padding: 10px 14px;
    font-size: 12px;
    gap: 6px;
  }
  .btn i {
    font-size: 14px;
  }
  .secure-panel {
    padding: 12px 14px;
  }
  .secure-icon {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY & UTILITIES
   ══════════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(180deg, #1a2456 0%, #0f1629 55%, #1a2456 100%);
  }
  .login-card {
    background: linear-gradient(
      180deg,
      rgba(20, 30, 70, 0.95) 0%,
      rgba(20, 30, 70, 0.85) 100%
    );
    border-color: rgba(255, 255, 255, 0.08);
  }
  .login-card-brand h1 {
    color: #ffffff;
  }
  .brand-subtitle {
    color: #b0b8d4;
  }
  .login-type-toggle a {
    background: rgba(255, 255, 255, 0.05);
    color: #b0b8d4;
    border-color: rgba(255, 255, 255, 0.08);
  }
  .login-type-toggle a:hover {
    background: rgba(245, 166, 35, 0.1);
    border-color: var(--secondary-color);
  }
  .input-wrap input {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.12);
  }
  .input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.4);
  }
  .input-wrap input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--secondary-color);
  }
  .password-toggle {
    color: var(--secondary-color);
    opacity: 0.85;
  }
  .password-toggle:hover {
    color: var(--secondary-color);
    background: rgba(245, 166, 35, 0.15);
    opacity: 1;
  }
  .password-toggle:focus {
    outline-color: var(--secondary-color);
    background: rgba(245, 166, 35, 0.15);
    opacity: 1;
  }
  .password-toggle:active {
    background: rgba(245, 166, 35, 0.25);
    opacity: 1;
  }
  .brand-logo {
    background: rgba(245, 166, 35, 0.15);
    box-shadow: 0 8px 24px rgba(245, 166, 35, 0.15);
  }
  .form-group label {
    color: #ffffff;
  }
  .checkbox-wrap {
    color: #b0b8d4;
  }
  .secure-panel {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
  }
  .secure-panel h3 {
    color: #ffffff;
  }
  .secure-panel p {
    color: #b0b8d4;
  }
}

/* Focus-visible for better keyboard navigation */

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