:root {
  color: #1a222e;
  background: #f4f7f8;
  font-family: Liberation Sans, Segoe UI, sans-serif;
}

body {
  margin: 0;
}

h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.app-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.sidebar-slot {
  display: flex;
  flex-direction: column;
  flex: 0 0 248px;
  width: 248px;
  background: #0b1f33;
}

.sidebar {
  width: 100%;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: #0b1f33;
  color: #e7eef6;
  padding: 18px 12px 16px;
}

.sidebar h5 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.brand-copy { min-width: 0; }

.brand-name {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.3;
}

.brand-name span { color: #67dbe5; font-weight: 600; }

.brand-tagline {
  margin: 5px 0 0;
  color: #b5c6d6;
  font-size: 0.65rem;
  line-height: 1.5;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark svg,
.about-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sidebar .brand-mark {
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9);
}

.nav-section {
  margin: 18px 10px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8ea0b5;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar nav[hidden],
.nav-section[hidden],
.nav-link[hidden] {
  display: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e7eef6;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
}

.nav-link span {
  text-wrap: balance;
}

.nav-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-link.active {
  background: #fff;
  color: #0b1f33;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.workspace {
  flex: 1;
  min-width: 0;
}

.app-header {
  background: linear-gradient(110deg, #fff 40%, #eef9fb);
  border-bottom: 1px solid #dce9ee;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-eyebrow {
  margin: 0 0 8px;
  color: #087e8b;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#pageTitle {
  margin: 0;
  color: #0b1f33;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.header-copy {
  min-width: 0;
}

.header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 4px;
}

#pageNote {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.3;
}

#shareHold {
  margin: 0;
  color: #0b1f33;
  font-size: 0.8rem;
  line-height: 1.3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#shareHold::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #26c6da;
  flex-shrink: 0;
}

#shareHold[hidden] {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
}

.account-menu {
  position: relative;
  min-width: 0;
}

.account-menu__trigger.btn-small {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(320px, 46vw);
  max-width: 100%;
  padding: 8px 12px 8px 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #1a222e;
  border: 1px solid #dce9ee;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(11, 31, 51, 0.03);
  text-align: left;
}

.account-menu__trigger.btn-small:hover:not(:disabled),
.account-menu__trigger.btn-small.is-open {
  background: #fff;
  color: #1a222e;
}

.account-menu__trigger .header-user__identity {
  flex: 1;
}

.account-menu__chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #64748b;
}

.account-menu__trigger.is-open .account-menu__chevron {
  transform: rotate(180deg);
}

.account-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(280px, calc(100vw - 88px));
  padding: 6px;
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.account-menu__panel[hidden],
.account-profile[hidden] {
  display: none;
}

.account-profile {
  padding: 8px 10px 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid #e9edf3;
}

.account-profile__label {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.3;
}

.account-profile__label:first-child {
  margin-top: 0;
}

.account-profile__value {
  margin: 2px 0 0;
  color: #1a222e;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.account-menu__item.btn-small {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  background: transparent;
  color: #1a222e;
  font-weight: 500;
}

.account-menu__item.btn-small svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.account-menu__item.btn-small:hover:not(:disabled) {
  background: #f8fafc;
  color: #1a222e;
}

.account-menu__item--out.btn-small {
  color: #a12626;
}

.account-menu__item--out.btn-small:hover:not(:disabled) {
  background: #fff5f5;
  color: #a12626;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: min(360px, 46vw);
  padding: 10px 14px 10px 10px;
  border: 1px solid #dce9ee;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(11, 31, 51, 0.03);
}

.header-user__identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-user__name,
.header-user__company {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user__company {
  color: #0e7490;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.3;
}

.header-user__company:empty {
  display: none;
}

.header-user__name {
  color: #1a222e;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
}

.header-user__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #0b1f33;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  position: relative;
}

.header-user__mark::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #26c6da;
  box-shadow: 0 0 0 2px #0b1f33;
}

main {
  padding: 20px 24px 40px;
}

#pageToday,
#pageActivity,
#pageLogs,
#pageProfile,
#pageBusiness,
#pagePeople,
#pageRoles,
#pageAssign {
  position: relative;
  min-height: 280px;
}

.page-loader {
  position: fixed;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(248, 250, 252, 0.94);
}

.page-loader[hidden] {
  display: none !important;
}

.page-loader__mark {
  position: relative;
  width: 64px;
  height: 64px;
}

.page-loader__ring {
  position: absolute;
  inset: 0;
  border: 3px solid #d7eef5;
  border-top-color: #26c6da;
  border-radius: 50%;
  box-sizing: border-box;
  animation: spin 0.8s linear infinite;
}

.page-loader__play {
  position: absolute;
  inset: 16px;
  color: #0b1f33;
}

.page-loader p {
  margin: 0;
  color: #334155;
  font-size: 0.875rem;
}

.panel {
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 16px;
  overflow: hidden;
}

.panel__head {
  background: #f8fafc;
  border-bottom: 1px solid #e9edf3;
  padding: 10px 16px;
}

.panel__body {
  padding: 16px;
}

.guide-lead {
  margin: 0 0 16px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #475569;
}

.guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 10px;
}

.guide-step__num {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e3f2fd;
  color: #1a222e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.guide-step h5 {
  margin: 2px 0 6px;
}

.guide-step p {
  margin: 0 0 8px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #475569;
}

.guide-step p:last-child {
  margin-bottom: 0;
}

.need-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.need-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e9edf3;
}

.need-head h5 {
  margin: 0;
  font-size: 0.875rem;
}

.need-status {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f7f8;
  color: #0e7490;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.need-status--wait {
  background: #fff6e8;
  color: #8a5a00;
}

.need-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
}

.need-body p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #475569;
}

.need-body strong {
  color: #111827;
  font-weight: 700;
}

.today-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.action-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-card {
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  overflow: hidden;
}

.action-card__head {
  background: #f8fafc;
  border-bottom: 1px solid #e9edf3;
  padding: 6px 10px;
}

button.action-card__head.btn-small {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  background: #f8fafc;
  color: #111827;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}

button.action-card__head.btn-small:hover:not(:disabled) {
  background: #f1f5f9;
  color: #111827;
}

.action-card[data-fold]:not(.is-open) .action-card__head {
  border-bottom: none;
}

.action-card[data-fold]:not(.is-open) .action-card__body {
  display: none;
}

.action-card__name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.action-card__spin {
  width: 14px;
  height: 14px;
}

.action-card.is-posting .action-card__head {
  background: #f3fbfc;
}

.check-row:has(input:disabled) {
  color: #94a3b8;
}

#shareAllGo {
  width: 100%;
  margin-top: 8px;
}

#shareAllGo[hidden] {
  display: none !important;
}

.share-board {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.share-board__nets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 8px;
}

.share-board__nets:empty {
  display: none;
}

.share-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #0b1f33;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
}

.share-chip__dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #198754;
}

.share-chip.is-missing {
  background: #f8fafc;
  color: #64748b;
}

.share-chip.is-missing .share-chip__dot {
  background: #cbd5e1;
}

.share-chip.is-expired .share-chip__dot {
  background: #d97706;
}

.share-chip .spin {
  width: 12px;
  height: 12px;
  border-width: 2px;
}

.share-board__note,
.share-board__result {
  margin: 0;
  padding: 8px 12px 10px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.75rem;
  line-height: 1.4;
}

.share-board__result[hidden] {
  display: none !important;
}

.action-card__head h5 {
  font-size: 0.8rem;
  font-weight: 500;
}

.fold-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.network-mark {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}

.network-mark--facebook { color: #1877f2; }
.network-mark--instagram { color: #e4405f; }
.network-mark--tiktok,
.network-mark--threads,
.network-mark--x { color: #111827; }
.network-mark--youtube { color: #ff0000; }
.network-mark--linkedin { color: #0a66c2; }
.network-mark--pinterest { color: #bd081c; }
.network-mark--whatsapp { color: #25d366; }
.network-mark--share { color: #2196f3; }

.fold-mark {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #64748b;
  transform: rotate(-90deg);
}

.action-card.is-open .fold-mark {
  transform: none;
}

.action-card__body {
  padding: 12px;
}

.action-rail .actions {
  flex-direction: column;
  align-items: stretch;
}

.action-rail .btn-small,
.action-rail .link {
  display: flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.action-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #4cb5f5 0%, #26c6da 100%);
  color: #fff;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 500;
}

.action-main:hover:not(:disabled):not(.is-posted) {
  background: linear-gradient(135deg, #2196f3 0%, #00acc1 100%);
  color: #fff;
}

.action-main:disabled:not(.is-posted) {
  background: #e9ecef;
  color: #6c757d;
  opacity: 1;
}

.action-main.is-posted {
  justify-content: flex-start;
  background: #198754;
  color: #fff;
  opacity: 1;
  cursor: default;
}

.action-mark {
  display: none;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.action-main.is-posted .action-mark {
  display: block;
}

.action-menu {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  border: 1px solid #e9edf3;
  border-radius: 8px;
  overflow: hidden;
}

.action-rail .action-menu .action-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #1a222e;
  text-align: left;
}

.action-rail .action-menu .action-row + .action-row {
  border-top: 1px solid #eef2f6;
}

.action-rail .action-menu .action-row svg,
.action-card .links a svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.action-rail .action-menu .action-row:hover:not(:disabled) {
  background: #f8fafc;
}

.action-rail .action-menu .action-row--danger:not(:disabled) {
  color: #dc3545;
}

.action-rail .action-menu .action-row--danger:hover:not(:disabled) {
  background: #fdecec;
}

.action-rail .action-menu .action-row:disabled {
  color: #94a3b8;
  opacity: 1;
  background: #fff;
}

.action-card .links:not(:empty) {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  border: 1px solid #e9edf3;
  border-radius: 8px;
  overflow: hidden;
}

.action-card .links a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2196f3;
  text-decoration: none;
}

.action-card .links a:hover {
  background: #f0f9ff;
}

.today-main {
  min-width: 0;
}

.empty-video {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 40px 28px;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  background: #f8fafc;
}

.empty-video[hidden] {
  display: none !important;
}

.empty-video.is-refused {
  background: #fff6e8;
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.empty-video.is-refused .empty-video__mark {
  background: #c2410c;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
}

.empty-video.is-refused .empty-video__mark::before {
  content: "!";
}

.empty-video.is-refused h5,
.empty-video.is-refused p {
  color: #9a3412;
}

.empty-video.is-refused h5 {
  font-size: 0.875rem;
}

.empty-video.is-refused p {
  font-size: 0.8rem;
  font-weight: 500;
}

.share-refuse {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  background: #fff6e8;
  border: none;
  border-left: 3px solid #c2410c;
  border-radius: 10px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.share-refuse[hidden] {
  display: none;
}

.share-refuse__mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #c2410c;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
}

.share-refuse h5 {
  margin: 0;
  color: #9a3412;
  font-size: 0.875rem;
}

.share-refuse p {
  margin: 2px 0 0;
  color: #9a3412;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
}

.empty-video__mark {
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: #e3f2fd;
  color: #1a222e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.empty-video__mark svg {
  width: 24px;
  height: 24px;
  display: block;
}

.empty-video p {
  max-width: 34rem;
  margin: 0 0 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
}

.empty-video .btn-small--primary {
  border: none;
  background: linear-gradient(135deg, #4cb5f5 0%, #26c6da 100%);
  color: #fff;
}

.empty-video.is-saved .empty-video__mark {
  background: #e8f6ef;
  color: #198754;
}

.empty-video .video-next {
  width: min(100%, 28rem);
  margin: 8px 0 8px;
}

.video-next {
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.video-next__head {
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.video-next__kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0b1f33;
}

.video-next__steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 12px 14px 4px;
  list-style: none;
}

.video-next__steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.video-next__steps li + li {
  flex: 1;
}

.video-next__steps li + li::before {
  content: "";
  width: 22px;
  height: 1px;
  margin: 0 8px;
  background: #cbd5e1;
  flex-shrink: 0;
}

.video-next__num {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e7f6f8;
  color: #0b1f33;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
}

.video-next__step {
  color: #0b1f33;
  font-size: 0.8rem;
  line-height: 1.3;
}

.empty-video .video-next .video-next__note,
.dialog-status .video-next .video-next__note,
.video-next__note {
  margin: 0;
  padding: 8px 14px 12px;
  max-width: none;
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.4;
}

.spin {
  width: 26px;
  height: 26px;
  border: 3px solid #dbeafe;
  border-top-color: #2196f3;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: spin 0.8s linear infinite;
}

.spin--btn {
  width: 14px;
  height: 14px;
  border-width: 2px;
  flex-shrink: 0;
}

#tiktok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.spin[hidden],
#emptyVideoIcon[hidden],
#emptyVideoDone[hidden],
#dialogDone[hidden],
#dialogSpin[hidden],
.video-next[hidden],
.dialog-status[hidden] {
  display: none !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .spin, .page-loader__ring { animation: none; }
}

.dialog-status {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 4px;
}

.dialog-status__mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e3f2fd;
  color: #2196f3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dialog-status.is-saved .dialog-status__mark {
  background: #e8f6ef;
  color: #198754;
}

.dialog-status__mark svg {
  width: 22px;
  height: 22px;
  display: block;
}

.dialog-status__title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

.dialog-status__copy p {
  margin: 0 0 10px;
}

.today-stage {
  margin-top: 12px;
  background: #0b1f33;
  border-radius: 10px;
  padding: 12px;
}

video[hidden],
.today-stage[hidden] {
  display: none !important;
}

video {
  display: block;
  width: auto;
  max-width: 100%;
  height: min(68vh, 640px);
  margin: 0 auto;
  background: transparent;
  border-radius: 6px;
}

.today-main .caption {
  margin-bottom: 0;
}

.caption {
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.45;
}

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

.auth-screen {
  position: relative;
  z-index: 30;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: #f4f7fb;
}

.auth-layout {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 100vh;
  gap: 0;
}

.auth-layout:has(.auth-benefits[hidden]),
.auth-layout:has(.auth-benefits[hidden]) .auth-stage {
  justify-content: center;
  background-color: #0b1f33;
  background-image: url("/tangaza-auth-bg.jpg?v=1");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.auth-benefits[hidden] {
  display: none !important;
}

.auth-benefits {
  width: 52%;
  flex: 0 0 52%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  box-sizing: border-box;
  padding: 28px 36px;
  color: #fff;
  background-color: #0b1f33;
  background-image:
    linear-gradient(145deg, rgba(10, 18, 30, 0.86) 0%, rgba(11, 31, 51, 0.8) 55%, rgba(18, 47, 65, 0.74) 100%),
    url("/tangaza-auth-bg.jpg?v=1");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.auth-hero__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28em;
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.auth-hero__accent {
  color: #26c6da;
}

.auth-hero__tag {
  margin: 10px 0 0;
  max-width: 460px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.78);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.auth-flow {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 10px;
}

.auth-flow__head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.75rem;
  font-weight: 700;
}

.auth-flow__head span:last-child {
  font-weight: 600;
  color: rgba(148, 163, 184, 0.75);
}

.auth-flow__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(15, 29, 43, 0.82);
}

.auth-flow__item--lead {
  grid-row: span 2;
  flex-direction: column;
}

.auth-flow__step {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #168fd1;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.auth-flow__body {
  min-width: 0;
}

.auth-flow__title {
  margin: 0;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
}

.auth-flow__copy {
  margin: 4px 0 0;
  color: rgba(226, 232, 240, 0.75);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.auth-nets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.auth-nets li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
}

.auth-nets .network-mark--facebook { color: #4c9bff; }
.auth-nets .network-mark--instagram { color: #f777b0; }
.auth-nets .network-mark--tiktok,
.auth-nets .network-mark--x { color: #fff; }
.auth-nets .network-mark--youtube { color: #ff4d4d; }
.auth-nets .network-mark--linkedin { color: #6aabf5; }

.auth-nets li.is-off {
  color: rgba(226, 232, 240, 0.45);
  background: transparent;
}

.auth-nets li.is-off .network-mark {
  color: rgba(226, 232, 240, 0.45);
}

.share-chip.is-off {
  background: #f8fafc;
  color: #94a3b8;
}

.share-chip.is-off .network-mark {
  color: #94a3b8;
}

.people-nets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.people-net {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #0b1f33;
  font-size: 0.75rem;
  line-height: 1.2;
}

.people-net.is-off {
  background: #f8fafc;
  color: #94a3b8;
}

.people-net.is-off .network-mark {
  color: #94a3b8;
}

.people-net .network-mark {
  width: 12px;
  height: 12px;
}

.auth-spotlight {
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(8, 15, 25, 0.45);
}

.auth-spotlight__kicker {
  margin: 0 0 4px;
  color: #26c6da;
  font-size: 0.75rem;
  font-weight: 700;
}

.auth-spotlight__text {
  margin: 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
}

.auth-stage {
  flex: 1 1 48%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 32px 24px;
  background: #f4f7fb;
}

.auth-screen .dialog-card {
  width: min(440px, 100%);
  max-width: 440px;
  flex: 0 1 auto;
  max-height: calc(100vh - 48px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  overflow: auto;
}

.auth-screen .auth-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 26px;
  padding: 28px 24px 22px;
  background: linear-gradient(135deg, #fff 35%, #eef9fb);
  border-bottom: 1px solid #e2edf1;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-head .brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 13px;
  box-shadow: 0 4px 10px rgba(11, 31, 51, 0.12);
}

.auth-head__copy {
  min-width: 0;
}

.auth-product {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.3;
  color: #0b1f33;
}

.auth-product span {
  color: #087e8b;
  font-weight: 600;
}

.auth-tagline {
  margin: 5px 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #526579;
}

.auth-head #authTitle {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: #0b1f33;
}

.dialog--session {
  z-index: 25;
}

.about-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.about-mark {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.about-lockup p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #475569;
}

.about-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-copy {
  margin: 0;
  padding: 12px 14px 14px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #475569;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #1e293b;
  font-size: 0.875rem;
  line-height: 1.45;
}

.check-row a {
  color: #2196f3;
  font-weight: 700;
  text-decoration: none;
}

.check-row a:hover {
  text-decoration: underline;
}

.legal-screen {
  position: fixed;
  inset: 0;
  z-index: 35;
  overflow: auto;
  background:
    radial-gradient(900px 320px at 50% -80px, rgba(38, 198, 218, 0.18), transparent 70%),
    #eef3f8;
  padding: 28px 16px 64px;
}

.legal-screen[hidden] {
  display: none !important;
}

.legal-card {
  width: min(820px, 100%);
  margin: 0 auto;
}

.legal-bar {
  margin: 0 0 14px;
}

.legal-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  padding: 18px 18px 16px;
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(11, 31, 51, 0.06);
}

.legal-hero .brand-mark {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.legal-hero .brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.legal-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.legal-kicker span {
  color: #0891b2;
}

.legal-hero h5 {
  margin: 2px 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0b1f33;
}

.legal-meta {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.legal-lead,
.legal-foot {
  margin: 0 0 16px;
  padding: 0 2px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #334155;
}

.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.legal-toc a {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #0f4c5c;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.legal-toc a:hover {
  border-color: #26c6da;
  color: #087e8b;
}

.legal-doc {
  counter-reset: legal;
}

.legal-doc .form-group {
  scroll-margin-top: 16px;
}

.legal-doc .form-group + .form-group {
  margin-top: 12px;
}

.legal-doc .form-group__title::before {
  counter-increment: legal;
  content: counter(legal) ". ";
  color: #0891b2;
}

.legal-doc .about-copy {
  padding: 12px 16px 14px;
  line-height: 1.65;
}

.legal-doc .about-copy + .about-copy {
  padding-top: 0;
}

.legal-foot a {
  color: #2196f3;
  font-weight: 700;
  text-decoration: none;
}

#authHelp {
  margin: 0 0 12px;
  min-height: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #475569;
}

#authHelp:empty {
  display: none;
}

#authHelp.is-error {
  color: #9a3412;
}

.auth-public {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0 16px 16px;
}

.auth-public a {
  color: #2196f3;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-public a:hover {
  text-decoration: underline;
}

.pass-field {
  position: relative;
}

.pass-field .filter-control {
  padding-right: 40px;
}

.pass-toggle.btn-small {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: #64748b;
}

.pass-toggle.btn-small:hover:not(:disabled) {
  background: #f8fafc;
  color: #0b1f33;
}

.pass-toggle.btn-small.is-shown {
  color: #087e8b;
}

.pass-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.pass-toggle .pass-icon--hide {
  display: none;
}

.pass-toggle.is-shown .pass-icon--show {
  display: none;
}

.pass-toggle.is-shown .pass-icon--hide {
  display: block;
}

.pass-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
}

.pass-strength[hidden] {
  display: none !important;
}

.pass-strength__bars {
  display: grid;
  grid-template-columns: repeat(4, 18px);
  gap: 3px;
  flex-shrink: 0;
}

.pass-strength__bars i {
  display: block;
  height: 4px;
  border-radius: 99px;
  background: #e2e8f0;
}

.pass-strength__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.pass-strength[data-level="1"] .pass-strength__bars i:nth-child(-n + 1),
.pass-strength[data-level="2"] .pass-strength__bars i:nth-child(-n + 2),
.pass-strength[data-level="3"] .pass-strength__bars i:nth-child(-n + 3),
.pass-strength[data-level="4"] .pass-strength__bars i:nth-child(-n + 4) {
  background: #d97706;
}

.pass-strength[data-level="2"] .pass-strength__bars i:nth-child(-n + 2) {
  background: #2196f3;
}

.pass-strength[data-level="3"] .pass-strength__bars i:nth-child(-n + 3) {
  background: #0891b2;
}

.pass-strength[data-level="4"] .pass-strength__bars i:nth-child(-n + 4) {
  background: #059669;
}

.pass-strength[data-level="1"] .pass-strength__label { color: #9a3412; }
.pass-strength[data-level="2"] .pass-strength__label { color: #1d4ed8; }
.pass-strength[data-level="3"] .pass-strength__label { color: #0e7490; }
.pass-strength[data-level="4"] .pass-strength__label { color: #047857; }

.field-error {
  margin: 4px 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #9a3412;
}

.field-error.is-ok {
  color: #047857;
}

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

.filter-field:has(> .field-error:only-child[hidden]) {
  display: none;
}

#appShell[hidden],
#authScreen[hidden],
#loginForm[hidden],
#registerForm[hidden],
#forgotForm[hidden],
#resetForm[hidden],
#pendingNote[hidden] {
  display: none !important;
}

.help[hidden],
section[hidden],
button[hidden],
.dialog[hidden] {
  display: none !important;
}

.btn-small {
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background: #6c757d;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.btn-small:hover:not(:disabled) {
  background: #5c636a;
  color: #fff;
}

.btn-small--primary {
  background: linear-gradient(135deg, #4cb5f5 0%, #26c6da 100%);
  color: #fff;
}

.btn-small--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2196f3 0%, #00acc1 100%);
  color: #fff;
}

.btn-small--danger {
  background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);
  color: #fff;
}

.btn-small--danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #bb2d3b 0%, #b02a37 100%);
  color: #fff;
}

a.btn-small.link,
.link {
  background: transparent;
  color: #2196f3;
}

a.btn-small.link:hover,
.link:hover {
  background: transparent;
  color: #1976d2;
}

button.action-main:not(:disabled):not(.is-posted) {
  background: linear-gradient(135deg, #4cb5f5 0%, #26c6da 100%);
  color: #fff;
}

button.action-main:hover:not(:disabled):not(.is-posted) {
  background: linear-gradient(135deg, #2196f3 0%, #00acc1 100%);
  color: #fff;
}

.btn-small:disabled:not(.is-posted),
.dialog-foot .btn-small:disabled,
.dialog-foot .btn-small--primary:disabled,
.dialog-foot .btn-small--danger:disabled,
.dialog-foot .btn-small--primary.btn-small--danger:disabled {
  background: #e9ecef;
  color: #6c757d;
  opacity: 1;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

.row-actions {
  display: flex;
  justify-content: center;
  gap: 4px;
}

td.table-cell-actions {
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

.actions .btn-small {
  border: none;
  box-shadow: none;
}

a.btn-small.action-pill,
button.btn-small.action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  border: none;
  border-radius: 50rem;
  background: #fff;
  box-shadow: none;
  line-height: 1;
}

button.btn-small.action-pill:disabled {
  color: #94a3b8;
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

.action-pill svg {
  width: 11px;
  height: 11px;
  display: block;
  fill: currentColor;
}

button.btn-small.action-pill--primary:not(:disabled) {
  color: #2196f3;
}

button.btn-small.action-pill--success:not(:disabled) {
  color: #198754;
}

button.btn-small.action-pill--danger:not(:disabled) {
  color: #dc3545;
}

button.btn-small.action-pill--warning:not(:disabled) {
  color: #b45309;
}

button.btn-small.action-pill--primary:hover:not(:disabled) {
  background: #e3f2fd;
}

button.btn-small.action-pill--success:hover:not(:disabled) {
  background: #e8f6ef;
}

button.btn-small.action-pill--danger:hover:not(:disabled) {
  background: #fdecec;
}

button.btn-small.action-pill--warning:hover:not(:disabled) {
  background: #fef3c7;
}

.note {
  min-height: 1.2em;
  font-size: 0.85rem;
  margin: 0 0 8px;
}

.status {
  margin-top: 8px;
}

.status[hidden] {
  display: none !important;
}

.share-work,
.share-result {
  margin-bottom: 8px;
}

.share-work {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  background: #fff;
}

.share-work .spin {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.share-work__title,
.share-result__title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
}

.share-work__text {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.share-result {
  padding: 10px 12px;
  border: 1px solid #e9edf3;
  border-left: 3px solid #2196f3;
  border-radius: 10px;
  background: #fff;
}

.share-result__title {
  margin-bottom: 8px;
}

.share-link {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.share-link__url {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 10px;
  border: 1px solid #e9edf3;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.75rem;
  color: #2196f3;
  text-decoration: none;
}

.share-link__url:hover {
  text-decoration: underline;
}

.share-link .btn-small {
  flex-shrink: 0;
}

.status.is-working .note,
.status.is-working [data-clear],
.status.is-done .note,
.status.is-prompt .note,
.status.is-prompt [data-clear],
.share-work[hidden],
.share-result[hidden],
.share-prompt[hidden],
.share-alert[hidden] {
  display: none !important;
}

.status.is-alert .note {
  display: none !important;
}

.share-prompt {
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid #e9edf3;
  border-left: 3px solid #2196f3;
  border-radius: 10px;
  background: #fff;
}

.share-prompt__kicker {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2196f3;
}

.share-prompt__text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #1e293b;
}

.share-alert {
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid #f3d0d4;
  border-left: 3px solid #dc3545;
  border-radius: 10px;
  background: #fff;
}

.share-alert__kicker {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #b91c1c;
}

.share-alert__text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #1e293b;
}

#clearPosted {
  margin-top: 8px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.links a {
  font-size: 0.85rem;
  color: #1a222e;
}

.help {
  background: #f8fafc;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  padding: 10px;
}

.help p {
  width: 100%;
  margin: 0 0 8px;
  font-size: 0.85rem;
}

.filter-panel__body {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filter-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
  flex: 1 1 140px;
}

.filter-field--action {
  flex: 0 0 auto;
}

.req {
  color: #dc2626;
  font-weight: 700;
}

.ai-reading {
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 520px;
}

.ai-reading__mark {
  position: relative;
  width: 48px;
  height: 48px;
}

.ai-reading p {
  margin: 0;
  color: #334155;
  font-size: 0.875rem;
  line-height: 1.5;
}

.ai-reading__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  width: 100%;
}

.ai-reading__steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e9edf3;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font-size: 0.875rem;
}

.ai-reading__steps li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  flex: none;
}

.ai-reading__steps li.is-on {
  color: #0f172a;
  border-color: #99e6ef;
  background: #f0fdff;
}

.ai-reading__steps li.is-on::before {
  background: #26c6da;
}

#aiDrafts .btn-small {
  white-space: nowrap;
}

#aiReview .data-table {
  table-layout: fixed;
  width: 100%;
}

#aiReview .data-table th:last-child,
#aiReview .data-table td.table-cell-actions {
  width: 76px;
}

#aiReview .data-table td:not(.table-cell-actions) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-note,
.ai-error p {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff;
  color: #991b1b;
  font-size: 0.875rem;
  line-height: 1.5;
}

.ai-error {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.ai-error p {
  margin: 0;
}

.ai-error .field-hint {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #64748b;
}

.panel--error {
  border-color: #fecaca;
}

.panel--limit {
  border-color: #99e6ef;
}

.ai-limit {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.ai-limit p {
  margin: 0;
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.5;
}

.ai-limit .field-hint {
  margin: 0;
  color: #0e7490;
  font-weight: 600;
}

.filter-label {
  display: block;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.25;
}

.filter-control {
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.8125rem;
  border-radius: 8px;
  border: 1px solid #dce3ec;
  background: #fff;
  color: #1e293b;
  width: 100%;
  box-sizing: border-box;
}

.filter-control:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.12);
}

.filter-field.is-active .filter-control {
  border-color: #93c5fd;
  background: #f0f9ff;
}

.filter-search {
  position: relative;
}

.filter-search .filter-control {
  padding-right: 28px;
}

.filter-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.filter-search-clear:hover {
  background: #f1f5f9;
  color: #64748b;
}

.filter-clear {
  height: 34px;
}

.filter-clear.is-on {
  background: #dc3545;
  color: #fff;
}

.filter-clear.is-on:hover:not(:disabled) {
  background: #bb2d3b;
  color: #fff;
}

.filter-count {
  display: inline-flex;
  margin: 12px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.form-section {
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  margin-bottom: 16px;
}

.form-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.token-state {
  font-weight: 600;
}

.token-state--connected {
  color: #0f766e;
}

.token-state--saved {
  color: #1a222e;
}

.token-state--expired,
.token-state--invalid {
  color: #b91c1c;
}

.token-state--missing {
  color: #64748b;
}

.form-groups[hidden],
.payload-view[hidden],
#dialogFields[hidden],
#dialogView[hidden],
#businessForm[hidden],
#exampleForm[hidden],
#connectionForm[hidden],
#companyForm[hidden],
#roleForm[hidden],
#assignForm[hidden],
#removeConnection[hidden],
#removeCompany[hidden],
#openCompany[hidden],
#viewCompany[hidden],
#companySummary[hidden],
#companyEmpty[hidden] {
  display: none !important;
}

.company-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.company-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
  padding-right: 12px;
  border-right: 1px solid #e9edf3;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid #dce9ee;
  border-radius: 999px;
  background: #fff;
  color: #0e7490;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.quick-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.quick-link:hover {
  background: #eef9fb;
  border-color: #b7e3ea;
  color: #0b6b78;
}

.panel__body .form-groups {
  padding: 0 0 4px;
}

.example-form .filter-control:disabled {
  background: #f8fafc;
  color: #475569;
  cursor: default;
  opacity: 1;
}

.company-empty {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
}

select.search-select__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  pointer-events: none;
}

.city-select__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  font-weight: 400;
  font-family: inherit;
  cursor: pointer;
}

.city-select__button span {
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-select__button span.is-placeholder {
  color: #64748b;
}

.city-select__button svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: #64748b;
}

.city-menu {
  position: fixed;
  z-index: 40;
  box-sizing: border-box;
  padding: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.city-menu[hidden] {
  display: none !important;
}

.city-menu__note {
  margin: 8px 2px 0;
  font-size: 0.75rem;
  color: #64748b;
}

.city-menu__list {
  max-height: 240px;
  margin-top: 6px;
  overflow: auto;
}

.city-menu__option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.city-menu__option:hover,
.city-menu__option.is-selected {
  background: #e3f2fd;
}

.form-group {
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  box-shadow: none;
}

.form-group__title {
  margin: 0;
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e9edf3;
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
}

.form-group__body {
  padding: 4px 14px 8px;
}

.profile-note {
  margin: 0 16px 4px;
  padding: 12px 14px;
  background: #fff6e8;
  border-left: 3px solid #c2410c;
  border-radius: 10px;
  color: #9a3412;
}

.profile-status {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: #fff;
  border-left: 3px solid #2196f3;
  border-radius: 10px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  font-size: 0.875rem;
  color: #1e293b;
}

.profile-status.is-saved {
  background: #e8f6ef;
  border-left-color: #198754;
  color: #0f766e;
}

.profile-status.is-error {
  background: #fff6e8;
  border-left-color: #c2410c;
  color: #9a3412;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
}

.form-span {
  grid-column: 1 / -1;
}

.form-grid .filter-control {
  width: 100%;
  box-sizing: border-box;
}

textarea.filter-control {
  height: auto;
  min-height: 72px;
  padding: 8px 10px;
}

.field-hint {
  margin: 4px 0 0;
  font-size: 0.75rem;
  font-weight: 400;
  color: #6c757d;
}

.view-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #e9edf3;
}

.view-line strong {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
}

.view-line span {
  font-size: 0.75rem;
  font-weight: 400;
  color: #6c757d;
  text-align: right;
  max-width: 68%;
}

.form-group__body .view-line:last-child {
  border-bottom: none;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.pager p {
  margin: 0;
  font-size: 0.8rem;
  color: #475569;
}

.pager-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pager-buttons .btn-small {
  background: #f8f9fa;
  color: #212529;
}

.pager-buttons .btn-small:hover:not(:disabled) {
  background: #e2e6ea;
  color: #212529;
}

.pager-buttons .btn-small.active,
.pager-buttons .btn-small.active:hover {
  background: #2196f3;
  color: #fff;
}

.toast {
  position: fixed;
  z-index: 60;
  right: 24px;
  bottom: 24px;
  max-width: 320px;
  margin: 0;
  padding: 14px 16px;
  background: #fff6e8;
  color: #9a3412;
  border-left: 3px solid #c2410c;
  border-radius: 10px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  font-size: 0.875rem;
}

.toast[hidden] {
  display: none !important;
}

.dialog {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 24px 24px;
}

.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 51, 0.35);
}

.dialog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-height: calc(100vh - 48px);
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  overflow: hidden;
}

.dialog-card--wide {
  width: min(800px, 100%);
}

.dialog-head {
  background: #f8fafc;
  border-bottom: 1px solid #e9edf3;
  padding: 10px 16px;
}

.dialog-body {
  padding: 16px;
  overflow: auto;
}

.dialog-body .form-groups {
  padding: 0;
}

.dialog-body p {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: #475569;
}

.change-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.change-pane {
  min-width: 0;
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  overflow: hidden;
}

.change-pane h5 {
  margin: 0;
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e9edf3;
  border-top: 3px solid #94a3b8;
  font-size: 0.875rem;
  font-weight: 700;
  color: #64748b;
}

.change-pane--after h5 {
  background: #e8f6ef;
  border-top-color: #198754;
  border-bottom-color: #c7ead8;
  color: #0f766e;
}

.change-pane dl {
  margin: 0;
}

.change-field {
  padding: 10px 14px;
}

.change-field + .change-field {
  border-top: 1px solid #f1f5f9;
}

.change-field dt {
  margin: 0 0 2px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}

.change-field dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.45;
  word-break: break-word;
}

.change-pane--after .change-field.is-changed {
  background: #f3fbf7;
}

.change-pane--after .change-field.is-changed dd {
  color: #0f766e;
  font-weight: 700;
}

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

#dialogCaption {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  min-height: 140px;
  padding: 10px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  font: inherit;
  font-size: 0.875rem;
  color: #1e293b;
  resize: vertical;
}

#dialogCaption:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.12);
}

.dialog-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid #e9edf3;
}

.dialog-foot .btn-small {
  border: none;
  box-shadow: none;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
}

.dialog-foot .btn-small--primary {
  background: linear-gradient(135deg, #4cb5f5 0%, #26c6da 100%);
  color: #fff;
}

.dialog-foot .btn-small--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2196f3 0%, #00acc1 100%);
  color: #fff;
}

.dialog-foot .btn-small--danger,
.dialog-foot .btn-small--primary.btn-small--danger {
  background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);
  color: #fff;
}

.dialog-foot .btn-small--danger:hover:not(:disabled),
.dialog-foot .btn-small--primary.btn-small--danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #bb2d3b 0%, #b02a37 100%);
  color: #fff;
}

.payload-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payload-value {
  margin: 6px 0 0;
  padding: 10px;
  border: 1px solid #e9edf3;
  border-radius: 8px;
  background: #fafbfc;
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.row-actions {
  display: flex;
  gap: 6px;
}

.ok { color: #0f7a4a; }
.warn { color: #8a5a00; }
.bad { color: #a12626; }

@media (max-width: 1100px) {
  .auth-benefits {
    padding: 24px 20px;
  }
}

.sidebar-toggle {
  display: none;
}

.sidebar-toggle svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .app-shell {
    flex-direction: row;
    align-items: stretch;
  }

  .sidebar-slot {
    flex: 0 0 56px;
    width: 56px;
  }

  .sidebar {
    width: 56px;
    flex: 0 0 auto;
    height: 100vh;
    position: sticky;
    top: 0;
    align-self: flex-start;
    z-index: 20;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 6px 12px;
  }

  .sidebar.is-open {
    position: fixed;
    left: 0;
    top: 0;
    width: 248px;
    height: 100vh;
    z-index: 40;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.28);
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  .sidebar-toggle:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
  }

  .sidebar:not(.is-open) .sidebar-toggle span,
  .sidebar:not(.is-open) .brand-copy,
  .sidebar:not(.is-open) .nav-section,
  .sidebar:not(.is-open) .nav-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .sidebar:not(.is-open) .brand {
    justify-content: center;
    padding: 4px 0 12px;
  }

  .sidebar:not(.is-open) .nav-link {
    justify-content: center;
    padding: 8px;
  }

  .sidebar:not(.is-open) nav {
    margin-bottom: 8px;
  }

  .dialog-card,
  .auth-layout,
  .auth-screen .dialog-card {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
  }

  .auth-layout {
    flex-direction: column;
    min-height: 100vh;
  }

  .auth-screen .auth-benefits {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    min-height: 0;
    padding: 20px 16px;
    gap: 8px;
  }

  .auth-flow,
  .auth-spotlight {
    display: none;
  }

  .auth-stage {
    align-items: flex-start;
    padding: 16px;
  }

  .auth-screen .dialog-card {
    width: 100%;
    max-width: none;
    max-height: none;
  }

  .today-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .today-main {
    order: -1;
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 16px;
    gap: 12px;
  }

  .header-actions {
    width: 100%;
  }

  .account-menu,
  .account-menu__trigger.btn-small {
    width: 100%;
    max-width: none;
  }

  .quick-links {
    width: 100%;
    margin-right: 0;
    padding-right: 0;
    border-right: 0;
  }

  #pageToday .company-head {
    flex-direction: column;
    align-items: stretch;
  }

  #pageToday .company-actions {
    justify-content: flex-start;
  }

  .quick-link {
    white-space: nowrap;
  }

  .header-user {
    max-width: none;
    flex: 1;
  }

  main {
    padding: 16px;
  }

  .video-next__steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .video-next__steps li + li::before {
    display: none;
  }
}

 .music-choice {
  margin: 20px 0 4px;
  padding: 20px;
  border: 1px solid #d6e8ed;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5fbfc, #f8fafc);
}
.music-choice[hidden] { display: none; }
.music-choice__intro { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.music-choice__icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: #0b1f33; color: #67dbe5; font-size: 1.4rem; }
.music-choice__title { margin: 0; font-size: 0.95rem; font-weight: 700; color: #0b1f33; }
.music-choice__subtitle { margin: 4px 0 0; font-size: 0.8rem; color: #526579; line-height: 1.4; }
.music-choice .filter-control { width: 100%; min-height: 44px; background-color: #fff; box-sizing: border-box; }
.music-choice .filter-control:focus-visible { outline: 2px solid #087e8b; outline-offset: 3px; }
.music-choice__description { margin: 12px 0 0; font-size: 0.8rem; color: #526579; line-height: 1.5; }
@media (max-width: 480px) { .music-choice { padding: 16px; } }

/* Keep the video setup panel within the modal, including at browser zoom. */
#dialog:has(#musicChoice:not([hidden])) .dialog-body {
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.music-choice {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
.music-choice__intro > div { min-width: 0; overflow-wrap: anywhere; }
.music-choice .filter-control { min-width: 0; max-width: 100%; }
