/* Login Page Custom Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #059669;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --dark: #1f2937;
  --light: #f8fafc;
  --gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 35px 60px -12px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow-x: hidden;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="white" stroke-width="0.3" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.1;
  z-index: -1;
}

/* Login Container */
.login-container {
  width: 100%;
  max-width: 800px;
  z-index: 1;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  position: relative;
  width: 100%;
  display: flex;
}

/* Header */
.login-header {
  background: var(--gradient);
  padding: 2rem 2rem 3rem;
  text-align: center;
  color: white;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  flex-direction: column;
  justify-content: center;
}

.login-header::before {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 20px solid rgba(255, 255, 255, 0.98);
}

.login-logo {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.login-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  opacity: 0.9;
  font-size: 1rem;
  font-weight: 400;
}

/* Body */
.login-body {
  padding: 3rem 2rem 2rem;
  width: 100%;
}

.form-floating > label {
  padding: 1rem;
  color: #6b7280;
  font-weight: 500;
}

.form-floating > .form-control {
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8fafc;
}

/* Buttons */
.btn-login {
  background: var(--primary);
  border: none;
  border-radius: 12px;
  padding: 1rem;
  font-weight: 600;
  font-size: 1.1rem;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
  color: white;
  margin-bottom: 1.5rem;
}

.btn-login:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.6);
  color: white;
}

.btn-login:active {
  transform: translateY(0);
}

/* Links */
.login-links {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.login-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.login-links a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Alerts */
.alert {
  border-radius: 12px;
  border: none;
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #dc2626;
  border-left: 4px solid #dc2626;
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #059669;
  border-left: 4px solid #059669;
}

/* Setup Info */
.setup-info {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1.5rem;
  text-align: center;
}

.setup-info code {
  background: rgba(245, 158, 11, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-weight: 600;
  color: #d97706;
}

/* Back to Home */
.back-home {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 10;
}

.back-home .btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--dark);
  backdrop-filter: blur(10px);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.back-home .btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  color: var(--dark);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card {
  animation: fadeInUp 0.8s ease forwards;
}

/* Responsive */
@media (max-width: 480px) {
  body {
    padding: 15px;
  }

  .login-container {
    width: 100%;
    max-width: none;
  }

  .login-header {
    padding: 1.5rem 1.5rem 2.5rem;
  }

  .login-title {
    font-size: 1.5rem;
  }

  .login-body {
    padding: 2.5rem 1.5rem 1.5rem;
  }

  .back-home {
    top: 1rem;
    left: 1rem;
  }

  .back-home .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Loading state */
.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Focus states for accessibility */
.form-control:focus,
.btn:focus {
  outline: none;
}

/* Utility classes */
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
