/* Extends variables from style.css */

.client-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-color);
}

.topbar {
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-logout {
  background: transparent;
  color: var(--color-pink);
  font-size: 1.2rem;
  margin-left: 10px;
}

.client-content {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
  padding: 2.5rem 3rem;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  margin-bottom: 3rem;
}

.welcome-banner h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  font-family: 'Outfit', sans-serif;
}

.time-card {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(5px);
  padding: 1.5rem 2.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid rgba(255,255,255,0.3);
}

.time-icon {
  font-size: 3rem;
}

.time-details {
  display: flex;
  flex-direction: column;
}

.time-amount {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  font-family: 'Outfit', sans-serif;
}

.time-label {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dashboard-section h2 {
  font-size: 1.8rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.history-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.consultant-info {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.consultant-info img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.consultant-info h4 {
  font-size: 1.2rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.consultant-info .date {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-expand {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-expand:hover {
  background: #e2e8f0;
}
[data-theme='dark'] .btn-expand:hover {
  background: #334155;
}

.history-body {
  padding: 2rem;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-body.collapsed {
  display: none;
}

.chat-bubble {
  max-width: 80%;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.chat-bubble.consultant {
  background: #111827;
  color: #ffffff;
  border: 1px solid #000000;
  align-self: flex-start;
  border-top-left-radius: 0;
}

.chat-bubble.client {
  background: var(--color-blue);
  color: #fff;
  align-self: flex-end;
  border-top-right-radius: 0;
}

.chat-bubble strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  opacity: 0.8;
}

@media (max-width: 768px) {
  body { display: flex; flex-direction: column; min-height: 100vh; justify-content: safe center; }
  .welcome-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  .welcome-banner h1 { font-size: 1.8rem; }
  .time-card { padding: 1rem 1.2rem; gap: 1rem; }
  .time-icon { font-size: 2.2rem; }
  .time-amount { font-size: 2.4rem; }
  .time-label { font-size: 0.8rem; }
  .client-layout { flex-direction: column; }
  /* The header grows with its content instead of the fixed desktop height */
  .topbar { height: auto; min-height: 56px; flex-wrap: wrap; gap: 0.5rem 1rem; padding: 0.6rem 1rem; }
  .topbar-right { flex-wrap: wrap; gap: 0.5rem 0.8rem; }
  .user-profile span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .btn-logout { margin-left: 0; min-width: 40px; min-height: 40px; }
  .dashboard-section { display: flex; flex-direction: column; }
  .dashboard-section > div { grid-template-columns: 1fr; }
  .dashboard-section h2 { font-size: 1.4rem; }
  .client-content { padding: 1rem 0.9rem 2rem; }
  .history-header { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1rem 1.2rem; }
  .history-body { padding: 1rem; }
  .chat-bubble { max-width: 90%; }
  .btn-expand { width: 100%; min-height: 44px; }
  /* 16px text in form fields stops iPhones from zooming in when a field is tapped */
  input, textarea, select { font-size: 16px !important; }
}


