/* NR Tools desk — shared glass LAYOUT; colors swap via body.theme-* */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root, body.theme-glass {
  --bg: #f3f2f7 !important;
  --panel: rgba(255, 255, 255, 0.72) !important;
  --panel-2: rgba(255, 255, 255, 0.86) !important;
  --line: rgba(0, 0, 0, 0.08) !important;
  --text: #1d1d1f !important;
  --muted: #6e6e73 !important;
  --accent: #1d1d1f !important;
  --accent-ink: #ffffff !important;
  --danger: #ff3b30 !important;
  --footer: rgba(255, 255, 255, 0.7) !important;
  --surface: rgba(255, 255, 255, 0.78) !important;
  --surface-strong: rgba(255, 255, 255, 0.9) !important;
  --chip: rgba(255, 255, 255, 0.62) !important;
  --shadow: rgba(28, 28, 40, 0.1) !important;
  color: var(--text) !important;
  background: transparent !important;
  color-scheme: light !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "Nirmala UI", sans-serif !important;
}

html, body {
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}
body.theme-glass,
body:not(.theme-classic) {
  background:
    radial-gradient(980px 640px at 6% -12%, rgba(186, 208, 255, 0.62), transparent 60%),
    radial-gradient(860px 540px at 110% -4%, rgba(255, 210, 190, 0.48), transparent 56%),
    radial-gradient(760px 520px at 50% 118%, rgba(228, 228, 240, 0.9), transparent 52%),
    #f3f2f7 !important;
}

.kicker {
  color: var(--muted) !important;
  letter-spacing: 0.12em !important;
  font-weight: 600 !important;
}

/* Login / gate */
.gate {
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: transparent !important;
}
.gate-card {
  width: min(420px, 100%) !important;
  background: rgba(255, 255, 255, 0.64) !important;
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.82) !important;
  border-radius: 28px !important;
  box-shadow: 0 14px 44px rgba(28, 28, 40, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  padding: 28px 24px 24px !important;
  gap: 12px !important;
}
.gate-card h1 {
  letter-spacing: -0.045em !important;
  font-weight: 650 !important;
  color: var(--text) !important;
}
.gate-copy, .tagline { color: var(--muted) !important; }

/* Facebook-style floating labels */
.gate .fb-field {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 56px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.gate .fb-field input {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 12px !important;
  padding: 22px 14px 8px !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  color: var(--text) !important;
  caret-color: var(--text);
}
.gate .fb-field span {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  color: #8a8d91 !important;
  pointer-events: none !important;
  transition: top 0.15s ease, transform 0.15s ease, font-size 0.15s ease, color 0.15s ease !important;
}
.gate .fb-field input:focus + span,
.gate .fb-field input:not(:placeholder-shown) + span {
  top: 10px !important;
  transform: none !important;
  font-size: 12px !important;
  color: #65676b !important;
}
.gate .fb-field:focus-within {
  border-color: rgba(0, 0, 0, 0.22) !important;
  box-shadow: none !important;
}
.gate .btn-primary,
.gate button[type="submit"] {
  width: 100% !important;
  height: 52px !important;
  margin-top: 4px !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: #1d1d1f !important;
  color: #fff !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}
.gate .btn-primary:active { transform: scale(0.98); }

/* Home: wide brand stage, login card keeps its 420px width on the right */
.gate.home-split:not([hidden]) {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  height: auto;
  min-height: 0;
  padding: 0 !important;
  overflow: visible;
}
.home-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 468px;
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
}
.home-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 72px 36px;
  gap: 6px;
}
.nrt-mark.home-logo {
  width: 76px;
  height: 76px;
  border-radius: 20px;
}
.home-kicker {
  margin: 14px 0 0;
  color: #c89600;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.home-title {
  margin: 0;
  font-size: clamp(42px, 4.8vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 650;
  color: var(--text, #1d1d1f);
}
.home-tagline {
  margin: 8px 0 22px;
  max-width: 16ch;
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 550;
  color: var(--muted, #65676b) !important;
}
.home-collage {
  position: relative;
  height: 300px;
  max-width: 560px;
}
.mock {
  position: absolute;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 18px 44px rgba(28, 28, 40, 0.12);
}
.mock-photo {
  width: 230px;
  left: 8px;
  top: 36px;
  padding: 10px;
  transform: rotate(-7deg);
}
.mock-pic {
  height: 118px;
  border-radius: 12px;
  background:
    linear-gradient(160deg, rgba(255, 200, 12, 0.15), transparent 40%),
    linear-gradient(180deg, #2a2a2c 0%, #111 70%);
}
.mock-lines span,
.mock-quote span,
.mock-break span {
  display: block;
  height: 8px;
  margin-top: 8px;
  border-radius: 99px;
  background: #ececee;
}
.mock .short { width: 62%; }
.mock-break {
  width: 270px;
  right: 12px;
  top: 6px;
  padding: 16px 16px 14px;
  color: #fff;
  background: #111;
  transform: rotate(5deg);
}
.mock-break b {
  color: #ffc80c;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.mock-break span { background: rgba(255, 255, 255, 0.22); }
.mock-quote {
  width: 210px;
  left: 168px;
  bottom: 8px;
  padding: 12px 16px 16px;
  transform: rotate(3deg);
}
.mock-quote em {
  display: block;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-style: normal;
  font-size: 48px;
  line-height: 0.7;
  color: #ffc80c;
}
.home-aside {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.35);
}
.home-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  flex-wrap: wrap;
  padding: 6px 20px 8px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted, #65676b);
}
.home-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.home-copy svg { width: 12px; height: 12px; display: block; }
.home-links { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.home-links a {
  color: inherit;
  text-decoration: none;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.home-links a:hover { background: rgba(0, 0, 0, 0.04); }
body:has(.public-page) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.public-page {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 24px;
}
.public-page h1 {
  margin: 12px 0 8px;
  font-size: 40px;
  letter-spacing: -0.045em;
}
.public-body {
  font-size: 17px;
  line-height: 1.55;
}
.public-back {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
@media (max-width: 980px) {
  .home-stage { grid-template-columns: 1fr; }
  .home-brand { padding: 28px 20px 4px; }
  .home-collage { height: 230px; max-width: 100%; }
  .home-aside {
    border-left: 0;
    background: transparent;
    padding-top: 8px;
  }
  .home-foot { padding-inline: 20px; }
}

/* App chrome */
.app {
  background: transparent !important;
}
.gate-theme-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 4px;
}
.topbar-theme {
  grid-area: theme;
  justify-self: end;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto !important;
  grid-template-areas: "client tabs product theme account" !important;
  align-items: center !important;
  gap: 10px 14px !important;
  padding: 10px 18px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  background: rgba(243, 242, 247, 0.92) !important;
  /* blur on ::before so it does not trap position:fixed descendants */
  isolation: isolate;
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(243, 242, 247, 0.72);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
}
/* Left: client logo + name */
.client-brand {
  grid-area: client;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0;
  max-width: min(220px, 28vw);
}
.client-mark {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 16px rgba(28, 28, 40, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.client-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.client-initials {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1d1d1f;
}
.house-name {
  display: block;
  font-size: 15px !important;
  font-weight: 650 !important;
  letter-spacing: -0.03em !important;
  color: var(--text) !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-brand {
  grid-area: product;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0;
  max-width: min(280px, 36vw);
  justify-self: center;
}
.product-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  align-content: center;
}
.product-name {
  font-size: 13px !important;
  font-weight: 650 !important;
  color: var(--text) !important;
  letter-spacing: -0.02em !important;
  white-space: nowrap;
  line-height: 1.15 !important;
}
.product-brand .version {
  display: inline-block !important;
  width: fit-content;
  margin: 0 !important;
  color: #007aff !important;
  border: 1px solid rgba(0, 122, 255, 0.35) !important;
  background: rgba(0, 122, 255, 0.1) !important;
  font-size: 8px !important;
  font-weight: 650 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  line-height: 1.45 !important;
}
.product-brand .tagline {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* NR Tools mark — black / white / yellow inside frosted glass */
.nrt-mark {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 20px rgba(28, 28, 40, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
}
.nrt-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}
.nrt-mark-bg { fill: #111111; }
.nrt-mark-bar { fill: #FFC80C; }
.nrt-mark-line { fill: #F4F4F4; }
.nrt-mark.gate-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin-bottom: 2px;
}

.tool-tabs {
  grid-area: tabs;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0;
  margin: 0 !important;
  position: relative;
  z-index: 50;
  pointer-events: auto;
}
.tool-tab {
  background: rgba(255, 255, 255, 0.62) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: var(--muted) !important;
  border-radius: 999px !important;
  text-transform: none !important;
  letter-spacing: -0.01em !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 7px 14px !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: auto !important;
  position: relative;
  z-index: 5;
  cursor: pointer;
}
.tool-tab.is-active {
  background: rgba(29, 29, 31, 0.88) !important;
  color: #fff !important;
  border-color: rgba(29, 29, 31, 0.88) !important;
  box-shadow: 0 6px 16px rgba(28, 28, 40, 0.12);
}

.account {
  grid-area: account;
  margin: 0 !important;
  flex: none;
  z-index: 45;
  justify-self: end;
}
.account-button { color: var(--text) !important; }
.avatar {
  background: #1d1d1f !important;
  color: #fff !important;
}
.greeting { color: var(--muted) !important; }

.account-menu {
  position: fixed !important;
  top: calc(8px + env(safe-area-inset-top) + 48px) !important;
  right: 12px !important;
  left: auto !important;
  width: min(260px, calc(100vw - 20px)) !important;
  max-width: min(260px, calc(100vw - 20px)) !important;
  max-height: min(62vh, 420px) !important;
  overflow: auto !important;
  padding: 10px !important;
  display: grid !important;
  gap: 6px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 16px !important;
  box-shadow: 0 14px 36px rgba(28, 28, 40, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  z-index: 80 !important;
}
.account-menu[hidden] {
  display: none !important;
}
.account-menu .profile-card {
  grid-template-columns: 32px minmax(0, 1fr) !important;
  gap: 8px !important;
}
.account-menu .profile-card .avatar {
  width: 32px !important;
  height: 32px !important;
  font-size: 11px !important;
}
.account-menu .profile-facts {
  gap: 2px !important;
}
.account-menu .profile-facts div {
  grid-template-columns: 56px minmax(0, 1fr) !important;
  gap: 4px !important;
}
.account-menu .profile-facts dt {
  font-size: 10px !important;
}
.account-menu .profile-facts dd {
  font-size: 12px !important;
}
.account-menu .settings-section {
  gap: 6px !important;
  padding-bottom: 6px !important;
}
.account-menu .settings-title {
  font-size: 10px !important;
  letter-spacing: 0.06em !important;
}
.account-menu .btn {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  border-radius: 10px !important;
}
.account-menu .field {
  gap: 2px !important;
}
.account-menu .field span {
  font-size: 10px !important;
}
.account-menu .field input {
  min-height: 32px !important;
  padding: 6px 8px !important;
  font-size: 13px !important;
}
.account-menu .password-fold summary {
  font-size: 12px !important;
  min-height: 26px !important;
}
.account-menu .menu-block {
  gap: 5px !important;
}
.account-menu .settings-jump {
  font-size: 12px !important;
  min-height: 28px !important;
}
.settings-title {
  color: #1d1d1f !important;
  letter-spacing: 0.08em !important;
}
.settings-section { border-bottom-color: rgba(0, 0, 0, 0.08) !important; }
.settings-jump { color: #1d1d1f !important; }
.settings-logout { color: #ff3b30 !important; }

.panel {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
  border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.panel-head { border-bottom-color: rgba(0, 0, 0, 0.08) !important; }
.block {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.block h3 {
  letter-spacing: -0.02em !important;
  font-weight: 650 !important;
}

.btn {
  border-radius: 14px !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  color: var(--text) !important;
  font-weight: 600 !important;
}
.btn-primary {
  background: #1d1d1f !important;
  border-color: #1d1d1f !important;
  color: #fff !important;
}
.btn.is-active {
  border-color: #1d1d1f !important;
  color: #1d1d1f !important;
}

.field, .check {
  color: var(--text) !important;
}
input, select, textarea {
  background: rgba(255, 255, 255, 0.82) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 14px !important;
  color: var(--text) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(0, 0, 0, 0.16) !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Quote / headline text fields — white glass, not solid black */
.headline-editor {
  min-height: 132px !important;
  padding: 14px 16px !important;
  background: rgba(255, 255, 255, 0.86) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(28, 28, 40, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  color: #1d1d1f !important;
}
#photocardTool #headlineEditor {
  text-align: center !important;
}
.headline-editor:focus {
  border-color: rgba(0, 0, 0, 0.14) !important;
  outline: none !important;
  box-shadow: 0 10px 28px rgba(28, 28, 40, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}
/* Card ink is white on canvas; show dark in the light glass editor (data-color unchanged). */
.headline-editor span[data-color="#FFFFFF"],
.headline-editor span[data-color="#ffffff"],
.headline-editor span[data-color="#FFF"],
.headline-editor span[data-color="#fff"],
.headline-editor span[data-color="#F4F4F4"],
.headline-editor span[data-color="#f4f4f4"] {
  color: #1d1d1f !important;
}
.headline-editor span[data-color="#FFC80C"],
.headline-editor span[data-color="#ffc80c"] {
  color: #c9a000 !important;
}

/* Dashboard stats — white glass chips */
.stat-pill,
.stat-chip {
  background: rgba(255, 255, 255, 0.78) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: var(--text) !important;
  border-radius: 999px !important;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 4px 14px rgba(28, 28, 40, 0.05) !important;
  min-height: 30px !important;
  padding: 4px 12px !important;
}
.stat-pill b,
.stat-chip b {
  color: #1d1d1f !important;
}
.stat-pill.is-active,
.stat-chip.is-active,
.log-filters .btn.is-active {
  background: rgba(29, 29, 31, 0.1) !important;
  color: #1d1d1f !important;
  border-color: rgba(29, 29, 31, 0.35) !important;
}
.stat-pill.is-active b,
.stat-chip.is-active b {
  color: #1d1d1f !important;
}

/* Install popup — drops in from the top. Swipe any way to close. */
.install-offer {
  z-index: 80 !important;
  top: 0 !important;
  bottom: auto !important;
  left: 50% !important;
  right: auto !important;
  width: min(420px, calc(100% - 24px)) !important;
  height: auto !important;
  transform: translateX(-50%);
  align-items: flex-start !important;
  padding: calc(10px + env(safe-area-inset-top)) 0 0 !important;
  pointer-events: none !important;
  background: transparent !important;
}
.install-card,
.install-card * {
  pointer-events: auto !important;
}
.install-card {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 22px !important;
  box-shadow: 0 18px 48px rgba(28, 28, 40, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  color: var(--text) !important;
}
.install-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: min(420px, calc(100% - 8px));
  margin: 0 auto;
  padding: 12px 14px !important;
}
.install-card strong { color: var(--text) !important; font-size: 17px; }
.install-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.install-copy p { margin: 0; font-size: 12px; line-height: 1.35; color: var(--muted, #6e6e73); }
.team-stats { margin: 4px 0 16px; }
.team-stats h3 { margin: 0 0 8px; font-size: 15px; }
.team-stats-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.team-stats-filters label { display: grid; gap: 4px; font-size: 12px; }
.team-stats-filters input,
.team-stats-filters select { min-height: 34px; }
.team-stats table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.team-stats th,
.team-stats td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); font-size: 13px; }
.team-stats td:last-child,
.team-stats th:last-child { text-align: right; }
html.theme-classic #articleUrl,
body.theme-classic #articleUrl {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
}
.photo-stack .photo-chip {
  display: flex !important;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.photo-chip-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.nrt-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.nrt-file-row .muted {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-chip-x,
.nrt-file-x {
  position: relative;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(26, 20, 0, 0.2);
  background: rgba(255, 255, 255, 0.86);
  color: transparent;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
}
.photo-chip-x::before,
.photo-chip-x::after,
.nrt-file-x::before,
.nrt-file-x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 1.5px;
  border-radius: 1px;
  background: #1a1400;
}
.photo-chip-x::before,
.nrt-file-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.photo-chip-x::after,
.nrt-file-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
body.theme-classic .photo-chip-x,
body.theme-classic .nrt-file-x {
  background: #161616;
  border-color: #ffc80c;
}
body.theme-classic .photo-chip-x::before,
body.theme-classic .photo-chip-x::after,
body.theme-classic .nrt-file-x::before,
body.theme-classic .nrt-file-x::after {
  background: #ffc80c;
}
.preview-frame { position: relative; }
.nrt-canvas-type {
  position: absolute;
  z-index: 4;
  margin: 0;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: #ffc80c;
  overflow: hidden;
  font-family: "NR House Font", "Li Ador Noirrit", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
  white-space: pre-wrap;
}
.nrt-canvas-type:focus {
  pointer-events: auto;
  outline: 1px dashed rgba(255, 200, 12, 0.75);
}
.install-card p,
.install-hint {
  color: var(--muted) !important;
}
.install-close {
  background: rgba(0, 0, 0, 0.05) !important;
  border: 0 !important;
  color: var(--muted) !important;
  border-radius: 999px !important;
}

.preview-wrap, .canvas-shell, #preview, #breakingPreview, #quotePreview, #thumbPreview {
  border-radius: 18px !important;
}
/* Keep the actual card canvas dark so social designs stay accurate */
#preview, #breakingPreview, #quotePreview, #thumbPreview {
  background: #0b0b0b !important;
  box-shadow: 0 18px 48px rgba(28, 28, 40, 0.16) !important;
}

.toast {
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--text) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(20px);
  z-index: 90 !important;
}

.master-mode-banner {
  background: rgba(29, 29, 31, 0.08) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: var(--text) !important;
  backdrop-filter: blur(16px);
  z-index: 35;
}
.master-mode-banner .btn-primary {
  background: #1d1d1f !important;
  border-color: #1d1d1f !important;
}

/* Team directory / overlays — above sticky header, solid enough not to show through */
.overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 120 !important;
  display: grid !important;
  place-items: center !important;
  padding: max(16px, env(safe-area-inset-top) + 12px) 16px 16px !important;
  background: rgba(243, 242, 247, 0.78) !important;
  backdrop-filter: blur(22px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
}
.overlay[hidden] {
  display: none !important;
}
.overlay-card {
  width: min(920px, 100%) !important;
  max-height: min(86dvh, calc(100dvh - 48px - env(safe-area-inset-top))) !important;
  overflow: auto !important;
  margin-top: 0 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.92) !important;
  border-radius: 22px !important;
  padding: 18px !important;
  box-shadow: 0 22px 56px rgba(28, 28, 40, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(28px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(170%) !important;
  position: relative !important;
  z-index: 121 !important;
}
.team-layout {
  display: grid !important;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr) !important;
  gap: 16px !important;
}
.team-list,
.team-form {
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 18px !important;
  padding: 12px !important;
}
.team-list > * {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 14px !important;
}
.check input[type="checkbox"] {
  accent-color: #1d1d1f !important;
}

.offline-note {
  background: rgba(255, 149, 0, 0.14) !important;
  color: #9a5b00 !important;
}

.workspace {
  background: transparent !important;
}

/* Overlapping glass: upper layers denser so content does not mix */
.topbar { isolation: isolate; }
.panel { z-index: 2; }
.stage {
  background: rgba(255, 255, 255, 0.42) !important;
}
.stage-bar {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/*
  Mobile composition:
  Row 1 — left client logo · center NR Tools logo/tagline/version · right account
  Row 2 — sticky tool tabs (Dashboard / Photocard / Breaking / Quote / Thumbnail)
*/
@media (max-width: 900px) {
  .topbar {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto !important;
    grid-template-areas: "client product theme account" "tabs tabs tabs tabs" !important;
    align-items: center !important;
    gap: 8px 8px !important;
    padding: calc(8px + env(safe-area-inset-top)) 10px 0 !important;
    border-bottom: 0 !important;
    min-width: 0 !important;
    overflow-x: clip;
  }
  .topbar-theme {
    grid-area: theme !important;
    justify-self: end !important;
  }
  .topbar-theme .nrt-theme-sun { display: none; }

  .client-brand {
    grid-area: client !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    max-width: 76px !important;
    min-width: 0 !important;
  }
  .client-brand .house-name {
    display: block !important;
    max-width: 76px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
    font-weight: 650 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .client-mark {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
  }

  .product-brand {
    grid-area: product !important;
    justify-self: center !important;
    justify-content: center !important;
    max-width: min(220px, 58vw) !important;
    gap: 8px !important;
    text-align: left;
  }
  .product-copy {
    display: grid !important;
    gap: 2px !important;
    min-width: 0 !important;
  }
  .product-name {
    display: block !important;
    font-size: 12px !important;
    font-weight: 650 !important;
  }
  .product-brand .version {
    display: inline-block !important;
    font-size: 7px !important;
    padding: 0 4px !important;
    letter-spacing: 0.04em !important;
  }
  .product-brand .tagline {
    display: none !important;
  }
  .nrt-mark {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
  }

  .account {
    grid-area: account !important;
    position: static !important; /* menu anchors to .topbar, not the tiny avatar cell */
    justify-self: end !important;
  }
  .account-button {
    width: auto !important;
    padding: 2px 0 !important;
    gap: 0 !important;
  }
  .greeting,
  .account-copy {
    display: none !important;
  }
  .avatar {
    width: 32px !important;
    height: 32px !important;
  }
  .account-gear {
    display: none !important;
  }

  /* Profile menu: compact popover under the avatar */
  .account-menu {
    position: fixed !important;
    top: calc(8px + env(safe-area-inset-top) + 46px) !important;
    left: auto !important;
    right: 10px !important;
    width: min(248px, calc(100vw - 20px)) !important;
    max-width: min(248px, calc(100vw - 20px)) !important;
    max-height: min(58dvh, calc(100dvh - 110px - env(safe-area-inset-bottom))) !important;
    overflow: auto !important;
    padding: 8px !important;
    gap: 5px !important;
    border-radius: 14px !important;
    z-index: 80 !important;
    box-shadow: 0 14px 32px rgba(28, 28, 40, 0.16) !important;
  }
  .account-menu .profile-card {
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 6px !important;
  }
  .account-menu .profile-card .avatar {
    width: 28px !important;
    height: 28px !important;
  }
  .account-menu .btn {
    min-height: 28px !important;
    font-size: 11px !important;
    padding: 3px 7px !important;
  }
  .account-menu .settings-logout {
    min-height: 30px !important;
  }

  /* Tab strip: standard pill size, swipe sideways when overflowing */
  .tool-tabs {
    grid-area: tabs !important;
    position: relative !important;
    top: auto !important;
    z-index: 41 !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
    /* min-width:0 lets the grid cell shrink so overflow-x can scroll */
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 4px 0 0 !important;
    padding: 8px 10px 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
    background: rgba(243, 242, 247, 0.94) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(20px) saturate(165%);
    -webkit-backdrop-filter: blur(20px) saturate(165%);
    box-shadow: none !important;
  }
  .tool-tabs::-webkit-scrollbar { display: none; }
  .tool-tab {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    min-width: max-content !important;
    width: auto !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 34px !important;
    white-space: nowrap !important;
    border-radius: 999px !important;
    text-align: center !important;
    pointer-events: auto !important;
    touch-action: manipulation;
    position: relative;
    z-index: 1;
  }
  .app:not([hidden]) {
    padding-bottom: env(safe-area-inset-bottom) !important;
  }
}

@media (max-width: 380px) {
  .product-brand .tagline { display: none !important; }
  .nrt-mark { width: 30px !important; height: 30px !important; }
  .client-mark { width: 26px !important; height: 26px !important; }
  .client-brand { max-width: 64px !important; }
  .client-brand .house-name { max-width: 64px !important; font-size: 9px !important; }
}

/* ===== Classic Dark Yellow — SAME layout/pills, dark colors only ===== */
body.theme-classic {
  --bg: #0b0b0b !important;
  --panel: #141414 !important;
  --panel-2: #1b1b1b !important;
  --line: #2c2c2c !important;
  --text: #f4f4f4 !important;
  --muted: #a1a1a1 !important;
  --accent: #ffc80c !important;
  --accent-ink: #1a1400 !important;
  --danger: #ffb4b4 !important;
  --footer: #211f1f !important;
  --surface: rgba(27, 27, 27, 0.92) !important;
  --surface-strong: rgba(20, 20, 20, 0.96) !important;
  --chip: rgba(27, 27, 27, 0.88) !important;
  --shadow: rgba(0, 0, 0, 0.45) !important;
  color: var(--text) !important;
  color-scheme: dark !important;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(255, 200, 12, 0.08), transparent 55%),
    radial-gradient(720px 480px at 100% 0%, rgba(255, 255, 255, 0.04), transparent 50%),
    #0b0b0b !important;
}

body.theme-classic .gate-card,
body.theme-classic .topbar,
body.theme-classic .topbar::before,
body.theme-classic .panel,
body.theme-classic .account-menu,
body.theme-classic .install-card,
body.theme-classic .headline-editor,
body.theme-classic .preview-frame,
body.theme-classic .stage,
body.theme-classic .stage-bar,
body.theme-classic .client-mark,
body.theme-classic .nrt-mark,
body.theme-classic .tool-tabs {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  box-shadow: 0 14px 36px var(--shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.theme-classic .topbar::before {
  background: rgba(16, 16, 16, 0.92) !important;
}
body.theme-classic .gate .fb-field,
body.theme-classic input,
body.theme-classic select,
body.theme-classic textarea,
body.theme-classic .field input,
body.theme-classic .field select,
body.theme-classic .field textarea {
  background: #101010 !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
body.theme-classic .gate .fb-field span {
  color: var(--muted) !important;
}
body.theme-classic .gate .fb-field input:focus + span,
body.theme-classic .gate .fb-field input:not(:placeholder-shown) + span {
  color: var(--accent) !important;
}
body.theme-classic .gate .btn-primary,
body.theme-classic .gate button[type="submit"],
body.theme-classic .btn-primary {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: var(--accent-ink) !important;
}
body.theme-classic .btn {
  background: var(--chip) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
  border-radius: 14px !important;
}
body.theme-classic #installNow.btn.btn-primary {
  background: #ffc80c !important;
  border-color: #ffc80c !important;
  color: #1a1400 !important;
}
body.theme-classic .btn.is-active {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* Keep glass pill shapes; recolor for classic */
body.theme-classic .tool-tab,
body.theme-classic .stat-pill,
body.theme-classic .stat-chip,
body.theme-classic .product-brand .version,
body.theme-classic .log-filters .btn {
  border-radius: 999px !important;
  background: #1b1b1b !important;
  border: 1px solid var(--line) !important;
  color: var(--muted) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.theme-classic .tool-tab.is-active,
body.theme-classic .stat-pill.is-active,
body.theme-classic .stat-chip.is-active,
body.theme-classic .log-filters .btn.is-active {
  background: #2a2a2a !important;
  color: #fff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1px rgba(255, 200, 12, 0.35) !important;
}
body.theme-classic .stat-pill b,
body.theme-classic .stat-chip b,
body.theme-classic .stat-pill.is-active b,
body.theme-classic .stat-chip.is-active b {
  color: var(--accent) !important;
}
body.theme-classic .product-brand .version {
  color: #007aff !important;
  border-color: rgba(0, 122, 255, 0.45) !important;
  background: rgba(0, 122, 255, 0.14) !important;
}
body.theme-classic .settings-title,
body.theme-classic .settings-jump,
body.theme-classic .kicker {
  color: var(--accent) !important;
}
body.theme-classic .settings-logout { color: var(--danger) !important; }
body.theme-classic .headline-editor {
  color: var(--text) !important;
}
body.theme-classic .headline-editor span[data-color="#FFFFFF"],
body.theme-classic .headline-editor span[data-color="#ffffff"],
body.theme-classic .headline-editor span[data-color="#FFF"],
body.theme-classic .headline-editor span[data-color="#fff"],
body.theme-classic .headline-editor span[data-color="#F4F4F4"],
body.theme-classic .headline-editor span[data-color="#f4f4f4"] {
  color: #f4f4f4 !important;
}
body.theme-classic .headline-editor span[data-color="#FFC80C"],
body.theme-classic .headline-editor span[data-color="#ffc80c"] {
  color: #ffc80c !important;
}
body.theme-classic .avatar {
  background: var(--accent) !important;
  color: var(--accent-ink) !important;
}
body.theme-classic .account-menu {
  background: #141414 !important;
  border-color: var(--line) !important;
}
body.theme-classic .panel-head,
body.theme-classic .block,
body.theme-classic .settings-section {
  border-bottom-color: var(--line) !important;
}
body.theme-classic .tool-tabs {
  background: #101010 !important;
  border-top-color: var(--line) !important;
  border-bottom-color: var(--line) !important;
}
body.theme-classic .nrt-mark-bg { fill: #111111; }
body.theme-classic .nrt-mark-bar { fill: #FFC80C; }
body.theme-classic .nrt-mark-line { fill: #F4F4F4; }
body.theme-classic .client-initials { color: var(--text) !important; }
body.theme-classic .offline-note,
body.theme-classic .toast {
  background: #141414 !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}
body.theme-classic .master-mode-banner {
  background: rgba(255, 200, 12, 0.12) !important;
  border-color: rgba(255, 200, 12, 0.35) !important;
  color: var(--text) !important;
}
body.theme-classic .overlay {
  background: rgba(0, 0, 0, 0.72) !important;
}
body.theme-classic .overlay-card,
body.theme-classic .team-list,
body.theme-classic .team-form,
body.theme-classic .team-list > * {
  background: #141414 !important;
  border-color: var(--line) !important;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.theme-classic .check input[type="checkbox"] {
  accent-color: #ffc80c !important;
}
body.theme-classic .settings-title,
body.theme-classic .settings-jump {
  color: var(--accent) !important;
}
body.theme-classic .home-kicker { color: var(--accent) !important; }
body.theme-classic .home-title { color: var(--text) !important; }
body.theme-classic .home-aside {
  background: transparent !important;
  border-left-color: var(--line) !important;
}
body.theme-classic .mock {
  background: #1b1b1b !important;
  border-color: var(--line) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45) !important;
}
body.theme-classic .mock-lines span,
body.theme-classic .mock-quote span {
  background: #333 !important;
}
body.theme-classic .home-links a {
  color: var(--muted) !important;
  border-color: var(--line) !important;
}
.log-bulk {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}
.log-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.latest-ticker {
  position: fixed;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
body.has-latest-ticker .app { padding-bottom: 58px; }
.latest-ticker-track {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: max-content;
  animation: nrt-marquee 42s linear infinite;
}
.latest-ticker:hover .latest-ticker-track,
.latest-scroll:hover .latest-scroll-track { animation-play-state: paused; }
.latest-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.latest-link img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
  flex: none;
}
.latest-board {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  border-radius: 16px;
}
.latest-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 700;
}
.latest-brand img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
.latest-brand strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.latest-scroll {
  height: 34px;
  overflow: hidden;
}
.latest-scroll-track {
  display: flex;
  flex-direction: column;
  animation: nrt-latest-rise 18s linear infinite;
}
.latest-scroll-track a {
  height: 34px;
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-settings-card .settings-title { margin: 18px 0 8px; }
.site-settings-card .settings-section { border-bottom: 0; padding-top: 8px; }
.latest-config-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.4fr) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
}
.latest-menu {
  position: fixed;
  z-index: 70;
  min-width: 180px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}
.latest-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.latest-menu strong { display: block; padding: 4px 10px 8px; font-size: 12px; }
body.theme-classic .latest-ticker,
body.theme-classic .latest-menu {
  background: #121212;
  color: #f4f4f4;
  border-color: #2c2c2c;
}
body.theme-classic .latest-menu button:hover { background: #1d1d1d; }
@keyframes nrt-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes nrt-latest-rise {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
@media (max-width: 720px) {
  .latest-board { grid-template-columns: 1fr; }
  .latest-config-row { grid-template-columns: 1fr; }
}

/* Team directory — solid dialog, directory on the left, editor on the right */
#teamOverlay.overlay {
  background: rgba(22, 22, 26, 0.56) !important;
  padding: 20px !important;
}
#teamOverlay .team-card {
  width: min(1080px, 100%) !important;
  max-height: min(900px, calc(100dvh - 40px)) !important;
  height: min(900px, calc(100dvh - 40px)) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 0 !important;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
#teamOverlay .overlay-head {
  position: static !important;
  top: auto !important;
  flex: 0 0 auto;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 16px 20px !important;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  z-index: 2 !important;
}
#teamOverlay .team-head-copy { min-width: 0; }
#teamOverlay .overlay-head h2 {
  margin: 0 !important;
  font-size: 22px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em;
}
#teamOverlay .overlay-head .hint {
  margin: 4px 0 0 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}
#teamOverlay .overlay-head .btn { flex: 0 0 auto; }
#teamOverlay .team-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 20px;
}
#teamOverlay .team-stats {
  margin: 0 0 16px !important;
  padding: 12px 14px;
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
}
#teamOverlay .team-stats h3 {
  margin: 0 0 10px !important;
  font-size: 13px !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#teamOverlay .team-stats-filters {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px !important;
  align-items: end !important;
}
#teamOverlay .team-stats-filters label {
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
}
#teamOverlay .team-stats-filters input,
#teamOverlay .team-stats-filters select {
  width: 100%;
  min-height: 38px;
  background: #fff !important;
}
#teamOverlay .team-stats table {
  display: block;
  overflow-x: auto;
}
#teamOverlay .team-layout {
  display: grid !important;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: start !important;
}
#teamOverlay .team-directory h3,
#teamOverlay .team-form h3 {
  margin: 0 !important;
  font-size: 13px !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#teamOverlay .team-form h3 {
  font-size: 18px !important;
  letter-spacing: -0.02em;
  text-transform: none;
}
#teamOverlay .team-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  max-height: 560px;
  overflow: auto;
  margin-top: 8px;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}
#teamOverlay .team-person {
  width: 100%;
  display: grid !important;
  gap: 3px !important;
  text-align: left !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  background: #fff !important;
  box-shadow: none !important;
  cursor: pointer;
}
#teamOverlay .team-person strong {
  font-size: 15px;
  line-height: 1.3;
}
#teamOverlay .team-person span {
  color: #666 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
}
#teamOverlay .team-person.is-selected {
  border-color: #1d1d1f !important;
  background: #f4f4f6 !important;
  box-shadow: inset 3px 0 0 #1d1d1f !important;
}
#teamOverlay .team-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  min-width: 0;
  padding: 16px !important;
  background: #fafafa !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 16px !important;
}
#teamOverlay .team-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#teamOverlay .team-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
#teamOverlay .team-fields > :last-child { grid-column: 1 / -1; }
#teamOverlay .field {
  display: grid !important;
  gap: 6px !important;
  min-width: 0;
  margin: 0 !important;
}
#teamOverlay .field span {
  font-size: 12px;
  font-weight: 650;
}
#teamOverlay .field input,
#teamOverlay .field select,
#teamOverlay .nrt-id-row input {
  width: 100% !important;
  min-height: 42px !important;
  padding: 8px 12px !important;
  background: #fff !important;
  border-radius: 10px !important;
}
#teamOverlay .nrt-id-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#teamOverlay .nrt-id-row input { flex: 1 1 auto; min-width: 0; }
#teamOverlay .team-perms {
  margin: 0;
  padding: 8px 14px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}
#teamOverlay .team-perms legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#teamOverlay .team-perms .check {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  margin: 0 !important;
  min-width: 0;
}
#teamOverlay .team-perms .check span {
  font-size: 14px;
  line-height: 1.35;
}
#teamOverlay #teamError { margin: 0; }
#teamOverlay .team-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
#teamOverlay #teamDelete { margin-right: auto; }
@media (max-width: 860px) {
  #teamOverlay.overlay { padding: 0 !important; }
  #teamOverlay .team-card {
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: 0 !important;
  }
  #teamOverlay .overlay-head { padding: 14px 14px 12px !important; }
  #teamOverlay .overlay-head h2 { font-size: 20px !important; }
  #teamOverlay .team-body { padding: 12px 14px 16px; }
  #teamOverlay .team-stats-filters { grid-template-columns: 1fr 1fr; }
  #teamOverlay .team-layout { grid-template-columns: 1fr !important; }
  #teamOverlay .team-list { max-height: 240px; }
  #teamOverlay .team-fields,
  #teamOverlay .team-perms { grid-template-columns: 1fr; }
}
body.theme-classic #teamOverlay.overlay { background: rgba(0, 0, 0, 0.72) !important; }
body.theme-classic #teamOverlay .team-card,
body.theme-classic #teamOverlay .overlay-head {
  background: #141414 !important;
  color: #f4f4f4 !important;
  border-color: #2c2c2c !important;
}
body.theme-classic #teamOverlay .team-stats,
body.theme-classic #teamOverlay .team-form,
body.theme-classic #teamOverlay .team-perms,
body.theme-classic #teamOverlay .team-person {
  background: #101010 !important;
  border-color: #2c2c2c !important;
  color: #f4f4f4 !important;
}
body.theme-classic #teamOverlay .team-person span { color: #a1a1a1 !important; }
body.theme-classic #teamOverlay .team-person.is-selected {
  border-color: #ffc80c !important;
  background: #1b1b1b !important;
  box-shadow: inset 3px 0 0 #ffc80c !important;
}
body.theme-classic #teamOverlay .field input,
body.theme-classic #teamOverlay .field select,
body.theme-classic #teamOverlay .team-stats-filters input,
body.theme-classic #teamOverlay .team-stats-filters select {
  background: #0b0b0b !important;
  color: #f4f4f4 !important;
  border-color: #2c2c2c !important;
}
