/* ExpandHealth V2 - Login Page Styles */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

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

:root {
  --primary: #1E4D3F;
  --primary-dark: #163D32;
  --primary-light: #2E7A64;
  --secondary: #8B5CF6;
  --bg-light: #F5F4F0;
  --bg-white: #FFFFFF;
  --text-dark: #0F1F1A;
  --text-medium: #4B5563;
  --text-muted: #6C7280;
  --text-light: #9CA3AF;
  --border: #E8E5DF;
  --border-light: #F0EDE8;
  --error: #EF4444;
  --success: #10B981;
  --sidebar-bg: #1B3A30;
  --sidebar-text: #C8E0D8;
  --sidebar-border: rgba(255, 255, 255, 0.08);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  display: flex;
  width: 100%;
  max-width: 1200px;
  min-height: 100vh;
  background: var(--bg-white);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
}

/* ============================================
   LEFT SIDE - BRANDING
   ============================================ */

.login-left {
  flex: 1;
  background: var(--sidebar-bg);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: none;
}

.branding {
  margin-bottom: 48px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.logo-icon {
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.logo-expand {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.5px;
}

.logo-health {
  font-size: 20px;
  font-weight: 400;
  color: var(--sidebar-text);
  letter-spacing: 0.5px;
}

.tagline {
  font-size: 16px;
  color: var(--sidebar-text);
  line-height: 1.6;
}

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

.feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--sidebar-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--sidebar-text);
  stroke-width: 1.5;
  fill: none;
}

.feature h3 {
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.feature p {
  font-size: 13px;
  color: var(--sidebar-text);
  line-height: 1.5;
}

/* ============================================
   RIGHT SIDE - LOGIN FORM
   ============================================ */

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: var(--bg-light);
}

.login-form-container {
  width: 100%;
  max-width: 400px;
}

.login-header {
  margin-bottom: 32px;
  text-align: center;
}

.login-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

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

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
}

.alert.error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
}

.alert.success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #059669;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input {
  padding: 14px 16px;
  font-size: 15px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dark);
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 77, 63, 0.12);
}

.form-group input::placeholder {
  color: var(--text-light);
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-medium);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
  border-radius: 4px;
}

.forgot-password {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-password:hover {
  color: var(--primary-dark);
}

/* Primary Button */
.btn-primary {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(30, 77, 63, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 77, 63, 0.4);
  background: var(--primary-dark);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(30, 77, 63, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
}

.spinner circle {
  stroke-dasharray: 60;
  stroke-dashoffset: 30;
  animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

/* Footer */
.login-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.login-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.login-footer a:hover {
  color: var(--primary-dark);
}

.demo-link {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.demo-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.demo-link a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.version-info {
  margin-top: 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 12px;
}

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

@media (max-width: 968px) {
  .login-container {
    flex-direction: column;
    min-height: auto;
  }

  .login-left {
    padding: 40px;
    border-right: none;
    border-bottom: 1px solid var(--sidebar-border);
  }

  .features {
    display: none;
  }

  .login-right {
    padding: 40px;
  }
}

@media (max-width: 640px) {
  .login-left {
    padding: 30px 24px;
  }

  .logo-expand,
  .logo-health {
    font-size: 18px;
  }

  .tagline {
    font-size: 14px;
  }

  .login-right {
    padding: 30px 24px;
  }

  .login-header h2 {
    font-size: 24px;
  }

  .login-form-container {
    max-width: 100%;
  }
}

/* Support Modal */
.support-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.support-modal-overlay.active {
  display: flex;
}

.support-modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  margin: 16px;
}

.support-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.support-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.support-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.support-modal-close:hover {
  color: #4B5563;
}

.support-modal-body {
  padding: 24px;
}

.support-form-group {
  margin-bottom: 20px;
}

.support-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.support-form-label .required {
  color: #dc2626;
}

.support-form-input,
.support-form-select,
.support-form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.support-form-input:focus,
.support-form-select:focus,
.support-form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 77, 63, 0.1);
}

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

.support-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.support-btn-cancel {
  padding: 10px 20px;
  background: white;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
}

.support-btn-cancel:hover {
  background: #F9FAFB;
}

.support-btn-submit {
  padding: 10px 20px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  cursor: pointer;
}

.support-btn-submit:hover {
  background: var(--primary-dark);
}
