/* ============================================================
   Búzios — Client portal (conta)
   Same quiet-luxury tokens as public site
   ============================================================ */

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

.client-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 239, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: 64px;
  display: flex;
  align-items: center;
}

.client-header-inner {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.client-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

.client-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.client-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.client-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.client-main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3.5rem;
  text-align: left;
}

/* —— Auth card —— */
.auth-wrap {
  max-width: 400px;
  margin: 2rem auto 0;
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: 0 1px 0 var(--color-shadow);
}

.auth-card h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.auth-card .auth-sub {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

.auth-tabs {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.auth-tab {
  flex: 1;
  padding: 0.65rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  transition: background var(--t-fast), color var(--t-fast);
}

.auth-tab.is-active {
  background: var(--color-text);
  color: #fff;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* display:flex above would otherwise override the HTML hidden attribute */
.auth-form[hidden] {
  display: none !important;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.field input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  font-size: 0.95rem;
  font-weight: 400;
  transition: border-color var(--t-fast);
}

.field input:focus {
  outline: none;
  border-color: var(--color-border-strong);
}

.field input::placeholder {
  color: var(--color-text-soft);
  font-weight: 300;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  margin-top: 0.35rem;
  background: var(--color-text);
  color: #fff;
  border: 1px solid var(--color-text);
  border-radius: var(--radius-btn);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: background var(--t-fast), opacity var(--t-fast);
}

.btn-primary:hover:not(:disabled) {
  background: #000;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.btn-ghost:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.auth-error {
  font-size: 0.85rem;
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.06);
  border: 1px solid rgba(185, 28, 28, 0.15);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  line-height: 1.45;
}

.auth-error[hidden],
.auth-ok[hidden] {
  display: none !important;
}

.auth-ok {
  font-size: 0.85rem;
  color: #166534;
  background: rgba(22, 101, 52, 0.06);
  border: 1px solid rgba(22, 101, 52, 0.15);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
}

.auth-hint {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--color-text-soft);
  text-align: center;
  line-height: 1.5;
}

.auth-forgot {
  margin: 0.35rem 0 0;
  text-align: center;
}

.link-forgot {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.link-forgot:hover {
  color: var(--color-text);
}

.forgot-panel {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface-soft);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.5;
  text-align: center;
}

.forgot-panel[hidden] {
  display: none !important;
}

.forgot-panel p {
  margin: 0 0 0.75rem;
}

.forgot-panel .btn-wa {
  display: inline-flex;
  width: auto;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

.form-error {
  font-size: 0.85rem;
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.06);
  border: 1px solid rgba(185, 28, 28, 0.15);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  margin: 0;
}

.form-error[hidden] {
  display: none !important;
}

.change-password-form {
  margin-top: 0.25rem;
  max-width: 420px;
}

.change-password-form .btn-primary {
  margin-top: 0.5rem;
}

.trainings-pill {
  display: block;
  width: fit-content;
  margin-top: 0.55rem;
}

/* —— Training sheet (read-only, paper-like, single column) —— */
.sheet-paper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.15rem 1.5rem;
}
.sheet-header {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--color-border);
}
.sheet-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.55rem;
}
.sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.sheet-meta strong {
  font-weight: 500;
  color: var(--color-text-soft);
  margin-right: 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sheet-methods {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.45;
}
.sheet-block {
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.sheet-block-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}
.sheet-day-hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--color-text-soft);
}
.sheet-ex-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sheet-ex-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  font-size: 0.9rem;
}
.sheet-ex-list .ex-name { font-weight: 500; }
.sheet-ex-list .ex-detail {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 300;
}
.sheet-block-time {
  font-size: 0.8rem;
  color: var(--color-text-soft);
  margin-top: 0.35rem;
}
.sheet-notes {
  margin: 1rem 0;
  font-size: 0.85rem;
}
.sheet-notes ul {
  margin: 0.35rem 0 0 1.1rem;
  padding: 0;
  color: var(--color-text-muted);
}
.sheet-evals { margin-top: 0.5rem; }
.sheet-eval-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.65rem;
  background: var(--color-surface-soft);
}
.sheet-eval-date {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}
.sheet-eval-metrics { margin: 0; }
.sheet-eval-metrics .info-row {
  padding: 0.35rem 0;
  border-bottom: none;
  font-size: 0.85rem;
}

/* —— Dashboard —— */
.dash-hidden {
  display: none !important;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  object-fit: cover;
  background: var(--color-surface-soft);
  flex-shrink: 0;
}

.profile-avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-text-muted);
}

.profile-meta h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.15rem;
}

.profile-meta p {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--color-text-muted);
}

.plan-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.35rem 1.25rem;
  margin-bottom: 1.25rem;
}

.plan-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.plan-card-head h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

.plan-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface-soft);
}

.badge.is-active {
  border-color: rgba(22, 101, 52, 0.25);
  color: #166534;
  background: rgba(22, 101, 52, 0.08);
}

.badge.is-warn {
  border-color: rgba(180, 83, 9, 0.3);
  color: #b45309;
  background: rgba(180, 83, 9, 0.08);
}

.badge.is-danger {
  border-color: rgba(185, 28, 28, 0.25);
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.06);
}

.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}

.plan-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: 0.15rem;
}

.plan-field span {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-text);
}

.days-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-surface-soft);
}

.days-pill.is-ok { color: #166534; border-color: rgba(22, 101, 52, 0.2); }
.days-pill.is-warn { color: #b45309; border-color: rgba(180, 83, 9, 0.25); }
.days-pill.is-danger { color: #b91c1c; border-color: rgba(185, 28, 28, 0.2); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin: 1.75rem 0 0.85rem;
  color: var(--color-text);
}

.info-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row dt {
  color: var(--color-text-muted);
  font-weight: 400;
}

.info-row dd {
  text-align: right;
  font-weight: 500;
}

.empty-note {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--color-text-soft);
  padding: 1rem 0;
  line-height: 1.5;
}

.coming-soon {
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.coming-soon strong {
  display: block;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--color-text);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 100;
  max-width: calc(100% - 2rem);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out), visibility 0.25s;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.account-actions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.account-actions .btn-ghost,
.account-actions .btn-danger {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(185, 28, 28, 0.35);
  border-radius: var(--radius-btn);
  color: #b91c1c;
  background: transparent;
  font-weight: 500;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.btn-danger:hover {
  background: rgba(185, 28, 28, 0.06);
  border-color: rgba(185, 28, 28, 0.5);
}

.account-actions-note {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--color-text-soft);
  text-align: center;
  line-height: 1.45;
  margin-top: 0.25rem;
}

@media (min-width: 480px) {
  .auth-card {
    padding: 2.25rem 2rem 2rem;
  }
  .client-main {
    padding-top: 2.25rem;
  }
}


.auth-hint-help {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
}

.auth-hint a {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast);
}

.auth-hint a:hover {
  border-bottom-color: var(--color-accent);
}


.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input {
  width: 100%;
  padding-right: 4.5rem;
}

.password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  padding: 0.25rem 0.35rem;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color var(--t-fast);
}

.password-toggle:hover {
  color: var(--color-text);
}

.check-stay {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text-muted);
  cursor: pointer;
  user-select: none;
  margin-top: -0.15rem;
}

.check-stay input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-text);
  cursor: pointer;
  flex-shrink: 0;
}

/* —— Visibility helpers —— */
.dash-only.dash-hidden,
.auth-only.dash-hidden {
  display: none !important;
}

body.is-dash .auth-only {
  display: none !important;
}

body.is-dash .dash-only {
  display: flex;
}

/* —— Left sidebar (admin-style) —— */
:root {
  --client-nav-w: 72px;
  --client-nav-w-lg: 220px;
  --client-sidebar: #1c1917;
  --client-sidebar-hover: rgba(255, 255, 255, 0.08);
  --client-sidebar-active: #c45c26;
}

body.is-dash .client-shell {
  flex-direction: row;
}

body.is-dash .client-main {
  max-width: none;
  margin: 0;
  padding: 1.75rem 1.5rem 3.5rem;
  padding-left: calc(var(--client-nav-w) + 1.5rem);
  width: 100%;
}

.client-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--client-nav-w);
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0.4rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: var(--client-sidebar);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 50;
  box-shadow: 4px 0 24px rgba(28, 25, 23, 0.14);
}

body.is-dash .client-nav {
  display: flex;
}

.client-nav-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 0.25rem 1rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  text-align: center;
}

.client-nav-brand .brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  display: block;
}

.client-nav-brand .brand-text {
  display: none;
  flex-direction: column;
  gap: 0.1rem;
}

.client-nav-brand .brand-name {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.client-nav-brand .brand-sub {
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.client-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.client-nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 100%;
  min-height: 52px;
  padding: 0.45rem 0.25rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.client-nav-link:hover {
  background: var(--client-sidebar-hover);
  color: rgba(255, 255, 255, 0.95);
}

.client-nav-link.is-active {
  background: var(--client-sidebar-active);
  color: #fff;
}

.client-nav-link .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.client-nav-link .nav-icon svg {
  display: block;
}

.client-nav-link .nav-label {
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-nav-footer {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.client-nav-external {
  color: rgba(255, 255, 255, 0.45);
}

.client-nav-logout {
  color: rgba(255, 180, 180, 0.75);
}

.client-nav-logout:hover {
  background: rgba(185, 28, 28, 0.2);
  color: #fecaca;
}

/* Wider sidebar on larger screens */
@media (min-width: 768px) {
  body.is-dash .client-main {
    padding-left: calc(var(--client-nav-w-lg) + 2rem);
    padding-right: 2rem;
    max-width: calc(720px + var(--client-nav-w-lg) + 4rem);
  }

  .client-nav {
    width: var(--client-nav-w-lg);
    padding: 0.85rem 0.65rem;
  }

  .client-nav-brand {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.7rem;
    padding: 0.5rem 0.5rem 1.1rem;
    text-align: left;
  }

  .client-nav-brand .brand-text {
    display: flex;
  }

  .client-nav-link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.75rem;
    min-height: 44px;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    text-align: left;
  }

  .client-nav-link .nav-label {
    font-size: 0.9rem;
  }
}

/* —— Dashboard sections —— */
.dash-page-head {
  margin-bottom: 1.35rem;
}

.dash-page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.dash-section {
  display: none;
}

.dash-section.is-active {
  display: block;
}

.dash-section[hidden] {
  display: none !important;
}

.section-title:first-child {
  margin-top: 0;
}
