/*
 * =============================================
 * Alka Refrigeration — Customer Profile Styles
 * Clean card-based layout with tabs
 * =============================================
 */

/* =============================================
   PROFILE MAIN
   ============================================= */
.profile-main {
  padding-top: 90px;
  padding-bottom: 60px;
  min-height: 100vh;
  background: linear-gradient(180deg, #f0f2f8 0%, #f8f9fc 100%);
}

/* =============================================
   PROFILE HEADER
   ============================================= */
.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,111,0,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #ff6f00;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.profile-avatar-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 24px;
  height: 24px;
  background: #2e7d32;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid #1a237e;
}

.profile-info h1 {
  font-size: 1.5rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-info p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
}

/* =============================================
   PROFILE TABS
   ============================================= */
.profile-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  padding: 6px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid #eceef5;
}

.profile-tab {
  flex: 1;
  padding: 14px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #636b83;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.profile-tab:hover {
  background: #f5f6fa;
  color: var(--primary);
}

.profile-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,107,0,0.25);
}

/* =============================================
   TAB CONTENT
   ============================================= */
.tab-content {
  display: none;
  animation: fadeTab 0.3s ease;
}

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

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

/* =============================================
   USER INFO CARD
   ============================================= */
.info-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #eceef5;
}

.info-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 24px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.info-item label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8890a7;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.info-item .form-control {
  padding: 12px 16px;
  font-size: 0.92rem;
  border-radius: 10px;
}

.info-item .form-control[readonly] {
  background: #f5f6fa;
  color: #636b83;
  cursor: default;
}

.btn-save-profile {
  padding: 12px 32px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff6f00, #ff8f00);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,111,0,0.3);
  transition: all 0.2s ease;
}

.btn-save-profile:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255,111,0,0.4);
}

/* =============================================
   COMPLAINT CARDS (PROFILE)
   ============================================= */
.profile-complaint-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #eceef5;
  transition: all 0.2s ease;
}

.profile-complaint-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}

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

.pcc-service {
  font-size: 1.05rem;
  font-weight: 700;
  color: #232838;
}

.pcc-badge {
  padding: 5px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pcc-badge-pending { background: #fff8e1; color: #f57f17; }
.pcc-badge-called { background: #e3f2fd; color: #1565c0; }
.pcc-badge-confirmed { background: #e8f5e9; color: #2e7d32; }
.pcc-badge-on-the-way { background: #f3e5f5; color: #7b1fa2; }
.pcc-badge-completed { background: #e8f5e9; color: #2e7d32; }
.pcc-badge-cancelled { background: #ffebee; color: #c62828; }

/* Status Timeline */
.status-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
  padding: 16px 0;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.timeline-step::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: #eceef5;
  z-index: 0;
}

.timeline-step:last-child::after {
  display: none;
}

.timeline-step.done::after {
  background: linear-gradient(90deg, #2e7d32, #4caf50);
}

.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  z-index: 1;
  transition: all 0.3s ease;
}

.timeline-step.done .timeline-dot {
  background: #2e7d32;
  color: #fff;
  box-shadow: 0 2px 8px rgba(46,125,50,0.3);
}

.timeline-step.active .timeline-dot {
  background: #ff6f00;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,111,0,0.3);
  animation: pulseDot 2s infinite;
}

.timeline-step.upcoming .timeline-dot {
  background: #eceef5;
  color: #b0b5c9;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 2px 8px rgba(255,111,0,0.3); }
  50% { box-shadow: 0 2px 16px rgba(255,111,0,0.5); }
}

.timeline-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #8890a7;
  margin-top: 8px;
  text-align: center;
}

.timeline-step.done .timeline-label { color: #2e7d32; }
.timeline-step.active .timeline-label { color: #ff6f00; }

.pcc-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  background: #f8f9fc;
  border-radius: 12px;
  margin-bottom: 16px;
}

.pcc-detail {
  font-size: 0.82rem;
}

.pcc-detail .label {
  color: #8890a7;
  font-weight: 500;
  margin-bottom: 2px;
}

.pcc-detail .value {
  color: #353b50;
  font-weight: 600;
}

/* Payment Section */
.pcc-payment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8f9fc, #eceef5);
  border-radius: 12px;
  border: 1px solid #d8dbe8;
}

.payment-info .payment-label {
  font-size: 0.78rem;
  color: #8890a7;
  font-weight: 500;
}

.payment-info .payment-amount {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gray-800);
}

.payment-info .payment-paid {
  color: #2e7d32;
}

.btn-pay-online {
  padding: 10px 24px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff6f00, #ff8f00);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255,111,0,0.3);
  transition: all 0.2s ease;
}

.btn-pay-online:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,111,0,0.4);
}

.btn-pay-disabled {
  background: #e8f5e9;
  color: #2e7d32;
  cursor: default;
  box-shadow: none;
}

.btn-pay-disabled:hover {
  transform: none;
  box-shadow: none;
}

/* =============================================
   COUPON CARDS
   ============================================= */
.coupons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.coupon-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(13,27,74,0.06);
  border: 1px solid #eceef5;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.coupon-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(13,27,74,0.1);
}

.coupon-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #ff6f00, #ffab00);
}

.coupon-discount {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 2rem;
  font-weight: 800;
  color: #ff6f00;
  margin-bottom: 4px;
}

.coupon-discount span {
  font-size: 0.88rem;
  font-weight: 600;
}

.coupon-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #232838;
  margin-bottom: 8px;
}

.coupon-code-display {
  display: inline-block;
  padding: 6px 16px;
  background: #f5f6fa;
  border: 1px dashed #b0b5c9;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.08em;
  margin: 8px 0;
}

.coupon-meta {
  font-size: 0.78rem;
  color: #8890a7;
  margin-top: 8px;
}

/* =============================================
   PAYMENT MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13,27,74,0.4);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.3s ease;
}

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

.modal-card h3 {
  font-size: 1.2rem;
  color: var(--gray-800);
  margin-bottom: 20px;
}

.payment-summary {
  background: #f8f9fc;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.92rem;
  color: #636b83;
}

.payment-row.payment-total {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gray-800);
  border-top: 1px solid #d8dbe8;
  margin-top: 8px;
  padding-top: 12px;
}

.text-success { color: #2e7d32; }

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-cancel {
  flex: 1;
  padding: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #636b83;
  background: #eceef5;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: #d8dbe8;
}

.btn-pay {
  flex: 1;
  padding: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2e7d32, #43a047);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(46,125,50,0.3);
  transition: all 0.2s ease;
}

.btn-pay:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(46,125,50,0.4);
}

/* =============================================
   LOADING & EMPTY STATES
   ============================================= */
.profile-loading {
  text-align: center;
  padding: 60px 20px;
  color: #8890a7;
}

.profile-loading .spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(26,35,126,0.15);
  border-top-color: #1a237e;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 12px;
}

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

.profile-empty {
  text-align: center;
  padding: 60px 20px;
}

.profile-empty .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.profile-empty h3 {
  font-size: 1.1rem;
  color: #636b83;
  margin-bottom: 8px;
}

.profile-empty p {
  font-size: 0.88rem;
  color: #8890a7;
}

/* =============================================
   TOAST (standalone for profile page)
   ============================================= */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  animation: toastSlideIn 0.3s ease;
  max-width: 380px;
}

.toast.success { background: #e8f5e9; color: #2e7d32; }
.toast.error { background: #ffebee; color: #c62828; }
.toast.warning { background: #fff8e1; color: #f57f17; }
.toast.info { background: #e3f2fd; color: #1565c0; }

.toast-icon { font-size: 1.1rem; }
.toast-message { flex: 1; }
.toast-close { cursor: pointer; opacity: 0.6; font-size: 0.85rem; }
.toast-close:hover { opacity: 1; }

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

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

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

  .profile-tabs {
    flex-direction: column;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .pcc-details {
    grid-template-columns: 1fr;
  }

  .pcc-payment {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .status-timeline {
    flex-wrap: wrap;
    gap: 8px;
  }

  .timeline-step::after {
    display: none;
  }

  .coupons-grid {
    grid-template-columns: 1fr;
  }

  .pcc-actions {
    flex-direction: column;
  }

  .pcc-actions button,
  .pcc-actions a {
    width: 100%;
    justify-content: center;
  }
}

/* =============================================
   EDIT / CANCEL BOOKING ACTIONS
   ============================================= */
.pcc-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pcc-actions-confirmed {
  flex-direction: column;
  align-items: flex-start;
}

.btn-pcc-edit,
.btn-pcc-cancel,
.btn-pcc-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-pcc-edit {
  background: #e3f2fd;
  color: #1565c0;
}
.btn-pcc-edit:hover { background: #bbdefb; transform: translateY(-1px); }

.btn-pcc-cancel {
  background: #ffebee;
  color: #c62828;
}
.btn-pcc-cancel:hover { background: #ffcdd2; transform: translateY(-1px); }

.btn-pcc-whatsapp {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1.5px solid #a5d6a7;
  font-size: 0.85rem;
  padding: 9px 20px;
}
.btn-pcc-whatsapp:hover { background: #c8e6c9; transform: translateY(-1px); }

.confirmed-lock-msg {
  font-size: 0.82rem;
  color: #f57f17;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Cancellation Notice on Card */
.pcc-cancel-notice {
  margin: 10px 0 12px;
}

.cancel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #ffebee;
  color: #c62828;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #ffcdd2;
}
