/* Client portal layout */
.auth-email-label {
  display: block;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.auth-email-input {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: var(--font);
  background: var(--white);
  color: var(--ink-1);
  margin-bottom: 12px;
}
.auth-email-btn { margin-top: 4px; }
.auth-sent { color: var(--green); font-size: 0.88rem; margin-top: 12px; }

#clientApp { visibility: hidden; pointer-events: none; }
body.auth-ready #clientApp { visibility: visible; pointer-events: auto; }

.client-auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 18px;
}
.client-auth-logo {
  height: 44px;
  margin: 0 auto 12px;
}
.client-auth-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink-1);
}

.client-wrap { max-width: 560px; margin: 0 auto; }

.client-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 4px 8px 16px;
  margin-bottom: 4px;
}

.client-header .brand {
  min-width: 0;
  flex: 1;
  max-width: calc(100% - 108px);
}

.client-header .brand-lockup {
  display: inline-grid;
  grid-template-columns: max-content;
  justify-items: start;
  align-content: start;
  gap: 6px;
  max-width: 100%;
}

.client-header .logo-stack { display: grid; line-height: 0; }
.client-header .logo-stack .logo {
  grid-area: 1 / 1;
  height: 50px;
  width: auto;
  max-width: min(78vw, 340px);
  object-fit: contain;
  object-position: left top;
  border-radius: 6px;
}
.client-header .logo-stack .logo-light { visibility: hidden; pointer-events: none; }
[data-theme="light"] .client-header .logo-stack .logo-dark { visibility: hidden; pointer-events: none; }
[data-theme="light"] .client-header .logo-stack .logo-light { visibility: visible; pointer-events: auto; }

.client-header .eyebrow {
  margin: 0;
  padding-left: 2px;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  font-weight: 600;
  white-space: nowrap;
}

.client-header .header-actions {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.06);
  border: none;
  color: var(--ink-1);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.15s;
}
.theme-toggle:active { transform: scale(0.96); }
@media (hover: hover) {
  .theme-toggle:hover { background: rgba(29, 29, 31, 0.1); }
}
[data-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: var(--cyan);
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.client-header .greeting { text-align: right; padding-top: 2px; }
.client-header .greeting b {
  display: block;
  color: var(--ink-1);
  font-size: 1.02rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}
.client-header .greeting span { font-size: 0.78rem; color: var(--ink-3); }

@media (max-width: 640px) {
  .client-header .logo-stack .logo {
    height: 30px;
    max-width: min(64vw, 200px);
  }
  .theme-toggle { width: 36px; height: 36px; border-radius: 10px; }
  .theme-toggle svg { width: 18px; height: 18px; }
  .client-header .greeting b { font-size: 0.94rem; }
}

.tile-grid { display: grid; gap: 10px; }

.tile-square-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s, transform 0.15s;
}
.tile:active { transform: scale(0.985); }
@media (hover: hover) {
  .tile:hover { background: var(--panel-hover); }
}

.tile-square {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  aspect-ratio: 1;
  width: min(196px, 52vw);
  gap: 14px;
  padding: 22px 16px;
}
.tile-square .tile-ic {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(84, 213, 245, 0.18);
  color: var(--cyan);
}
.tile-square .tile-ic svg { width: 34px; height: 34px; }
.tile-square .tile-copy h2 { font-size: 1.08rem; }
.tile-square .tile-copy p,
.tile-square .tile-chev { display: none; }

.tile-ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--ic-bg);
  color: var(--cyan);
}
.tile-ic.gold { color: var(--gold); }
.tile-copy h2 { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.02em; }
.tile-copy p { color: var(--ink-2); font-size: 0.86rem; margin-top: 2px; }
.tile-chev { margin-left: auto; color: var(--ink-3); }

.client-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 0 8px;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.72rem;
}
.sign-out-btn {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (hover: hover) {
  .sign-out-btn:hover { color: var(--ink-2); }
}
.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.refresh-btn:active:not(:disabled) { background: var(--surface-hover); transform: scale(0.98); }
.refresh-btn:disabled { opacity: 0.45; cursor: default; }
.refresh-btn svg { width: 14px; height: 14px; flex: none; }

.doc-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  font-weight: 550;
}
.doc-link .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  flex: none;
}
.doc-link .arrow { margin-left: auto; color: var(--ink-3); }

.progress-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 4px 10px;
}

.page-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 16px;
}
.page-back {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: var(--chip-bg);
  text-decoration: none;
}
.page-top h1 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.03em; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}
.card h3 { font-size: 1rem; font-weight: 650; margin-bottom: 6px; }
.card .meta { color: var(--ink-3); font-size: 0.82rem; margin-bottom: 10px; }
.card .body { color: var(--ink-2); font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; }
.card .section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 12px 0 6px;
}
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.5;
}

.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: var(--font);
  background: var(--white);
  color: var(--ink-1);
}
.form-submit {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 650;
  background: var(--cyan);
  color: #0a1620;
  cursor: pointer;
}
.form-submit:disabled { opacity: 0.55; }
.form-success { color: var(--green); font-size: 0.9rem; margin-top: 12px; text-align: center; }

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--chip-bg);
  overflow: hidden;
  margin: 10px 0 6px;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), #3bc4e8);
  border-radius: 999px;
}
.pt-stat { font-size: 0.86rem; color: var(--ink-2); }

.schedule-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.schedule-item:last-child { border-bottom: none; }
.schedule-time { font-weight: 650; min-width: 72px; color: var(--ink-1); }
.schedule-detail { color: var(--ink-2); font-size: 0.92rem; }

.link-btn {
  display: inline-block;
  margin-top: 12px;
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
}
