:root {
  --primary: #0f3d5e;
  --primary-dark: #0a2d46;
  --primary-light: #eaf2f8;

  --text: #172033;
  --text-secondary: #64748b;
  --text-light: #94a3b8;

  --border: #dbe2ea;
  --background: #f5f7fa;
  --white: #ffffff;

  --success: #16a34a;
  --danger: #dc2626;

  --shadow: 0 20px 50px rgba(15, 61, 94, 0.08);

  --radius: 12px;
}

/* ================================
RESET
================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;

  background: var(--background);
  color: var(--text);

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

/* ================================
LOGIN PAGE
================================ */

.login-page {
  min-height: 100vh;

  display: grid;
  grid-template-columns: minmax(400px, 46%) 1fr;
}

/* ================================
LEFT PANEL
================================ */

.login-info {
  position: relative;

  display: flex;
  align-items: center;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(255, 255, 255, 0.08),
      transparent 35%
    ),
    linear-gradient(145deg, #0f3d5e 0%, #0b304a 55%, #08263b 100%);

  color: var(--white);
}

.login-info::before {
  content: "";

  position: absolute;

  width: 420px;
  height: 420px;

  border-radius: 50%;

  right: -200px;
  bottom: -180px;

  border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-info::after {
  content: "";

  position: absolute;

  width: 280px;
  height: 280px;

  border-radius: 50%;

  left: -150px;
  top: -130px;

  border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-info-content {
  position: relative;
  z-index: 1;

  width: 100%;
  max-width: 560px;

  padding: 60px;
}

/* ================================
BRAND
================================ */

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.12);

  border: 1px solid rgba(255, 255, 255, 0.14);

  font-size: 21px;
  font-weight: 700;
}

.brand-name {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.2px;
}

/* ================================
INFORMATION
================================ */

.info-content {
  margin-top: 180px;
}

.info-label {
  display: inline-block;

  margin-bottom: 20px;

  font-size: 11px;
  font-weight: 700;

  letter-spacing: 1.6px;

  color: rgba(255, 255, 255, 0.65);
}

.info-content h1 {
  max-width: 500px;

  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.08;

  letter-spacing: -2px;

  font-weight: 400;
}

.info-content h1 strong {
  display: block;

  font-weight: 700;
}

.info-content p {
  max-width: 470px;

  margin-top: 26px;

  font-size: 16px;
  line-height: 1.7;

  color: rgba(255, 255, 255, 0.7);
}

/* ================================
INFO FOOTER
================================ */

.info-footer {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-top: 100px;

  font-size: 12px;

  color: rgba(255, 255, 255, 0.45);
}

.separator {
  opacity: 0.5;
}

/* ================================
RIGHT PANEL
================================ */

.login-panel {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 40px;

  background: var(--white);
}

.login-container {
  width: 100%;
  max-width: 430px;
}

/* ================================
MOBILE BRAND
================================ */

.mobile-brand {
  display: none;
}

/* ================================
HEADER
================================ */

.login-header {
  margin-bottom: 38px;
}

.login-header h2 {
  font-size: 32px;
  line-height: 1.2;

  letter-spacing: -0.8px;

  font-weight: 700;
}

.login-header p {
  margin-top: 10px;

  color: var(--text-secondary);

  font-size: 14px;
  line-height: 1.6;
}

/* ================================
FORM
================================ */

.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 23px;
}

.form-group label {
  display: block;

  margin-bottom: 9px;

  font-size: 13px;
  font-weight: 600;

  color: var(--text);
}

.password-label {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 9px;
}

.password-label label {
  margin-bottom: 0;
}

.forgot-password {
  font-size: 12px;

  color: var(--primary);

  text-decoration: none;

  font-weight: 600;
}

.forgot-password:hover {
  text-decoration: underline;
}

/* ================================
INPUT
================================ */

.input-wrapper {
  position: relative;

  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  height: 50px;

  padding: 0 48px 0 44px;

  border: 1px solid var(--border);
  border-radius: 9px;

  outline: none;

  background: var(--white);

  color: var(--text);

  font-size: 14px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.input-wrapper input::placeholder {
  color: var(--text-light);
}

.input-wrapper input:hover {
  border-color: #c5ced9;
}

.input-wrapper input:focus {
  border-color: var(--primary);

  box-shadow: 0 0 0 3px rgba(15, 61, 94, 0.09);
}

.input-icon {
  position: absolute;

  left: 15px;

  width: 18px;
  height: 18px;

  fill: none;

  stroke: #94a3b8;

  stroke-width: 1.8;

  pointer-events: none;
}

.input-wrapper input:focus ~ .input-icon {
  stroke: var(--primary);
}

/* ================================
PASSWORD
================================ */

.password-toggle {
  position: absolute;

  right: 12px;

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;

  background: transparent;

  cursor: pointer;

  border-radius: 6px;
}

.password-toggle:hover {
  background: #f1f5f9;
}

.password-toggle svg {
  width: 18px;
  height: 18px;

  fill: none;

  stroke: #64748b;

  stroke-width: 1.8;
}

/* ================================
ERRORS
================================ */

.field-error {
  display: block;

  min-height: 0;

  margin-top: 6px;

  color: var(--danger);

  font-size: 12px;
}

.login-error {
  display: none;

  margin-bottom: 18px;

  padding: 11px 13px;

  border-radius: 8px;

  background: #fef2f2;

  border: 1px solid #fecaca;

  color: #b91c1c;

  font-size: 13px;

  line-height: 1.5;
}

.login-error.show {
  display: block;
}

/* ================================
OPTIONS
================================ */

.form-options {
  margin: 3px 0 24px;
}

.checkbox-container {
  display: inline-flex !important;
  align-items: center;

  gap: 9px;

  margin: 0 !important;

  cursor: pointer;

  font-size: 13px !important;
  font-weight: 400 !important;

  color: var(--text-secondary) !important;
}

.checkbox-container input {
  position: absolute;

  opacity: 0;

  pointer-events: none;
}

.custom-checkbox {
  width: 17px;
  height: 17px;

  display: inline-flex;

  align-items: center;
  justify-content: center;

  border: 1px solid #cbd5e1;

  border-radius: 4px;

  transition: 0.2s ease;
}

.checkbox-container input:checked + .custom-checkbox {
  background: var(--primary);

  border-color: var(--primary);
}

.checkbox-container input:checked + .custom-checkbox::after {
  content: "";

  width: 8px;
  height: 4px;

  border-left: 2px solid white;
  border-bottom: 2px solid white;

  transform: rotate(-45deg) translateY(-1px);
}

/* ================================
BUTTON
================================ */

.login-button {
  width: 100%;
  height: 50px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 9px;

  background: var(--primary);

  color: var(--white);

  font-size: 14px;
  font-weight: 650;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.1s ease,
    box-shadow 0.2s ease;
}

.login-button:hover {
  background: var(--primary-dark);

  box-shadow: 0 7px 18px rgba(15, 61, 94, 0.18);
}

.login-button:active {
  transform: translateY(1px);
}

.login-button:disabled {
  cursor: not-allowed;

  opacity: 0.75;

  box-shadow: none;
}

/* ================================
LOADER
================================ */

.button-loader {
  display: none;

  width: 18px;
  height: 18px;

  margin-left: 10px;

  border: 2px solid rgba(255, 255, 255, 0.35);

  border-top-color: white;

  border-radius: 50%;

  animation: spin 0.7s linear infinite;
}

.login-button.loading .button-loader {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================================
FOOTER
================================ */

.login-footer {
  margin-top: 40px;

  text-align: center;
}

.login-footer p {
  color: var(--text-light);

  font-size: 11px;

  line-height: 1.5;
}

/* ================================
RESPONSIVE
================================ */

@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-info {
    display: none;
  }

  .login-panel {
    min-height: 100vh;

    padding: 30px 24px;
  }

  .mobile-brand {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    margin-bottom: 70px;

    color: var(--primary);

    font-size: 18px;
    font-weight: 700;
  }

  .mobile-brand .brand-icon {
    width: 38px;
    height: 38px;

    background: var(--primary-light);

    border: 0;

    color: var(--primary);
  }
}

@media (max-width: 480px) {
  .login-panel {
    padding: 24px 20px;
  }

  .mobile-brand {
    margin-bottom: 55px;
  }

  .login-header h2 {
    font-size: 28px;
  }

  .login-header {
    margin-bottom: 30px;
  }

  .password-label {
    align-items: flex-start;

    gap: 10px;
  }

  .forgot-password {
    white-space: nowrap;
  }
}
