/* ========================================= */
/* FORM.CSS - Solid Gray Theme (Image BG)    */
/* ========================================= */

/* 1. THEME VARIABLES - Synchronized with styles.css */
/* Removed redundant :root as tokens are now inherited from styles.css */


/* 2. PAGE LAYOUT & BACKGROUND */
/* 2. PAGE LAYOUT & BACKGROUND */
body.form-page {
  background-color: var(--bg);
  background-image: 
    linear-gradient(to bottom, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.85)),
    url("/img/ppm.jpg") !important;
  background-size: cover, cover !important;
  background-attachment: fixed;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  
  color: var(--text);
  font-family: "Inter", sans-serif; /* Changed from Merriweather to Inter for consistency */
  line-height: 1.6;
  transition: all 0.4s ease;
}

:root[data-theme="light"] body.form-page {
  background-image: 
    linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.8)),
    url("/img/ppm.jpg") !important;
}

.form-wrap {
  width: min(980px, 94%);
  margin: calc(var(--nav-h) + 40px) auto 80px;
}

.form-title {
  text-align: center;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 24px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Pop Animation */
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.95) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 3. FORM CARD (SOLID & SMOOTH) - Updated to match info_santri */
.form-card {
  background: var(--bg-2); /* Solid Color */
  border: 1px solid var(--border);
  border-radius: 16px; /* Increased radius */
  padding: 32px;
  position: relative; /* For pseudo-element */
  overflow: hidden;   /* For pseudo-element */
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: var(--accent);
  opacity: 0.8;
}

.form-card:hover {
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
  /* border-color: rgba(5, 150, 105, 0.2); Removed to avoid clash with accent top border */
}

/* 4. GRID SYSTEM */
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.col-12 { grid-column: span 12; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

/* 5. TYPOGRAPHY & DIVIDERS */
.sec-title {
  font-weight: 800;
  font-size: 1.25rem;
  margin-top: 12px;
  margin-bottom: 16px;
  color: var(--text);
  border-left: 4px solid var(--accent);
  padding-left: 16px;
  border-radius: 2px;
}

.divider {
  height: 3px;
  background: var(--border);
  margin: 16px 0;
  opacity: 0.8;
}

.label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: 0.01em;
}

.hint {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85rem;
  margin-left: 6px;
}

/* 6. INPUT FIELDS (SOLID & SMOOTH) - Clean & Simple */
.input, .select, .file, textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--input-border); /* Changed from 2.5px to 1px for simple look */
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
}

:root[data-theme="light"] .input, 
:root[data-theme="light"] .select, 
:root[data-theme="light"] .file, 
:root[data-theme="light"] textarea {
  background: var(--input-bg);
}

/* Fokus State */
.input:focus, .select:focus, .file:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1); /* Subtle focus ring */
  background: var(--input-bg);
}

/* Disabled / Readonly */
.input:read-only, .input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: rgba(0,0,0,0.2); 
  border-style: solid; /* Changed from dashed to solid for cleaner look */
}
:root[data-theme="light"] .input:read-only { background: rgba(0,0,0,0.05); }

/* Select Arrow Customization */
.select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

/* 7. BOXES & AVATAR */
.smooth-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(0,0,0,0.25);
}
:root[data-theme="light"] .smooth-box { background: #f1f5f9; }

.avatar {
  width: 80px; height: 80px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--bg);
}

/* 8. BUTTONS & ACTIONS */
.actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
}

.btn-nav, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
  border: none;
  font-size: 1rem;
}

.btn-nav {
  background: var(--accent);
  color: #08110a;
}
.btn-nav:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg);
}



/* Tombol Masuk (Outline) */
.mobile-btn-login {
  display: flex; align-items: center; justify-content: center;
  padding: 12px; border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent; color: var(--text);
  font-weight: 700; text-decoration: none;
}

/* Tombol Daftar (Solid Hijau) */
.mobile-btn-register {
  display: flex; align-items: center; justify-content: center;
  padding: 12px; border-radius: var(--radius-md);
  background: var(--accent); color: #08110a; /* Teks Gelap biar kontras */
  font-weight: 800; text-decoration: none;
  border: none;
}
/* 9. RESPONSIVE (MOBILE) */
@media (max-width: 768px) {
  /* Grid collapse to single column */
  .col-12, .col-6, .col-4, .col-3 {
    grid-column: span 12;
  }
  
  .form-card { padding: 20px 16px; }
  
  /* Buttons full width on mobile */
  .actions {
    flex-direction: column-reverse;
    gap: 12px;
  }
  .btn-nav, .btn-ghost {
    width: 100%;
  }
  
  /* Margin top adjusted for mobile header */
  .form-wrap {
    margin-top: calc(var(--nav-h) + 20px);
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .form-wrap { width: 96%; margin-bottom: 40px; }
  .form-title { font-size: 1.3rem; }
  .form-card { padding: 16px 14px; border-radius: 14px; }
  .grid-12 { gap: 14px; }
  .sec-title { font-size: 1rem; padding-left: 10px; }
  .input, .select, .file, textarea { padding: 10px 14px; font-size: 0.9rem; }
  .label { font-size: 0.85rem; margin-bottom: 6px; }
  .btn-nav, .btn-ghost { padding: 11px 20px; font-size: 0.9rem; }
  .smooth-box { padding: 14px; }
}