:root {
  --primary-color: #2a374d;
  --primary-dark: #467194;
  --primary-light: #5f82b1;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f8f9fa;
  --border-color: #d1d5db;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100" opacity="0.03"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23000"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 380px;
  /* Mas maliit na container */
  text-align: center;
  position: relative;
  z-index: 1;
}

.logo-container {
  margin-bottom: 8px;
  /* Mas maliit na margin */
}

.logo {
  width: 180px;
  /* Mas maliit na logo */
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.welcome-text {
  margin-bottom: 20px;
  /* Mas maliit na margin */
}

.welcome-text h2 {
  font-size: 24px;
  /* Mas maliit na font */
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  /* Mas maliit na margin */
  position: relative;
  display: inline-block;
}

.welcome-text h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  /* Mas maliit */
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  /* Mas maliit */
  height: 3px;
  /* Mas maliit */
  background: var(--primary-color);
  border-radius: 2px;
}

.welcome-text p {
  color: var(--text-light);
  font-size: 14px;
  /* Mas maliit na font */
  margin: 16px 0 0;
  /* Mas maliit na margin */
  font-weight: 400;
}

.form-group {
  margin-bottom: 16px;
  /* Mas maliit na margin */
  text-align: left;
  position: relative;
}

.form-label {
  font-weight: 600;
  font-size: 13px;
  /* Mas maliit na font */
  color: var(--text-dark);
  margin-bottom: 6px;
  /* Mas maliit na margin */
  margin-left: 4px;
  display: flex;
  align-items: center;
}

.form-label i {
  margin-right: 8px;
  /* Mas maliit na margin */
  color: var(--primary-color);
  width: 16px;
  /* Mas maliit */
  text-align: center;
  font-size: 14px;
  /* Mas maliit na icon */
}

.input-container {
  position: relative;
}

.form-control {
  width: 100%;
  padding: 8px 16px 8px 40px;
  /* Mas compact na padding */
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  /* Mas maliit na border radius */
  font-size: 14px;
  /* Mas maliit na font */
  transition: var(--transition);
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  height: 42px;
  /* Fixed height para consistent */
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
}

.input-icon {
  position: absolute;
  left: 14px;
  /* Mas malapit */
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  z-index: 2;
  font-size: 16px;
  /* Mas maliit na icon */
}

.password-toggle {
  position: absolute;
  right: 14px;
  /* Mas malapit */
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  z-index: 2;
  font-size: 16px;
  /* Mas maliit na icon */
  padding: 4px;
}

.password-toggle:hover {
  color: var(--primary-color);
}

.forgot-password {
  margin: 0;
  /* remove all top/bottom margins */
}

.forgot-password a {
  color: var(--text-light);
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  /* vertically center icon and text */
}

.forgot-password a:hover {
  color: var(--primary-color);
}

.forgot-password a i {
  margin-right: 6px;
  /* Mas maliit na margin */
  font-size: 12px;
  /* Mas maliit na icon */
}

.btn-submit {
  width: 100%;
  padding: 10px;
  /* Mas compact */
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  /* Mas maliit na border radius */
  font-size: 15px;
  /* Mas maliit na font */
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  /* Mas maliit na margin */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* Mas maliit na gap */
  box-shadow: 0 4px 12px rgba(53, 123, 229, 0.3);
  height: 42px;
  /* Consistent height */
}

.btn-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px  rgba(53, 123, 229, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.signup-text {
  text-align: center;
  margin-top: 20px;
  /* Mas maliit na margin */
  font-size: 14px;
  /* Mas maliit na font */
  color: var(--text-light);
  padding-top: 16px;
  /* Mas maliit na padding */
  border-top: 1px solid #eee;
}

.signup-text a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.signup-text a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Animation for form elements */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-group,
.btn-submit,
.signup-text {
  animation: fadeIn 0.5s ease forwards;
}

.form-group:nth-child(1) {
  animation-delay: 0.1s;
}

.form-group:nth-child(2) {
  animation-delay: 0.2s;
}

.forgot-password {
  animation-delay: 0.3s;
}

.btn-submit {
  animation-delay: 0.4s;
}

.signup-text {
  animation-delay: 0.5s;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .login-container {
    max-width: 320px;
    /* Mas maliit sa mobile */
  }

  .welcome-text h2 {
    font-size: 22px;
  }

  .logo {
    width: 150px;
  }

  .welcome-text p {
    font-size: 13px;
  }

  .form-control {
    height: 40px;
    /* Mas maliit sa mobile */
  }

  .btn-submit {
    height: 40px;
    /* Mas maliit sa mobile */
  }
}