.shell {
  grid-template-columns: 225px 1fr;
}

.pager-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px 0 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbf7;
  color: var(--muted);
  font-size: 12px;
}

.pager-row > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pager-row strong {
  color: var(--ink);
  font-size: 12px;
}

.pager-row button[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.customer-management .table-wrap {
  max-height: none;
  overflow-x: auto;
}

.customer-management th,
.customer-management td {
  padding: 9px 10px;
  vertical-align: middle;
}

.customer-management .member-cell .avatar {
  width: 30px;
  height: 30px;
}

.customer-management .admin-actions {
  gap: 5px;
}

.customer-management .admin-actions button,
.customer-management .admin-select,
.customer-management .admin-input {
  font-size: 12px;
  padding: 6px 8px !important;
}

.profile-grid {
  align-items: start;
}

.paged-profile-card {
  padding: 14px !important;
  gap: 12px !important;
}

.paged-profile-card .avatar,
.paged-profile-card img.avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.paged-profile-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.paged-profile-card p {
  font-size: 12px;
  line-height: 1.35;
}

@media(max-width:700px) {
  .pager-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.sidebar {
  overflow: hidden;
  scrollbar-width: thin;
  padding: 18px 14px;
}

.brand {
  flex-shrink: 0;
  font-size: 18px;
}

.sidebar nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 18px;
  gap: 4px;
  padding-right: 2px;
}

.nav-item {
  padding: 8px 10px;
  font-size: 13px;
}

.nav-item span {
  width: 22px;
  font-size: 15px;
}

.side-card {
  display: none;
  flex-shrink: 0;
}

.profile {
  flex-shrink: 0;
  z-index: 2;
  background: var(--ink);
  margin-top: 8px;
  padding: 10px 0 4px;
  border-top: 1px solid #304a40;
}

.profile .avatar {
  width: 32px;
  height: 32px;
}

.profile button,
#logoutBtn {
  min-width: 36px;
  min-height: 36px;
  border-radius: 10px;
  background: #1b372d;
  color: #d7f35d;
}

@media (max-height: 760px) {
  .sidebar {
    padding: 20px 16px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .sidebar nav {
    margin-top: 22px;
  }

  .nav-item {
    padding: 9px 10px;
    font-size: 13px;
  }

  .nav-item span {
    width: 24px;
    font-size: 16px;
  }

  .side-card {
    display: none;
  }

  .profile {
    margin-top: 12px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    overflow-y: auto;
  }

  .profile {
    position: sticky;
    bottom: 0;
    background: var(--ink);
  }
}

body.sidebar-compact .shell {
  grid-template-columns: 190px 1fr;
}

body.sidebar-compact .sidebar {
  padding-left: 14px;
  padding-right: 14px;
}

body.sidebar-compact .nav-item {
  padding: 9px 10px;
  font-size: 13px;
}

body.hide-side-card .side-card {
  display: none;
}

body.font-small {
  font-size: 14px;
}

body.font-small h1 {
  font-size: 25px;
}

body.font-small h2 {
  font-size: 19px;
}

body.font-large {
  font-size: 17px;
}

body.font-large h1 {
  font-size: 33px;
}

body.font-large h2 {
  font-size: 25px;
}

.contact-section {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f6f8f3;
}

.contact-section p {
  margin: 4px 0 14px;
  font-size: 13px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.mini-tool {
  background: #f6f8f3;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.mini-tool .toggle-access {
  margin: 6px 8px 0 0;
}

.contact-preview,
.link-preview {
  margin: 14px 0;
}

.link-preview {
  background: #f6f8f3;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.link-preview div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.link-preview a {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
  text-decoration: none;
}

.auth-links a.text-btn {
  display: inline-flex;
  text-decoration: none;
}

.legal-consent-row {
  align-items: flex-start;
  background: #f6f8f3;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  gap: 10px;
  line-height: 1.45;
  margin: 12px 0;
  padding: 12px;
}

.legal-consent-row input {
  margin-top: 3px;
  width: auto;
}

.legal-consent-row a,
.legal-link-row a {
  color: var(--green);
  font-weight: 900;
}

.legal-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-link-row a {
  background: #f6f8f3;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  text-decoration: none;
}

.public-profile {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f6f8f3;
  padding: 18px;
}

.public-profile .avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
}

.public-profile h3 {
  margin: 4px 0;
}

.public-profile p {
  margin: 5px 0;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.profile-actions a {
  background: var(--ink);
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 11px;
  text-decoration: none;
}

.public-profile small {
  color: var(--muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.public-profile-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.public-profile-card h3 {
  margin: 4px 0;
}

.public-profile-card p {
  color: var(--muted);
  margin: 6px 0;
}

.profile-thumb {
  object-fit: cover;
}

.profile-modal {
  max-width: 720px;
}

.modal-profile {
  margin-top: 14px;
}

.admin-profile-note {
  background: white;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 10px;
}

.profile-actions button.text-btn {
  border: 0;
  cursor: pointer;
  padding-left: 0;
}

.launch-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.launch-summary article {
  background: var(--ink);
  border-radius: 20px;
  color: white;
  padding: 18px;
}

.launch-summary span,
.launch-summary small {
  color: rgba(255, 255, 255, .72);
  display: block;
}

.launch-summary strong {
  display: block;
  font-size: 32px;
  margin: 6px 0;
}

.launch-note {
  background: #f6f8f3;
  margin-bottom: 18px;
}

.launch-group {
  margin-bottom: 18px;
}

.launch-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  border: 1px solid var(--line);
  border-left: 6px solid #d8ded0;
  border-radius: 18px;
  margin: 12px 0;
  padding: 16px;
}

.launch-main h3 {
  margin: 8px 0 6px;
}

.launch-main p {
  color: var(--muted);
  margin: 0;
}

.launch-badge {
  border-radius: 999px;
  background: #eef1e9;
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.launch-status-ready {
  border-left-color: #4f9b60;
}

.launch-status-review {
  border-left-color: #d4a72c;
}

.launch-status-needs_setup {
  border-left-color: #d66f4d;
}

.launch-status-future {
  border-left-color: #6c8bd8;
}

.launch-status-blocked {
  border-left-color: #c74343;
}

.launch-controls {
  display: grid;
  gap: 7px;
}

.launch-controls label {
  font-size: 12px;
  font-weight: 800;
}

.launch-controls textarea {
  min-height: 72px;
  resize: vertical;
}

.production-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: stretch;
  background: linear-gradient(135deg, var(--ink), #244336);
  border-radius: 24px;
  color: white;
  margin-bottom: 18px;
  padding: 22px;
}

.production-hero .eyebrow,
.production-hero p,
.production-hero small {
  color: rgba(255, 255, 255, .76);
}

.production-hero h2 {
  color: white;
  font-size: 34px;
  margin: 6px 0;
}

.production-meter {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 20px;
  display: grid;
  place-content: center;
  text-align: center;
}

.production-meter strong {
  font-size: 42px;
}

.production-meter span,
.production-meter small {
  display: block;
}

.production-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.production-summary article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.production-summary span,
.production-summary small {
  color: var(--muted);
  display: block;
}

.production-summary strong {
  display: block;
  font-size: 30px;
  margin: 4px 0;
}

.production-note {
  background: #fff8e7;
  border-color: #f1d28f;
  margin-bottom: 18px;
}

.production-group {
  margin-bottom: 18px;
}

.production-list {
  display: grid;
  gap: 12px;
}

.production-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  border: 1px solid var(--line);
  border-left: 6px solid #d8ded0;
  border-radius: 18px;
  padding: 16px;
}

.production-main h3 {
  margin: 10px 0 6px;
}

.production-main p {
  color: var(--muted);
  margin: 0;
}

.production-badge,
.production-priority,
.production-secret {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  margin: 0 6px 6px 0;
  padding: 6px 9px;
}

.production-badge {
  background: #eef1e9;
  color: var(--ink);
}

.production-priority {
  background: #edf4ff;
  color: #315f9d;
}

.production-secret {
  background: #fff0e6;
  color: #a14e1f;
}

.production-status-connected,
.production-status-verified {
  border-left-color: #4f9b60;
}

.production-status-selected {
  border-left-color: #6c8bd8;
}

.production-status-comparing {
  border-left-color: #d4a72c;
}

.production-status-blocked {
  border-left-color: #c74343;
}

.production-status-later {
  border-left-color: #8e96a3;
}

.production-controls {
  display: grid;
  gap: 7px;
}

.production-controls label {
  font-size: 12px;
  font-weight: 800;
}

.production-controls textarea {
  min-height: 78px;
  resize: vertical;
}

.email-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.email-summary article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.email-summary span,
.email-summary small {
  color: var(--muted);
  display: block;
}

.email-summary strong {
  display: block;
  font-size: 30px;
  margin: 4px 0;
}

.email-settings-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: center;
  background: #f6f8f3;
  margin-bottom: 18px;
}

.email-smtp-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.smtp-ready {
  background: #f2fbef;
  border-color: #b9dfae;
}

.smtp-missing {
  background: #fff8e7;
  border-color: #f1d28f;
}

.smtp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.smtp-facts span,
.email-status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 9px;
}

.smtp-facts span {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.smtp-help-card code {
  background: #f6f8f3;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: block;
  line-height: 1.65;
  padding: 12px;
  word-break: break-word;
}

.email-settings-form {
  display: grid;
  gap: 10px;
}

.email-two-col {
  align-items: start;
  margin-bottom: 18px;
}

.unverified-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 10px 0;
  padding: 12px;
}

.unverified-row small {
  color: var(--muted);
  display: block;
}

.email-outbox {
  display: grid;
  gap: 12px;
}

.email-row {
  border: 1px solid var(--line);
  border-left: 6px solid #6c8bd8;
  border-radius: 16px;
  padding: 14px;
}

.email-row h3 {
  margin: 8px 0 5px;
}

.email-kind {
  background: #edf4ff;
  border-radius: 999px;
  color: #315f9d;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 9px;
}

.email-status-pill {
  background: #eef1e9;
  color: var(--ink);
  margin-left: 6px;
}

.email-status-sent {
  border-left-color: #4f9b60;
}

.email-status-send_failed {
  border-left-color: #c74343;
}

.email-error {
  background: #fff0e6;
  border: 1px solid #efc2a8;
  border-radius: 12px;
  color: #8a3f18;
  margin: 10px 0;
  padding: 10px;
}

.email-token {
  align-items: center;
  background: #fff8e7;
  border: 1px solid #f1d28f;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
}

.email-token code {
  font-size: 12px;
  word-break: break-all;
}

.email-row pre {
  background: #f6f8f3;
  border-radius: 12px;
  margin: 10px 0 0;
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.email-row-actions {
  margin-top: 10px;
}

.legal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 18px;
  align-items: stretch;
  background: linear-gradient(135deg, #10261f, #354126);
  border-radius: 24px;
  color: white;
  margin-bottom: 18px;
  padding: 22px;
}

.legal-hero .eyebrow,
.legal-hero p,
.legal-hero small {
  color: rgba(255, 255, 255, .76);
}

.legal-hero h2 {
  color: white;
  font-size: 34px;
  margin: 6px 0;
}

.legal-meter {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 20px;
  display: grid;
  place-content: center;
  text-align: center;
}

.legal-meter strong {
  font-size: 42px;
}

.legal-meter span,
.legal-meter small {
  display: block;
}

.legal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.legal-summary article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.legal-summary span,
.legal-summary small {
  color: var(--muted);
  display: block;
}

.legal-summary strong {
  display: block;
  font-size: 30px;
  margin: 4px 0;
}

.legal-warning {
  background: #fff8e7;
  border-color: #f1d28f;
  margin-bottom: 18px;
}

.legal-doc-grid {
  display: grid;
  gap: 16px;
}

.legal-doc {
  border: 1px solid var(--line);
  border-left: 6px solid #d8ded0;
  border-radius: 18px;
  padding: 16px;
}

.legal-doc-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.legal-doc-head small,
.data-request-row small {
  color: var(--muted);
}

.legal-pill,
.legal-type {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  margin: 0 6px 6px 0;
  padding: 6px 9px;
}

.legal-pill {
  background: #eef1e9;
  color: var(--ink);
}

.legal-type {
  background: #edf4ff;
  color: #315f9d;
}

.legal-doc label,
.legal-task-controls label,
.legal-request-form label {
  font-size: 12px;
  font-weight: 800;
}

.legal-doc input,
.legal-doc textarea,
.legal-task-controls input,
.legal-task-controls textarea,
.legal-request-form input,
.legal-request-form textarea,
.legal-request-form select {
  width: 100%;
}

.legal-doc-body {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-height: 280px;
  resize: vertical;
  white-space: pre-wrap;
}

.legal-doc-notes,
.legal-task-notes,
.data-request-notes {
  min-height: 76px;
  resize: vertical;
}

.legal-controls {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 130px;
  gap: 12px;
  align-items: end;
  margin-top: 10px;
}

.legal-status-ready,
.legal-task-ready,
.data-request-completed,
.legal-status-published {
  border-left-color: #4f9b60;
}

.legal-status-needs_review,
.legal-task-needs_review,
.data-request-reviewing,
.data-request-waiting_user {
  border-left-color: #d4a72c;
}

.legal-task-blocked,
.data-request-rejected {
  border-left-color: #c74343;
}

.legal-two-col {
  align-items: start;
  margin-top: 18px;
}

.legal-task-group {
  margin-bottom: 18px;
}

.legal-task,
.data-request-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  border: 1px solid var(--line);
  border-left: 6px solid #d8ded0;
  border-radius: 18px;
  margin: 12px 0;
  padding: 16px;
}

.legal-task h3,
.data-request-row h3 {
  margin: 8px 0 6px;
}

.legal-task p,
.data-request-row p {
  color: var(--muted);
  margin: 5px 0;
}

.legal-task-controls,
.legal-request-form {
  display: grid;
  gap: 8px;
}

.legal-request-panel {
  position: sticky;
  top: 18px;
}

.legal-request-form {
  background: #f6f8f3;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 16px;
  padding: 14px;
}

.data-request-list {
  display: grid;
  gap: 12px;
}

.signup-inline-error {
  background: #fff3e8;
  border: 1px solid #efb985;
  border-radius: 14px;
  color: #813f12;
  display: none;
  font-size: 0.92rem;
  font-weight: 700;
  margin: 12px 0;
  padding: 10px 12px;
}

.signup-inline-error:not(:empty) {
  display: block;
}

.signup-field-error {
  border-color: #e66a2c !important;
  box-shadow: 0 0 0 3px rgba(230, 106, 44, 0.14) !important;
}

.auth-inline-message {
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  margin: 12px 0;
  padding: 10px 12px;
}

.auth-inline-message.error {
  background: #fff3e8;
  border: 1px solid #efb985;
  color: #813f12;
}

.auth-inline-message.success {
  background: #f1ffd8;
  border: 1px solid #b8d96b;
  color: #38580d;
}

.post-permission-note {
  background: #f6f8f3;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 8px;
  padding: 10px 12px;
}

.moderation-table td small {
  color: var(--muted);
  display: block;
  line-height: 1.35;
  margin-top: 4px;
}

.moderation-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 5px 8px;
}

.moderation-badge.pending {
  background: #fff3d8;
  color: #7a4c00;
}

.moderation-badge.approved {
  background: #edf8d8;
  color: #3f6412;
}

.moderation-badge.rejected,
.moderation-badge.archived {
  background: #ffe7df;
  color: #8a2d12;
}

.moderation-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.toggle-access.approve {
  border-color: #9fc64f;
  color: #47660f;
}

.toggle-access.reject {
  border-color: #efb0a0;
  color: #8a2d12;
}

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

  .launch-summary,
  .launch-item,
  .production-hero,
  .production-summary,
  .production-item,
  .email-summary,
  .email-settings-card,
  .email-smtp-card,
  .legal-hero,
  .legal-summary,
  .legal-controls,
  .legal-task,
  .data-request-row {
    grid-template-columns: 1fr;
  }

  .unverified-row {
    display: grid;
  }
}
