/* ==========================================================================
   Global Reset and Base Styles
   ========================================================================== */
:root {
  --primary-blue: #667eea;
  --secondary-blue: #764ba2;
  --success-green: #10b981;
  --error-red: #ef4444;
  --text-primary: #1f2a44;
  --text-secondary: #6b7280;
  --text-light: #e2e8f0;
  --bg-light: #f8fafc;
  --bg-dark: #0f172a;
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-dark: rgba(0, 0, 0, 0.2);
}

* { margin: 0; padding: 0; box-sizing: inherit; }
html { font-size: 62.5%; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--text-primary); background: linear-gradient(135deg, var(--bg-light) 0%, #e2e8f0 50%, #d1d5db 100%); min-height: 100vh; transition: all 0.3s ease; position: relative; overflow-x: hidden; animation: backgroundShift 20s ease-in-out infinite; }
body.dark-mode { background: linear-gradient(135deg, var(--bg-dark) 0%, #1e293b 50%, #334155 100%); }

@keyframes backgroundShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* NAVIGATION */
nav { display: flex; align-items: center; justify-content: space-between; padding: 1.6rem 2rem; background-color: #ffffff; border-radius: 1rem; box-shadow: 0 4px 8px var(--shadow-light); margin: 2rem auto; max-width: 120rem; }
body.dark-mode nav { background-color: #1e293b; box-shadow: 0 4px 8px var(--shadow-dark); }
.nav__left { display: flex; align-items: center; gap: 1.2rem; }
.logo-link { display: block; line-height: 0; }
.logo { height: 4.8rem; transition: filter 0.3s ease, transform 0.3s ease; }
.logo:hover { transform: scale(1.05); }
body.dark-mode .logo { filter: brightness(0) invert(1); }

/* DARK MODE BTN */
.dark-mode-btn { background: none; border: none; cursor: pointer; width: 3.6rem; height: 3.6rem; border-radius: 50%; color: var(--text-primary); transition: all 0.3s; display: flex; align-items: center; justify-content: center; }
body.dark-mode .dark-mode-btn { color: var(--text-light); }
.dark-mode-btn:hover { background-color: #e5e7eb; transform: scale(1.05); }
body.dark-mode .dark-mode-btn:hover { background-color: #334155; }
.dark-mode-btn svg { width: 2.4rem; height: 2.4rem; }

.dark-mode-btn .sun { display: block; }
.dark-mode-btn .moon { display: none; }
body.dark-mode .dark-mode-btn .sun { display: none; }
body.dark-mode .dark-mode-btn .moon { display: block; }

/* CONTAINER */
.container { max-width: 120rem; margin: 0 auto; padding: 0 2.4rem; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.login-section { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 0; opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.login-section.animate { opacity: 1; transform: translateY(0); }
.section__title { font-size: 4rem; font-weight: 600; text-align: center; margin-bottom: 1.2rem; }
.section__subtitle { font-size: 1.8rem; text-align: center; color: var(--text-secondary); margin-bottom: 4rem; }
body.dark-mode .section__title, body.dark-mode .section__subtitle { color: var(--text-light); }

.login-container { max-width: 60rem; width: 100%; background: #ffffff; padding: 4rem; border-radius: 1.6rem; box-shadow: 0 8px 24px var(--shadow-light); position: relative; overflow: hidden; }
body.dark-mode .login-container { background: #1e293b; }

.login-form { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.form-group { position: relative; }
.login-input { width: 100%; padding: 1.4rem 1.8rem; font-size: 1.7rem; border-radius: 1rem; border: 1px solid #d1d5db; background-color: #ffffff; color: var(--text-primary); outline: none; transition: all 0.3s; }
body.dark-mode .login-input { background-color: #374151; color: var(--text-light); border-color: #4b5563; }
.form-label { font-size: 1.6rem; color: var(--text-secondary); position: absolute; top: 1.4rem; left: 1.8rem; transition: all 0.3s ease; pointer-events: none; }
.login-input:focus + .form-label, .login-input:not(:placeholder-shown) + .form-label { top: -1rem; left: 1.2rem; font-size: 1.3rem; color: var(--primary-blue); background: inherit; padding: 0 0.5rem; }

.password-toggle { position: absolute; right: 1.8rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-secondary); font-size: 1.5rem; }
.btn { border-radius: 1rem; padding: 1.4rem 2.4rem; font-size: 1.7rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 1rem; background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue)); border: none; color: white; cursor: pointer; transition: all 0.3s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3); }

/* QUICK LOGIN SECTION */
.test-credentials {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

body.dark-mode .test-credentials {
  border-top-color: #334155;
}

.test-credentials h4 {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

body.dark-mode .test-credentials h4 {
  color: var(--text-light);
  opacity: 0.8;
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  padding: 0 1rem;
}

.credential-card {
  background: #f8fafc;
  padding: 1.8rem;
  border-radius: 1.4rem;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}

body.dark-mode .credential-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: #334155;
}

.credential-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-blue);
  background: #ffffff;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

body.dark-mode .credential-card:hover {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.credential-card::after {
  content: 'AUTOFILL';
  position: absolute;
  top: 0;
  right: 0;
  background: var(--primary-blue);
  color: white;
  font-size: 0.8rem;
  font-weight: 900;
  padding: 0.4rem 0.8rem;
  border-bottom-left-radius: 0.8rem;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.credential-card:hover::after {
  transform: translateY(0);
}

.cred-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cred-label {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

body.dark-mode .cred-label {
  color: var(--text-light);
  opacity: 0.6;
}

.cred-value {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-blue);
  background: rgba(102, 126, 234, 0.1);
  padding: 0.6rem 1rem;
  border-radius: 0.8rem;
  display: inline-block;
  transition: all 0.3s;
}

body.dark-mode .cred-value {
  color: #a5b4fc;
  background: rgba(165, 180, 252, 0.15);
}

.credential-card:hover .cred-value {
  background: var(--primary-blue);
  color: white;
}

/* TOAST */
.toast { position: fixed; bottom: 2.4rem; left: 50%; transform: translateX(-50%) translateY(10px); padding: 1.2rem 2.4rem; border-radius: 0.8rem; color: white; font-size: 1.5rem; opacity: 0; transition: all 0.3s; z-index: 1000; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background-color: var(--success-green); }
.toast.error { background-color: var(--error-red); }

/* LOADING SCREEN */
.loading-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue)); display: flex; align-items: center; justify-content: center; z-index: 9999; transition: all 0.6s; }
.loading-screen.hidden { opacity: 0; visibility: hidden; }
