/* ==========================================================================
   CLIENT DASHBOARDS
   Password-protected report pages (single-client_dashboard.html).
   ========================================================================== */

.td-client-logo {
  margin: 0 0 var(--space-lg);
}

.td-client-logo img {
  display: block;
  max-height: 64px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.dashboard-body {
  padding-block: clamp(2rem, 5vw, 4rem);
}

/* WordPress password form */
.dashboard-body .post-password-form {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-xl, 2rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.dashboard-body .post-password-form p {
  margin: 0 0 var(--space-md);
}

.dashboard-body .post-password-form label {
  display: block;
  font-weight: 600;
}

.dashboard-body .post-password-form input[type="password"] {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font: inherit;
}

.dashboard-body .post-password-form input[type="submit"] {
  padding: 0.7rem 1.4rem;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.dashboard-body .post-password-form input[type="submit"]:hover {
  background: var(--color-accent-hover);
}

/* WP prints "Password: [input] [Enter]" in one <p>; lay it out as a row so the
   button doesn't wrap under the field. */
.dashboard-body .post-password-form p:last-of-type {
  display: flex;
  align-items: flex-end;
  gap: var(--space-md, 1rem);
  margin-bottom: 0;
}

.dashboard-body .post-password-form p:last-of-type label {
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-body .post-password-form input[type="submit"] {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .dashboard-body .post-password-form p:last-of-type {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Dashboard body */
.td-intro {
  max-width: 60ch;
  margin: 0 0 var(--space-xl, 2rem);
  color: var(--color-text-secondary);
}

.td-notice {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--color-surface-elevated);
  color: var(--color-text-secondary);
}

.td-notice--admin {
  margin-bottom: var(--space-lg);
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.td-section + .td-section {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.td-section-title {
  margin: 0 0 0.35rem;
}

.td-section-desc {
  margin: 0 0 var(--space-md);
  color: var(--color-text-secondary);
}

.td-frame {
  margin-top: var(--space-md);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.td-frame iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* Tabs layout */
.td-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.td-tab {
  padding: 0.75rem 1.1rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--color-text-secondary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.td-tab:hover {
  color: var(--color-text-primary);
}

.td-tab.is-active {
  color: var(--color-text-primary);
  border-bottom-color: var(--color-accent);
}

.td-section[hidden] {
  display: none;
}

.td-section[role="tabpanel"] + .td-section[role="tabpanel"] {
  margin-top: 0;
}
