/**
 * FLYEXCEL SERVICES — Client Portal CSS
 * ─────────────────────────────────────────────────────────────
 * Phase 6: Portal-specific styles and UX improvements.
 * Loaded after styles.css. Builds on top of shared components
 * defined there (cards, alerts, forms, badges, timeline, etc.)
 * ─────────────────────────────────────────────────────────────
 */

/* ═══════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════════ */

.portal-login {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #2A5298 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
  width: 100%;
  max-width: 440px;
  padding: 40px;
}

.login-logo { text-align: center; margin-bottom: 28px; }

.login-logo-icon {
  width: 60px; height: 60px;
  border-radius: 12px;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--navy);
  margin: 0 auto 10px;
}

.login-tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 24px;
}

.login-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  font-size: .9rem;
  font-weight: 600;
  color: var(--gray-400);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition);
}
.login-tab.active { color: var(--navy); border-bottom-color: var(--gold); }
.login-tab:hover:not(.active) { color: var(--gray-700); }

/* ═══════════════════════════════════════════════════════════════
   PORTAL STATUS BADGES  (mirrors dashboard.css — Phase 6)
   ═══════════════════════════════════════════════════════════════ */

.status-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
  letter-spacing: .2px;
}
.status-pending   { background: var(--gray-100); color: var(--gray-600); }
.status-progress  { background: rgba(27,58,107,.09); color: var(--navy); }
.status-awaiting  { background: var(--amber-light); color: #A07830; }
.status-completed { background: var(--green-light); color: #1E8449; }
.status-overdue   { background: var(--red-light); color: #C0392B; }
.status-rejected  { background: #F8D7DA; color: #A93226; }
.status-done      { background: var(--green-light); color: #1E8449; }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD STAT CARDS  (portal variant)
   ═══════════════════════════════════════════════════════════════ */

/* Portal stat cards use styles.css .stat-card base — these add portal polish */
.stat-card .stat-value { color: var(--navy); }

/* Onboarding banner */
#onboarding-banner {
  border-left: 4px solid var(--amber);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   JOB / SERVICE REQUEST CARDS
   ═══════════════════════════════════════════════════════════════ */

.job-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px;
  border: 1px solid var(--gray-200);
  margin-bottom: 16px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.job-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--gray-300);
  transform: translateY(-1px);
}

.job-progress-steps {
  display: flex;
  margin-top: 16px;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.job-step {
  flex: 1;
  text-align: center;
  position: relative;
  min-width: 56px;
}
.job-step::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.job-step:last-child::after { display: none; }
.job-step.done::after  { background: var(--gold); }
.job-step.current::after { background: linear-gradient(90deg, var(--gold), var(--gray-200)); }

.job-step-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gray-200);
  margin: 0 auto 6px;
  z-index: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 700;
  color: var(--gray-500);
  border: 2px solid var(--gray-200);
}
.job-step.done .job-step-dot {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}
.job-step.current .job-step-dot {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  animation: pulse 1.5s infinite;
}

.job-step-lbl { font-size: .67rem; color: var(--gray-500); line-height: 1.3; }
.job-step.done .job-step-lbl    { color: var(--gold-dark); }
.job-step.current .job-step-lbl { color: var(--navy); font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   COMPLIANCE REMINDER ITEMS
   ═══════════════════════════════════════════════════════════════ */

.reminder-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.reminder-item:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
}

.reminder-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.reminder-icon.red    { background: var(--red-light); }
.reminder-icon.amber  { background: var(--amber-light); }
.reminder-icon.green  { background: var(--green-light); }
.reminder-icon.blue   { background: var(--blue-light); }

/* ═══════════════════════════════════════════════════════════════
   DOCUMENT SECTION
   ═══════════════════════════════════════════════════════════════ */

.doc-thumb {
  width: 48px; height: 60px;
  border-radius: 4px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* Document checklist item */
.doc-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 8px;
  background: var(--white);
  transition: var(--transition);
}
.doc-check-item:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); }
.doc-check-item.uploaded { border-color: var(--green); background: #F0FFF4; }
.doc-check-item.required { border-color: var(--amber); background: var(--amber-light); }

/* Upload drop zone */
.doc-dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--gray-50);
}
.doc-dropzone:hover,
.doc-dropzone.drag-over {
  border-color: var(--navy);
  background: rgba(27,58,107,.03);
}
.doc-dropzone-icon { font-size: 2.4rem; margin-bottom: 10px; opacity: .6; }
.doc-dropzone-text { font-size: .9rem; color: var(--gray-600); }
.doc-dropzone-sub  { font-size: .78rem; color: var(--gray-400); margin-top: 6px; }

/* ═══════════════════════════════════════════════════════════════
   PAYMENT SECTION
   ═══════════════════════════════════════════════════════════════ */

.pay-method {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.pay-method:hover,
.pay-method.selected { border-color: var(--navy); background: #EEF3FF; }
.pay-method input[type=radio] { accent-color: var(--navy); }

.invoice-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: .875rem;
}
.invoice-row:last-child { border: none; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATES  (portal variant)
   ═══════════════════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 48px 20px;
}
.empty-state-icon  { font-size: 3rem; display: block; margin-bottom: 14px; opacity: .5; }
.empty-state-title { font-size: 1rem; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; }
.empty-state-sub   { font-size: .85rem; color: var(--gray-500); margin-bottom: 20px; }

/* ═══════════════════════════════════════════════════════════════
   PORTAL-SPECIFIC CARD HIERARCHY IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════ */

/* Card headers for portal use gold accent on active items */
.card-header-gold {
  background: linear-gradient(90deg, rgba(201,168,76,.12), rgba(201,168,76,.04));
  border-bottom: 2px solid rgba(201,168,76,.25);
}

/* Compliance calendar card */
.cal-card-urgent {
  border-left-color: var(--red) !important;
  background: #FFFAFA;
}
.cal-card-warning {
  border-left-color: var(--amber) !important;
  background: var(--amber-light);
}

/* Service module icons row */
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.module-btn {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.module-btn:hover {
  border-color: var(--navy);
  box-shadow: 0 4px 16px rgba(27,58,107,.1);
  transform: translateY(-2px);
}
.module-btn-icon  { font-size: 1.8rem; margin-bottom: 8px; display: block; }
.module-btn-label { font-size: .78rem; font-weight: 600; color: var(--navy); }
.module-btn-badge {
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--red-light);
  color: var(--red);
  display: inline-block;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — PORTAL SPECIFIC
   ═══════════════════════════════════════════════════════════════ */

/* ── 1024px ── */
@media (max-width: 1024px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── 768px — tablet (supplements styles.css) ── */
@media (max-width: 768px) {
  .login-card { padding: 28px 20px; }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .job-progress-steps { font-size: .72rem; }
  .reminder-item { flex-wrap: wrap; }
  .reminder-item .btn { width: 100%; text-align: center; margin-top: 8px; }
  .pay-method { flex-wrap: wrap; }
}

/* ── 390px — iPhone / small phone ── */
@media (max-width: 390px) {
  .portal-login { padding: 14px; }
  .login-card { padding: 24px 16px; border-radius: var(--radius); }
  .login-tab { font-size: .82rem; padding: 8px 6px; }
  .module-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .module-btn { padding: 12px 8px; }
  .job-card { padding: 16px; }
  .reminder-icon { width: 36px; height: 36px; font-size: 1.1rem; }
  .doc-dropzone { padding: 24px 14px; }
}
