/* Jayce customer portal — account, settings, subscription */

:root {
  --cp-bg: #0b1220;
  --cp-panel: #111827;
  --cp-panel-2: #1e293b;
  --cp-line: #334155;
  --cp-text: #e2e8f0;
  --cp-muted: #94a3b8;
  --cp-teal: #14b8a6;
  --cp-teal-btn: #0d9488;
  --cp-amber: #f59e0b;
  --cp-danger: #f87171;
  --cp-ok: #4ade80;
  --cp-input-bg: #0f172a;
  --cp-radius: 8px;
  --cp-font: "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--cp-bg);
  color: var(--cp-text);
  font-family: var(--cp-font);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.cp-banner {
  background: #422006;
  color: #fde68a;
  border-bottom: 1px solid #92400e;
  padding: 8px 16px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.cp-banner strong {
  color: #fef3c7;
}

.cp-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--cp-line);
  background: #0f172a;
}

.cp-header-brand {
  min-width: 0;
}

.cp-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid #0f766e;
  background: #0d9488;
  color: #ecfdf5;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.25);
}

.cp-back-link:hover {
  background: #14b8a6;
  border-color: #0d9488;
  color: #fff;
  text-decoration: none;
}

.cp-header h1 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--cp-teal);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cp-header p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--cp-muted);
  max-width: 40rem;
  line-height: 1.4;
}

.cp-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cp-header-actions .account-menu {
  margin-left: 0.15rem;
}

.cp-status {
  font-size: 0.72rem;
  color: var(--cp-muted);
  min-height: 1.2em;
}

.cp-status.ok {
  color: var(--cp-ok);
}

.cp-status.warn {
  color: var(--cp-amber);
}

.cp-main {
  display: grid;
  grid-template-columns: minmax(200px, 240px) 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
}

@media (max-width: 860px) {
  .cp-main {
    grid-template-columns: 1fr;
  }
}

.cp-sidebar {
  border-right: 1px solid var(--cp-line);
  background: var(--cp-panel);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.cp-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--cp-line);
}

.cp-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(145deg, #0d9488, #155e75);
  color: #ecfeff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.cp-profile-meta {
  min-width: 0;
}

.cp-profile-meta .name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-profile-meta .sub {
  font-size: 0.72rem;
  color: var(--cp-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-nav {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 4px;
}

.cp-nav button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--cp-muted);
  border-radius: var(--cp-radius);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cp-nav-badge {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.35rem;
  text-align: center;
}

.cp-mailbox-alert {
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(127, 29, 29, 0.25);
}

.cp-mailbox-row.is-pending {
  border-color: rgba(20, 184, 166, 0.35);
}

.cp-mailbox-row.is-unread .name {
  color: #5eead4;
}

.cp-nav button:hover {
  color: var(--cp-text);
  background: var(--cp-input-bg);
  border-color: var(--cp-line);
}

.cp-nav button.active {
  color: var(--cp-teal);
  background: rgba(20, 184, 166, 0.1);
  border-color: rgba(20, 184, 166, 0.35);
}

.cp-nav-exit {
  margin: auto 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid rgba(20, 184, 166, 0.45);
  border-radius: var(--cp-radius);
  background: rgba(20, 184, 166, 0.1);
  color: #5eead4;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.cp-nav-exit:hover {
  background: rgba(20, 184, 166, 0.18);
  border-color: #14b8a6;
  color: #99f6e4;
}

.cp-mobile-exit {
  display: none;
}

.cp-content {
  padding: 18px 20px 36px;
  overflow: auto;
  background:
    radial-gradient(ellipse 70% 40% at 0% 0%, rgba(20, 184, 166, 0.07), transparent 55%),
    var(--cp-bg);
}

.cp-panel {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cp-panel h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #f8fafc;
}

.cp-panel .lead {
  margin: 0;
  font-size: 0.82rem;
  color: var(--cp-muted);
  line-height: 1.45;
}

.cp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .cp-grid {
    grid-template-columns: 1fr;
  }
}

.cp-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cp-field.full {
  grid-column: 1 / -1;
}

.cp-field label {
  font-size: 0.72rem;
  color: var(--cp-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cp-field input,
.cp-field select,
.cp-field textarea {
  background: var(--cp-input-bg);
  border: 1px solid var(--cp-line);
  border-radius: var(--cp-radius);
  color: var(--cp-text);
  padding: 8px 10px;
  font: inherit;
  font-size: 0.9rem;
}

.cp-field textarea {
  min-height: 72px;
  resize: vertical;
}

.cp-field input:focus,
.cp-field select:focus,
.cp-field textarea:focus {
  outline: none;
  border-color: var(--cp-teal);
}

.cp-field .hint {
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.35;
}

.cp-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--cp-text);
}

.cp-check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--cp-teal);
}

.cp-logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}

.cp-logo-preview {
  width: 160px;
  height: 88px;
  border: 1px dashed var(--cp-line);
  border-radius: var(--cp-radius);
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.cp-logo-preview.has-logo {
  border-style: solid;
  background: #0f172a;
}

.cp-logo-preview span {
  font-size: 0.75rem;
  color: #64748b;
}

.cp-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.cp-logo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(100%, 220px);
  flex: 1;
}

.cp-logo-actions .cp-btn-row,
.cp-logo-actions {
  align-items: flex-start;
}

.cp-logo-actions .action {
  align-self: flex-start;
}

.cp-card {
  border: 1px solid var(--cp-line);
  border-radius: var(--cp-radius);
  background: var(--cp-panel);
  padding: 14px 16px;
}

.cp-card h3 {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cp-muted);
}

.cp-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.cp-stat {
  min-width: 8rem;
}

.cp-stat .label {
  font-size: 0.68rem;
  color: var(--cp-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cp-stat .value {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  margin-top: 2px;
}

.cp-stat .value.teal {
  color: var(--cp-teal);
}

.cp-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--cp-line);
  color: var(--cp-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cp-badge.active,
.cp-badge.trialing {
  color: var(--cp-ok);
  border-color: #166534;
}

.cp-badge.canceled,
.cp-badge.none {
  color: var(--cp-danger);
  border-color: #7f1d1d;
}

.cp-tier-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cp-tier-option {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid var(--cp-line);
  background: var(--cp-input-bg);
  color: inherit;
  border-radius: var(--cp-radius);
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cp-tier-option:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.cp-tier-option:hover:not(:disabled) {
  border-color: #475569;
}

.cp-tier-option.selected {
  border-color: var(--cp-teal);
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.35);
}

.cp-tier-option .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.cp-tier-option .name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #f8fafc;
}

.cp-tier-option .price {
  font-size: 0.85rem;
  color: var(--cp-teal);
  font-weight: 700;
  white-space: nowrap;
}

.cp-tier-option .desc {
  font-size: 0.78rem;
  color: var(--cp-muted);
  line-height: 1.4;
}

.cp-features {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cp-features li {
  font-size: 0.76rem;
  color: var(--cp-text);
  padding-left: 0.95rem;
  position: relative;
  line-height: 1.35;
}

.cp-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 1px;
  background: var(--cp-teal);
}

.cp-addon-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cp-addon-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--cp-line);
  border-radius: var(--cp-radius);
  background: var(--cp-input-bg);
}

.cp-addon-row input {
  margin-top: 3px;
  accent-color: var(--cp-teal);
}

.cp-addon-row .body {
  flex: 1;
  min-width: 0;
}

.cp-addon-row .name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f5f9;
}

.cp-addon-row .meta {
  font-size: 0.72rem;
  color: var(--cp-muted);
}

.cp-addon-row .desc {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.35;
}

.cp-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.action {
  appearance: none;
  border: 1px solid var(--cp-line);
  background: var(--cp-panel-2);
  color: var(--cp-text);
  border-radius: var(--cp-radius);
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.action:hover {
  border-color: #64748b;
}

.action.primary {
  background: var(--cp-teal-btn);
  border-color: #0f766e;
  color: #ecfeff;
}

.action.primary:hover {
  background: #0f766e;
}

.action.back {
  border-color: rgba(20, 184, 166, 0.55);
  background: rgba(20, 184, 166, 0.12);
  color: #5eead4;
}

.action.back:hover {
  border-color: #14b8a6;
  background: rgba(20, 184, 166, 0.22);
  color: #99f6e4;
}

.action.danger {
  color: #fecaca;
  border-color: #7f1d1d;
  background: #450a0a;
}

.action.danger:hover {
  background: #7f1d1d;
}

@media (max-width: 860px) {
  .cp-mobile-exit {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(20, 184, 166, 0.35);
    background: #0f172a;
    color: #5eead4;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 800;
  }

  .cp-mobile-exit:hover {
    color: #99f6e4;
    background: #134e4a;
  }
}

.cp-placeholder {
  font-size: 0.82rem;
  color: var(--cp-muted);
  line-height: 1.45;
  margin: 0;
}

.cp-invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.cp-invoice-table th,
.cp-invoice-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--cp-line);
}

.cp-invoice-table th {
  color: var(--cp-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.cp-invoice-table td {
  color: var(--cp-text);
}

/* Price sheet */
.cp-price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}
.cp-price-table th,
.cp-price-table td {
  border-bottom: 1px solid var(--cp-line);
  padding: 0.45rem 0.5rem;
  text-align: left;
  vertical-align: middle;
}
.cp-price-table th {
  color: var(--cp-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cp-price-table td.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: var(--cp-muted);
}
.cp-price-table input[type="number"] {
  width: 6.5rem;
  background: var(--cp-input-bg);
  border: 1px solid var(--cp-line);
  border-radius: 6px;
  color: var(--cp-text);
  padding: 0.35rem 0.45rem;
}
.cp-price-notes {
  width: 100%;
  background: var(--cp-input-bg);
  border: 1px solid var(--cp-line);
  border-radius: 6px;
  color: var(--cp-text);
  padding: 0.5rem 0.6rem;
  font: inherit;
  resize: vertical;
}

/* Materials quote + estimate viewers (export / proposal-format documents) */
#cp-materials-quote-viewer[data-open="1"],
#cp-estimate-viewer[data-open="1"] { display: flex; }
#cp-materials-quote-viewer,
#cp-estimate-viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.78);
  padding: 1rem;
}
#cp-materials-quote-viewer .cp-mq-dialog,
#cp-estimate-viewer .cp-mq-dialog {
  width: min(56rem, 100%);
  max-height: min(92vh, 52rem);
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.65rem;
  color: #e2e8f0;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
#cp-estimate-viewer .cp-mq-dialog {
  width: min(48rem, 100%);
}
#cp-materials-quote-viewer .cp-mq-head,
#cp-estimate-viewer .cp-mq-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1rem 0.65rem;
  border-bottom: 1px solid #1e293b;
}
#cp-materials-quote-viewer .cp-mq-head h2,
#cp-estimate-viewer .cp-mq-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #5eead4;
}
#cp-materials-quote-viewer .cp-mq-sub,
#cp-estimate-viewer .cp-mq-sub {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
}
#cp-materials-quote-viewer .cp-mq-close,
#cp-estimate-viewer .cp-mq-close {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
#cp-materials-quote-viewer .cp-mq-body,
#cp-estimate-viewer .cp-mq-body {
  padding: 1rem;
  overflow: auto;
  flex: 1;
  background: #f8fafc;
  color: #0f172a;
}
#cp-estimate-viewer .cp-mq-body {
  padding: 0;
  background: #e8eef4;
}
#cp-materials-quote-viewer .cp-mq-foot,
#cp-estimate-viewer .cp-mq-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #1e293b;
}
.mq-doc { font-size: 0.85rem; }
.mq-doc-head h2 {
  margin: 0;
  text-align: center;
  font-size: 1.15rem;
  color: #0f172a;
}
.mq-doc-title {
  margin: 0.35rem 0 0.65rem;
  text-align: center;
  font-weight: 700;
  color: #1e3a5f;
}
.mq-doc-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  font-size: 0.8rem;
  color: #334155;
  margin-bottom: 0.5rem;
}
.mq-doc-from, .mq-doc-msg, .mq-doc-bldg {
  margin: 0.25rem 0;
  color: #475569;
  font-size: 0.8rem;
}
.mq-doc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  background: #fff;
}
.mq-doc-table th,
.mq-doc-table td {
  border: 1px solid #93c5fd;
  padding: 0.35rem 0.45rem;
  text-align: left;
}
.mq-doc-table th {
  background: #1a5276;
  color: #fff;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.mq-doc-table .mq-num { text-align: right; white-space: nowrap; }
.mq-doc-table .mq-money { color: #145a32; font-weight: 700; }
.mq-doc-table .mq-sec td {
  background: #1e293b;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
}
.mq-doc-table .mq-sub td {
  background: #eef2f7;
  font-weight: 700;
}
.mq-doc-table tfoot td {
  background: #1a5276;
  color: #fff;
  font-weight: 800;
}
.mq-doc-foot {
  margin-top: 0.75rem;
  font-size: 0.72rem;
  color: #64748b;
}

/* Estimate proposal document (network send — mirrors PDF export) */
.ep-doc {
  background: #fff;
  color: #1a2f4a;
  font-size: 0.86rem;
  line-height: 1.45;
}
.ep-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding: 1rem 1.15rem;
  background: #1a5276;
  color: #fff;
}
.ep-band-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.ep-logo-plate {
  flex: 0 0 auto;
  background: #fff;
  border-radius: 0.3rem;
  padding: 0.2rem 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ep-logo {
  display: block;
  max-height: 2.4rem;
  max-width: 6.5rem;
  width: auto;
  height: auto;
  object-fit: contain;
}
.ep-band-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.ep-band-copy strong {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.ep-band-copy span {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.95;
}
.ep-band-copy em {
  font-style: normal;
  font-size: 0.74rem;
  opacity: 0.85;
}
.ep-band-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  font-size: 0.78rem;
  text-align: right;
}
.ep-band-meta strong {
  font-size: 0.88rem;
}
.ep-body {
  padding: 1.1rem 1.15rem 1.35rem;
}
.ep-project {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #1a2f4a;
}
.ep-prepared,
.ep-meta-line {
  margin: 0.15rem 0;
  color: #5a6e82;
  font-size: 0.82rem;
}
.ep-prepared strong {
  color: #1a2f4a;
}
.ep-cover-msg {
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid #5dade2;
  background: #f5f8fa;
  color: #334155;
  font-size: 0.82rem;
}
.ep-intro {
  margin: 0.85rem 0 1rem;
  color: #1a2f4a;
  font-size: 0.86rem;
}
.ep-snapshot {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  background: #f5f8fa;
  border: 1px solid #d2dce6;
  border-radius: 0.4rem;
}
.ep-snapshot h3,
.ep-section-head h3,
.ep-section h3,
.ep-accept h3 {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: #1a2f4a;
}
.ep-snapshot dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.55rem 0.85rem;
  margin: 0;
}
.ep-snapshot dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5a6e82;
  font-weight: 700;
}
.ep-snapshot dd {
  margin: 0.12rem 0 0;
  font-size: 0.82rem;
  font-weight: 650;
  color: #1a2f4a;
}
.ep-views {
  margin: 0 0 1rem;
}
.ep-section-head p {
  margin: -0.2rem 0 0.55rem;
  font-size: 0.76rem;
  color: #5a6e82;
}
.ep-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.65rem;
}
.ep-view-grid figure {
  margin: 0;
  background: #0f172a;
  border-radius: 0.35rem;
  overflow: hidden;
}
.ep-view-grid img {
  display: block;
  width: 100%;
  height: auto;
}
.ep-view-grid figcaption {
  padding: 0.3rem 0.45rem;
  font-size: 0.7rem;
  color: #cbd5e1;
}
.ep-summary {
  margin: 0 0 1.1rem;
}
.ep-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.ep-table th,
.ep-table td {
  border: 1px solid #5dade2;
  padding: 0.45rem 0.5rem;
  vertical-align: top;
  text-align: left;
}
.ep-table th {
  background: #1a5276;
  color: #fff;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ep-table .ep-trade {
  width: 22%;
  font-weight: 750;
  color: #1a2f4a;
}
.ep-table .ep-scope {
  color: #5a6e82;
  font-size: 0.78rem;
  white-space: pre-wrap;
}
.ep-table .ep-num {
  width: 18%;
  text-align: right;
  white-space: nowrap;
}
.ep-table .ep-money {
  color: #145a32;
  font-weight: 750;
}
.ep-table .ep-row-alt td {
  background: #d6eaf8;
}
.ep-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.55rem;
  padding: 0.7rem 0.85rem;
  background: #1a5276;
  color: #fff;
  border-radius: 0.25rem;
  font-weight: 750;
}
.ep-total strong {
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.ep-section {
  margin: 0 0 1rem;
}
.ep-section ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #5a6e82;
  font-size: 0.8rem;
}
.ep-section li + li {
  margin-top: 0.25rem;
}
.ep-clarify {
  display: grid;
  gap: 0.65rem;
}
.ep-clarify h4 {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  color: #1a5276;
  font-weight: 800;
}
.ep-clarify p {
  margin: 0;
  font-size: 0.78rem;
  color: #5a6e82;
}
.ep-accept {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid #d2dce6;
}
.ep-accept p {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  color: #5a6e82;
}
.ep-sign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
}
.ep-sign-line {
  height: 0;
  border-bottom: 1px solid #94a3b8;
  margin-bottom: 0.35rem;
}
.ep-sign-grid span {
  font-size: 0.7rem;
  color: #64748b;
}
.ep-foot {
  margin: 1.1rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}
.ep-empty {
  margin: 1rem;
  color: #64748b;
}

@media (max-width: 640px) {
  .ep-band {
    flex-direction: column;
  }
  .ep-band-meta {
    align-items: flex-start;
    text-align: left;
  }
  .ep-table,
  .ep-table thead,
  .ep-table tbody,
  .ep-table th,
  .ep-table td,
  .ep-table tr {
    display: block;
    width: 100%;
  }
  .ep-table thead {
    display: none;
  }
  .ep-table tr {
    border: 1px solid #5dade2;
    margin-bottom: 0.55rem;
    background: #fff;
  }
  .ep-table .ep-row-alt td {
    background: transparent;
  }
  .ep-table td {
    border: 0;
    padding: 0.35rem 0.55rem;
  }
  .ep-table .ep-trade {
    padding-top: 0.55rem;
    font-size: 0.92rem;
  }
  .ep-table .ep-scope {
    padding-bottom: 0.2rem;
  }
  .ep-table .ep-num {
    text-align: left;
    padding-bottom: 0.55rem;
    font-size: 0.95rem;
  }
}

/* App Store / TestFlight — lean Account nav (JS also hides; CSS is backup). */
html.jayce-store-shell .cp-nav [data-section="settings"],
html.jayce-store-shell .cp-nav [data-section="mailbox"],
html.jayce-store-shell .cp-nav [data-section="directory"],
html.jayce-store-shell .cp-nav [data-section="billing"],
html.jayce-store-shell .cp-nav [data-section="price-sheet"],
body.jayce-store-shell .cp-nav [data-section="settings"],
body.jayce-store-shell .cp-nav [data-section="mailbox"],
body.jayce-store-shell .cp-nav [data-section="directory"],
body.jayce-store-shell .cp-nav [data-section="billing"],
body.jayce-store-shell .cp-nav [data-section="price-sheet"] {
  display: none !important;
}
