/* ==========================================================================
   TuniBill - Login (reference style: royal-blue split background,
   white card, form left + illustration panel right)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --rl-blue: #2f4bff;
  --rl-blue-dark: #2340e6;
  --rl-bg-bottom: #dce3fb;
  --rl-panel: #f2f5fd;
  --rl-input: #eef1f7;
  --rl-ink: #101331;
  --rl-muted: #8a8fa3;
  --rl-border: #e3e8f5;
  --rl-danger: #c53030;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: linear-gradient(to bottom, var(--rl-blue) 0%, var(--rl-blue) 45%, var(--rl-bg-bottom) 45%, var(--rl-bg-bottom) 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px 28px;
}

/* Card */
.rl-card {
  display: flex;
  width: 920px;
  max-width: 96vw;
  min-height: 560px;
  background: #ffffff;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(23, 43, 180, 0.35);
  animation: rl-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rl-rise {
  from { opacity: 0; transform: translateY(22px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Left : form */
.rl-form-side {
  flex: 1 1 46%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 52px 54px;
}

.rl-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.rl-logo img {
  width: 190px;
  height: auto;
  object-fit: contain;
}

.rl-title {
  color: var(--rl-ink);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.3px;
  text-align: center;
  margin-bottom: 30px;
}

.rl-field { margin-bottom: 18px; }

.rl-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #9aa0b4;
  margin-bottom: 7px;
}

.rl-input {
  width: 100%;
  height: 46px;
  background: var(--rl-input);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: var(--rl-ink);
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rl-input::placeholder { color: #b6bccf; font-weight: 400; }

.rl-input:focus {
  background: #ffffff;
  border-color: var(--rl-blue);
  box-shadow: 0 0 0 3px rgba(47, 75, 255, 0.15);
}

.rl-input.is-invalid {
  border-color: var(--rl-danger);
  box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.12);
}

.rl-password-wrap { position: relative; }

.rl-password-wrap .rl-input { padding-right: 44px; }

.rl-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9aa0b4;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
}

.rl-eye:hover { color: var(--rl-blue); background: #e4e9fb; }

.rl-eye svg { width: 18px; height: 18px; }

.rl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
}

.rl-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #9aa0b4;
  cursor: pointer;
  user-select: none;
}

.rl-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--rl-blue);
  cursor: pointer;
}

.rl-forgot {
  font-size: 12px;
  font-weight: 500;
  color: #9aa0b4;
  text-decoration: none;
  transition: color 0.2s ease;
}

.rl-forgot:hover { color: var(--rl-blue); }

.rl-submit {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--rl-blue);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(47, 75, 255, 0.35);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.rl-submit:hover {
  background: var(--rl-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(47, 75, 255, 0.42);
}

.rl-submit:active { transform: translateY(0); }

.rl-error {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--rl-danger);
  margin-top: 6px;
  animation: rl-fade 0.3s ease;
}

@keyframes rl-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.rl-signup {
  margin-top: 26px;
  text-align: center;
  font-size: 12px;
  color: #9aa0b4;
}

.rl-signup a {
  color: var(--rl-blue);
  font-weight: 600;
  text-decoration: none;
}

.rl-signup a:hover { text-decoration: underline; }

/* Right : visual panel */
.rl-visual-side {
  flex: 1 1 54%;
  background: var(--rl-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 42px;
}

.rl-art {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin-bottom: 26px;
}

.rl-visual-title {
  color: var(--rl-ink);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.2px;
  margin-bottom: 10px;
  min-height: 26px;
}

.rl-visual-text {
  color: #9aa0b4;
  font-size: 12.5px;
  line-height: 1.65;
  max-width: 330px;
  margin-bottom: 22px;
  min-height: 42px;
}

.rl-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rl-dot {
  width: 26px;
  height: 4px;
  border: 0;
  border-radius: 4px;
  background: #d4dbf1;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, width 0.25s ease;
}

.rl-dot.active { background: var(--rl-blue); }

/* Copyright under card */
.rl-copyright {
  margin-top: 22px;
  font-size: 12px;
  font-weight: 500;
  color: #7c86a8;
}

/* Responsive */
@media (max-width: 860px) {
  body { padding: 24px 12px; }

  .rl-card {
    flex-direction: column;
    min-height: 0;
    border-radius: 22px;
  }

  .rl-form-side { padding: 40px 28px; }

  .rl-visual-side { padding: 36px 26px; }

  .rl-art { max-width: 320px; }
}
