/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0f0f0f;
  padding: 20px;
  background-attachment: fixed;
  background-size: cover;
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
  width: 100%;
  max-width: 450px;
  background: #1a1a1a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 10;
  border: 1px solid #2a2a2a;
}

.login-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* ===== HEADER SECTION ===== */
.login-header {
  background: linear-gradient(135deg, #1f1f2e 0%, #2a2a3e 100%);
  color: #e0e0e0;
  padding: 40px 30px 50px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid #2a2a2a;
}

.login-header h1 {
  font-size: 2.5rem;
  margin-bottom: 12px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.login-header p {
  font-size: 1.1rem;
  opacity: 0.7;
}

.logo {
  width: 80px;
  height: 80px;
  background: #2a2a3e;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  border: 1px solid #3a3a4e;
}

.logo i {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== FORM STYLES ===== */
.login-form {
  padding: 40px 35px 35px;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #e0e0e0;
  font-size: 1.05rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i:first-of-type {
  position: absolute;
  left: 15px;
  color: #60a5fa;
  font-size: 1.1rem;
  z-index: 1;
  pointer-events: none;
}

.form-group input {
  width: 100%;
  padding: 12px 15px 12px 45px;
  border: 2px solid #2a2a2a;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
  background: #252525;
  color: #e0e0e0;
}

.form-group input::placeholder {
  color: #666666;
}

.form-group input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: #2a2a2a;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

button[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

button[type="submit"]:active {
  transform: translateY(0);
}

.form-footer {
  text-align: center;
  margin-top: 25px;
  color: #888888;
  font-size: 0.95rem;
}

.form-footer p {
  margin-bottom: 8px;
}

.form-footer a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.form-footer a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* ===== FLASH MESSAGES ===== */
.flash-messages {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 90%;
  max-width: 500px;
}

.flash-message {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.5s ease, fadeOut 0.5s ease 4.5s forwards;
  opacity: 1;
  transition: opacity 0.5s ease;
  border-left: 5px solid;
}

.flash-message i {
  margin-right: 12px;
  font-size: 1.2rem;
}

.flash-message.success {
  background: #1e3a1f;
  color: #86efac;
  border-left-color: #22c55e;
}

.flash-message.error {
  background: #3a1f1f;
  color: #fca5a5;
  border-left-color: #dc3545;
}

.flash-message.info {
  background: #1f2a3a;
  color: #93c5fd;
  border-left-color: #3b82f6;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 500px) {
  .login-header {
    padding: 30px 20px 40px;
  }
  
  .login-header h1 {
    font-size: 2rem;
  }
  
  .login-form {
    padding: 30px 25px 25px;
  }
  
  .logo {
    width: 70px;
    height: 70px;
  }
  
  .logo i {
    font-size: 2rem;
  }
  
  .form-group input {
    padding: 13px 13px 13px 40px;
  }
}
.password-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.password-label-row label {
  margin: 0;
}

.toggle-password {
  background: none;
  border: none;
  color: #60a5fa;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.toggle-password:hover {
  opacity: 1;
}

.toggle-password:focus {
  outline: none;
  color: #93c5fd;
}