/* ========================================
   MODERN AUTHENTICATION STYLES
   Login, Register, and Setup Pages
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
  min-height: 100vh;
  line-height: 1.6;
}

/* ========================================
   MODERN LOGIN PAGE STYLES
   Two-column layout with branding
   ======================================== */

.auth-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-template-columns: 45% 55%;
  min-height: 600px;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Left Side - Branding */
.auth-branding {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-branding::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float 20s infinite ease-in-out;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  25% {
    transform: translate(5%, 5%) rotate(90deg);
  }

  50% {
    transform: translate(0, 10%) rotate(180deg);
  }

  75% {
    transform: translate(-5%, 5%) rotate(270deg);
  }
}

.auth-branding-content {
  position: relative;
  z-index: 1;
}

.auth-logo {
  margin-bottom: 30px;
}

.auth-logo-img {
  width: 120px;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.auth-brand-name {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-tagline {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  opacity: 0.95;
}

.auth-description {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 40px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.auth-feature-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.feature-icon {
  font-size: 28px;
}

/* Right Side - Form */
.auth-form-container {
  padding: 60px 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.auth-form-box {
  width: 100%;
  max-width: 400px;
}

.auth-form-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-form-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 10px;
}

.auth-form-subtitle {
  font-size: 15px;
  color: #718096;
}

/* Form Input Styles */
.auth-form {
  width: 100%;
}

.auth-input-group {
  margin-bottom: 24px;
}

.auth-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 14px;
}

.label-icon {
  font-size: 16px;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  font-family: inherit;
  background: #f7fafc;
}

.auth-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper .auth-input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #718096;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: #667eea;
}

.eye-icon {
  font-size: 18px;
}

/* Auth Options */
.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 14px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #4a5568;
}

.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.forgot-password {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: #764ba2;
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-icon {
  font-size: 18px;
}

/* Divider */
.auth-divider {
  text-align: center;
  margin: 30px 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e8f0;
}

.auth-divider span {
  position: relative;
  background: white;
  padding: 0 15px;
  color: #a0aec0;
  font-size: 14px;
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  color: #4a5568;
  font-size: 14px;
}

.auth-footer p {
  margin-bottom: 10px;
}

.auth-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  display: inline-block;
}

.auth-link:hover {
  color: #764ba2;
  transform: translateX(3px);
}

/* Input Hints */
.input-hint {
  display: block;
  margin-top: 4px;
  color: #a0aec0;
  font-size: 12px;
}

/* Auth Benefits Section */
.auth-benefits {
  margin-top: 30px;
}

.benefits-title {
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 600;
  opacity: 0.95;
}

/* Role Selection */
.role-selection {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.role-option {
  position: relative;
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.role-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f7fafc;
  text-align: center;
}

.role-option input[type="radio"]:checked+.role-label {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.role-label:hover {
  border-color: #cbd5e0;
}

.role-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.role-name {
  font-weight: 600;
  color: #2d3748;
  font-size: 14px;
}

/* Terms Checkbox */
.terms-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
}

.terms-group input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.terms-group label {
  color: #4a5568;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.terms-group a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.terms-group a:hover {
  text-decoration: underline;
}

/* Flash Messages */
.auth-flash-messages {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
}

/* ========================================
   PASSWORD SETUP PAGE STYLES
   Single column centered design
   ======================================== */

.password-setup-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.setup-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 50px;
  width: 100%;
  max-width: 550px;
  animation: fadeInUp 0.6s ease-out;
}

.setup-header {
  text-align: center;
  margin-bottom: 30px;
}

.setup-header h1 {
  color: #1a202c;
  font-size: 32px;
  margin-bottom: 15px;
  font-weight: 700;
}

.setup-header p {
  color: #718096;
  font-size: 16px;
}

.timer-box {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  border-left: 4px solid #3b82f6;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  text-align: center;
}

.timer-box.warning {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left-color: #ef4444;
}

.timer-box p {
  margin-bottom: 5px;
  color: #1e40af;
  font-size: 16px;
}

.timer-box.warning p {
  color: #991b1b;
}

.timer-box small {
  color: #64748b;
  font-size: 13px;
}

.info-section {
  background: #f8fafc;
  border-radius: 12px;
  padding: 25px;
  margin-top: 30px;
}

.info-section h3 {
  color: #1e293b;
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 600;
}

.info-section ul {
  list-style: none;
  padding: 0;
}

.info-section li {
  padding: 10px 0;
  padding-left: 30px;
  position: relative;
  color: #475569;
}

.info-section li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 18px;
}

.login-credentials {
  background: #eff6ff;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  text-align: center;
}

.login-credentials p {
  color: #1e40af;
  margin: 0;
}

.password-strength {
  margin-top: 10px;
  margin-bottom: 20px;
}

.strength-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.strength-fill {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 10px;
}

/* Form Container (for other simple forms) */
.form-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 50px;
  width: 100%;
  max-width: 500px;
  margin: 40px auto;
  animation: fadeInUp 0.6s ease-out;
}

/* Form Header */
.form-header {
  text-align: center;
  margin-bottom: 30px;
}

.form-header h1 {
  color: #1a202c;
  font-size: 28px;
  margin-bottom: 10px;
  font-weight: 700;
}

.form-header p {
  color: #718096;
  font-size: 14px;
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #333;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Buttons */
.btn,
.auth-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn:hover,
.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
  background: #6c757d;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* Form Links */
.form-footer,
.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.form-footer a,
.auth-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.form-footer a:hover,
.auth-footer a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Alert Messages */
.alert,
.auth-alert {
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success,
.auth-alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error,
.auth-alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-warning,
.auth-alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.alert-info,
.auth-alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.alert-icon {
  font-size: 18px;
  font-weight: bold;
}

/* Tables */
.table-container {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

table thead th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

table tbody tr {
  border-bottom: 1px solid #e0e0e0;
  transition: background 0.2s ease;
}

table tbody tr:hover {
  background: #f8f9fa;
}

table tbody td {
  padding: 15px;
  font-size: 14px;
  color: #333;
}

/* Responsive */
@media (max-width: 768px) {

  .form-container,
  .auth-container {
    padding: 30px 20px;
  }

  .form-header h1,
  .auth-header h1 {
    font-size: 24px;
  }

  table {
    font-size: 12px;
  }

  table thead th,
  table tbody td {
    padding: 10px;
  }
}

/* ========================================
   FORM GROUPS & INPUTS (for setup pages)
   ======================================== */

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  color: #2d3748;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea,
.input-field {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  font-family: inherit;
  background: #f7fafc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.input-field:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  display: block;
  margin-top: 6px;
  color: #718096;
  font-size: 13px;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-large {
  width: 100%;
  padding: 16px;
  font-size: 17px;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

/* Form Footer */
.form-footer {
  text-align: center;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid #e2e8f0;
}

.form-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.form-footer a:hover {
  color: #764ba2;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* ========================================
   RESPONSIVE DESIGN - LAPTOP & TABLET
   ======================================== */

@media (max-width: 1200px) {
  .auth-container {
    max-width: 900px;
  }

  .auth-branding {
    padding: 50px 35px;
  }

  .auth-form-container {
    padding: 50px 40px;
  }
}

@media (max-width: 992px) {
  .auth-container {
    grid-template-columns: 1fr;
    max-width: 600px;
  }

  .auth-branding {
    padding: 50px 40px;
    min-height: auto;
  }

  .auth-brand-name {
    font-size: 28px;
  }

  .auth-tagline {
    font-size: 20px;
  }

  .auth-form-container {
    padding: 50px 40px;
  }

  .role-selection {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
   ======================================== */

@media (max-width: 768px) {
  .auth-container {
    grid-template-columns: 1fr;
    max-width: 500px;
    border-radius: 15px;
  }

  .auth-branding {
    padding: 35px 25px;
    min-height: auto;
  }

  .auth-brand-name {
    font-size: 22px;
  }

  .auth-tagline {
    font-size: 18px;
  }

  .auth-description {
    font-size: 14px;
  }

  .auth-features {
    gap: 12px;
  }

  .auth-feature-item {
    padding: 12px;
    font-size: 14px;
  }

  .feature-icon {
    font-size: 24px;
  }

  .auth-form-container {
    padding: 35px 25px;
  }

  .auth-form-title {
    font-size: 26px;
  }

  .auth-form-subtitle {
    font-size: 14px;
  }

  /* Fix auth-options alignment on small devices */
  .auth-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .remember-me {
    order: 1;
  }

  .forgot-password {
    order: 2;
  }

  .role-selection {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .setup-card {
    padding: 30px 20px;
  }

  .form-container {
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .auth-section {
    padding: 20px 15px;
  }

  .auth-container {
    border-radius: 12px;
  }

  .auth-branding {
    padding: 25px 20px;
  }

  .auth-logo-img {
    width: 80px;
  }

  .auth-brand-name {
    font-size: 20px;
  }

  .auth-tagline {
    font-size: 16px;
  }

  .auth-description {
    font-size: 13px;
    margin-bottom: 25px;
  }

  .auth-features {
    gap: 10px;
  }

  .auth-feature-item {
    padding: 10px;
    font-size: 13px;
  }

  .feature-icon {
    font-size: 20px;
  }

  .auth-form-container {
    padding: 25px 20px;
  }

  .auth-form-title {
    font-size: 22px;
  }

  .auth-input-group {
    margin-bottom: 20px;
  }

  .auth-input,
  .input-field {
    padding: 12px 14px;
    font-size: 14px;
  }

  .auth-submit-btn {
    padding: 14px;
    font-size: 15px;
  }

  .auth-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
  }

  .setup-card {
    padding: 25px 15px;
  }

  .setup-header h1 {
    font-size: 24px;
  }

  .form-container {
    padding: 25px 15px;
  }

  .auth-flash-messages {
    left: 15px;
    right: 15px;
    max-width: none;
  }
}

/* Additional utility classes */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.text-muted {
  color: #6c757d;
}

.text-small {
  font-size: 12px;
}