/* ── Spinner animation ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Compact hero for client area only ── */
#pg-client-area .pg-header { padding: 72px 0 48px; }
@media (max-width: 640px) { #pg-client-area .pg-header { padding: 52px 0 36px; } }

/* ── Client Area sub-tabs ── */
.ca-tab {
  padding: 16px 24px;
  border: none;
  background: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--t);
  white-space: nowrap;
  position: relative;
}
.ca-tab.on   { color: var(--teal); border-bottom-color: var(--teal); }
.ca-tab:hover:not(.on) { color: var(--ink); }

.ca-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  background: #EF4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.ca-badge:empty { display: none; }

.ca-sec     { display: none; padding: 32px 0; }
.ca-sec.on  { display: block; }

/* ── Chat messages ── */
.ca-msg {
  display: flex;
  flex-direction: column;
  max-width: 72%;
}
.ca-msg-user  { align-self: flex-end;  align-items: flex-end;   }
.ca-msg-admin { align-self: flex-start; align-items: flex-start; }
.ca-msg-sender {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 3px;
}
.ca-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.ca-msg-user  .ca-msg-bubble { background: var(--teal); color: #fff; border-bottom-right-radius: 4px; }
.ca-msg-admin .ca-msg-bubble { background: var(--surface); color: var(--ink); border-bottom-left-radius: 4px; }
.ca-msg-time  { font-size: 10px; color: var(--muted); margin-top: 4px; }

/* ── Work & invoice cards ── */
.ca-work-card,
.ca-inv-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: box-shadow var(--t);
}
.ca-work-card:hover,
.ca-inv-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.07); }

/* ── Invoice filter pills ── */
.ca-inv-filter {
  padding: 6px 16px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: var(--t);
}
.ca-inv-filter.on                  { background: var(--teal); color: #fff; border-color: var(--teal); }
.ca-inv-filter:hover:not(.on)      { border-color: var(--teal); color: var(--teal); }

/* ── Auth-aware nav ── */
.nav-user  { position: relative; cursor: pointer; display: flex; align-items: center; }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--teal); color: #fff;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.nav-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 200;
}
.num-name {
  padding: 6px 10px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-user-menu button {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: var(--t);
}
.nav-user-menu button:hover { background: var(--surface); color: var(--ink); }
