/* auth.css - Premium Multi-Role Authentication UI */

:root {
  --bg-dark: #0a0a0a;
  --bg-secondary: #141414;
  --text-light: #ffffff;
  --text-muted: #a0a0a0;
  --accent-primary: #e63946;
  --accent-gradient: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
  --border-color: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(255, 255, 255, 0.05);
  --error-color: #ff4d4d;
  --success-color: #2ecc71;
  --glass-bg: rgba(20, 20, 20, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

/* Container Split Layout */
.auth-container {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* ========================================= */
/* LEFT SIDE: MOTIVATION & BRANDING          */
/* ========================================= */
.auth-left {
  flex: 1;
  background: var(--bg-secondary);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top left, rgba(230, 57, 70, 0.15) 0%, transparent 60%);
  z-index: 1;
}

.auth-left-content {
  position: relative;
  z-index: 10;
  max-width: 600px;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-light);
  text-decoration: none;
  margin-bottom: 5rem;
  letter-spacing: 1px;
}

.logo img {
  width: 40px;
  height: auto;
  margin-right: 12px;
}

.logo span {
  color: var(--accent-primary);
}

.motivation-block h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #ffffff, #a0a0a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.motivation-block p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 450px;
}

/* Abstract Background Shapes */
.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: rgba(230, 57, 70, 0.2);
  top: -100px;
  right: -50px;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: rgba(255, 107, 107, 0.1);
  bottom: -150px;
  left: -100px;
}

/* ========================================= */
/* RIGHT SIDE: LOGIN FORM                    */
/* ========================================= */
.auth-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  position: relative;
  background: var(--bg-dark);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

.login-header {
  margin-bottom: 2rem;
  text-align: center;
}

.login-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Role Selector Tabs */
.role-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 2rem;
  border: 1px solid var(--glass-border);
  position: relative;
}

.role-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 0;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  z-index: 1;
}

.role-tab:hover {
  color: var(--text-light);
}

.role-tab.active {
  color: var(--text-light);
  background: var(--input-bg);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 5px;
  transition: color 0.3s ease;
}

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

.input-icon {
  position: absolute;
  left: 16px;
  color: #666;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.input-wrapper input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 1rem;
  padding: 14px 16px 14px 45px;
  border-radius: 12px;
  outline: none;
  transition: all 0.3s ease;
}

.input-wrapper input::placeholder {
  color: #555;
}

.input-wrapper input:focus {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.1);
}

.input-wrapper input:focus + .input-icon,
.form-group:focus-within .input-icon {
  color: var(--accent-primary);
}

.form-group:focus-within label {
  color: var(--text-light);
}

/* Checkbox */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -0.5rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.remember-me input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.remember-me input:checked ~ .checkmark {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.remember-me input:checked ~ .checkmark::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: white;
  font-size: 10px;
}

/* Button */
.btn-login {
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-top: 0.5rem;
  box-shadow: 0 10px 20px -5px rgba(230, 57, 70, 0.4);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(230, 57, 70, 0.5);
}

.btn-login:active {
  transform: translateY(0);
}

/* Loader for button */
.loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s ease-in-out infinite;
}

.btn-login.loading .btn-text {
  display: none;
}

.btn-login.loading .loader {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
  display: none;
  color: var(--error-color);
  font-size: 0.85rem;
  text-align: center;
  background: rgba(255, 77, 77, 0.1);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 77, 77, 0.2);
}

/* Support Text */
.support-text {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.support-text a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.support-text a:hover {
  color: var(--accent-primary);
}

.mobile-logo {
  display: none;
  position: absolute;
  top: 20px;
  left: 20px;
}

.mobile-logo a {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-light);
  text-decoration: none;
}
.mobile-logo span {
  color: var(--accent-primary);
}

/* Demo Credentials Floating Box */
.demo-credentials {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 100;
  animation: slideInRight 0.5s ease-out;
}

.demo-credentials h4 {
  font-size: 0.8rem;
  color: var(--accent-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.demo-credentials ul {
  list-style: none;
}

.demo-credentials li {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  display: none;
}
.demo-credentials li.active {
  display: block;
}

.demo-credentials strong {
  color: var(--text-light);
}

#closeDemoBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}
#closeDemoBtn:hover {
  color: white;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}


/* ========================================= */
/* RESPONSIVENESS                            */
/* ========================================= */
@media (max-width: 992px) {
  .auth-left {
    display: none; /* Hide left side on smaller screens */
  }
  
  .auth-container {
    flex-direction: column;
  }
  
  .mobile-logo {
    display: block;
  }
  
  .auth-right {
    padding: 1.5rem;
  }
  
  .login-card {
    padding: 2.5rem 2rem;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.5rem;
  }
  
  .motivation-block h1 {
    font-size: 2.5rem;
  }
  
  .demo-credentials {
    bottom: 10px;
    right: 10px;
    left: 10px;
  }
}
