
/* ==========================================
   TAMPILKAN. BERITA
   PENULIS - AUTHENTICATION PAGE
   FULL FIX STYLE.CSS
========================================== */

/* VARIABLES */

:root {
  --primary: #f3653b;
  --primary-hover: #e6532b;

  --navy: #172438;
  --navy-hover: #24354c;

  --background: #ffffff;
  --surface: #ffffff;
  --soft: #fff3ed;

  --text: #172438;
  --muted: #718096;
  --border: #e5eaf0;

  --success: #15803d;
  --danger: #dc2626;
}

/* ==========================================
   RESET
========================================== */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;

  min-height: 100vh;
  min-height: 100dvh;

  padding: 24px 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-family: "DM Sans", sans-serif;

  background: var(--background);
  color: var(--text);

  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================
   AUTH CARD
========================================== */

.auth-card {
  position: relative;

  width: 100%;
  max-width: 460px;

  padding: 42px;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: 20px;

  box-shadow:
    0 18px 55px rgba(23, 36, 56, 0.065),
    0 3px 12px rgba(23, 36, 56, 0.025);
}


/* ==========================================
   BRAND
========================================== */

.brand {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;

  margin: 0 0 13px;

  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 29px;
  font-weight: 800;

  letter-spacing: -1.6px;
  line-height: 1.4;

  color: var(--navy);
}

.brand-main {
  color: var(--navy);
}

.brand .brand-accent {
  color: var(--primary);
}

.brand-service {
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -1.2px;
}

/* DESCRIPTION */

.subtitle {
  max-width: 350px;

  margin: 0 0 31px;

  font-size: 14px;
  font-weight: 400;
  line-height: 1.85;

  color: var(--muted);
}


/* ==========================================
   LOGIN / REGISTER TABS
========================================== */

.tabs {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 5px;

  padding: 5px;
  margin-bottom: 30px;

  background: #f4f6f9;

  border: 1px solid #edf0f4;
  border-radius: 12px;
}

.tab {
  min-height: 44px;

  padding: 11px 14px;

  background: transparent;
  color: var(--muted);

  border: none;
  border-radius: 9px;

  font-size: 13px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.tab:hover {
  color: var(--primary);
}

.tab.active {
  background: #ffffff;
  color: var(--primary);

  box-shadow:
    0 2px 9px rgba(23, 36, 56, 0.07);
}

/* ==========================================
   FORM
========================================== */

#authForm {
  width: 100%;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;

  margin-bottom: 9px;

  color: var(--navy);

  font-size: 13px;
  font-weight: 700;
}

/* INPUT */

.field input {
  display: block;

  width: 100%;
  height: 50px;

  padding: 0 15px;

  background: #ffffff;
  color: var(--text);

  border: 1px solid var(--border);
  border-radius: 10px;

  outline: none;

  font-size: 14px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field input::placeholder {
  color: #9aa5b5;
}

.field input:hover {
  border-color: #cbd5e1;
}

.field input:focus {
  border-color: var(--primary);

  box-shadow:
    0 0 0 3px rgba(243, 101, 59, 0.10);
}

/* ==========================================
   SUBMIT BUTTON
========================================== */

.submit {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 51px;

  margin-top: 9px;
  padding: 13px 20px;

  background: var(--primary);
  color: #ffffff;

  border: none;
  border-radius: 10px;

  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.submit:hover:not(:disabled) {
  background: var(--primary-hover);

  box-shadow:
    0 5px 14px rgba(243, 101, 59, 0.20);
}

.submit:active:not(:disabled) {
  transform: scale(0.99);
}

.submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ==========================================
   FOOTER
========================================== */

.footer {
  margin-top: 29px;
  padding-top: 22px;

  border-top: 1px solid var(--border);

  text-align: center;

  color: var(--muted);

  font-size: 12px;
  line-height: 1.7;
}

.footer a {
  color: var(--primary);

  font-weight: 800;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ==========================================
   ACCESSIBILITY
========================================== */

.tab:focus-visible,
.submit:focus-visible,
.footer a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* HIDDEN ELEMENTS */

[hidden] {
  display: none !important;
}

/* ==========================================
   CUSTOM TOAST NOTIFICATION
========================================== */

.custom-toast {
  position: fixed;

  top: 24px;
  right: 24px;

  z-index: 9999;

  width: max-content;
  max-width: min(390px, calc(100vw - 32px));

  padding: 15px 20px;

  background: var(--navy);
  color: #ffffff;

  border-radius: 12px;

  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;

  box-shadow:
    0 12px 35px rgba(23, 36, 56, 0.18);

  opacity: 0;
  visibility: hidden;

  transform: translateY(-12px);

  pointer-events: none;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease;
}

/* VISIBLE TOAST */

.custom-toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* SUCCESS */

.custom-toast.success {
  background: var(--success);
}

/* ERROR */

.custom-toast.error {
  background: var(--danger);
}

/* INFO */

.custom-toast.info {
  background: var(--primary);
}

/* ==========================================
   RESPONSIVE - TABLET
========================================== */

@media (max-width: 768px) {
  .auth-card {
    padding: 34px;
  }
}

/* ==========================================
   RESPONSIVE - MOBILE
========================================== */

@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .auth-card {
    padding: 30px 23px;
    border-radius: 17px;
  }

  .brand {
    font-size: 25px;
  }

  .subtitle {
    font-size: 13px;
    margin-bottom: 25px;
  }

  .tabs {
    margin-bottom: 25px;
  }

  .field {
    margin-bottom: 18px;
  }

  .field input {
    height: 48px;
  }

  .submit {
    min-height: 49px;
  }

  .custom-toast {
    top: 16px;
    left: 16px;
    right: 16px;

    width: auto;
    max-width: none;
  }
}

/* ==========================================
   REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ==========================================
   PASSWORD VISIBILITY - EYE ICON 2D
========================================== */

.password-input-wrap {
  position: relative;
  width: 100%;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);

  display: flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;
  padding: 0;

  background: transparent;
  border: none;
  border-radius: 7px;
  box-shadow: none;

  color: #718096;
  cursor: pointer;

  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--primary);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.password-toggle svg {
  display: block;
  width: 20px;
  height: 20px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.password-toggle svg[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  .password-toggle {
    right: 10px;
  }
}

/* ==========================================
   FORGOT PASSWORD
========================================== */

.forgot-password {
  display: flex;
  justify-content: flex-end;

  margin-top: -7px;
  margin-bottom: 22px;
}

.forgot-password a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;

  transition: color 0.2s ease;
}

.forgot-password a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.forgot-password a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ==========================================
   FORGOT PASSWORD PAGE
========================================== */

.reset-title {
  margin: 8px 0 12px;

  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.7px;

  color: var(--navy);
}

.reset-success {
  padding: 8px 0 0;
  text-align: center;
}

.reset-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 54px;
  height: 54px;

  margin: 0 auto 18px;

  background: #ecfdf3;
  color: var(--success);

  border-radius: 50%;

  font-size: 26px;
  font-weight: 700;
}

.reset-success h2 {
  margin: 0 0 12px;

  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 19px;
  font-weight: 800;

  color: var(--navy);
}

.reset-success p {
  margin: 0;

  font-size: 13px;
  line-height: 1.8;

  color: var(--muted);
}

.reset-resend {
  margin-top: 20px;
  padding: 10px 18px;

  background: var(--soft);
  color: var(--primary);

  border: none;
  border-radius: 9px;

  font-size: 13px;
  font-weight: 700;

  cursor: pointer;
}

.reset-resend:hover {
  background: #ffe5d9;
}

@media (max-width: 480px) {
  .reset-title {
    font-size: 21px;
  }
}

/* ==========================================
   RESET PASSWORD PAGE
========================================== */

.reset-status {
  padding: 15px 16px;
  margin-top: 8px;

  background: #f4f6f9;
  color: var(--muted);

  border-radius: 10px;

  font-size: 13px;
  line-height: 1.8;
  text-align: center;
}

.reset-login-link {
  text-decoration: none;
}

.reset-login-link:hover {
  color: #ffffff;
}
