/* ========== RESET & BASE ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #0f172a; /* slate-900 */
  color: #e5e7eb;      /* gray-200 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.alert-success {
  color: green;
}
.alert-fail{
  color: red;
}
/* ========== CARD ========== */
.auth-card {
  background: #020617; /* near black */
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* ========== HEADER ========== */
.auth-header {
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

.auth-header p {
  margin-top: 0.5rem;
  color: #94a3b8;
  font-size: 0.95rem;
}

/* ========== FORM ========== */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: #cbd5f5;
}

input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 0.95rem;
}

input:focus {
  outline: none;
  border-color: #6366f1; /* indigo */
}

/* ========== BUTTON ========== */
button {
  width: 100%;
  padding: 0.75rem;
  background: #6366f1;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 0.5rem;
}

button:hover {
  background: #4f46e5;
}

/* ========== FOOTER ========== */
.auth-footer {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: #94a3b8;
}

.auth-footer a {
  color: #818cf8;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ========== ERRORS (WTForms friendly) ========== */
.error {
  color: #f87171;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
@media (max-width: 480px) {
  body {
    /* Add side padding so the card doesn't touch the screen edges */
    padding: 1rem;
    
    /* Change height handling for mobile browsers (address bar quirks) */
    min-height: 100dvh; 
  }

  .auth-card {
    /* Reduce padding on small screens to give inputs more room */
    padding: 1.5rem;
    
    /* Optional: Remove heavy shadow on mobile for a cleaner look */
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  .auth-header {
    margin-bottom: 1.5rem;
  }
}
