:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #20242a;
  --muted: #6b7280;
  --line: #e3e6eb;
  --primary: #0f766e;
  --primary-dark: #0a5f59;
  --accent: #b45309;
  --soft: #ecfdf5;
  --danger: #b91c1c;
  --control-height: 34px;
  --control-radius: 7px;
  --control-font-size: 13px;
}

[hidden] { display: none !important; }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.site-icp-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
}

.site-icp-footer a {
  color: #cbd5e1;
  font-size: 12px;
  line-height: 20px;
  text-decoration: none;
}

.site-icp-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

/* Do not let component display rules override the native hidden attribute. */
#login-page[hidden],
#app-shell[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

.sidebar {
  background: #17202a;
  color: #fff;
  min-height: 100vh;
  padding: 20px 14px;
  position: sticky;
  top: 0;
}

.brand {
  display: flex;
  align-items: center;
  padding: 4px 8px 24px;
}

.brand-logo {
  width: 184px;
  height: 56px;
}

.brand-logo img {
  display: block;
  width: 184px;
  height: auto;
}

nav {
  display: grid;
  gap: 6px;
}

.nav {
  width: 100%;
  border: 0;
  background: transparent;
  color: #d7dde4;
  text-align: left;
  padding: 11px 12px;
  border-radius: 7px;
  cursor: pointer;
}

.nav:hover,
.nav.active {
  background: #253241;
  color: #fff;
}

main {
  min-width: 0;
  padding: 20px 22px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}

h1 {
  margin: 0;
  font-size: 24px;
}

.topbar p,
.panel p {
  margin: 6px 0 0;
  color: var(--muted);
}

.user-menu {
  position: relative;
}

.topbar-account-actions { display: flex; align-items: center; gap: 8px; }
.notification-menu { position: relative; }
.notification-trigger {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 16px;
}
.notification-count {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  border: 2px solid #fff; border-radius: 999px; background: #dc2626; color: #fff;
  font-size: 10px; font-weight: 800; line-height: 14px;
}
.notification-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20;
  width: min(380px, calc(100vw - 32px)); max-height: 480px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .18); opacity: 0; visibility: hidden;
  transform: translateY(-5px); transition: .18s ease;
}
.notification-menu.open .notification-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.notification-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notification-head button { min-height: 28px; padding: 4px 8px; border: 0; background: transparent; color: var(--primary); }
.notification-list { max-height: 410px; overflow: auto; }
.notification-item { padding: 12px 14px; border-bottom: 1px solid #eef2f7; }
.notification-item.unread { background: #f0fdfa; }
.notification-item strong { display: block; color: #0f172a; font-size: 13px; }
.notification-item p { margin: 5px 0; color: #475569; font-size: 12px; line-height: 1.55; }
.notification-item time { color: #94a3b8; font-size: 11px; }
.notification-item > div { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.notification-item > div span { color: #0f766e; font-size: 11px; font-weight: 700; }
.notification-item.clickable { cursor: pointer; transition: background .18s ease; }
.notification-item.clickable:hover, .notification-item.clickable:focus { outline: none; background: #e8f7f4; }
.target-highlight { animation: target-highlight-pulse 1s ease-in-out 3; box-shadow: inset 0 0 0 2px #16a394; }
@keyframes target-highlight-pulse { 0%, 100% { background: #fff; } 50% { background: #dff7f2; } }
.notification-empty { padding: 20px 14px; text-align: center; }

.user-pill {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 999px;
  color: #374151;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-caret {
  font-size: 16px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  width: 148px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown,
.user-menu.open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu:hover .user-caret,
.user-menu:focus-within .user-caret,
.user-menu.open .user-caret {
  transform: rotate(180deg);
}

.user-dropdown button {
  width: 100%;
  border: 0;
  padding: 9px 10px;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}

.user-dropdown button:hover,
.user-dropdown button:focus-visible {
  background: #f1f5f9;
  border: 0;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  background: #fff;
}

.login-showcase {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 70px);
  color: #fff;
  background: #05070d;
}

.login-showcase::before,
.login-showcase::after {
  display: none;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.login-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong { font-size: 19px; letter-spacing: 0.04em; }
.login-brand span { margin-top: 4px; color: rgba(255,255,255,.65); font-size: 10px; letter-spacing: .14em; }

.showcase-copy {
  position: relative;
  z-index: 2;
  max-width: 580px;
  margin-top: clamp(74px, 15vh, 160px);
}

.eyebrow {
  margin: 0 0 13px;
  color: #ffbc61;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.showcase-copy h1 {
  max-width: 580px;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.22;
  letter-spacing: -0.04em;
}

.world-journey {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
}

.star-field {
  position: absolute;
  inset: 0;
  opacity: .7;
  background-image:
    radial-gradient(circle at 13% 22%, rgba(255,255,255,.85) 0 1px, transparent 1.5px),
    radial-gradient(circle at 81% 14%, rgba(116,214,255,.75) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 36%, rgba(255,255,255,.7) 0 1px, transparent 1.5px),
    radial-gradient(circle at 17% 72%, rgba(137,163,255,.65) 0 1px, transparent 1.5px),
    radial-gradient(circle at 50% 83%, rgba(255,255,255,.5) 0 1px, transparent 1.5px);
}

.globe {
  position: absolute;
  border-radius: 50%;
  right: clamp(-120px, -8vw, -45px);
  bottom: clamp(-90px, -8vh, -30px);
  width: min(48vw, 570px);
  aspect-ratio: 1;
  overflow: visible;
  background: radial-gradient(circle at 34% 28%, #254466 0%, #102a45 32%, #081524 68%, #03070e 100%);
  box-shadow: inset -36px -24px 65px rgba(0,0,0,.78), inset 14px 10px 35px rgba(100,206,255,.18), 0 0 82px rgba(31,122,210,.20);
}

.globe-aura,
.globe-surface {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.globe-aura { box-shadow: 0 0 0 1px rgba(122,209,255,.35), 0 0 35px rgba(37,162,255,.24); }
.globe-surface {
  background:
    repeating-linear-gradient(0deg, transparent 0 50px, rgba(138,214,255,.12) 51px 52px, transparent 53px 102px),
    repeating-linear-gradient(90deg, transparent 0 65px, rgba(138,214,255,.09) 66px 67px, transparent 68px 132px);
  opacity: .42;
  transform: perspective(450px) rotateY(-35deg);
}

.globe-map {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}
.map-drift { transform-origin: 250px 250px; }
.map-land { fill: url(#map-dots); opacity: .95; }
.map-shade { fill: url(#map-fade); opacity: .35; }

.city {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(221,246,255,.82);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  opacity: 0;
  white-space: nowrap;
  animation: none;
}
.city i { width: 7px; height: 7px; border-radius: 50%; background: #7de9ff; box-shadow: 0 0 0 4px rgba(74,214,255,.13), 0 0 16px 5px rgba(74,214,255,.72); }
.city-beijing { top: 34%; left: 57%; animation-delay: 4.8s; }
.city-losangeles { top: 47%; left: 25%; animation-delay: 7.3s; }
.city-madrid { top: 39%; left: 43%; animation-delay: 9.8s; }
.city-sydney { top: 65%; left: 66%; animation-delay: 12.3s; }

.journey-cicada {
  position: absolute;
  z-index: 4;
  left: 86%;
  top: 13%;
  width: 15px;
  height: 17px;
  filter: drop-shadow(0 0 8px rgba(87,224,255,.95));
  opacity: 0;
  animation: none;
}
.journey-cicada img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* The sequence starts when the login screen is shown, rather than while it is hidden. */
.login-page.is-journey-active .globe-surface { animation: globe-turn 16s linear 1 both; }
.login-page.is-journey-active .map-drift { animation: map-drift 16s cubic-bezier(.35,.02,.22,1) 1 both; }
.login-page.is-journey-active .city { animation: city-on 1s ease-out 1 forwards; }
.login-page.is-journey-active .journey-cicada { animation: cicada-journey 15s cubic-bezier(.37,.01,.2,1) 1 forwards; }

@keyframes globe-turn { from { transform: perspective(450px) rotateY(-58deg) scale(.94); } 52% { transform: perspective(450px) rotateY(22deg) scale(1); } to { transform: perspective(450px) rotateY(38deg) scale(1); } }
@keyframes map-drift { from { transform: translateX(-68px) scale(.95); } 55% { transform: translateX(24px) scale(1.02); } to { transform: translateX(42px) scale(1.03); } }
@keyframes city-on { 0% { opacity: 0; transform: scale(.35); } 48% { opacity: 1; transform: scale(1.25); } 100% { opacity: 1; transform: scale(1); } }
@keyframes cicada-journey {
  0%, 6% { left: 88%; top: 13%; width: 13px; height: 15px; opacity: 0; }
  14% { left: 58%; top: 34%; width: 23px; height: 26px; opacity: 1; }
  28% { left: 58%; top: 34%; width: 18px; height: 20px; opacity: .8; }
  40% { left: 25%; top: 47%; width: 23px; height: 26px; opacity: 1; }
  54% { left: 25%; top: 47%; width: 18px; height: 20px; opacity: .8; }
  65% { left: 43%; top: 39%; width: 23px; height: 26px; opacity: 1; }
  78% { left: 43%; top: 39%; width: 18px; height: 20px; opacity: .8; }
  88% { left: 66%; top: 65%; width: 23px; height: 26px; opacity: 1; }
  94% { left: 84%; top: 11%; width: 17px; height: 19px; opacity: .9; }
  100% { left: 84%; top: 11%; width: 13px; height: 15px; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .globe-surface, .map-drift, .city, .journey-cicada { animation: none !important; }
  .city { opacity: 1; }
  .journey-cicada { display: none; }
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 40px;
  background: #fff;
}

.login-form { width: min(100%, 390px); }
.login-form-head { margin-bottom: 32px; }
.login-form-head .eyebrow { color: var(--primary); }
.login-form h2 { margin: 0; font-size: 30px; letter-spacing: -0.03em; }
.login-form-head > p:last-child { margin: 11px 0 0; color: var(--muted); line-height: 1.6; }
.login-form label { display: grid; gap: 8px; margin-bottom: 18px; color: #374151; font-size: 14px; font-weight: 700; }
.login-form input { padding: 13px 14px; }
.login-submit { width: 100%; margin-top: 6px; padding: 13px 16px; border: 0; border-radius: 9px; background: var(--primary); color: #fff; font-weight: 700; }
.login-submit:hover { border: 0; background: var(--primary-dark); }
.login-note { margin: 18px 0 0; color: #9ca3af; text-align: center; font-size: 12px; }

.view {
  display: none;
}

.view.active {
  display: block;
}

.required-mark { color: #d83931; margin-left: 3px; }
.tag-list, .project-memberships, .tag-manager-options { display: flex; flex-wrap: wrap; gap: 6px; min-width: 150px; }
.tag-chip, .project-membership { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; background: #eef4fb; color: #315b88; font-size: 12px; line-height: 1.3; }
.tag-chip small { color: #7b8da3; }
.tag-chip button, .project-membership button { border: 0; padding: 0 2px; background: transparent; color: inherit; }
.influencer-tag-editor { display: grid; gap: 9px; }
.influencer-tag-editor > span { font-weight: 700; color: #374151; }
#editor-tag-groups { display: grid; gap: 10px; }
.tag-option-group { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.tag-option-group legend { padding: 0 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.creator-type-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.creator-type-levels label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; color: #475569; }
.creator-type-levels select { min-width: 0; }
.creator-type-levels select:disabled { background: #f8fafc; color: #94a3b8; cursor: not-allowed; }
.creator-type-path-list { display: grid; gap: 10px; }
.creator-type-path-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.creator-type-path-row:last-child { padding-bottom: 0; border-bottom: 0; }
.creator-type-path-add, .creator-type-path-remove { margin-top: 9px; font-size: 12px; }
.creator-type-path-remove { color: #b42318; }
.creator-type-filter-level { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.creator-type-filter-level > span { display: inline-block; width: 34px; color: var(--muted); font-size: 12px; font-weight: 700; }
.creator-type-manager { background: #fbfdff; }
.creator-type-manager > .tag-manager-type-head { align-items: center; }
.creator-type-manager > .tag-manager-type-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; }
.creator-type-tree { list-style: none; margin: 12px 0 0; padding: 0; }
.creator-type-tree .creator-type-tree { margin: 6px 0 0 18px; padding-left: 12px; border-left: 1px solid #e2e8f0; }
.creator-type-tree li { margin: 4px 0; }
.creator-type-manager-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.creator-type-manager-item > strong { color: #334155; font-size: 13px; }
.creator-type-manager-actions { display: inline-flex; flex: 0 0 auto; gap: 3px; opacity: .5; transition: opacity .15s ease; }
.creator-type-manager-item:hover .creator-type-manager-actions, .creator-type-manager-item:focus-within .creator-type-manager-actions { opacity: 1; }
.creator-type-manager-actions button { display: inline-grid; width: 25px; height: 25px; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #64748b; font-size: 16px; line-height: 1; }
.creator-type-manager-actions button:hover, .creator-type-manager-actions button:focus-visible { background: #eff6ff; color: #2563eb; }
.creator-type-manager-actions .danger-link { color: #b42318; }
.creator-type-manager-actions .danger-link:hover, .creator-type-manager-actions .danger-link:focus-visible { background: #fff1f2; color: #b42318; }
.creator-type-manager > .tag-manager-type-head > .primary { padding: 6px 10px; font-size: 12px; }
@media (max-width: 680px) { .creator-type-levels { grid-template-columns: 1fr; } .creator-type-path-row { grid-template-columns: 1fr; } }
.tag-option { display: inline-flex !important; grid-template-columns: none !important; align-items: center; gap: 5px !important; margin: 3px 12px 3px 0; font-weight: 500 !important; }
.tag-option input { width: auto; }
.tag-manager-dialog { width: min(820px, calc(100vw - 32px)); }
.tag-manager-create, .tag-manager-add, .tag-manager-type-head { display: flex; align-items: center; gap: 9px; }
.tag-manager-create { margin-bottom: 14px; }
.tag-manager-create input, .tag-manager-add input { flex: 1; }
.tag-manager-list { display: grid; gap: 12px; max-height: 58vh; overflow: auto; }
.tag-manager-type { padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.tag-manager-type-head { justify-content: space-between; margin-bottom: 10px; }
.tag-manager-type-head > div { display: flex; gap: 6px; }
.tag-manager-add { margin-top: 10px; }
.multi-filter-label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.multi-filter-label select { min-height: 92px; }
.order-filters > label:not(.multi-filter-label) { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.attachment-link { display: inline-block; margin-top: 6px; }

.role-finance #orders .template-toolbar > .bulk-actions-main,
.role-finance #bulk-delete-orders,
.role-finance #order-selection-count,
.role-finance #orders table th:first-child,
.role-finance #orders table td:first-child {
  display: none;
}

.role-finance #orders table th:nth-child(2), .role-finance #orders table td:nth-child(2) { left: 0; }
.role-finance #orders table th:nth-child(3), .role-finance #orders table td:nth-child(3) { left: 118px; }
.role-finance #orders table th:nth-child(4), .role-finance #orders table td:nth-child(4) { left: 204px; }
.role-finance #orders table th:nth-child(5), .role-finance #orders table td:nth-child(5) { left: 290px; }
.role-finance #orders table th:nth-child(6), .role-finance #orders table td:nth-child(6) { left: 450px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}

.project-monitor-panel { margin-bottom: 18px; }
.project-table { min-width: 1120px; }
.progress-text { color: var(--primary-dark); font-weight: 700; font-variant-numeric: tabular-nums; }

.project-cards { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 14px; }
.project-card { display: block; min-height: 182px; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(180deg, #fff, #fbfcfd); text-align: left; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.project-card:hover { border-color: #9ccbc5; box-shadow: 0 10px 24px rgba(15, 118, 110, .10); transform: translateY(-2px); }
.project-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.project-card-head strong, .project-card-head span { display: block; }
.project-card-head strong { max-width: 210px; color: #1f2937; font-size: 16px; line-height: 1.35; }
.project-card-head > div > span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.project-card p { min-height: 20px; margin: 12px 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.project-card-stats { display: flex; gap: 14px; color: #64748b; font-size: 12px; }
.project-card-stats b { margin-right: 3px; color: #1f2937; font-size: 16px; }
.project-progress { height: 6px; margin: 15px 0 8px; overflow: hidden; border-radius: 999px; background: #e7edf0; }
.project-progress i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.project-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.project-card-foot small { color: #7c8798; font-size: 12px; }
.project-card-foot > div { display: flex; gap: 5px; }
.project-card-foot button { padding: 5px 7px; border-radius: 6px; font-size: 12px; }
.empty-projects { padding: 28px; border: 1px dashed #cbd5e1; border-radius: 10px; color: var(--muted); text-align: center; }
.project-detail { scroll-margin-top: 18px; }
.project-monitor-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.project-monitor-actions button { min-height: var(--control-height); }
.project-monitor-range { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.project-monitor-range-label { color: #334155; font-size: 13px; font-weight: 700; }
.project-monitor-periods { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border-radius: 7px; background: #e8eef1; }
.project-monitor-periods button { min-height: 30px; padding: 5px 11px; border: 0; border-radius: 5px; background: transparent; color: #64748b; box-shadow: none; font-size: 12px; }
.project-monitor-periods button:hover { color: var(--primary-dark); }
.project-monitor-periods button.active { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 4px rgba(15, 23, 42, .12); font-weight: 700; }
.project-monitor-custom-range { display: flex; align-items: end; gap: 7px; }
.project-monitor-custom-range[hidden] { display: none; }
.project-monitor-custom-range > span { padding-bottom: 8px; color: var(--muted); font-size: 12px; }
.project-monitor-custom-range label { display: grid; gap: 3px; color: var(--muted); font-size: 11px; }
.project-monitor-custom-range input { min-height: 32px; width: 132px; padding: 5px 8px; }
.project-monitor-custom-range button { min-height: 32px; }
.project-progress-summary { display: grid; grid-template-columns: 1.35fr repeat(3, minmax(110px, .7fr)); gap: 10px; margin: 17px 0 12px; }
.project-progress-summary.spend-summary { grid-template-columns: minmax(210px, 1.25fr) repeat(5, minmax(130px, 1fr)); }
.project-progress-summary > div { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.project-progress-summary span { display: block; color: var(--muted); font-size: 12px; }
.project-progress-summary strong { display: block; margin-top: 7px; color: #1f2937; font-size: 23px; overflow-wrap: anywhere; }
.project-progress-summary small { display: block; margin-top: 7px; color: #94a3b8; font-size: 11px; }
.budget-progress-card { background: linear-gradient(180deg, #f8fffe 0%, #fbfcfd 100%); }
.project-progress-boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 17px; }
.progress-board { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.progress-board-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.progress-board-head strong { color: #172033; font-size: 15px; }
.progress-board-head span { color: var(--muted); font-size: 12px; }
.progress-steps { display: grid; gap: 9px; }
.progress-step-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; color: #334155; font-size: 13px; }
.progress-step-row strong { color: #0f172a; font-size: 15px; font-variant-numeric: tabular-nums; }
.progress-step-row small { margin-left: 2px; color: #94a3b8; font-size: 11px; font-weight: 600; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #e7edf0; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0f766e, #2563eb); }
.project-detail-grid { margin: 0; }
.project-detail-grid > section { min-width: 0; }
.detail-label { margin-bottom: 10px; color: #334155; font-weight: 700; }

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

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

.language-tag-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 420px;
  overflow: auto;
}

.language-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.language-tag-row > div {
  display: flex;
  gap: 6px;
}

.panel-title {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
}

.actions,
.bulk-bar,
.email-bar,
.email-compose-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

button,
.file-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #1f2937;
  min-height: var(--control-height);
  padding: 0 11px;
  border-radius: var(--control-radius);
  cursor: pointer;
  font-size: var(--control-font-size);
  line-height: 1.2;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.actions select {
  width: auto;
  min-width: 172px;
}

button:hover,
.file-btn:hover {
  border-color: #b8c0cc;
}

.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.file-btn input {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.form-grid.compact {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

#email-influencer-filters {
  grid-template-columns: repeat(8, minmax(100px, 1fr));
  align-items: end;
}

.filters {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.influencer-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.influencer-filter-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.influencer-filter-row > * { min-width: 0; }
.influencer-filter-row input,
.influencer-filter-row select,
.influencer-filter-row .multi-select-display,
.influencer-filter-row > button { min-height: var(--control-height); height: var(--control-height); }

.contacted-library-button {
  min-height: var(--control-height);
  padding: 6px 14px;
  border-color: #a8d3ce;
  background: #eef8f6;
  color: #176f67;
  font-weight: 700;
}
.contacted-library-button:hover,
.contacted-library-button:hover { border-color: #68afa7; background: #e2f3f0; color: #115f58; }
.contacted-library-button.active { border-color: var(--primary); background: var(--primary); color: #fff; }

.order-filters {
  grid-template-columns: repeat(9, minmax(0, 1fr));
  align-items: end;
}

.filter-span-2 { grid-column: span 2; }
.order-filters > input,
.order-filters > select,
.order-filters > button { align-self: end; }
.date-filter { margin: 0; }
.filter-caption { color: var(--muted); font-size: 12px; line-height: normal; }
.order-status-multi { display: grid; gap: 5px; min-width: 0; }
.order-filter-third-row-start { grid-column: 1 / span 2; }
.order-filters .multi-select.order-cost-currency-filter { width: 118px; max-width: 100%; justify-self: start; }
input[type="date"] { padding-right: 4px; padding-left: 5px; font-size: 11px; }
.order-detail-content { margin-top: 6px; }
.order-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.order-detail-grid > div { min-height: 74px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.order-detail-grid span { display: block; color: var(--muted); font-size: 12px; }
.order-detail-grid strong { display: block; margin-top: 7px; overflow-wrap: anywhere; color: #1f2937; font-size: 14px; }
.order-summary { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; color: #64748b; font-size: 13px; }
.order-summary strong, .order-summary b { color: #1f2937; }
.shipping-request-detail { margin-top: 12px; }
.shipping-request-detail .shipping-address-item { flex-basis: 100%; }
.order-readonly-notice { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 11px 14px; border: 1px solid #f3d39a; border-radius: 8px; background: #fff9eb; color: #8a5a00; font-size: 13px; }
.order-readonly-notice strong { color: #7a4800; }
.order-workbench { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(300px, 1.35fr) minmax(240px, .9fr); gap: 16px; margin-top: 16px; }
.order-workbench > * { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.order-workbench h3 { margin: 0 0 14px; color: #334155; font-size: 15px; }
.order-timeline ol { position: relative; margin: 0; padding: 0; list-style: none; }
.order-timeline li { position: relative; display: flex; gap: 10px; align-items: center; min-height: 35px; color: #94a3b8; font-size: 13px; }
.order-timeline li:not(:last-child)::after { position: absolute; top: 24px; left: 7px; width: 2px; height: 16px; background: #e2e8f0; content: ""; }
.order-timeline li i { position: relative; z-index: 1; width: 15px; height: 15px; border: 2px solid #cbd5e1; border-radius: 50%; background: #fff; }
.order-timeline li.done, .order-timeline li.current { color: #0f766e; font-weight: 700; }
.order-timeline li.done i { border-color: #0f766e; background: #0f766e; }
.order-timeline li.current i { border-color: #0f766e; box-shadow: 0 0 0 4px rgba(15, 118, 110, .14); }
.order-event-list { display: grid; gap: 10px; max-height: 570px; overflow: auto; }
.order-event { padding: 11px; border-left: 3px solid #99c9c3; border-radius: 0 7px 7px 0; background: #f8fafc; }
.order-event > div { display: flex; justify-content: space-between; gap: 8px; }
.order-event strong { color: #334155; font-size: 13px; }
.order-event span, .order-event small { color: #94a3b8; font-size: 11px; }
.order-event p { margin: 7px 0; color: #64748b; font-size: 12px; line-height: 1.5; }
.event-meta-grid, .stage-record-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin: 9px 0; }
.event-meta-grid span, .stage-record-grid span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 10px; border: 1px solid #e7edf2; border-radius: 7px; background: #fff; color: #334155; font-size: 12px; }
.event-meta-grid small, .stage-record-grid small { color: #7c8da3; font-size: 11px; }
.event-meta-grid b, .stage-record-grid b { color: #243244; font-weight: 600; line-height: 1.45; white-space: normal; }
.stage-record-grid .stage-record-links { grid-column: 1 / -1; }
.stage-record-links > div { display: grid; gap: 7px; width: 100%; }
.stage-record-links a { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 9px 11px; border: 1px solid #dce9e7; border-radius: 7px; background: #f8fcfb; text-decoration: none; }
.stage-record-links a:hover { border-color: #83bbb4; background: #edf8f6; }
.stage-record-links a small { color: #7c8da3; }
.stage-record-links a b { min-width: 0; overflow-wrap: anywhere; }
.stage-record-card { margin-bottom: 16px; padding: 14px; border: 1px solid #d8ebe7; border-radius: 9px; background: #f6fbfa; }
.stage-record-card > strong { color: #176b63; font-size: 14px; }
.payment-progress-card { display: grid; gap: 14px; width: 100%; margin-bottom: 16px; padding: 16px; border: 1px solid #cfe5e1; border-radius: 10px; background: #f8fcfb; }
.payment-progress-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: #176b63; }
.payment-progress-head span { color: #718096; font-size: 12px; }
.payment-progress-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 0; border: 0; background: transparent; }
.payment-progress-summary span { display: grid; gap: 5px; padding: 12px; border: 1px solid #e0ece9; border-radius: 8px; background: #fff; }
.payment-progress-summary small { color: #7c8da3; }
.payment-progress-summary b { font-size: 16px; }
.payment-progress-card .table-wrap { margin: 0; }
.payment-progress-card table { min-width: 840px; }
.daily-report-dialog { width: min(860px, calc(100vw - 32px)); }
.daily-report-dialog form { display: grid; gap: 14px; }
.daily-report-dialog label { display: grid; gap: 7px; color: #475569; font-size: 13px; font-weight: 700; }
.daily-report-toolbar { display: flex; align-items: end; gap: 10px; }
.daily-report-toolbar label { min-width: 210px; }
.daily-report-dialog textarea { min-height: 86px; }
.daily-report-dialog .daily-report-output { min-height: 430px; line-height: 1.65; font-family: inherit; background: #f8fafc; }
#copy-daily-report.copied { border-color: #059669; background: #059669; }
.topbar.dashboard-topbar { min-height: 52px; padding-bottom: 4px; }
.dashboard-module-tabs { display: flex; gap: 8px; margin-bottom: 12px; padding: 6px; border: 1px solid #dbe7e5; border-radius: 12px; background: #fff; width: fit-content; }
.dashboard-module-tabs button { min-height: 44px; padding: 8px 18px; font-size: 15px; font-weight: 700; }
.dashboard-module-tabs button.active { color: #fff; border-color: #0f766e; background: #0f766e; }
.operations-workbench-panel, .operations-dashboard-panel { padding-top: 18px; }
.operations-filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 14px; }
.operations-filter-bar label { display: grid; gap: 5px; color: #64748b; font-size: 12px; }
.operations-filter-bar select, .operations-filter-bar input { min-width: 180px; }
.operations-dashboard-note { margin: -4px 0 14px; color: #64748b; font-size: 12px; }
.operations-multi-select { width: min(320px, 28vw); min-width: 210px; }
.operations-multi-select .multi-select-display.has-selection { border-color: #91c9c3; background: #f1faf9; color: var(--primary-dark); font-weight: 700; }
.operations-multi-select .multi-select-options { right: auto; width: min(420px, calc(100vw - 40px)); }
.workbench-summary { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; }
.workbench-task-card { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; min-height: 82px; align-items: center; text-align: left; padding: 16px; border-color: #dce6e5; background: #f8fafc; }
.workbench-task-card strong { color: #64748b; font-size: 24px; }
.workbench-task-card.has-task { border-color: #8fc9c1; background: #effaf8; }
.workbench-task-card.has-task strong { color: #0f766e; }
.operations-sheet-block { display: grid; gap: 9px; margin-top: 20px; }
.operations-sheet-table { min-width: 2200px; font-size: 12px; }
.operations-sheet-table th { position: sticky; top: 0; color: #fff; background: #111827; white-space: nowrap; }
.operations-sheet-table td { white-space: nowrap; }
.operations-sheet-table th:nth-child(1), .operations-sheet-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  background: #fff;
}
.operations-sheet-table th:nth-child(2), .operations-sheet-table td:nth-child(2) {
  position: sticky;
  left: 300px;
  z-index: 3;
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  background: #fff;
  box-shadow: 8px 0 12px -12px rgba(15, 23, 42, .65);
}
.operations-crawler-table { width: max-content; min-width: 0; table-layout: auto; }
.operations-crawler-wrap { width: fit-content; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.operations-sheet-table thead th:nth-child(1), .operations-sheet-table thead th:nth-child(2) {
  z-index: 5;
  background: #111827;
}
.operations-report-divider { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-top: 30px; padding: 15px 2px 10px; border-top: 2px solid #dbe7e5; color: #172033; }
.operations-report-divider strong { font-size: 18px; }
.operations-report-divider span { color: #64748b; font-size: 12px; }
.content-performance-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 8px; }
.content-performance-filters label { display: grid; min-width: 240px; gap: 5px; color: #64748b; font-size: 12px; font-weight: 700; }
.content-performance-filters select, .content-performance-filters input { width: 100%; background: #fff; }
.content-performance-table { min-width: 1660px; }
.content-performance-order-table { min-width: 2050px; }
.content-performance-order-table th:nth-child(2), .content-performance-order-table td:nth-child(2) { box-shadow: none; }
.content-performance-order-table th:nth-child(3), .content-performance-order-table td:nth-child(3) {
  position: sticky;
  left: 390px;
  z-index: 3;
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  background: #fff;
}
.content-performance-order-table th:nth-child(4), .content-performance-order-table td:nth-child(4) {
  position: sticky;
  left: 500px;
  z-index: 3;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  overflow: hidden;
  background: #fff;
  box-shadow: 8px 0 12px -12px rgba(15, 23, 42, .65);
  text-overflow: ellipsis;
}
.content-performance-order-table thead th:nth-child(3),
.content-performance-order-table thead th:nth-child(4) { z-index: 5; background: #111827; }
:is(.content-performance-table, .sortable-report-table) .table-sort { display: inline-flex; min-height: 0; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
:is(.content-performance-table, .sortable-report-table) .sort-arrows { display: inline-flex; flex-direction: column; gap: 0; color: #94a3b8; font-size: 8px; line-height: .72; }
:is(.content-performance-table, .sortable-report-table) .sort-arrows i { font-style: normal; opacity: .55; }
:is(.content-performance-table, .sortable-report-table) .table-sort.sorted-asc .sort-arrows i:first-child,
:is(.content-performance-table, .sortable-report-table) .table-sort.sorted-desc .sort-arrows i:last-child { color: #5eead4; opacity: 1; }
:is(.content-performance-table, .sortable-report-table) .table-sort.sorted-asc .sort-arrows i:last-child,
:is(.content-performance-table, .sortable-report-table) .table-sort.sorted-desc .sort-arrows i:first-child { opacity: .2; }
:is(.content-performance-table, .sortable-report-table) .table-sort:hover .sort-arrows i { opacity: 1; }
:is(.content-performance-table, .sortable-report-table) .table-sort:focus-visible { outline: 2px solid #5eead4; outline-offset: 4px; border-radius: 2px; }
.template-stats-sortable-table .table-sort { display: inline-flex; min-height: 0; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
.template-stats-sortable-table .sort-arrows { display: inline-flex; flex-direction: column; gap: 0; color: #94a3b8; font-size: 8px; line-height: .72; }
.template-stats-sortable-table .sort-arrows i { font-style: normal; opacity: .55; }
.template-stats-sortable-table .table-sort.sorted-asc .sort-arrows i:first-child,
.template-stats-sortable-table .table-sort.sorted-desc .sort-arrows i:last-child { color: #0f766e; opacity: 1; }
.template-stats-sortable-table .table-sort.sorted-asc .sort-arrows i:last-child,
.template-stats-sortable-table .table-sort.sorted-desc .sort-arrows i:first-child { opacity: .2; }
.template-stats-sortable-table .table-sort:hover .sort-arrows i { opacity: 1; }
.template-stats-sortable-table .table-sort:focus-visible { outline: 2px solid #0f766e; outline-offset: 3px; border-radius: 2px; }
.content-performance-table .table-link { min-height: auto; padding: 0; border: 0; background: transparent; color: #0f766e; font-weight: 700; text-decoration: underline; }
.content-performance-table .table-empty { padding: 24px; color: #94a3b8; text-align: center; }
.content-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.content-published-time { color: #475569 !important; }
.content-published-time b { color: #0f766e; }
@media (max-width: 1180px) { .workbench-summary { grid-template-columns: repeat(3, minmax(180px, 1fr)); } }
@media (max-width: 780px) { .workbench-summary { grid-template-columns: repeat(2, minmax(150px, 1fr)); } .operations-multi-select { width: 100%; } }
.order-action-form { display: grid; gap: 11px; }
.order-action-form label { display: grid; gap: 6px; color: #475569; font-size: 13px; font-weight: 700; }
.order-action-form textarea { min-height: 92px; }
.money-input-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
.money-input-row input, .money-input-row select { width: 100%; }
.order-action-empty { color: var(--muted); font-size: 13px; line-height: 1.6; }
.order-action-empty h3 { color: #334155; }
.detail-head-actions { display: flex; gap: 6px; }
.detail-head-actions button, .order-action-form .primary { padding: 7px 10px; border-radius: 6px; font-size: 13px; }
.order-detail-content { position: relative; overflow: hidden; }
.order-status-flow { margin-top: 12px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; overflow-x: auto; }
.order-status-flow ol { display: flex; min-width: 850px; margin: 0; padding: 0; list-style: none; }
.order-status-flow li { position: relative; display: flex; flex: 1; flex-direction: column; gap: 7px; align-items: center; color: #94a3b8; font-size: 12px; text-align: center; white-space: nowrap; }
.order-status-flow li:not(:last-child)::after { position: absolute; z-index: 0; top: 7px; left: calc(50% + 10px); width: calc(100% - 20px); height: 2px; background: #e2e8f0; content: ""; }
.order-status-flow li button { position: relative; z-index: 1; display: inline-flex; flex-direction: column; gap: 7px; align-items: center; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; }
.order-status-flow li i { position: relative; z-index: 1; width: 14px; height: 14px; border: 2px solid #cbd5e1; border-radius: 50%; background: #fff; }
.order-status-flow li.done, .order-status-flow li.current { color: #0f766e; font-weight: 700; }
.order-status-flow li.done i { border-color: #0f766e; background: #0f766e; }
.order-status-flow li.current i { border-color: #0f766e; box-shadow: 0 0 0 4px rgba(15,118,110,.14); }
.order-status-flow li.selected span { padding: 3px 8px; border-radius: 999px; background: #e8f3f2; color: #0f766e; }
.order-action-panel { min-height: 350px; margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.stage-readonly-panel { display: grid; gap: 10px; }
.stage-edit-form strong { color: #334155; }
.action-panel-label { margin-bottom: 14px; color: #334155; font-size: 14px; font-weight: 700; }
.order-action-form { max-width: 440px; }
.order-action-form .action-title { margin-bottom: 3px; color: #1f2937; font-size: 16px; font-weight: 700; }
.order-utility-panel { min-height: 0; }
.order-tool-grid { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr) auto; gap: 12px; align-items: end; }
.order-mini-form { display: grid; gap: 8px; }
.order-mini-form label { display: grid; gap: 6px; color: #475569; font-size: 13px; font-weight: 700; }
.order-mini-form textarea { min-height: 74px; }
.split-order-form { grid-column: 1 / -1; }
.split-child-rows { display: grid; gap: 10px; }
.split-child-row { display: grid; grid-template-columns: 110px minmax(220px, 1fr) minmax(220px, 1fr); gap: 12px; align-items: end; padding: 12px; border: 1px solid #dbe4ea; border-radius: 10px; background: #f8fafc; }
.split-child-row > strong { align-self: center; color: #0f766e; }
.bundle-payment-list { display: grid; gap: 8px; }
.bundle-payment-row { display: grid !important; grid-template-columns: auto minmax(180px, 1fr) auto !important; gap: 10px !important; align-items: center; padding: 10px 12px; border: 1px solid #dbe4ea; border-radius: 9px; background: #f8fafc; }
.bundle-payment-row span { display: grid; gap: 2px; }
.bundle-payment-row small { color: var(--muted); font-weight: 500; }
.bundle-payment-row b { color: #0f766e; }
.order-content-links { margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef2f7; }
.order-content-links strong { display: block; margin-bottom: 8px; color: #334155; }
.order-content-links ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.order-content-links li { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.admin-tool-toggle { display: flex; justify-content: flex-end; margin-top: 14px; }
.admin-tool-toggle button { border-color: #8fc9c1; background: #effaf8; color: #0f766e; font-weight: 700; }
.order-utility-panel[hidden] { display: none !important; }
.order-event-drawer { position: absolute; z-index: 20; top: 0; right: 0; width: min(440px, 92vw); height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 9px 0 0 9px; background: #fff; box-shadow: -16px 0 34px rgba(15,23,42,.16); transform: translateX(105%); transition: transform .23s ease; }
.order-event-drawer.open { transform: translateX(0); }
.event-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; color: #334155; }
.event-drawer-head button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: #f1f5f9; font-size: 20px; line-height: 1; }

.filter-field {
  position: relative;
  min-width: 0;
}

.filter-field > input { height: 100%; }

.filter-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 8;
  display: flex;
  width: max-content;
  max-width: 300px;
  max-height: min(320px, calc(100vh - 24px));
  overflow-y: auto;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 13px 28px rgba(15, 23, 42, .13);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.filter-field.suggestions-upward .filter-suggestions {
  top: auto;
  bottom: calc(100% + 7px);
  transform: translateY(4px);
}

.filter-field.suggestions-upward:hover .filter-suggestions,
.filter-field.suggestions-upward:focus-within .filter-suggestions { transform: translateY(0); }

.filter-field:hover .filter-suggestions,
.filter-field:focus-within .filter-suggestions {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.suggestion-label {
  width: 100%;
  margin-bottom: 1px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
}

.filter-suggestions button {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.filter-suggestions button:hover { border-color: #b9d8d4; background: #e8f3f2; color: var(--primary-dark); }
.filter-suggestions button.selected { border-color: var(--primary); background: var(--primary); color: #fff; }

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: #fff;
  color: var(--text);
  min-height: var(--control-height);
  padding: 6px 9px;
  outline: none;
  font-size: var(--control-font-size);
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

#influencer-table {
  min-width: 1180px;
}

#influencers table { min-width: 1640px; }
#orders table { min-width: 1850px; }
#orders table th,
#orders table td { white-space: nowrap; }

/* Keep the order identity visible while reviewing columns on the right. */
#orders table th:nth-child(-n+6),
#orders table td:nth-child(-n+6) {
  position: sticky;
  z-index: 3;
  background: #fff;
}

#orders table th:nth-child(-n+6) {
  z-index: 5;
  background: #f2f4f7;
}

#orders table th:nth-child(1), #orders table td:nth-child(1) { left: 0; min-width: 42px; width: 42px; }
#orders table th:nth-child(2), #orders table td:nth-child(2) { left: 42px; min-width: 118px; width: 118px; }
#orders table th:nth-child(3), #orders table td:nth-child(3) { left: 160px; min-width: 86px; width: 86px; }
#orders table th:nth-child(4), #orders table td:nth-child(4) { left: 246px; min-width: 86px; width: 86px; }
#orders table th:nth-child(5), #orders table td:nth-child(5) { left: 332px; min-width: 160px; width: 160px; }
#orders table th:nth-child(6), #orders table td:nth-child(6) {
  left: 492px;
  min-width: 110px;
  width: 110px;
  box-shadow: 8px 0 12px rgba(15, 23, 42, 0.07);
}

#orders table tr:hover td:nth-child(-n+6) { background: #fafafa; }

#orders .influencer-identity { min-width: 140px; width: 140px; gap: 8px; }
#orders .influencer-identity > div { overflow: hidden; }
#orders .profile-name-button {
  display: block;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  background: #f2f4f7;
  color: #4b5563;
  font-weight: 700;
  position: sticky;
  top: 0;
}

tr:hover td {
  background: #fafafa;
}

.influencer-id {
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.influencer-identity {
  display: flex;
  align-items: center;
  min-width: 210px;
  gap: 10px;
}

.influencer-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  display: block;
  overflow: hidden;
}

.avatar-fallback {
  position: relative;
  background: #f5f6f7;
  border-color: #d8dde3;
  color: transparent;
  font-size: 0;
}

.avatar-fallback::before,
.avatar-fallback::after {
  content: "";
  position: absolute;
  left: 50%;
  background: #89919e;
  transform: translateX(-50%);
}

.avatar-fallback::before {
  top: 9px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
}

.avatar-fallback::after {
  bottom: -2px;
  width: 36px;
  height: 21px;
  border-radius: 50% 50% 42% 42%;
}

.avatar-fallback.has-image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.avatar-fallback.has-image::before,
.avatar-fallback.has-image::after {
  display: none;
}

.influencer-identity > div { display: flex; align-items: center; min-width: 0; min-height: 42px; }
.username { color: #2563eb; font-weight: 700; }
.profile-name-button { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.profile-name-button:hover { text-decoration: underline; }
.channel-list { display: flex; align-items: center; gap: 5px; }
.channel-icon { position: relative; display: grid; width: 22px; height: 22px; place-items: center; overflow: hidden; border-radius: 5px; background: #fff; color: #64748b; font-size: 13px; font-weight: 700; line-height: 1; }
.channel-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.channel-icon:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(15, 23, 42, .18); }
.channel-icon.is-disabled { opacity: .46; cursor: default; }
.muted { color: #94a3b8; }

.operation-column {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 190px;
  background: #fff;
  box-shadow: -8px 0 12px rgba(15, 23, 42, 0.04);
}

th.operation-column { z-index: 4; background: #f2f4f7; }
tr:hover .operation-column { background: #fafafa; }
.row-actions { display: flex; gap: 5px; }
.row-actions button { padding: 6px 8px; border-radius: 6px; font-size: 12px; white-space: nowrap; }
.shipping-tracking-actions { margin-top: 7px; }
.shipping-tracking-dialog { width: min(920px, calc(100vw - 32px)); max-width: 920px; }
.shipping-tracking-result { min-height: 360px; max-height: 65vh; overflow: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.crawler-review-panel { margin-bottom: 18px; }
.crawler-review-import { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.crawler-review-import-operators .multi-select-options { min-width: 240px; }
.crawler-review-import-operators .multi-select-display.has-selection { border-color: #91c9c3; background: #f1faf9; color: var(--primary-dark); font-weight: 700; }
.crawler-review-filters { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.crawler-review-panel .table-wrap { overflow-x: hidden; }
.crawler-review-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 12px; }
.crawler-review-table th, .crawler-review-table td { padding-left: 8px; padding-right: 8px; overflow-wrap: anywhere; }
.crawler-review-table th:nth-child(1) { width: 14%; }
.crawler-review-table th:nth-child(2) { width: 15%; }
.crawler-review-table th:nth-child(3) { width: 8%; }
.crawler-review-table th:nth-child(4) { width: 7%; }
.crawler-review-table th:nth-child(5) { width: 6%; }
.crawler-review-table th:nth-child(6) { width: 17%; }
.crawler-review-table th:nth-child(7) { width: 8%; }
.crawler-review-table th:nth-child(8) { width: 8%; }
.crawler-review-table th:nth-child(9) { width: 10%; }
.crawler-review-table th:nth-child(10) { width: 7%; }
.crawler-review-table td:nth-child(1), .crawler-review-table td:nth-child(6) { word-break: break-word; }
.crawler-review-table .row-actions { flex-wrap: wrap; }
.crawler-review-dialog { width: min(820px, calc(100vw - 32px)); max-width: 820px; }
.crawler-review-section { margin-top: 18px; }
.crawler-review-section > strong { display: block; margin-bottom: 8px; }
.crawler-review-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 220px; overflow: auto; }
.crawler-review-fixed-project { padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: #f7faf9; color: var(--primary-dark); font-weight: 700; }
.danger-link { color: var(--danger); }

.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 5px; padding-top: 14px; }
.page-button { min-width: 32px; padding: 0 9px; font-size: 12px; }
.page-button.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.page-button:disabled { cursor: default; opacity: .45; }
.page-ellipsis { padding: 0 2px; color: #94a3b8; }
.page-size-label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }
.page-size-label select { width: 62px; padding: 5px 7px; }
.quick-pagination { display: flex; gap: 6px; }
.quick-pagination button { padding: 0 9px; font-size: 12px; }
.quick-pagination button:disabled { cursor: default; opacity: .45; }
.order-action-form button:disabled { cursor: not-allowed; border-color: #cbd5e1; background: #e2e8f0; color: #64748b; opacity: 1; }
.list-footer-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; padding-top: 12px; }
.list-footer-bar .selection-note { margin-right: auto; }

.status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.status-item:hover {
  border-color: #9ccbc5;
  background: #f0fdfa;
}

.content-summary {
  display: grid;
  gap: 10px;
}

.content-summary div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.content-page {
  padding: 2px 0 18px;
}

.content-center-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.content-center-tabs button {
  min-height: 36px;
  padding: 7px 16px;
  border-color: transparent;
  background: transparent;
  color: #64748b;
}

.content-center-tabs button.active {
  border-color: #b9ded9;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 3px 10px rgba(15, 118, 110, .1);
}

.content-toolbar,
.content-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 4px 0 18px;
}

.content-toolbar p,
.content-detail-head p {
  margin: 7px 0 0;
  color: var(--muted);
}

.content-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.upload-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: 0 11px;
  border: 1px solid #ffd2ac;
  border-radius: var(--control-radius);
  background: #fff7ef;
  color: #e85f00;
  font-size: var(--control-font-size);
  font-weight: 700;
  cursor: pointer;
}

.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.content-create-button {
  min-width: 0;
  border-color: #ff6a00;
  background: #ff6a00;
  box-shadow: 0 8px 18px rgba(255, 106, 0, .18);
}

.content-create-button:hover {
  border-color: #e85f00;
  background: #e85f00;
}

.content-filter-card,
.content-list-panel,
.content-data-card,
.content-rank-card {
  border: 1px solid #edf0f4;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .035);
}

.content-filter-card {
  padding: 18px 20px;
  margin-bottom: 18px;
}

.content-filter-row,
.content-detail-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.content-filter-row input,
.content-filter-row select,
.content-detail-filters input,
.content-detail-filters select {
  width: auto;
  min-width: 150px;
  border: 0;
  border-radius: var(--control-radius);
  background: #f6f7f9;
  color: #374151;
}

.content-filter-row input,
.content-detail-filters input {
  min-width: 220px;
}

.content-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-top: 18px;
  border: 1px solid #f0ece7;
  border-radius: 17px;
  background: linear-gradient(90deg, rgba(255, 248, 239, .8), #fff);
  overflow: hidden;
}

.content-overview > div {
  min-height: 82px;
  padding: 18px 22px;
  border-right: 1px solid #f1eee9;
}

.content-overview > div:last-child {
  border-right: 0;
}

.content-overview span,
.content-project-card span,
.content-detail-metrics span,
.content-rank-metrics span {
  display: block;
  color: #7c8494;
  font-size: 13px;
}

.content-overview strong {
  display: block;
  margin-top: 12px;
  color: #1f2937;
  font-size: 24px;
}

.content-list-panel {
  padding: 24px 22px;
}

.content-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.content-list-head strong {
  color: #1f2937;
  font-size: 19px;
}

.content-list-head span {
  color: var(--muted);
  font-size: 13px;
}

.content-project-cards {
  display: grid;
  gap: 14px;
}

.content-project-card {
  display: grid;
  grid-template-columns: minmax(230px, 1.4fr) repeat(4, minmax(110px, .75fr)) 104px;
  gap: 18px;
  align-items: center;
  min-height: 106px;
  padding: 20px 22px;
  border: 1px solid #eef1f5;
  border-radius: 17px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.content-project-card:hover {
  border-color: #ffd2ac;
  box-shadow: 0 10px 26px rgba(255, 106, 0, .09);
  transform: translateY(-1px);
}

.content-project-main strong {
  display: block;
  color: #1f2937;
  font-size: 17px;
}

.content-project-main span {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.content-avatar {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #ffe7d2;
}

.content-project-card > div > strong {
  display: block;
  margin-top: 8px;
  color: #1f2937;
  font-size: 17px;
}

.content-socials {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.content-social-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 5px;
  background: #f3f4f6;
  color: #111827;
  font-size: 11px;
  font-weight: 800;
}

.content-social-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.content-project-status {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  color: #374151;
}

.content-project-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
}

.content-detail-page {
  padding-top: 2px;
}

.ghost-button {
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ff6a00;
  font-weight: 700;
}

.ghost-button:hover {
  border: 0;
  background: transparent;
  color: #d95700;
}

.content-detail-head h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
}

.content-platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #eef1f5;
  border-radius: 18px 18px 0 0;
  background: #fff;
}

.content-platform-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 88px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f7f8fa;
  color: #4b5563;
  font-weight: 700;
}

.content-platform-tabs button.active {
  border-color: #ff6a00;
  background: #fff7ef;
  color: #ff6a00;
}

.content-platform-tabs b {
  color: inherit;
  font-size: 12px;
}

.content-detail-filters {
  padding: 18px;
  margin-bottom: 22px;
  border: 1px solid #eef1f5;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: #fff;
}

.content-board-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
}

.content-board-title span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6a00;
}

.content-board-title strong {
  color: #1f2937;
  font-size: 18px;
}

.content-board-title button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #64748b;
}

.content-data-card,
.content-rank-card {
  padding: 22px 24px;
  margin-bottom: 18px;
}

.content-section-title {
  margin-bottom: 17px;
  color: #1f2937;
  font-weight: 700;
}

.content-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
}

.content-detail-metrics > div {
  min-height: 92px;
  padding: 22px 24px;
  border: 1px solid #edf0f4;
  border-radius: 13px;
  background: #fff;
}

.content-detail-metrics strong {
  display: block;
  margin-top: 9px;
  color: #1f2937;
  font-size: 20px;
}

.content-rank-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.content-rank-head > strong {
  color: #1f2937;
  font-size: 17px;
}

.content-rank-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-rank-tabs button {
  padding: 8px 15px;
  border-radius: 999px;
  background: #f6f7f9;
  color: #4b5563;
  font-size: 13px;
}

.content-rank-tabs button.active {
  border-color: #ffb16c;
  background: #fff5eb;
  color: #e85f00;
}

.content-rank-list {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.content-sort-header {
  display: grid;
  grid-template-columns: 28px 58px minmax(400px, 1.4fr) minmax(650px, 1.6fr) 104px;
  min-width: 1320px;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 0;
  border-radius: 12px 12px 0 0;
  background: #f7f8fa;
  color: #8490a4;
  font-size: 13px;
  font-weight: 700;
}

.content-sort-header > span,
.content-sort-header button {
  min-height: 52px;
}

.content-sort-header > span:first-child {
  grid-column: 1 / 4;
  padding-left: 28px;
}

.content-sort-header > span:last-child {
  grid-column: 5;
  justify-content: center;
}

.content-sort-header > span,
.content-sort-metrics > span {
  display: flex;
  align-items: center;
}

.content-sort-metrics {
  display: grid;
  grid-column: 4;
  grid-template-columns: repeat(4, minmax(90px, 1fr)) minmax(125px, 1.15fr) minmax(100px, .9fr);
  gap: 18px;
  align-items: center;
}

.content-sort-metrics > span {
  min-height: 52px;
  justify-content: center;
}

.content-sort-header button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.content-sort-header button:hover,
.content-sort-header button.active {
  color: #0f766e;
}

.content-sort-header button i {
  position: relative;
  width: 10px;
  height: 16px;
}

.content-sort-header button i::before,
.content-sort-header button i::after {
  position: absolute;
  left: 1px;
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
}

.content-sort-header button i::before {
  top: 1px;
  border-bottom: 5px solid #b5bdca;
}

.content-sort-header button i::after {
  bottom: 1px;
  border-top: 5px solid #b5bdca;
}

.content-sort-header button.ascending i::before {
  border-bottom-color: #0f766e;
}

.content-sort-header button.descending i::after {
  border-top-color: #0f766e;
}

.content-rank-row {
  display: grid;
  grid-template-columns: 28px 58px minmax(400px, 1.4fr) minmax(650px, 1.6fr) 104px;
  min-width: 1320px;
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #eef2f7;
}

.content-row-actions {
  display: grid;
  gap: 10px;
}

.content-row-actions button {
  min-height: 30px;
  padding: 0 9px;
  white-space: nowrap;
}

.content-rank-index {
  color: #94a3b8;
  text-align: center;
  font-size: 13px;
}

.content-thumb {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff1e6, #eef6ff);
}

.content-rank-info {
  min-width: 0;
}

.content-rank-info a,
.content-rank-info strong {
  display: block;
  overflow: hidden;
  color: #1f2937;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-rank-info span {
  display: block;
  margin-top: 9px;
  color: #7c8494;
  font-size: 13px;
}

.content-rank-info .content-rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.content-rank-info .content-rank-meta > span {
  margin-top: 0;
}

.content-rank-info .content-metadata-item {
  display: inline-flex;
  width: auto;
  min-height: 27px;
  padding: 3px 10px;
  align-items: center;
  gap: 5px;
  border: 1px solid #dbe5ed;
  border-radius: 7px;
  background: #f8fafc;
  color: #475569;
  white-space: nowrap;
}

.content-rank-info .content-metadata-item small {
  color: #94a3b8;
  font-size: 11px;
}

.content-rank-info .content-metadata-item b {
  display: inline;
  color: #334155;
  font-size: 12px;
}

.content-category-badge,
.content-order-link,
.content-order-missing {
  display: inline-flex !important;
  width: auto;
  min-height: 27px;
  margin-top: 0 !important;
  padding: 3px 11px;
  align-items: center;
  border-radius: 999px;
  font-size: 12px !important;
  font-weight: 700;
}

.content-category-badge {
  background: #edf9f7;
  color: #0f766e;
}

.content-order-link {
  border-color: #cbd9e7;
  background: #f7f9fc;
  color: #42627f;
}

.content-order-link:hover {
  border-color: #779ab9;
  background: #edf4fa;
}

.content-order-missing {
  background: #fff2f2;
  color: #b91c1c !important;
}

.order-content-category {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: #64748b;
  font-size: 12px;
}

.order-content-category select {
  width: auto;
  min-width: 92px;
  min-height: 32px;
  padding: 4px 28px 4px 10px;
  border-color: #b8ddd8;
  border-radius: 999px;
  background-color: #edf9f7;
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
}

.content-rank-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr)) minmax(125px, 1.15fr) minmax(100px, .9fr);
  gap: 18px;
  align-items: center;
}

.content-rank-metrics label {
  display: grid;
  gap: 4px;
}

.content-rank-metrics input {
  width: 100%;
  min-height: var(--control-height);
  padding: 6px 9px;
  font-size: 13px;
}

.content-rank-metrics strong {
  display: block;
  margin-top: 4px;
  color: #1f2937;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.content-rank-metrics .content-inline-metric {
  position: relative;
  min-height: var(--control-height);
  min-width: 0;
  align-content: center;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: text;
}

.content-rank-metrics .content-inline-metric > span {
  display: none;
}

.content-rank-metrics .content-inline-metric input {
  display: none;
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border-color: #88c9c2;
  background: #fff;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}

.content-rank-metrics .content-inline-metric input::-webkit-inner-spin-button,
.content-rank-metrics .content-inline-metric input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.content-rank-metrics .content-inline-metric:hover,
.content-rank-metrics .content-inline-metric:focus-within {
  border-color: #c4e4df;
  background: #f5fbfa;
}

.content-rank-metrics .content-inline-metric:hover strong,
.content-rank-metrics .content-inline-metric:focus-within strong {
  display: none;
}

.content-rank-metrics .content-inline-metric:hover input,
.content-rank-metrics .content-inline-metric:focus-within input {
  display: block;
}

.content-rank-metrics em {
  display: block;
  margin-top: 3px;
  color: #10b981;
  font-size: 12px;
  font-style: normal;
}

.content-create-panel {
  margin-top: 6px;
}

.content-reference-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 2px 12px;
  color: #172033;
}

.content-reference-head span {
  color: var(--muted);
  font-size: 13px;
}

.content-reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 230px));
  gap: 14px;
  align-items: start;
}

.content-reference-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e5ebef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
}

.content-reference-media {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f6f3, #f8fafc);
}

.content-reference-media > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.content-reference-media > span .content-social-icon {
  width: 46px;
  height: 46px;
}

.content-reference-media em {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

.content-reference-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.content-reference-tags,
.content-reference-meta,
.content-reference-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.content-reference-tags b {
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9f7f5;
  color: #0f766e;
  font-size: 12px;
}

.content-reference-tags span,
.content-reference-meta {
  color: var(--muted);
  font-size: 12px;
}

.content-reference-body h3 {
  margin: 0;
  color: #172033;
  font-size: 15px;
  line-height: 1.45;
}

.content-reference-body p {
  min-height: 40px;
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.content-reference-actions {
  justify-content: flex-end;
  padding-top: 3px;
  border-top: 1px solid #eef2f4;
}

.bulk-bar,
.email-bar {
  padding: 7px 0 11px;
}

.bulk-bar,
.order-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  align-items: center;
}

.bulk-actions-main,
.bulk-actions-side {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.bulk-actions-side {
  justify-content: flex-start;
  text-align: left;
}

.bulk-bar #bulk-project { max-width: 260px; }

.email-compose-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 2px 0 14px; }
.email-compose-bar select { min-width: 190px; max-width: 280px; }
.email-influencer-wrap { max-height: 390px; }
.email-influencer-wrap tbody tr { cursor: pointer; }
.selection-note { padding: 0; color: var(--muted); font-size: 12px; }
.email-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.email-module { display: none; }
.email-module.active { display: block; }
.email-stats-summary { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 10px; margin: 16px 0 20px; }
.email-stats-summary > div { padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.email-stats-summary span, .email-stats-summary small { display: block; color: var(--muted); font-size: 12px; }
.email-stats-summary strong { display: block; margin: 5px 0 2px; color: #172033; font-size: 24px; }
.email-stats-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 16px; }
.email-stats-filter label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.email-stats-filter input { min-width: 170px; }
.email-stats-filter > span { padding-bottom: 12px; color: var(--muted); }
.email-queue-heading { margin-top: 22px; }
.email-queue-heading .detail-label { margin-bottom: 3px; }
.email-queue-heading p { margin: 0; }
.email-policy-text { color: #475569; font-size: 12px; line-height: 1.55; white-space: nowrap; }
.email-service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.email-service-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 4px 16px;
  align-items: center;
  min-height: 116px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
}
.email-service-card:hover {
  border-color: #b6d9d5;
  box-shadow: 0 18px 36px rgba(15, 23, 42, .08);
}
.email-service-card span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: #f3f6f8;
  color: #1f2937;
  font-size: 24px;
}
.email-service-card strong {
  color: #1f2937;
  font-size: 18px;
}
.email-service-card em {
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}
.email-back {
  margin: 0 0 18px;
  border: 0;
  background: transparent;
  color: #1597b3;
  font-weight: 800;
}
.email-empty-state {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 190px;
  margin: 16px 0;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}
.email-empty-state strong { color: #1f2937; font-size: 20px; }
.email-empty-state p { margin: 0; }
.template-upload-card {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
  margin: 12px 0 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}
.template-upload-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.template-upload-card input { max-width: 320px; }
.template-download-link {
  min-height: var(--control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid #b7d7d3;
  border-radius: var(--control-radius);
  background: #eef7f6;
  color: var(--primary-dark);
  font-size: var(--control-font-size);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.template-download-link:hover {
  background: #dff1ef;
}
.option-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #374151;
}
.option-line input {
  width: auto;
}
.template-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(140px, .75fr)) auto auto auto minmax(130px, auto);
  gap: 10px;
  align-items: center;
  margin: 12px 0 14px;
}

.order-toolbar {
  grid-template-columns: 1fr;
  justify-content: stretch;
  margin-top: -2px;
}

.order-toolbar .selection-note {
  text-align: left;
}

.bulk-bar .selection-note {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.bulk-owner-action {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.bulk-owner-action[hidden] {
  display: none;
}

.bulk-owner-action > button {
  min-width: 0;
}

.bulk-owner-panel {
  position: absolute;
  z-index: 12;
  top: calc(100% + 7px);
  left: 0;
  display: grid;
  width: 238px;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .14);
}

.bulk-owner-panel[hidden] {
  display: none;
}

.bulk-owner-panel select,
.bulk-owner-panel button {
  width: 100%;
}

.bulk-owner-panel .bulk-panel-check {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.bulk-owner-panel .bulk-panel-check input {
  width: auto;
  margin: 0;
}

.bulk-bar .danger-link,
.template-toolbar .danger-link {
  border-color: #f0c9c9;
  color: #b4232a;
  font-weight: 700;
}

.bulk-bar .danger-link:hover,
.template-toolbar .danger-link:hover {
  border-color: #e9a6a8;
  background: #fff5f5;
}
.template-toolbar .selection-note {
  padding: 0;
  text-align: right;
  white-space: nowrap;
}
.template-actions { display: flex; gap: 8px; align-items: center; }
.template-dialog { width: min(1120px, calc(100vw - 44px)); }
.template-editor-grid textarea { min-height: 190px; }
.template-rich-editor {
  min-height: 210px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
  white-space: normal;
  outline: none;
  overflow: auto;
}
.template-rich-editor p,
.template-preview-body p {
  margin: 0 0 1em;
}
.template-rich-editor p:last-child,
.template-preview-body p:last-child {
  margin-bottom: 0;
}
.template-rich-editor div,
.template-preview-body div {
  margin: 0;
}
.template-rich-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13, 148, 136, .12); }
.template-rich-editor:empty::before { content: attr(data-placeholder); color: #94a3b8; pointer-events: none; }
.template-rich-editor img, .template-preview-body img { display: block; max-width: min(100%, 640px); height: auto; margin: 12px 0; border-radius: 8px; }
.field-hint { display: block; margin-top: 7px; color: var(--muted); font-weight: 400; }
.template-token-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
}
.template-token-toolbar button {
  border-style: dashed;
  background: #f8fafc;
}
.template-preview-panel {
  padding: 14px;
  border: 1px solid #dbe7e5;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fffd 0%, #ffffff 100%);
}
.template-preview-panel p { margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.template-placeholder-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  line-height: 1.65;
  white-space: normal;
}
.template-preview-subject {
  font-weight: 800;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.template-preview-body {
  color: #334155;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
}
.template-token {
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  margin: 0 1px;
  border-radius: 6px;
  background: #fff3cd;
  color: #b45309;
  font-weight: 800;
  border: 1px solid #facc15;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef7f6;
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
}

.bulk-bar select,
.email-bar select {
  max-width: 320px;
}

.email-preview {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.email-card {
  border: 1px solid var(--line);
  background: #fcfdfd;
  border-radius: 8px;
  padding: 12px;
  white-space: pre-wrap;
}

.email-card > strong {
  display: block;
  margin-bottom: 6px;
}
.email-draft-card {
  display: grid;
  gap: 10px;
  white-space: normal;
}
.email-draft-card label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}
.email-draft-card input,
.email-draft-card textarea {
  width: 100%;
  font-weight: 500;
}
.email-draft-card textarea {
  min-height: 210px;
  resize: vertical;
  line-height: 1.65;
}
.email-draft-card .email-draft-body {
  width: 100%;
  color: #334155;
  font-size: 15px;
  font-weight: 400;
}
.email-draft-card .email-draft-body img {
  display: block;
  max-width: min(100%, 640px);
  height: auto;
  margin: 12px 0;
  border-radius: 8px;
}
.reply-inbound-card {
  min-height: 240px;
  line-height: 1.7;
}
.reply-detail-page { max-width: 1180px; margin: 0 auto; }
.reply-detail-panel { padding-bottom: 28px; }
.reply-email-document { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); color: #1f2937; font-size: 15px; overflow-wrap: anywhere; }
.reply-email-document img { max-width: 100%; height: auto; }
.reply-email-document table { max-width: 100%; }
.reply-email-document a { color: #0f766e; text-decoration: underline; }
.reply-plain-text { white-space: pre-wrap; line-height: 1.75; }
.email-quoted-content { margin-top: 14px; padding: 10px 12px; border-left: 3px solid #d7e2e8; background: #f8fafc; color: #64748b; }
.email-quoted-content summary { cursor: pointer; color: #557086; font-size: 13px; font-weight: 700; }
.email-quoted-content blockquote { margin: 10px 0 0; padding-left: 12px; border-left: 1px solid #cbd5e1; }
.reply-page-actions { position: sticky; bottom: 0; margin-top: 18px; padding: 12px 0; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
.reply-editor-label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}
.reply-editor-label textarea {
  min-height: 150px;
  resize: vertical;
}
.segmented-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.segmented-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 80px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #334155;
}

.order-inline-danger {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.table-head-action {
  min-height: 32px;
  padding: 6px 10px;
  background: #fff;
  white-space: nowrap;
}

.influencer-dialog.email-send-dialog { width: min(980px, calc(100vw - 40px)); }
.email-send-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #dce8e6;
  border-radius: 8px;
  background: #f7fbfa;
  color: #334155;
}
.email-send-summary strong { color: #0f172a; }
.email-send-summary span { color: #64748b; font-size: 13px; line-height: 1.6; }
.email-send-steps {
  display: grid;
  gap: 14px;
}
.email-send-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.email-step-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}
.email-step-body h3 {
  margin: 2px 0 10px;
  font-size: 16px;
}
.email-step-body select {
  width: min(520px, 100%);
}
.template-search-picker {
  position: relative;
  width: min(520px, 100%);
}
.template-search-trigger {
  width: 100%;
  min-height: 38px;
  padding: 8px 34px 8px 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #334155;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.template-search-trigger::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  top: 8px;
  color: #64748b;
  pointer-events: none;
}
.template-search-trigger:disabled { background: #f8fafc; color: #94a3b8; cursor: not-allowed; }
.template-search-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  width: 100%;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .16);
}
.template-search-panel input {
  width: 100%;
  margin-bottom: 7px;
}
.template-search-options {
  display: grid;
  max-height: 220px;
  overflow: auto;
}
.template-search-option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #334155;
  text-align: left;
}
.template-search-option:hover, .template-search-option.selected { background: #eef7f5; }
.template-search-option strong { font-size: 13px; }
.template-search-option small { color: #64748b; }
.email-step-body .email-preview {
  margin-top: 12px;
  max-height: 300px;
  overflow: auto;
}
.email-schedule-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 180px));
  gap: 10px;
  margin-bottom: 9px;
}
.email-schedule-fields label {
  display: grid;
  gap: 5px;
  color: #64748b;
  font-size: 12px;
}
.email-schedule-fields input { width: 100%; }

.influencer-dialog { width: min(900px, calc(100vw - 40px)); max-height: min(800px, calc(100vh - 40px)); border: 0; border-radius: 14px; padding: 0; box-shadow: 0 24px 70px rgba(15, 23, 42, .28); }
.influencer-dialog::backdrop { background: rgba(15, 23, 42, .48); }
.influencer-dialog form { padding: 24px; }
.influencer-profile-dialog { width: min(1080px, calc(100vw - 32px)); max-height: calc(100vh - 24px); }
.influencer-profile-shell { padding: 16px 18px; font-size: 12px; }
.influencer-profile-shell .dialog-head { margin-bottom: 10px; }
.influencer-profile-shell .dialog-head .eyebrow { margin-bottom: 2px; font-size: 10px; }
.influencer-profile-shell .dialog-head h2 { font-size: 18px; }
.influencer-profile-shell .dialog-close { width: 30px; height: 30px; font-size: 21px; }
.profile-hero { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 9px 11px; border: 1px solid #d7e8e5; border-radius: 9px; background: #f4faf9; }
.profile-hero .influencer-avatar { width: 42px; height: 42px; flex: 0 0 42px; }
.profile-hero > div { flex: 1; min-width: 0; }
.profile-hero h3 { margin: 0 0 2px; font-size: 15px; overflow-wrap: anywhere; }
.profile-hero p { margin: 0; color: var(--muted); font-size: 11px; }
.profile-readonly-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px 9px; margin: 0; }
.profile-readonly-grid > div { min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.profile-readonly-grid dt { margin-bottom: 3px; color: #64748b; font-size: 10px; font-weight: 700; }
.profile-readonly-grid dd { margin: 0; color: #172033; font-size: 12px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.profile-readonly-grid .profile-full { grid-column: 1 / -1; }
.profile-readonly-grid .profile-note { white-space: pre-wrap; font-weight: 400; }
.influencer-profile-shell .tag-chip { padding: 2px 6px; font-size: 10px; }
.influencer-profile-shell .project-membership { padding: 2px 6px; font-size: 10px; }
.influencer-profile-shell .dialog-actions { margin-top: 10px; }
.influencer-profile-shell .dialog-actions button { min-height: 30px; padding: 5px 14px; font-size: 12px; }
@media (max-width: 800px) { .profile-readonly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .profile-readonly-grid { grid-template-columns: 1fr; } .profile-readonly-grid .profile-full { grid-column: auto; } }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.dialog-head .eyebrow { margin-bottom: 6px; color: var(--primary); }
.dialog-head h2 { margin: 0; font-size: 22px; }
.dialog-close { width: 34px; height: 34px; padding: 0; border: 0; background: #f1f5f9; font-size: 25px; line-height: 1; }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.editor-grid label { display: grid; gap: 7px; color: #475569; font-size: 13px; font-weight: 700; }
.editor-full { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.multi-select { position: relative; width: 100%; font-weight: 400; }
.multi-select-display { position: relative; display: flex; width: 100%; align-items: center; min-height: var(--control-height); padding: 0 30px 0 9px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--control-radius); background: #fff; color: var(--text); cursor: pointer; outline: none; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.multi-select-display::after { position: absolute; right: 12px; content: "⌄"; color: #64748b; font-size: 16px; }
.multi-select-options { position: absolute; z-index: 15; top: calc(100% + 5px); left: 0; right: 0; display: flex; min-width: 280px; flex-wrap: wrap; gap: 6px; max-height: 300px; overflow-y: auto; padding: 9px; border: 1px solid var(--primary); border-radius: 7px; background: #fff; box-shadow: 0 12px 24px rgba(15, 23, 42, .12); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease, visibility .15s ease; }
.multi-select:hover .multi-select-options, .multi-select:focus-within .multi-select-options { opacity: 1; visibility: visible; transform: translateY(0); }
.multi-select:hover .multi-select-display, .multi-select:focus-within .multi-select-display { border-color: var(--primary); }
.multi-select-options .suggestion-label { width: 100%; }
.multi-select-options button { min-height: 27px; padding: 3px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 12px; }
.multi-select-options button:hover { border-color: #b9d8d4; background: #e8f3f2; color: var(--primary-dark); }
.multi-select-options button.selected { border-color: var(--primary); background: var(--primary); color: #fff; }
.order-status-multi .multi-select-options { top: 100%; }
.order-status-multi .multi-select-display.has-selection { border-color: #91c9c3; background: #f1faf9; color: var(--primary-dark); font-weight: 700; }
.influencer-tag-filter .multi-select-display.has-selection { border-color: #91c9c3; background: #f1faf9; color: var(--primary-dark); font-weight: 700; }
.influencer-tag-filter .multi-select-options { right: auto; width: min(430px, calc(100vw - 40px)); }
.tag-filter-group { display: grid; width: 100%; gap: 6px; padding: 3px 0 8px; border-bottom: 1px solid #edf1f4; }
.tag-filter-group:last-child { padding-bottom: 3px; border-bottom: 0; }
.tag-filter-group > strong { color: #475569; font-size: 12px; }
.tag-filter-group > div { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-upload-row { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.avatar-upload-row .influencer-avatar { width: 42px; height: 42px; }
.avatar-upload-row input[type="file"] { flex: 1; padding: 8px; font-size: 12px; }
.add-to-project-dialog { width: min(460px, calc(100vw - 40px)); }
.dialog-description { margin: 0 0 18px; color: var(--muted); line-height: 1.6; }
.password-dialog { width: min(460px, calc(100vw - 40px)); }
.password-fields { display: grid; gap: 14px; }
.password-fields label { display: grid; gap: 7px; color: #374151; font-size: 13px; font-weight: 700; }
.password-fields input { width: 100%; }
.member-dialog { width: min(860px, calc(100vw - 40px)); }
.member-layout { display: grid; grid-template-columns: minmax(240px, .85fr) minmax(320px, 1.15fr); gap: 18px; }
.member-create-panel,
.member-list-panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.member-create-panel h3,
.member-list-panel h3 { margin: 0 0 14px; color: #1f2937; font-size: 15px; }
.member-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.member-list-head span { color: var(--muted); font-size: 12px; }
.member-list { display: grid; gap: 9px; max-height: 360px; overflow: auto; }
.member-row { display: grid; grid-template-columns: minmax(110px, 1fr) auto; gap: 8px; align-items: center; padding: 11px 12px; border: 1px solid #e8edf3; border-radius: 8px; background: #fff; }
.member-row strong { display: block; color: #1f2937; font-size: 14px; }
.member-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.member-row-actions { display: flex; align-items: center; gap: 8px; }
.member-role { padding: 4px 8px; border-radius: 999px; background: var(--soft); color: var(--primary-dark); font-size: 12px; font-weight: 700; white-space: nowrap; }

.repeatable-content-field { grid-column: 1 / -1; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfc; }
.installment-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.installment-row select, .installment-row input { flex: 1 1 150px; }
.installment-row strong { color: var(--primary); text-align: right; }
.installment-total { margin-top: 10px; text-align: right; font-weight: 700; color: #475569; }
.repeatable-field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.commercial-rights-scope-label { color: #475569; font-size: 13px; font-weight: 700; }
.content-item-row { display: grid; grid-template-columns: minmax(110px, .45fr) minmax(230px, 1.4fr) auto; gap: 8px; align-items: center; margin-top: 8px; }
.content-item-row input, .content-item-row select { width: 100%; }
.quote-estimate-card { grid-column: 1 / -1; padding: 14px; border: 1px solid #dbe7e5; border-radius: 12px; background: #f8fbfb; }
.quote-estimate-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.quote-estimate-head strong { color: #1f2937; font-size: 15px; }
.quote-estimate-head span, .quote-estimate-empty { margin: 0; color: var(--muted); font-size: 12px; }
.quote-estimate-rows { display: grid; gap: 8px; }
.quote-estimate-row { display: grid; grid-template-columns: minmax(96px, .8fr) minmax(180px, 1.3fr) minmax(150px, 1fr) minmax(200px, 1.35fr); gap: 10px; align-items: end; padding: 10px; border: 1px solid #e4eceb; border-radius: 9px; background: #fff; }
.quote-estimate-row strong { padding-bottom: 10px; color: #334155; }
.quote-estimate-row label { display: grid; gap: 5px; color: #64748b; font-size: 12px; font-weight: 700; }
.quote-cpm, .quote-row-result { padding-bottom: 10px; color: #475569; font-size: 13px; }
.quote-row-result { color: var(--primary-dark); font-weight: 700; }
.quote-estimate-total { margin-top: 10px; color: #164e49; font-size: 14px; font-weight: 800; }
.quote-estimate-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
@media (max-width: 900px) { .quote-estimate-row { grid-template-columns: 1fr; gap: 6px; } .quote-estimate-row strong, .quote-cpm, .quote-row-result { padding-bottom: 0; } }
.finance-summary { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; margin: 4px 0 16px; }
.finance-summary button { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 12px 16px; background: #f8fbfb; border: 1px solid var(--line); border-radius: 10px; text-align: left; }
.finance-summary button strong { color: var(--primary-dark); font-size: 22px; }
.finance-filters { margin-bottom: 14px; }
.finance-brief-panel { margin-bottom: 18px; }
.finance-brief-total-row td { background: #eef8f6; color: #174f4a; font-weight: 700; }
.finance-brief-total-row:hover td { background: #e4f3f0; }
.additional-rights-panel { margin-top: 16px; }
.additional-rights-panel table { min-width: 920px; }
.additional-right-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.additional-right-form > label { min-width: 0; }
.additional-right-form textarea { min-height: 72px; }
.additional-right-form .dialog-actions { grid-column: 1 / -1; }
.additional-right-scope { display: flex; flex-wrap: wrap; gap: 7px; align-content: start; }
.additional-right-scope > strong { flex-basis: 100%; color: #475569; font-size: 13px; }
.additional-right-scope label { display: inline-flex; grid-auto-flow: column; justify-content: start; align-items: center; width: auto; padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.additional-right-scope input { width: auto; }
@media (max-width: 900px) { .additional-right-form { grid-template-columns: 1fr; } }
.finance-brief-exchange {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 13px 15px;
  margin: 14px 0 18px;
  border: 1px solid #d7e8e5;
  border-radius: 12px;
  background: #f4faf9;
}
.finance-brief-exchange label { display: inline-flex; align-items: center; gap: 7px; color: #334155; font-size: 13px; font-weight: 700; }
.finance-brief-exchange input[type="number"] { width: 105px; min-height: 34px; padding: 6px 9px; }
.finance-brief-exchange .finance-convert-toggle input { width: auto; }
.finance-brief-exchange .muted { flex: 1 1 260px; }
.finance-brief-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.finance-brief-block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.finance-brief-block-head strong { display: block; color: #172033; font-size: 16px; line-height: 1.35; }
.finance-brief-period { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.finance-brief-period button { min-height: 34px; padding: 6px 12px; }
.finance-brief-period button.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.finance-brief-period label { display: inline-flex; align-items: center; gap: 7px; margin-left: 5px; }
.finance-brief-period input { min-height: 34px; padding: 6px 8px; }
.finance-brief-table { table-layout: auto; width: max-content; }
.finance-brief-table th { min-width: 150px; white-space: normal; text-align: right; }
.finance-brief-table th:first-child { min-width: 230px; text-align: left; }
.finance-brief-table td { min-width: 150px; padding-left: 16px; padding-right: 16px; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.finance-brief-table td:first-child { text-align: left; white-space: normal; font-variant-numeric: normal; font-feature-settings: normal; }
.finance-brief-cumulative-wrap, .finance-brief-published-wrap { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.finance-brief-cumulative-table { min-width: 1500px; }
.finance-brief-published-table { min-width: 1030px; }
.finance-payment-info { min-width: 220px; max-width: 360px; white-space: pre-wrap; word-break: break-word; }
.finance-payment-info-divider { margin: 9px 0; border: 0; border-top: 1px solid var(--line); }
.finance-merge-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid #cfe4e1;
  border-radius: 10px;
  background: #f3faf9;
  color: #45615e;
  font-size: 13px;
  font-weight: 700;
}
.finance-merge-toolbar[hidden] { display: none; }
.finance-merge-toolbar button { flex: 0 0 auto; }
.finance-payable-table small { color: var(--muted); }
.link-button { padding: 0; border: 0; background: none; color: var(--primary-dark); text-decoration: underline; }

@media (max-width: 900px) {
  .content-item-row { grid-template-columns: 1fr; }
  .finance-summary { grid-template-columns: repeat(2, 1fr); }
  .finance-brief-block-head { flex-direction: column; }
  .finance-brief-period { justify-content: flex-start; }
}
.member-row-actions button { padding: 5px 8px; border-radius: 6px; font-size: 12px; }
.project-select-label { display: grid; gap: 8px; color: #475569; font-size: 13px; font-weight: 700; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary-dark);
  font-size: 12px;
}
.muted-badge { background: #eef2f7; color: #475569; }

#toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10000;
  background: #111827;
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

a {
  color: var(--primary);
  text-decoration: none;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 210px 1fr;
  }

  .metrics,
  .panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid,
  .filters,
  .order-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .influencer-filters { grid-template-columns: 1fr; }
  .influencer-filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #email-influencer-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .order-filters .order-status-multi.filter-span-2 { grid-column: span 1; }
  .order-filters .order-status-multi.order-filter-third-row-start { grid-column: 1; }
  .order-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-workbench { grid-template-columns: 1fr 1fr; }
  .order-tool-grid { grid-template-columns: 1fr 1fr; }
  .split-child-row { grid-template-columns: 1fr; }
  .order-actions { grid-column: 1 / -1; }

  .login-page { grid-template-columns: 1fr; }
  .login-showcase { min-height: 410px; }
  .showcase-copy { margin-top: 56px; }
  .world-journey { opacity: .72; }
  .globe { width: 410px; right: -118px; bottom: -165px; }
  .project-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-progress-summary,
  .project-progress-boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .email-stats-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .content-overview,
  .content-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content-overview > div {
    border-right: 0;
    border-bottom: 1px solid #f1eee9;
  }
  .content-project-card {
    grid-template-columns: 1fr 1fr;
  }
  .content-reference-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 230px));
  }
  .content-project-status {
    justify-content: flex-start;
  }
  .content-rank-row {
    grid-template-columns: 24px 72px minmax(0, 1fr);
  }
	  .content-rank-metrics {
	    grid-column: 2 / -1;
	    grid-template-columns: repeat(3, minmax(0, 1fr));
	  }
	  .content-row-actions {
	    grid-column: 2 / -1;
	    grid-template-columns: repeat(2, minmax(0, 120px));
	  }
}

@media (max-width: 680px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; min-height: auto; }
  main { padding: 18px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .login-panel { padding: 32px 24px; }
  .login-showcase { min-height: 355px; padding: 30px 24px; }
  .showcase-copy h1 { font-size: 34px; }
  .project-cards,
  .project-progress-summary,
  .project-progress-boards { grid-template-columns: 1fr; }
  .email-stats-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-detail-grid { grid-template-columns: 1fr; }
  .form-grid,
  .filters,
  .order-filters { grid-template-columns: 1fr; }
  .influencer-filter-row { grid-template-columns: 1fr; }
  #email-influencer-filters { grid-template-columns: 1fr; }
  .filter-span-2 { grid-column: auto; }
  .bulk-bar,
  .order-toolbar { grid-template-columns: 1fr; }
  .bulk-actions-side { justify-content: flex-start; text-align: left; }
  .order-workbench { grid-template-columns: 1fr; }
  .order-tool-grid { grid-template-columns: 1fr; }
  .order-actions { grid-column: auto; }
  .content-toolbar,
  .content-detail-head {
    flex-direction: column;
  }
  .content-filter-row input,
  .content-filter-row select,
  .content-detail-filters input,
  .content-detail-filters select {
    width: 100%;
    min-width: 0;
  }
  .content-overview,
  .content-detail-metrics,
  .content-project-card {
    grid-template-columns: 1fr;
  }
  .content-reference-grid {
    grid-template-columns: minmax(0, 230px);
    justify-content: center;
  }
  .content-rank-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }
  .content-thumb {
    display: none;
  }
	  .content-rank-metrics {
	    grid-column: 1 / -1;
	    grid-template-columns: repeat(2, minmax(0, 1fr));
	  }
	  .content-row-actions {
	    grid-column: 1 / -1;
	  }
	}
