/* ==========================================================================
   Leverage Tax Specialists — Interactive Client Portal Styles
   Case Tracker, Outstanding Items, Document Vault, Secure Chat
   ========================================================================== */

.portal-layout {
  background: var(--slate-100);
  min-height: calc(100vh - 45px);
  padding: 2.5rem 0 5rem;
}

/* Portal Welcome & Header */
.portal-welcome-hero {
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 100%);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.portal-welcome-hero::after {
  content: '';
  position: absolute;
  top: -60%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.portal-welcome-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.portal-welcome-text h1 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

.portal-welcome-text p {
  color: var(--slate-300);
  font-size: 0.95rem;
}

.case-id-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--gold-400);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Case Stage Progress Bar */
.case-progress-wrap {
  position: relative;
  z-index: 2;
}

.progress-labels-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
}

.progress-status-title {
  color: var(--gold-400);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-pct-badge {
  font-weight: 800;
  color: var(--white);
}

.portal-progress-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.portal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500) 0%, var(--emerald-500) 100%);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-steps-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--slate-400);
}

.p-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.p-step.done {
  color: var(--emerald-400);
  font-weight: 600;
}

.p-step.active {
  color: var(--white);
  font-weight: 700;
}

/* Portal Grid 2-Column Layout */
.portal-main-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: flex-start;
}

/* Outstanding Action Items Card */
.outstanding-actions-card {
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.outstanding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.outstanding-header h3 {
  font-size: 1.15rem;
  color: #92400E;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.action-item-box {
  background: var(--white);
  border: 1px solid #FDE68A;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.action-item-box.completed {
  background: #F0FDF4;
  border-color: #BBF7D0;
  opacity: 0.75;
}

.action-left {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.action-num-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.action-item-box.completed .action-num-badge {
  background: var(--emerald-600);
}

.action-text h5 {
  font-size: 0.925rem;
  color: var(--navy-900);
  margin-bottom: 0.15rem;
}

.action-text p {
  font-size: 0.8rem;
  color: var(--slate-600);
  margin: 0;
}

/* Document Vault Tabs & List */
.doc-vault-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.doc-vault-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vault-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}

.vault-tab-btn {
  background: transparent;
  border: none;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--slate-600);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.vault-tab-btn.active {
  background: var(--white);
  color: var(--navy-900);
  box-shadow: var(--shadow-sm);
}

.vault-file-list {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vault-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--slate-50);
  font-size: 0.875rem;
}

.vault-file-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.vault-file-icon {
  color: var(--navy-900);
}

.vault-file-name {
  font-weight: 600;
  color: var(--navy-900);
}

.vault-file-meta {
  font-size: 0.75rem;
  color: var(--slate-500);
}

/* Secure Chat Box */
.chat-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 480px;
}

.chat-card-header {
  padding: 1rem 1.25rem;
  background: var(--navy-900);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-specialist-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.specialist-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.specialist-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--white);
}

.specialist-title {
  font-size: 0.725rem;
  color: var(--gold-400);
}

.chat-messages-container {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: #F8FAFC;
}

.chat-bubble {
  max-width: 82%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  line-height: 1.45;
  position: relative;
}

.chat-bubble.specialist {
  background: var(--white);
  color: var(--slate-800);
  border: 1px solid var(--slate-200);
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-sm);
}

.chat-bubble.client {
  background: var(--navy-900);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: var(--radius-sm);
}

.chat-bubble.system {
  background: var(--slate-200);
  color: var(--slate-600);
  font-size: 0.775rem;
  align-self: center;
  text-align: center;
  padding: 0.4rem 0.85rem;
}

.chat-bubble-time {
  font-size: 0.685rem;
  margin-top: 0.35rem;
  opacity: 0.7;
  text-align: right;
}

.chat-input-bar {
  padding: 0.85rem 1.25rem;
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-input-bar input {
  flex: 1;
}

/* Consultation Card */
.consultation-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.consult-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.consult-date-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.calendar-mini-badge {
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  text-align: center;
  flex-shrink: 0;
}

.cal-month {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--gold-400);
  font-weight: 700;
}

.cal-day {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}
