/* Authentication Pages (Login & Signup) Styles */

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

html {
  font-size: 13px;
}

@media (max-width: 1200px) {
  html {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 10px;
  }
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #191919 0%, #2d2d2d 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Page Wrapper for Side-by-Side Containers */
.page-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  justify-content: center;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Login Container */
.login-container,
.signup-container {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid #FFD700;
  border-radius: 1.5rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  margin: 0 auto;
}

.signup-container {
  flex: 0 0 auto;
  max-width: 450px;
  margin: 0;
}

/* Company Container */
.address-container,
.company-container {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid #FFD700;
  border-radius: 1.5rem;
  padding: 2rem;
  width: 320px;
  flex: 0 0 auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.company-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.company-header i {
  font-size: 2.5rem;
  color: #FFD700;
  margin-bottom: 0.5rem;
}

.company-header h2 {
  font-size: 1.3rem;
  color: #FFD700;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.company-header p {
  font-size: 0.85rem;
  color: #aaa;
}

/* Header */
.login-header,
.signup-header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
}

.login-title,
.signup-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #FFD700;
  margin-bottom: 0.5rem;
}

.login-subtitle,
.signup-subtitle {
  font-size: 0.95rem;
  color: #aaa;
}

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

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

.form-label {
  color: #FFD700;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-input {
  padding: 0.875rem 1rem;
  border: 1px solid #FFD700;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Fix autofill styling */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.1) inset !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #FFD700 !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Ensure autofilled text is editable */
.form-input:-webkit-autofill {
  caret-color: #fff;
}

/* Buttons */
.login-btn,
.signup-btn {
  padding: 1rem;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
  border: none;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.5rem;
}

.login-btn:hover,
.signup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

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

.login-btn:disabled,
.signup-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Messages */
.error-message {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid #dc2626;
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: #ff6b6b;
  font-size: 0.9rem;
  text-align: center;
  display: none;
}

.error-message.show {
  display: block;
  animation: shake 0.5s;
}

/* Inline error text below inputs */
.error-text {
  display: block;
  color: #ef4444;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.5rem;
  min-height: 1.4rem;
  transition: all 0.3s ease;
  line-height: 1.4;
}

.form-input.error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.success-message {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: #4ade80;
  font-size: 0.9rem;
  text-align: center;
  display: none;
}

.success-message.show {
  display: block;
  animation: fadeIn 0.5s;
}

/* Links */
.form-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
  margin-top: 1rem;
}

.form-link {
  color: #FFD700;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.form-link:hover {
  color: #fff;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: #aaa;
  font-size: 0.9rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 215, 0, 0.3);
}

/* Animations */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

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

/* Responsive */
@media (max-width: 768px) {
  .login-container,
  .signup-container {
    padding: 2.25rem 2rem;
  }

  .logo {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.5rem;
  }

  .login-container,
  .signup-container {
    padding: 2rem 1.5rem;
  }

  .logo {
    width: 60px;
    height: 60px;
  }

  .login-title,
  .signup-title {
    font-size: 1.5rem;
  }

  .form-input {
    padding: 0.75rem 0.875rem;
  }

  .login-btn,
  .signup-btn {
    padding: 0.875rem;
    font-size: 1rem;
  }
}

/* Back Link */
.back-link {
  text-align: center;
  margin-top: 1.5rem;
}

.back-link a {
  color: #FFD700;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link a:hover {
  color: #fff;
}

/* Login/Signup Link */
.login-link,
.signup-link {
  text-align: center;
  margin-top: 1rem;
  color: #aaa;
}

.login-link a,
.signup-link a {
  color: #FFD700;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.login-link a:hover,
.signup-link a:hover {
  color: #fff;
}

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

/* Demo Credentials */
.demo-credentials {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid #FFD700;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
}

.demo-credentials h4 {
  color: #FFD700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.demo-credentials p {
  color: #aaa;
  font-size: 0.85rem;
  margin: 0.25rem 0;
}

/* Demo Note / Info Box */
.demo-note {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 0.75rem;
  padding: 0.875rem;
  margin-top: 1rem;
  color: #93c5fd;
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}

.demo-note i {
  color: #60a5fa;
  margin-right: 0.5rem;
}

.demo-note strong {
  color: #dbeafe;
}

/* Password Requirements */
.password-requirements {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid #FFD700;
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-top: 1rem;
  font-size: 0.85rem;
}

.password-requirements h4 {
  color: #FFD700;
  margin-bottom: 0.5rem;
}

.password-requirements ul {
  color: #aaa;
  list-style: none;
  padding-left: 0;
}

.password-requirements li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
}

.requirement-icon {
  width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* Additional animations */
@keyframes slideDown {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}


/* Company Information Section */
.company-toggle-box {
  background: rgba(255, 215, 0, 0.1);
  border: 2px solid #FFD700;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  margin-top: 2px;
  accent-color: #FFD700;
  flex-shrink: 0;
}

.checkbox-text {
  color: #FFD700;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
}

.form-note {
  display: block;
  margin-left: 1.75rem;
  color: #aaa;
  font-size: 0.8rem;
  line-height: 1.3;
}

.form-note i {
  color: #FFD700;
  margin-right: 0.25rem;
}

/* Company Fields Container */
.company-fields {
  background: rgba(255, 215, 0, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 0.75rem;
  padding: 1.25rem;
  animation: slideDown 0.3s ease;
}

.company-fields .form-group {
  margin-bottom: 1.25rem;
}

.company-fields .form-group:last-child {
  margin-bottom: 0;
}

.form-input[type="text"],
.form-input[type="email"],
.form-input[type="password"],
.form-input select,
.form-input textarea {
  width: 100%;
}

textarea.form-input {
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  padding: 0.75rem;
}

/* Select dropdown styling */
select.form-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFD700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
  cursor: pointer;
}

select.form-input option {
  background: #1a1a1a;
  color: #fff;
  padding: 0.5rem;
}

/* Light mode select */
[data-theme="light"] select.form-input {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

[data-theme="light"] select.form-input option {
  background: #ffffff;
  color: #1a1a1a;
}

/* Light mode for company section */
[data-theme="light"] .company-toggle-box {
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.3);
}

[data-theme="light"] .checkbox-text {
  color: #f97316;
}

[data-theme="light"] .form-note {
  color: #6b7280;
}

[data-theme="light"] .form-note i {
  color: #f97316;
}

[data-theme="light"] .company-fields {
  background: rgba(249, 115, 22, 0.05);
  border-color: rgba(249, 115, 22, 0.2);
}

[data-theme="light"] .company-header h2 {
  color: #f97316;
}

[data-theme="light"] .company-header i {
  color: #f97316;
}

[data-theme="light"] .company-container {
  border-color: #f97316;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-wrapper {
    flex-direction: column;
    align-items: center;
  }
  
  .signup-container {
    max-width: 450px;
  }
  
  .company-container {
    width: 100%;
    max-width: 450px;
  }
}


/* Staff/Admin Login Tab */
.staff-admin-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  padding: 1.25rem 0.75rem;
  border-radius: 0.75rem 0 0 0.75rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  box-shadow: -4px 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 90px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.staff-admin-tab:hover {
  transform: translateY(-50%) translateX(-5px);
  box-shadow: -6px 6px 16px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.staff-admin-tab i {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.staff-admin-tab span {
  line-height: 1.3;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive adjustments for staff tab */
@media (max-width: 768px) {
  .staff-admin-tab {
    padding: 1rem 0.6rem;
    min-width: 80px;
    font-size: 0.75rem;
  }
  
  .staff-admin-tab i {
    font-size: 1.25rem;
  }
  
  .staff-admin-tab span {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .staff-admin-tab {
    padding: 0.875rem 0.5rem;
    min-width: 70px;
    font-size: 0.7rem;
  }
  
  .staff-admin-tab i {
    font-size: 1.1rem;
  }
  
  .staff-admin-tab span {
    font-size: 0.65rem;
  }
}

/* Forgot Password Link */
.forgot-password-link {
  text-align: right;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

.forgot-password-link a {
  color: #FFD700;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.forgot-password-link a:hover {
  color: #FFA500;
  text-decoration: underline;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-content {
  background: rgba(26, 26, 26, 0.95);
  border: 2px solid #FFD700;
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal-content h2 {
  color: #FFD700;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.modal-content p {
  color: #aaa;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-primary, .btn-secondary {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #1a1a1a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  min-height: 1rem;
}

/* Form Row for Side-by-Side Layout */
.signup-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  margin-bottom: 1.5rem;
  align-items: start;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.company-section {
  display: flex;
  flex-direction: column;
  width: 280px;
  flex-shrink: 0;
}

.company-toggle-box {
  background: rgba(255, 215, 0, 0.1);
  border: 2px solid #FFD700;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  width: 100%;
}

.company-toggle-box .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.company-toggle-box .checkbox-text {
  color: #FFD700;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
}

.company-toggle-box .form-note {
  display: block;
  color: #aaa;
  font-size: 0.8rem;
  line-height: 1.3;
  margin-left: 1.75rem;
}

.company-toggle-box input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  margin-top: 2px;
  accent-color: #FFD700;
}

/* Company Fields Styling */
.company-fields {
  background: rgba(255, 215, 0, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 0.75rem;
  padding: 1.25rem;
  animation: slideDown 0.3s ease;
  width: 100%;
}

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

.company-fields-header {
  color: #FFD700;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 968px) {
  .signup-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .company-section {
    width: 100%;
  }
}
