:root{
  --brand:#f28c1d;
  --brand-600:#e07f10;
  --brand-700:#c96f0c;
  --bg:#0b1220;
  --card-bg:#ffffff;
  --text:#0f172a;
  --muted:#6b7280;
  --border:#e5e7eb;
  --ring:#cbd5e1;
  --error:#b91c1c;
  --success:#059669;
}

.auth-wrapper{
  min-height: 70vh;
  display:flex;
  flex-direction:column;
}

.auth-hero{
  position:relative;
  height:120px; /* was 140 */
  background: radial-gradient(1200px 280px at 50% -80px, rgba(242,140,29,.25), transparent 60%),
              linear-gradient(180deg, #fff, #fff);
}
@media (min-width: 768px){
  .auth-hero{ height: 160px; } /* was 180 */
}

.auth-container{
  display:flex;
  justify-content:center;
  padding: 1.5rem;
  margin-top: -80px; /* was -100 */
  z-index: 9;
}
@media (min-width: 768px){
  .auth-container{ margin-top: -100px; padding: 2rem; } /* was -130 */
}

.auth-card{
  width:100%;
  max-width: 520px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(2,8,23,.08);
  padding: 1.25rem;
}
@media (min-width: 640px){
  .auth-card{ padding: 1.75rem; }
}
/* Lebarkan kartu di desktop agar form tidak panjang ke bawah */
@media (min-width: 1024px){
  .auth-card{ max-width: 1060px; }
}

.auth-card__header h1{
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  line-height: 1.2;
  margin: 0 0 .25rem 0;
  color: var(--text);
  font-weight: 700;
}
.auth-card__header .subtitle{
  margin: 0 0 1rem 0;
  color: var(--muted);
}

.auth-form .field{
  margin-bottom: 1rem;
}
.auth-form label{
  display:block;
  font-size: .9rem;
  color: var(--text);
  margin: 0 0 .4rem 0;
  font-weight: 600;
}

/* Grid 2 kolom di desktop */
.auth-form{
  display: block;
}
@media (min-width: 1024px){
  .auth-form{
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 12px;
  }
  .auth-form .field{ margin-bottom: 0; }
  .auth-form .field--full{ grid-column: 1 / -1; }

  /* Helper posisi kolom */
  .auth-form .field--col-1{ grid-column: 1; }
  .auth-form .field--col-2{ grid-column: 2; }
}

/* Kontainer satu grid-item untuk beberapa field (agar berurutan rapat) */
.auth-form .field-group{
  display: flex;
  flex-direction: column;
  gap: 12px; /* jarak antar field di dalam group */
}
@media (min-width: 1024px){
  .auth-form .field-group.field--col-2{ grid-column: 2; }
}

.input{
  position: relative;
  display:flex;
  align-items:center;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: .5rem .75rem;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus-within{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 28%, transparent);
}

.input .icon{
  width: 20px;
  height: 20px;
  fill: #94a3b8;
  flex: 0 0 auto;
}
.input input{
  border: none;
  outline: none;
  width: 100%;
  font-size: 1rem;
  padding: .5rem .5rem .5rem .6rem;
  background: transparent;
  color: var(--text);
}
.input.with-icon input{
  padding-left: .6rem;
}
.btn-ghost{
  border: none;
  background: transparent;
  padding: .25rem;
  margin-left: .25rem;
  cursor: pointer;
  border-radius: 8px;
  color: var(--muted);
  font-size: 1.2rem;
}
.btn-ghost:hover{
  background: #f3f4f6;
  color: var(--text);
}
.btn-ghost .icon{
  width: 20px; height: 20px; fill: #64748b;
}

.form-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: .75rem;
  margin: .25rem 0 1rem;
}

.otp-verify{
  display:flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  flex-wrap:nowrap;
  margin-top: .5rem;
}
.otp-verify input.otp-digit{
  max-width: 48px;
}
.otp-verify .btn{
  white-space: nowrap;
  width: auto;
  padding: .7rem 1rem;
  font-size: .9rem;
}
.otp-verify #otp-status{
  font-size: .85rem;
  width: 100%;
  margin-top: 0;
}

.text-muted{
  color: var(--muted);
}
.checkbox{
  display:flex; align-items:center; gap:.5rem; cursor: pointer; user-select:none;
}
.checkbox input{ width: 16px; height: 16px; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: .5rem;
  width:100%;
  line-height: 1;
  padding: .9rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform .02s ease, background-color .2s ease, box-shadow .2s ease;
}
.btn:active{ transform: translateY(1px); }

.btn-icon{
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* WhatsApp button styling */
#btn-send-otp{
  padding: .8rem .9rem;
  font-size: .95rem;
}
#btn-send-otp:hover .btn-icon{
  color: #25d366;
}

.btn-primary{
  color: #fff;
  background: var(--brand);
  box-shadow: 0 6px 16px color-mix(in oklab, var(--brand) 35%, transparent);
}
.btn-primary:hover{ background: var(--brand-600); }
.btn-primary:disabled{
  opacity: .85; cursor:not-allowed; box-shadow: none;
}

.btn-secondary{
  color: var(--brand);
  background: #fff;
  border: 2px solid var(--brand);
  box-shadow: 0 2px 8px color-mix(in oklab, var(--brand) 15%, transparent);
}
.btn-secondary:hover{ 
  background: color-mix(in oklab, var(--brand) 8%, #fff); 
}
.btn-secondary:disabled{
  opacity: .85; cursor:not-allowed; box-shadow: none;
}

.btn-spinner{
  display:inline-block;
  inline-size: 18px; block-size: 18px;
  border: 2px solid rgba(255,255,255,.6);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-right: .25rem;
  visibility: hidden;
}
@keyframes spin{ to{ transform: rotate(360deg); } }
@keyframes slideDown{ 
  from { 
    opacity: 0; 
    transform: translateY(-10px); 
  } 
  to { 
    opacity: 1; 
    transform: translateY(0); 
  } 
}

.alert{
  margin-top: .85rem;
  border-radius: 12px;
  padding: .8rem .9rem;
  font-size: .95rem;
  display: none;
}
.alert[hidden]{ display: none !important; }
.alert.error{
  display: block;
  color: #fff;
  background: color-mix(in oklab, var(--error) 92%, black 0%);
}

.auth-card__footer{
  margin-top: 1rem;
  text-align: center;
  color: var(--muted);
}
.auth-card__footer .link{ color: var(--brand-700); text-decoration: none; }
.auth-card__footer .link:hover{ text-decoration: underline; }

.link{
  color: var(--brand-700);
  text-decoration: none;
}
.link:hover{ text-decoration: underline; }

/* Location Controls - Responsive Layout */
.location-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.location-controls #btn-detect-location {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  width: 100%;
}

.location-controls #btn-detect-location .btn-icon {
  flex-shrink: 0;
}

.location-controls #pac-container {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.location-controls #pac-container input {
  width: 100%;
}

/* Desktop: Side by side */
@media (min-width: 768px) {
  .location-controls {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .location-controls #btn-detect-location {
    flex-shrink: 0;
    width: auto;
  }
  
  .location-controls #pac-container {
    width: auto;
  }
}

/* Map */
.map{
  width:100%;
  height: 250px;
  border-radius:12px;
  border:1px solid var(--border);
  margin-top:.4rem;
  overflow:hidden;
}
@media (min-width: 1024px){
  .map{ height: 350px; }
}

/* Radio Button Styles */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.radio {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  position: relative;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.radio:hover {
  border-color: var(--brand);
  background: rgba(242, 140, 29, 0.02);
}

.radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  margin-right: 0.75rem;
  transition: all 0.2s ease;
}

.radio-indicator::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  transform: translate(-50%, -50%) scale(0);
  transition: all 0.2s ease;
}

.radio input[type="radio"]:checked + .radio-indicator {
  border-color: var(--brand);
}

.radio input[type="radio"]:checked + .radio-indicator::after {
  transform: translate(-50%, -50%) scale(1);
}

.radio input[type="radio"]:checked ~ .radio-content {
  color: var(--brand);
}

.radio-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.radio-content .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.radio-content div {
  flex: 1;
}

.radio-content span {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.radio-content small {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Field Help Text */
.field-help {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Text Muted */
.text-muted {
  color: var(--muted);
}

/* Checkbox Group */
.checkbox-group {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  line-height: 1.6;
  font-size: 0.9rem;
  margin: 0;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  margin-top: 2px;
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-custom {
  display: none;
}

.checkbox-text {
  flex: 1;
  color: #374151;
  font-weight: 500;
}

.checkbox-text .link {
  color: var(--brand);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.checkbox-text .link:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

/* Account Deletion Specific Styling */
.deletion-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 640px) {
  .deletion-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.deletion-info-card {
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid;
}

.deletion-info-card--danger {
  background: #fef2f2;
  border-color: #fca5a5;
}

.deletion-info-card--success {
  background: #f0fdf4;
  border-color: #86efac;
}

.deletion-info-card h3 {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.deletion-info-card--danger h3 {
  color: #dc2626;
}

.deletion-info-card--success h3 {
  color: #059669;
}

.deletion-info-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.deletion-info-card li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.deletion-info-card li:last-child {
  margin-bottom: 0;
}

.deletion-info-card .icon {
  font-weight: bold;
  width: 16px;
  flex-shrink: 0;
  text-align: center;
}

.deletion-info-card--danger .icon {
  color: #dc2626;
}

.deletion-info-card--success .icon {
  color: #059669;
}

/* Textarea Styling */
.input--textarea {
  padding: 0;
  min-height: 100px;
}

.input--textarea textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: vertical;
  min-height: 80px;
  padding: 0.75rem;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
}

.input--textarea textarea::placeholder {
  color: var(--muted);
}

/* Button styling for delete account */
.btn-danger {
  color: #fff;
  background: #dc2626;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-danger:disabled {
  opacity: 0.85;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 640px) {
    .auth-container {
      padding: 0;
    }
    
    .otp-verify input.otp-digit{
      max-width: 44px;
    }
    
    .radio-content {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
    }
    
    .radio-content .icon {
      align-self: flex-start;
    }
    
    .checkbox-group {
      padding: 0.75rem;
      margin-bottom: 1rem;
    }
    
    .checkbox-label {
      gap: 10px;
      font-size: 0.85rem;
    }
    
    .checkbox-label input[type="checkbox"] {
      width: 18px;
      height: 18px;
    }
    
    /* Mobile optimization for deletion info */
    .deletion-info-card {
      padding: 0.875rem;
    }
    
    .deletion-info-card h3 {
      font-size: 0.9rem;
      margin-bottom: 0.6rem;
    }
    
    .deletion-info-card li {
      font-size: 0.825rem;
      margin-bottom: 0.4rem;
    }
    
    .input--textarea {
      min-height: 90px;
    }
    
    .input--textarea textarea {
      min-height: 70px;
      padding: 0.65rem;
      font-size: 0.9rem;
    }
}

/* ====================================
   SOCIAL LOGIN STYLES
   ==================================== */

/* Divider "atau" */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.75rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider span {
  padding: 0 1rem;
  font-weight: 500;
}

/* Social Login Container */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Google Sign-In Button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Desktop: max-width & center */
@media (min-width: 640px) {
  .btn-google {
    max-width: 400px;
    margin: 0 auto;
  }
}

.btn-google:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.btn-google:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-google .btn-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .auth-divider {
    margin: 1.5rem 0 1.25rem;
    font-size: 0.8125rem;
  }
  
  .auth-divider span {
    padding: 0 0.75rem;
  }
  
  .btn-google {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
  }
  
  .btn-google .btn-icon {
    width: 18px;
    height: 18px;
  }
}