.rekha-auth-container {
  padding: 40px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  background: var(--bot-bubble-bg)
}
.rekha-logo {
  margin: 0 auto 15px auto; /* Adjusted margin for spacing */
  display: flex;
  justify-content: center;
  align-items: center;
}

.rekha-title {
  margin-bottom: 25px;
}
.rekha-title h1 {
  font-size: 2rem;
  margin: 10px 0 0 0;
  letter-spacing: 0px;
  color: var(--primary-color);
}
.rekha-title p {
  color: var(--text-secondary-color);
  margin: 5px 0 0 0;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* --- NEW BRUTALIST BUTTON LOGO STYLES (DIKECILKAN 25%) --- */
.brutalist-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 107px; /* DIUBAH: 142px -> 107px */
  height: 107px; /* DIUBAH: 142px -> 107px */
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.button-2 {
  background-color: #fff;
  border-radius: 8px;
  padding: 10px; /* DIUBAH: Disesuaikan */
  transition: all 0.3s ease;
}
.button-2::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -150%;
  width: 300%;
  height: 300%;
  background-color: var(--primary-color);
  border-radius: 50%;
  transform: translateX(-50%) scale(0);
  transition: transform 0.5s ease-out;
  z-index: 0;
}
.button-2:hover::before {
  transform: translateX(-50%) scale(1);
}
.button-2::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 150%;
  height: 150%;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 75%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  pointer-events: none;
  opacity: 0;
}
.button-2:hover {
  color: var(--user-bubble-text);
}
.button-2:hover::after {
  animation: glassPass 0.8s ease-in-out 0.5s forwards;
}
@keyframes glassPass {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    opacity: 0.7;
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
    opacity: 0;
  }
}
.button-2 .openai-logo,
.button-2 .button-text {
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}
.openai-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.openai-icon {
  width: 90px; /* DIUBAH: 70px -> 52px */
  height: 90px; /* DIUBAH: 70px -> 52px */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.openai-icon path {
  fill: var(--primary-color);
  transition: fill 0.3s ease;
}
.brutalist-button:hover .openai-icon path {
  fill: var(--user-bubble-text);
}
.txt-front {
  color: inherit;
  margin-top: 11px; /* DIUBAH: 15px -> 11px */
  font-weight: bold;
  font-size: 19px; /* DIUBAH: 25px -> 19px */
}
.button-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  color: inherit;
}
.button-text span:first-child {
  font-size: 12px; /* DIUBAH: 16px -> 12px */
  font-weight: normal;
}
.button-text span:last-child {
  font-size: 15px; /* DIUBAH: 20px -> 15px */
}
.brutalist-button:hover .openai-logo {
  transform: translateY(-5px); /* DIUBAH: Disesuaikan */
}
.brutalist-button:hover .openai-icon {
  width: 30px; /* DIUBAH: 40px -> 30px */
  height: 30px; /* DIUBAH: 40px -> 30px */
  animation: spin-and-zoom 2s cubic-bezier(0.25, 0.8, 0.25, 1) infinite;
}
.brutalist-button:hover .button-text {
  opacity: 1;
  max-height: 45px; /* DIUBAH: 60px -> 45px */
  margin-top: 8px;
}
.brutalist-button:hover .txt-front {
  display: none;
}
@keyframes spin-and-zoom {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}
.brutalist-button:active .openai-icon,
.brutalist-button:active .button-text {
  transform: scale(0.85);
}
/* --- END OF NEW LOGO STYLES --- */

.auth-tabs {
  display: flex;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}
.auth-tab {
  flex: 1;
  padding: 12px;
  background-color: var(--card-bg);
  color: var(--text-secondary-color);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.auth-tab:not(:last-child) {
  border-right: 1.5px solid var(--border-color);
}
.auth-tab.active {
  background-color: var(--primary-color);
  color: white;
}

/* DIUBAH: Logika transisi untuk form login/signup */
.auth-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  transition: opacity 0.2s ease-out, max-height 0.4s ease-in-out, visibility 0s 0.4s;
}
.auth-content.active {
  max-height: 1000px; /* Nilai yang cukup besar untuk menampung form terpanjang */
  opacity: 1;
  visibility: visible;
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in 0.2s, visibility 0s;
}

.auth-form .form-group {
  margin-bottom: 15px;
}
.auth-form label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 5px;
  display: block;
  margin-top: 10px;
  text-align: center;
}
.auth-form .input-wrapper {
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  transition: 0.2s ease-in-out;
  background-color: #fdfdfd;
}
.auth-form .input-wrapper:focus-within {
  border-color: var(--primary-color);
}
.auth-form .form-control {
  border: none;
  width: 100%;
  height: 100%;
  background: none;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: var(--text-color);
  text-align: center;
}
.auth-form .form-control:focus {
  outline: none;
}
.auth-form input[type='date'] {
  text-align: center;
  padding: 0 10px;
} /* Specific style for date input */

.rekha-btn {
  margin-top: 10px;
  background-color: var(--primary-color);
  border: none;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  height: 45px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, transform 0.1s ease;
}
.rekha-btn:hover {
  background-color: var(--primary-hover-color);
}
.rekha-btn:active {
  /* DITAMBAHKAN: Efek tombol ditekan */
  transform: scale(0.98);
}
.rekha-btn:disabled {
  background-color: var(--disabled-bg);
  cursor: not-allowed;
  transform: scale(1);
}
.rekha-btn.rekha-btn-secondary {
  background-color: var(--card-bg);
  color: var(--primary-color);
  border: 1.5px solid var(--primary-color);
}
.rekha-btn.rekha-btn-secondary:hover {
  background-color: #fff8f0;
}
.rekha-btn.rekha-btn-outline {
  background-color: var(--card-bg);
  color: var(--primary-color);
  border: 1.5px solid var(--primary-color);
  margin-top: 10px;
  height: 50px;
}
.rekha-btn.rekha-btn-outline:hover {
  background-color: #fff8f0;
}

.rekha-btn.rekha-btn-help {
  background-color: #198754;
  margin-top: 20px;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 55px;
  font-size: 0.8rem;
  padding: 5px;
}
.rekha-btn.rekha-btn-help:hover {
  background-color: #157347;
}

.login-forms {
  border: 1px solid var(--disabled-bg);
  border-radius: 10px;
  padding: 10px;
  background: var(--bot-bubble-bg);
}

.auth-message {
  font-size: 0.9rem;
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  min-height: 1.2em;
  text-align: center;
  /* DITAMBAHKAN: Transisi */
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
  display: none; /* DIUBAH: Dari 'contents' menjadi 'none' agar bisa disembunyikan */
}
.auth-message.success,
.auth-message.error,
.auth-message.info {
  opacity: 1;
  transform: translateY(0);
}
.auth-message.success {
  color: var(--success-color);
  border-color: var(--success-color);
  background-color: #f0fff4;
}
.auth-message.error {
  color: var(--error-color);
  border-color: var(--error-color);
  background-color: #fff5f5;
}
/* DITAMBAHKAN: Style untuk pesan info (seperti "memproses...") */
.auth-message.info {
  color: #333;
  border-color: #ddd;
  background-color: #f8f9fa;
}
.auth-message:not(:empty) {
  display: block;
}

.file-upload-label {
  display: block;
  background-color: #fdfdfd;
  color: var(--text-secondary-color);
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  margin-top: 5px;
  transition: border-color 0.2s, background-color 0.2s;
  /* DITAMBAHKAN: untuk menangani nama file yang panjang */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-upload-label:hover {
  background-color: #f8f9fa;
  border-color: var(--primary-color);
}
input[type='file'] {
  display: none;
}
.file-upload-helper {
  font-size: 0.8rem;
  color: var(--text-secondary-color);
  text-align: center;
  margin-top: 5px;
}
.rekha-back-link {
  margin-top: 15px;
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text-secondary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}
.rekha-back-link:hover {
  color: var(--primary-color);
}

.privacy-policy-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  margin-bottom: 5px;
}
.privacy-policy-group label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary-color);
  text-align: left;
}
.privacy-policy-group a {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
}
.privacy-policy-group input[type='checkbox'] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .rekha-chat-container {
    height: var(--app-height, 100dvh); /* dynamic height via JS */
    max-height: none;
    border-radius: 0;
  }
}
