/* ============================================
   CROWN CHEMICAL - AUTH & DASHBOARD STYLES
   ============================================ */

/* ==========================================
   AUTH PAGE STYLES
   ========================================== */

.auth-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-container {
  width: 100%;
  max-width: 500px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Tab Navigation */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
  flex: 1;
  padding: 16px;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tab-btn.active {
  color: #0B9444;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #0B9444;
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 32px;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

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

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

.form-title {
  font-size: 28px;
  font-weight: 700;
  color: #0d1821;
  margin-bottom: 8px;
}

.form-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
}

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0B9444;
  box-shadow: 0 0 0 3px rgba(11, 148, 68, 0.1);
}

.form-group input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.form-group small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #999;
}

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

/* Form Row (side by side inputs) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}




@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Password Strength Meter */
.password-strength-meter {
  margin-top: 8px;
}

.strength-bar {
  height: 4px;
  border-radius: 2px;
  background: #e0e0e0;
  transition: all 0.3s ease;
}

.strength-bar.weak {
  width: 33%;
  background: #ff3b30;
}

.strength-bar.medium {
  width: 66%;
  background: #ff9500;
}

.strength-bar.strong {
  width: 100%;
  background: #0B9444;
}

.strength-text {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  margin-bottom: 20px;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

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

.btn-primary {
  background: #0B9444;
  color: #fff;
}

.btn-primary:hover {
  background: #09732f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 148, 68, 0.3);
}

.btn-google {
  background: #fff;
  color: #333;
  border: 2px solid #e0e0e0;
  margin-top: 12px;
}

.btn-google:hover {
  border-color: #0B9444;
  background: #f8f8f8;
}

.btn-outline {
  background: transparent;
  color: #0B9444;
  border: 2px solid #0B9444;
}

.btn-outline:hover {
  background: #0B9444;
  color: #fff;
}

.btn-link {
  background: transparent;
  color: #0B9444;
  text-decoration: underline;
  padding: 8px;
  width: auto;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
  width: auto;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid #e0e0e0;
  color: #666;
}

.btn-icon:hover {
  border-color: #ff3b30;
  color: #ff3b30;
  background: #fff5f5;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: #999;
  font-size: 14px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.divider span {
  padding: 0 16px;
}

/* Links */
.link {
  color: #0B9444;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.link:hover {
  color: #09732f;
  text-decoration: underline;
}

.forgot-password-link {
  font-size: 14px;
}

.guest-checkout-link {
  font-size: 14px;
}

/* Form Footer */
.form-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #666;
}

.form-footer p {
  margin: 8px 0;
}

/* Back Link */
.back-link {
  font-size: 14px;
  font-weight: 600;
  color: #0d1821;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.back-link:hover {
  color: #0B9444;
}

/* ==========================================
   PASSWORD RESET MODAL
   ========================================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  max-width: 450px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.modal-content h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #0d1821;
}

.modal-content p {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
}

/* ==========================================
   NOTIFICATIONS
   ========================================== */

.auth-notification {
  position: fixed;
  top: 100px;
  right: 24px;
  background: #fff;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 10001;
  transform: translateX(500px);
  transition: transform 0.3s ease;
  max-width: 400px;
  border-left: 4px solid #0B9444;
}

.auth-notification.show {
  transform: translateX(0);
}

.auth-notification.error {
  border-left-color: #ff3b30;
}

.notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notification-content span {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.close-notification {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ==========================================
   DASHBOARD STYLES
   ========================================== */

.dashboard-main {
  min-height: calc(100vh - 200px);
  padding: 40px 20px;
  background: #f5f7fa;
}

.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

@media (max-width: 1024px) {
  .dashboard-container {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.dashboard-sidebar {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  height: fit-content;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 120px;
}

@media (max-width: 1024px) {
  .dashboard-sidebar {
    position: static;
  }
}

.user-profile-card {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 24px;
}

.user-avatar {
  margin: 0 auto 16px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
}

.user-profile-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0d1821;
  margin-bottom: 4px;
}

.user-profile-card p {
  font-size: 14px;
  color: #666;
}

/* Dashboard Navigation */
.dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #666;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-item:hover {
  background: #f5f7fa;
  color: #0B9444;
}

.nav-item.active {
  background: linear-gradient(135deg, #0B9444 0%, #09732f 100%);
  color: #fff;
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

/* Dashboard Content */
.dashboard-content {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  min-height: 600px;
}

.dashboard-section {
  display: none;
}

.dashboard-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #0d1821;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-state svg {
  margin-bottom: 24px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
}

/* Order Card */
.order-card {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.order-card:hover {
  border-color: #0B9444;
  box-shadow: 0 4px 12px rgba(11, 148, 68, 0.1);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.order-id {
  font-size: 16px;
  font-weight: 700;
  color: #0d1821;
}

.order-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-processing {
  background: #d1ecf1;
  color: #0c5460;
}

.status-completed {
  background: #d4edda;
  color: #155724;
}

.status-cancelled {
  background: #f8d7da;
  color: #721c24;
}

.order-details p {
  font-size: 14px;
  color: #666;
  margin: 4px 0;
}

.btn-reorder {
  margin-top: 12px;
  padding: 8px 16px;
  background: #0B9444;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-reorder:hover {
  background: #09732f;
}

/* Profile Form */
.profile-form {
  max-width: 600px;
}

.danger-zone {
  max-width: 600px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid #f0f0f0;
}

.danger-zone h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ff3b30;
  margin-bottom: 8px;
}

.danger-zone p {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

/* User Welcome */
.user-welcome {
  font-size: 14px;
  color: #666;
}

.user-welcome strong {
  color: #0d1821;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-container {
    margin-top: 120px;
  }

  .tab-content {
    padding: 24px 20px;
  }

  .form-title {
    font-size: 24px;
  }

  .dashboard-content {
    padding: 20px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .user-welcome {
    display: none;
  }
}


