/* ==============================================
   GLOBAL RESET & BASE STYLES
============================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif; /* Ganti dari Segoe UI ke Poppins agar konsisten dengan login.css */
}

body {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* ==============================================
   LOGIN CONTAINER (COMMON TO ALL PAGES)
============================================== */
.login-container {
  background: white;
  padding: 40px 30px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 400px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  background: #d62828;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  z-index: 0;
}

.login-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: #0057b8;
  clip-path: polygon(100% 100%, 100% 0, 0 100%);
  z-index: 0;
}

.content {
  position: relative;
  z-index: 1;
}

/* Title styles */
.login-title {
  color: #0057b8;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

/* ==============================================
   MESSAGE / NOTIFICATION STYLE
============================================== */
.message {
  margin-bottom: 25px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #d62828; /* default merah, bisa di-overwrite inline */
}

/* ==============================================
   FORM GROUPS & INPUTS
============================================== */
.form-group {
  margin-bottom: 25px;
  text-align: left;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
  font-weight: 600;
  text-align: left;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  outline: none;
  background: #fafafa;
  transition: all 0.3s ease;
  color: #333;
}

.form-group input:focus {
  border-color: #0057b8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.15);
}

/* Toggle password icon (untuk login.php) */
.toggle-password {
  position: absolute;
  right: 16px;
  top: 65%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #aaa;
  font-size: 16px;
  transition: color 0.3s ease;
  z-index: 2;
}

.toggle-password:hover {
  color: #0057b8;
}

/* ==============================================
   BUTTON STYLES
============================================== */
.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #0057b8, #003d82);
  color: white;
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 87, 184, 0.3);
}

.btn-login:active {
  transform: translateY(0);
}

/* Register button (digunakan di register.php) */
.register-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #0057b8, #003d82);
  color: white;
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  letter-spacing: 0.5px;
  margin-top: 10px;
}

.register-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 87, 184, 0.3);
}

.register-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* ==============================================
   UPLOAD AREA (untuk register.php)
============================================== */
.upload-area {
  border: 2px dashed #e0e0e0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.upload-area:hover {
  border-color: #0057b8;
  background: #f0f7ff;
}

.upload-area.error {
  border-color: #d62828;
  background: #fff0f0;
}

.upload-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.upload-area .placeholder {
  z-index: 2;
  text-align: center;
  color: #777;
  font-size: 14px;
}

.upload-area .placeholder strong {
  color: #0057b8;
  display: block;
  margin-bottom: 4px;
}

#photoInput {
  display: none;
}

/* Error message untuk upload */
.error {
  font-size: 13px;
  color: #d62828;
  margin-top: 8px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff0f0;
  border-left: 4px solid #d62828;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 600;
  animation: slideIn 0.3s ease-out;
  display: none;
}

/* ==============================================
   FOOTER NOTE & LINKS
============================================== */
.footer-note {
  margin-top: 25px;
  font-size: 12px;
  color: #777;
}

.footer-note a {
  color: #0057b8;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed #0057b8;
  padding-bottom: 2px;
}

.footer-note a:hover {
  border-bottom-style: solid;
}

/* ==============================================
   ALERT STYLES (untuk login.php JS notification)
============================================== */
.alert {
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
  padding: 12px 16px;
  text-align: left;
  border: none;
  background: #f8f9fa;
  color: #555;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  animation: slideDown 0.3s ease-out;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.btn-close {
  font-size: 12px;
  opacity: 0.7;
}

.btn-close:hover {
  opacity: 1;
}

/* ==============================================
   ANIMATIONS
============================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}