:root {
  --bg: #f6f7fa;
  --panel: #ffffff;
  --panel-soft: #fafbfc;
  --line: #e7e9ee;
  --text: #172033;
  --muted: #7a8394;
  --blue: #315df4;
  --blue-soft: #eef2ff;
  --green: #168a63;
  --red: #c83c50;
  --shadow: 0 12px 36px rgba(23, 32, 51, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body, #app { margin: 0; min-height: 100%; height: 100%; }
body { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.boot,
.center-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(49, 93, 244, 0.12), transparent 28%),
    radial-gradient(circle at 80% 80%, rgba(91, 68, 184, 0.08), transparent 30%),
    #f7f8fb;
}

.auth-card {
  width: min(430px, 100%);
  padding: 34px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #315df4, #6e55df);
  color: white;
  font-weight: 800;
}

.auth h1 { font-size: 24px; margin: 28px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.form {
  display: grid;
  gap: 13px;
  margin-top: 22px;
}

.field {
  display: grid;
  gap: 6px;
  color: #606a7c;
  font-size: 12px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #dfe2e8;
  background: white;
  color: var(--text);
  border-radius: 9px;
  outline: none;
}

.field input,
.field select {
  height: 42px;
  padding: 0 12px;
}

.field textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #afbef8;
  box-shadow: 0 0 0 3px rgba(49, 93, 244, 0.08);
}

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

.btn {
  border: 0;
  border-radius: 9px;
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 700;
  font-size: 12px;
}

.btn.primary { color: white; background: var(--blue); }
.btn.soft { color: #526077; background: #f0f2f6; }
.btn.ghost { color: #667085; background: transparent; }
.btn.danger { color: var(--red); background: #fff1f3; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: 62px 1fr;
}

.topbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  align-items: center;
  padding: 0 18px;
  z-index: 20;
}

.nav {
  justify-self: center;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #f3f4f7;
}

.nav button {
  border: 0;
  background: transparent;
  color: #737c8c;
  border-radius: 8px;
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
}

.nav button.active {
  background: white;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(25, 35, 55, 0.08);
}

.user {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-copy {
  text-align: right;
  display: grid;
  font-size: 11px;
}

.user-copy span { color: var(--muted); font-size: 10px; }

.support {
  min-height: 0;
  display: grid;
  grid-template-columns: 330px minmax(420px, 1fr) 300px;
  background: white;
}

.stores,
.conversations,
.thread,
.customer {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
}

.stores {
  padding: 15px 10px;
  background: #fafbfc;
}

.section-title {
  padding: 8px 9px;
  color: #9aa1ad;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.store-button {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  color: #606a7a;
  font-size: 12px;
  text-align: left;
}

.store-button.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 500;
}

.badge {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  background: #edf0f5;
  color: #6a7485;
  font-size: 9px;
}

.store-button.active .badge {
  background: white;
  color: var(--blue);
}

.conversations {
  display: grid;
  grid-template-rows: auto 1fr;
  background: white;
}

.conversation-head {
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

.search {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  outline: none;
  background: #f9fafb;
}

.conversation-list {
  overflow: auto;
}

.conversation-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f0f1f4;
  background: white;
  padding: 14px 15px;
  text-align: left;
  display: grid;
  gap: 6px;
}

.conversation-item:hover,
.conversation-item.active {
  background: #f7f9ff;
}

.conversation-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.conversation-name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-time {
  color: #9aa1ad;
  font-size: 9px;
  white-space: nowrap;
}

.conversation-subject {
  font-size: 11px;
  color: #465064;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-preview {
  color: #8a92a1;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread {
  display: grid;
  grid-template-rows: 78px 1fr auto;
  background: #fcfcfd;
}

.thread-header {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.thread-header h2 {
  margin: 0;
  font-size: 15px;
}

.thread-header span {
  color: var(--muted);
  font-size: 10px;
}

.messages {
  overflow: auto;
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.message {
  max-width: 78%;
  border-radius: 13px;
  padding: 13px 14px;
  box-shadow: 0 2px 8px rgba(22, 32, 51, 0.04);
}

.message.in {
  justify-self: start;
  background: white;
  border: 1px solid var(--line);
}

.message.out {
  justify-self: end;
  background: #eef2ff;
  border: 1px solid #dce4ff;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #8b93a1;
  font-size: 9px;
  margin-bottom: 7px;
}

.message-body {
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.composer {
  border-top: 1px solid var(--line);
  background: white;
  padding: 14px;
}

.composer textarea {
  width: 100%;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  resize: vertical;
  outline: none;
}

.composer-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.customer {
  padding: 22px 18px;
  overflow: auto;
  background: white;
}

.customer h3 { margin: 0 0 4px; font-size: 15px; }
.customer-email { color: var(--muted); font-size: 11px; }

.customer-section {
  margin-top: 26px;
}

.customer-section h4 {
  margin: 0 0 10px;
  color: #8b93a1;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px;
  margin-bottom: 8px;
}

.order-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.order-total {
  margin: 8px 0;
  font-size: 15px;
  font-weight: 800;
}

.settings {
  min-height: 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  background: #f7f8fa;
}

.settings-nav {
  padding: 22px 12px;
  border-right: 1px solid var(--line);
  background: white;
}

.settings-nav button {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 9px;
  min-height: 42px;
  padding: 0 11px;
  text-align: left;
  color: #677184;
  font-size: 12px;
  font-weight: 700;
}

.settings-nav button.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.settings-main {
  overflow: auto;
  padding: 38px clamp(24px, 5vw, 70px) 70px;
}

.settings-header {
  max-width: 760px;
  margin-bottom: 24px;
}

.settings-header h1 {
  margin: 0 0 6px;
  font-size: 25px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(400px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 3px 12px rgba(22, 32, 51, 0.025);
}

.card h3 { margin: 0 0 5px; font-size: 14px; }
.card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.list {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.list-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 58px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.list-main {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}

.list-main strong { font-size: 11px; }
.list-main span {
  color: var(--muted);
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  max-width: 420px;
  border-radius: 10px;
  padding: 12px 15px;
  box-shadow: var(--shadow);
  font-size: 12px;
}

.notice.ok { background: #eaf8f2; color: #16684e; }
.notice.error { background: #fff0f1; color: #9e2c38; }

.empty {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 50px 20px;
}

.drawer-backdrop {
  position: fixed;
  inset: 62px 0 0;
  z-index: 60;
  background: rgba(23, 32, 51, 0.25);
}

.drawer {
  width: min(560px, 95vw);
  height: 100%;
  margin-left: auto;
  overflow: auto;
  background: white;
  padding: 24px;
  box-shadow: -18px 0 55px rgba(20, 30, 50, 0.16);
}

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

.drawer-head h2 { margin: 0; font-size: 18px; }

.line-item {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

@media (max-width: 1200px) {
  .support { grid-template-columns: 170px 300px minmax(380px, 1fr); }
  .customer { display: none; }
}

@media (max-width: 800px) {
  body { overflow: auto; }
  .app-shell { height: auto; min-height: 100vh; }
  .topbar { grid-template-columns: auto 1fr auto; }
  .user-copy { display: none; }
  .support { grid-template-columns: 1fr; }
  .stores { display: flex; overflow: auto; border-bottom: 1px solid var(--line); }
  .section-title { display: none; }
  .store-button { width: auto; min-width: max-content; }
  .conversations { min-height: 420px; }
  .thread { min-height: 650px; }
  .settings { grid-template-columns: 1fr; }
  .settings-nav { display: flex; overflow-x: auto; padding: 8px; }
  .settings-nav button { width: auto; min-width: max-content; }
  .settings-grid { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
}
/* Kundbox 0.2.4 — orderdetaljer */
.order-drawer {
  width: min(680px, 96vw);
}

.order-summary-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: #fbfcfe;
}

.order-summary-card > div:first-child {
  display: grid;
  gap: 4px;
}

.order-summary-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.order-summary-total {
  font-size: 20px;
  font-weight: 850;
}

.order-drawer-section {
  margin-top: 28px;
}

.order-drawer-section > h3,
.order-section-head h3 {
  margin: 0;
  font-size: 17px;
}

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

.order-product-list {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}

.order-product {
  min-height: 86px;
  padding: 11px 13px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  background: white;
}

.order-product + .order-product {
  border-top: 1px solid var(--line);
}

.order-product-image,
.order-product-placeholder {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f5f6f9;
}

.order-product-image {
  object-fit: cover;
  display: block;
}

.order-product-placeholder {
  display: grid;
  place-items: center;
  color: #9aa2b1;
  font-size: 16px;
  font-weight: 850;
}

.order-product-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.order-product-copy strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.order-product-copy span {
  color: var(--muted);
  font-size: 10px;
}

.order-product-price {
  font-size: 12px;
  white-space: nowrap;
}

.order-address-card,
.order-contact-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 15px;
  display: grid;
  gap: 5px;
  background: #fbfcfe;
  font-style: normal;
  font-size: 12px;
  line-height: 1.5;
}

.order-contact-card span {
  color: #626d7e;
}

.shipping-edit-form {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px;
  display: grid;
  gap: 13px;
  background: #fbfcfe;
}

.shipping-edit-warning {
  margin: 0;
  color: #7a8394;
  font-size: 10px;
}

.shipping-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 640px) {
  .order-product {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .order-product-image,
  .order-product-placeholder {
    width: 54px;
    height: 54px;
  }

  .order-product-price {
    grid-column: 2;
  }
}


/* Kundbox 0.3.0 — workspace navigation */
.app-shell.with-workspace-nav {
  grid-template-rows: 62px 54px 48px 1fr;
}

.workspace-nav {
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 18px;
}

.workspace-nav button {
  height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 0 16px;
  background: transparent;
  color: #778092;
  font-size: 11px;
  font-weight: 500;
}

.workspace-nav button:hover {
  background: #f5f6f9;
  color: #465064;
}

.workspace-nav button.active {
  background: var(--blue-soft);
  color: var(--blue);
}

/* Kundbox 0.3.0 — Social workspace */
.social-workspace,
.orders-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: #f7f8fa;
}

.social-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 30px;
}

.social-empty-card {
  width: min(520px, 100%);
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  text-align: center;
  box-shadow: var(--shadow);
}

.social-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 850;
}

.social-empty-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
}

.social-empty-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* Kundbox 0.3.0 — Order center */
.orders-main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 24px clamp(18px, 3vw, 40px) 60px;
}

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

.orders-header h1 {
  margin: 0 0 3px;
  font-size: 22px;
}

.orders-header p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.order-status-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 3px 0 14px;
}

.order-status-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: #6c7585;
  font-size: 10px;
  font-weight: 500;
}

.order-status-tabs button.active {
  border-color: #cfd9ff;
  background: var(--blue-soft);
  color: var(--blue);
}

.processing-product-filters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 18px;
}

.processing-filter-card {
  flex: 0 0 126px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px;
  background: white;
  color: #465064;
  text-align: left;
  display: grid;
  grid-template-rows: 76px auto;
  gap: 8px;
}

.processing-filter-card.active {
  border-color: #aebeff;
  box-shadow: 0 0 0 3px rgba(49, 93, 244, 0.08);
}

.processing-filter-card img,
.processing-filter-all {
  width: 100%;
  height: 76px;
  border-radius: 9px;
  object-fit: cover;
  background: #f3f5f8;
}

.processing-filter-all {
  display: grid;
  place-items: center;
  color: #7b8495;
  font-size: 12px;
  font-weight: 800;
}

.processing-filter-card span {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.processing-filter-empty {
  margin-bottom: 16px;
  border: 1px dashed #d9dde5;
  border-radius: 10px;
  padding: 12px;
  color: var(--muted);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.order-center-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: 0 3px 14px rgba(22, 32, 51, 0.035);
}

.order-center-row {
  width: 100%;
  min-height: 82px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: white;
  color: var(--text);
  padding: 14px 16px;
  text-align: left;
  display: grid;
  grid-template-columns:
    minmax(100px, 0.7fr)
    minmax(150px, 1.1fr)
    minmax(220px, 1.6fr)
    minmax(100px, 0.8fr)
    minmax(90px, auto)
    minmax(100px, auto);
  align-items: center;
  gap: 16px;
}

.order-center-row:last-child {
  border-bottom: 0;
}

.order-center-row:hover {
  background: #f8faff;
}

.order-center-number,
.order-center-customer {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.order-center-number strong,
.order-center-customer strong {
  font-size: 11px;
}

.order-center-number span,
.order-center-customer span,
.order-center-store {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-center-products {
  color: #606a7a;
  font-size: 9px;
  line-height: 1.5;
  overflow: hidden;
}

.order-center-products span {
  color: #9aa1ad;
}

.order-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 12px;
  padding: 0 9px;
  background: #eef0f4;
  color: #657083;
  font-size: 9px;
  font-weight: 800;
  text-transform: capitalize;
  white-space: nowrap;
}

.order-status.status-processing {
  background: #eaf8f2;
  color: #168a63;
}

.order-status.status-completed {
  background: #eef2ff;
  color: #315df4;
}

.order-status.status-on-hold,
.order-status.status-pending {
  background: #fff6df;
  color: #8b6713;
}

.order-status.status-cancelled,
.order-status.status-failed,
.order-status.status-refunded {
  background: #fff0f1;
  color: #b33a49;
}

.order-center-total {
  justify-self: end;
  font-size: 11px;
  white-space: nowrap;
}

.orders-loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--muted);
  font-size: 12px;
}

.order-pagination {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  font-size: 10px;
}

/* Kundbox 0.3.0 — Settings order filters */
.order-filter-settings-row {
  min-height: 72px;
}

.settings-product-image,
.settings-product-placeholder,
.product-search-result > img {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 9px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #f4f5f8;
}

.settings-product-placeholder {
  display: grid;
  place-items: center;
  color: #9aa2b1;
  font-weight: 850;
}

.product-search-results {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.product-search-result {
  min-height: 70px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Kundbox 0.3.0 — PostNord order actions */
.postnord-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 15px;
  background: #fbfcfe;
}

.postnord-unavailable {
  display: grid;
  gap: 5px;
}

.postnord-unavailable strong {
  font-size: 11px;
}

.postnord-unavailable span,
.postnord-unavailable small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.postnord-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.postnord-status-grid > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 9px;
  background: white;
  border: 1px solid #edf0f4;
}

.postnord-status-grid span {
  color: var(--muted);
  font-size: 9px;
}

.postnord-status-grid strong {
  font-size: 10px;
  overflow-wrap: anywhere;
}

.postnord-tracking {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.postnord-tracking a {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.postnord-actions {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.postnord-help {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.postnord-weight-form {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.postnord-weight-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.postnord-weight-row input {
  height: 38px;
}

.postnord-weight-row > span {
  color: var(--muted);
  font-size: 10px;
}

.postnord-weight-form small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 1050px) {
  .order-center-row {
    grid-template-columns:
      minmax(90px, 0.7fr)
      minmax(140px, 1fr)
      minmax(180px, 1.4fr)
      minmax(90px, auto)
      minmax(90px, auto);
  }

  .order-center-store {
    display: none;
  }
}

@media (max-width: 800px) {
  .app-shell.with-workspace-nav {
    grid-template-rows: 62px 48px auto;
  }

  .workspace-nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .social-workspace,
  .orders-workspace {
    grid-template-columns: 1fr;
  }

  .orders-workspace > .stores,
  .social-workspace > .stores {
    display: flex;
  }

  .order-center-row {
    grid-template-columns: 1fr auto;
    gap: 7px 12px;
  }

  .order-center-products,
  .order-center-store {
    grid-column: 1 / -1;
  }

  .order-center-total {
    justify-self: start;
  }

  .postnord-actions {
    grid-template-columns: 1fr;
  }

  .postnord-status-grid {
    grid-template-columns: 1fr;
  }
}


/* Kundbox 0.3.1 — orderintervall och tydligare laddningsfel */
.order-range-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.order-range-tabs button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #70798a;
  font-size: 11px;
  font-weight: 500;
}

.order-range-tabs button.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.orders-error {
  margin-top: 18px;
  border: 1px solid #ffd9de;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 5px;
  background: #fff7f8;
  color: #9f3441;
  font-size: 11px;
}

.orders-error strong {
  font-size: 12px;
}
/* Kundbox 0.3.2 — tydlig butikskontext */
.store-context-bar {
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  overflow: hidden;
}

.store-context-heading {
  flex: 0 0 auto;
  display: grid;
  gap: 1px;
  min-width: 88px;
}

.store-context-heading strong {
  font-size: 11px;
}

.store-context-heading span {
  color: var(--muted);
  font-size: 9px;
}

.store-context-list {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 6px 0;
}

.store-context-button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  background: white;
  color: #606a7a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 500;
}

.store-context-button:hover {
  border-color: #cfd6e3;
  background: #f7f9fc;
}

.store-context-button.active {
  border-color: #b9c8ff;
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: 0 0 0 2px rgba(49, 93, 244, 0.05);
}

.store-context-button.active .badge {
  background: white;
  color: var(--blue);
}

.store-context-empty {
  color: var(--muted);
  font-size: 10px;
}

.workspace-no-store {
  min-height: 0;
  display: grid;
  place-content: center;
  gap: 5px;
  text-align: center;
  background: #f7f8fa;
  color: var(--muted);
}

.workspace-no-store strong {
  color: var(--text);
  font-size: 14px;
}

/* Kundbox 0.3.2 — order bulkhantering */
.order-bulk-bar {
  min-height: 52px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.order-select-all,
.order-center-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.order-select-all {
  color: #626c7e;
  font-size: 10px;
  font-weight: 700;
}

.order-select-all input,
.order-center-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.order-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  opacity: 0.55;
}

.order-bulk-actions.visible {
  opacity: 1;
}

.order-bulk-actions strong {
  margin-right: 4px;
  font-size: 10px;
  white-space: nowrap;
}

.order-bulk-actions select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  background: white;
  color: #566174;
  font-size: 10px;
}

.order-center-row {
  padding: 0;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 0;
}

.order-center-row.selected {
  background: #f4f7ff;
}

.order-center-check {
  min-height: 82px;
  justify-content: center;
  border-right: 1px solid #f0f1f4;
}

.order-center-open {
  width: 100%;
  min-height: 82px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 14px 16px;
  text-align: left;
  display: grid;
  grid-template-columns:
    minmax(100px, 0.7fr)
    minmax(150px, 1.1fr)
    minmax(220px, 1.6fr)
    minmax(90px, auto)
    minmax(100px, auto);
  align-items: center;
  gap: 16px;
}

.order-center-open:hover {
  background: #f8faff;
}

.order-center-row.selected .order-center-open {
  background: #f4f7ff;
}

.order-status-tabs
  .order-status-tab.status-processing.active {
  border-color: #bfe8d8;
  background: #eaf8f2;
  color: #168a63;
}

.order-status-tabs
  .order-status-tab.status-completed.active {
  border-color: #cfd9ff;
  background: #eef2ff;
  color: #315df4;
}

/* Kundbox 0.3.2 — PostNord */
.postnord-tracking-button {
  text-decoration: none;
}

@media (max-width: 1050px) {
  .order-center-open {
    grid-template-columns:
      minmax(90px, 0.8fr)
      minmax(140px, 1fr)
      minmax(180px, 1.4fr)
      minmax(90px, auto)
      minmax(90px, auto);
  }
}

@media (max-width: 800px) {
  .app-shell.with-workspace-nav {
    grid-template-rows: 62px 54px 48px auto;
  }

  .store-context-bar {
    padding: 0 12px;
  }

  .store-context-heading {
    min-width: 72px;
  }

  .order-bulk-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-bulk-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .order-center-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .order-center-open {
    grid-template-columns: 1fr auto;
    gap: 7px 12px;
  }

  .order-center-products {
    grid-column: 1 / -1;
  }

  .order-center-total {
    justify-self: start;
  }

  .postnord-actions {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 1200px) and (min-width: 801px) {
  .support {
    grid-template-columns: 300px minmax(380px, 1fr);
  }

  .customer {
    display: none;
  }
}



/* Kundbox 0.3.3 — Analys */
.analytics-workspace {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 26px clamp(18px, 3vw, 44px) 70px;
  background:
    radial-gradient(circle at 18% 0%, rgba(49, 93, 244, 0.055), transparent 24%),
    #f7f8fa;
}

.analytics-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.analytics-header h1 {
  margin: 3px 0 4px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.analytics-header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.analytics-eyebrow,
.analytics-panel-kicker {
  color: var(--blue);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.analytics-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.analytics-range {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
}

.analytics-range button {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: #7a8394;
  font-size: 10px;
  font-weight: 800;
}

.analytics-range button:hover {
  background: #f5f7fb;
  color: #536075;
}

.analytics-range button.active {
  background: #172033;
  color: white;
  box-shadow: 0 3px 10px rgba(23, 32, 51, 0.13);
}

.analytics-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 16px;
}

.analytics-metric-card {
  min-width: 0;
  min-height: 128px;
  position: relative;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  box-shadow: 0 4px 16px rgba(22, 32, 51, 0.035);
}

.analytics-metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #d8dde6;
}

.analytics-metric-card.sales::before {
  background: #315df4;
}

.analytics-metric-card.profit::before {
  background: #14805e;
}

.analytics-metric-card.loss::before {
  background: #c83c50;
}

.analytics-metric-card.marketing::before {
  background: #8b5cf6;
}

.analytics-metric-card.poas::before {
  background: #0f8a9d;
}

.analytics-metric-card.orders::before {
  background: #e08a2f;
}

.analytics-metric-card.aov::before {
  background: #68758a;
}

.analytics-metric-label {
  color: #7b8494;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.075em;
}

.analytics-metric-value {
  margin-top: 15px;
  color: #172033;
  font-size: clamp(19px, 1.55vw, 27px);
  font-weight: 860;
  letter-spacing: -0.045em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-metric-foot {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  color: #9098a6;
  font-size: 9px;
}

.analytics-delta {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 6px;
  font-size: 8px;
  font-weight: 850;
}

.analytics-delta.positive {
  background: #e9f7f1;
  color: #137457;
}

.analytics-delta.negative {
  background: #fff0f2;
  color: #b83347;
}

.analytics-delta.neutral {
  background: #f0f2f6;
  color: #7b8494;
}

.analytics-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.75fr);
  gap: 15px;
  margin-bottom: 15px;
}

.analytics-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 4px 16px rgba(22, 32, 51, 0.025);
}

.analytics-trend-panel,
.analytics-cost-panel,
.analytics-marketing-panel {
  padding: 20px;
}

.analytics-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.analytics-panel-head h2 {
  margin: 3px 0 0;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.analytics-profit-now,
.analytics-marketing-total {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.analytics-profit-now span,
.analytics-marketing-total span {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.analytics-profit-now strong,
.analytics-marketing-total strong {
  font-size: 14px;
}

.analytics-chart {
  min-height: 290px;
}

.analytics-chart svg {
  width: 100%;
  min-height: 250px;
  overflow: visible;
}

.analytics-grid-line {
  stroke: #eef0f4;
  stroke-width: 1;
}

.analytics-zero-line {
  stroke: #d8dde5;
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.analytics-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.analytics-line.revenue {
  stroke: #315df4;
  opacity: 0.72;
}

.analytics-line.profit {
  stroke: #14805e;
}

.analytics-dot.profit {
  fill: white;
  stroke: #14805e;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.analytics-chart-legend {
  display: flex;
  align-items: center;
  gap: 17px;
  color: #737d8e;
  font-size: 9px;
}

.analytics-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-line {
  width: 18px;
  height: 3px;
  border-radius: 3px;
}

.legend-line.revenue {
  background: #315df4;
}

.legend-line.profit {
  background: #14805e;
}

.analytics-chart-dates {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  color: #a0a6b1;
  font-size: 8px;
}

.analytics-chart-empty,
.analytics-section-empty {
  min-height: 190px;
  border: 1px dashed #e1e4ea;
  border-radius: 12px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.analytics-cost-list {
  display: grid;
  gap: 17px;
}

.analytics-cost-row {
  display: grid;
  gap: 6px;
}

.analytics-cost-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
}

.analytics-cost-top span {
  color: #657084;
}

.analytics-cost-top strong {
  font-size: 10px;
}

.analytics-cost-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0f2f6;
}

.analytics-cost-track span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #315df4, #677ff5);
}

.analytics-cost-row:nth-child(2) .analytics-cost-track span {
  background: linear-gradient(90deg, #65758f, #8c98aa);
}

.analytics-cost-row:nth-child(3) .analytics-cost-track span {
  background: linear-gradient(90deg, #7d55dc, #a880ed);
}

.analytics-cost-row:nth-child(4) .analytics-cost-track span {
  background: linear-gradient(90deg, #d49342, #e8ae67);
}

.analytics-cost-row:nth-child(5) .analytics-cost-track span {
  background: linear-gradient(90deg, #c84e5e, #e07987);
}

.analytics-cost-row small {
  color: #9ba2af;
  font-size: 8px;
}

.analytics-marketing-panel {
  margin-bottom: 15px;
}

.analytics-channel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.analytics-channel-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfe;
}

.analytics-channel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.analytics-channel-head strong {
  font-size: 11px;
}

.analytics-channel-head span {
  color: var(--blue);
  font-size: 8px;
  font-weight: 850;
}

.analytics-channel-spend {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.analytics-channel-caption {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.analytics-channel-stats {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.analytics-channel-stats div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.analytics-channel-stats span {
  color: #969eab;
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.analytics-channel-stats strong {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.analytics-mini-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 7px;
}

.analytics-mini-card span {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.analytics-mini-card strong {
  font-size: 13px;
}

.analytics-error-card {
  width: min(680px, 100%);
  margin: 55px auto;
  padding: 28px;
  border: 1px solid #f0d9dc;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow);
}

.analytics-error-card strong {
  font-size: 15px;
}

.analytics-error-card p {
  color: #7c8492;
  font-size: 11px;
  line-height: 1.6;
}

.analytics-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
}

.analytics-skeleton-card,
.analytics-skeleton-panel {
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #edf0f5;
}

.analytics-skeleton-card {
  min-height: 128px;
}

.analytics-skeleton-panel {
  min-height: 360px;
  margin-top: 15px;
}

.analytics-skeleton-card::after,
.analytics-skeleton-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.65),
    transparent
  );
  animation: kundbox-analytics-shimmer 1.4s infinite;
}

@keyframes kundbox-analytics-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 1350px) {
  .analytics-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analytics-channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-skeleton-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 950px) {
  .analytics-header {
    flex-direction: column;
  }

  .analytics-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .analytics-main-grid {
    grid-template-columns: 1fr;
  }

  .analytics-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .analytics-workspace {
    padding: 18px 12px 50px;
  }

  .analytics-metric-grid,
  .analytics-skeleton-grid,
  .analytics-channel-grid,
  .analytics-mini-grid {
    grid-template-columns: 1fr;
  }

  .analytics-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-range {
    width: 100%;
  }

  .analytics-range button {
    flex: 1;
  }

  .analytics-chart {
    overflow-x: auto;
  }

  .analytics-chart svg {
    min-width: 650px;
  }
}


/* Kundbox 0.3.4 — ärenden, taggar och mail-signaturer */
.conversation-inboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.conversation-inbox-button {
  min-width: 0;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 10px;
  background: #f8f9fb;
  color: #667085;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  font-size: 10px;
  font-weight: 500;
}

.conversation-inbox-button strong {
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid rgba(23, 32, 51, 0.08);
  font-size: 10px;
}

.conversation-inbox-button.open.active {
  border-color: rgba(22, 138, 99, 0.24);
  background: #eaf8f2;
  color: #117153;
}

.conversation-inbox-button.done.active {
  border-color: rgba(49, 93, 244, 0.22);
  background: #eef2ff;
  color: #315df4;
}

.thread {
  grid-template-rows: 84px 1fr auto;
}

.thread-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  align-content: initial;
  gap: 14px;
}

.thread-header-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.thread-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.thread-title-row h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-status {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 9px !important;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}

.case-status.open {
  color: #117153 !important;
  background: #eaf8f2;
  border: 1px solid #c9ebdf;
}

.case-status.done {
  color: #315df4 !important;
  background: #eef2ff;
  border: 1px solid #d7e0ff;
}

.btn.status-open-button {
  color: #117153;
  background: #eaf8f2;
}

.btn.status-done-button {
  color: #315df4;
  background: #eef2ff;
}

.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.composer-footer .composer-actions {
  margin-top: 0;
}

.composer-status-hint {
  color: #98a2b3;
  font-size: 9px;
}

.conversation-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.conversation-tag {
  --tag-color: #315df4;
  min-height: 27px;
  border-radius: 999px;
  padding: 4px 5px 4px 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: color-mix(in srgb, var(--tag-color) 12%, white);
  border: 1px solid color-mix(in srgb, var(--tag-color) 25%, white);
  color: color-mix(in srgb, var(--tag-color) 82%, #111827);
  font-size: 10px;
  font-weight: 500;
}

.conversation-tag button {
  width: 19px;
  height: 19px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  font-size: 14px;
  line-height: 1;
}

.conversation-tag-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin-top: 9px;
}

.conversation-tag-add select {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  background: white;
  color: var(--text);
  font-size: 10px;
}

.settings-wide {
  grid-column: 1 / -1;
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.settings-card-head h3,
.signature-side h4 {
  margin: 0 0 5px;
}

.signature-store-field {
  width: min(260px, 42%);
  flex: 0 0 auto;
}

.signature-settings-layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.signature-side {
  display: grid;
  gap: 18px;
}

.signature-preview {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 3px;
  background: #fcfcfd;
  color: #344054;
  font-size: 12px;
  line-height: 1.5;
}

.signature-preview-empty {
  place-items: center;
  color: var(--muted);
}

.signature-closing {
  margin-bottom: 7px;
}

.signature-preview-logo {
  display: block;
  max-width: 180px;
  max-height: 72px;
  width: auto;
  height: auto;
  margin-top: 12px;
  object-fit: contain;
}

.signature-logo-form {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 10px;
}

.signature-logo-form input[type="file"] {
  height: auto;
  min-height: 42px;
  padding: 8px;
}

.signature-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-settings-chip {
  --tag-color: #315df4;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--tag-color) 12%, white);
  border: 1px solid color-mix(in srgb, var(--tag-color) 25%, white);
  color: color-mix(in srgb, var(--tag-color) 82%, #111827);
  font-size: 11px;
  font-weight: 500;
}

.tag-color-input {
  width: 70px !important;
  padding: 4px !important;
}

@supports not (color: color-mix(in srgb, red 50%, white)) {
  .conversation-tag,
  .tag-settings-chip {
    background: #f4f5f8;
    border-color: #e2e4ea;
    color: #344054;
  }
}

@media (max-width: 900px) {
  .signature-settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-card-head {
    display: grid;
  }

  .signature-store-field {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .conversation-inboxes {
    grid-template-columns: 1fr;
  }

  .composer-footer {
    align-items: flex-end;
  }

  .composer-status-hint {
    max-width: 55%;
  }
}

/* Kundbox 0.3.5 — Light UI refresh */
:root {
  --bg: #f7f9fd;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-solid: #ffffff;
  --panel-soft: #fbfcff;
  --line: #e8edf5;
  --line-strong: #dbe3ef;
  --text: #182234;
  --muted: #7d899b;
  --blue: #5577ee;
  --blue-strong: #4567df;
  --blue-soft: #f0f4ff;
  --green: #219a72;
  --green-soft: #ecfaf4;
  --red: #c94f62;
  --violet: #8468dd;
  --shadow:
    0 1px 2px rgba(33, 48, 76, 0.025),
    0 10px 32px rgba(44, 61, 92, 0.055);
  --shadow-hover:
    0 2px 5px rgba(33, 48, 76, 0.035),
    0 16px 42px rgba(44, 61, 92, 0.09);
  font-family:
    "Plus Jakarta Sans",
    "Avenir Next",
    "Segoe UI Variable Text",
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}

html {
  background: #f7f9fd;
}

body {
  color: var(--text);
  background:
    radial-gradient(
      circle at 5% -10%,
      rgba(167, 196, 255, 0.24),
      transparent 31%
    ),
    radial-gradient(
      circle at 94% 3%,
      rgba(219, 198, 255, 0.19),
      transparent 28%
    ),
    linear-gradient(180deg, #fbfdff 0%, #f7f9fd 42%, #f8faff 100%);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
.btn,
.store-context-button,
.workspace-nav button,
.nav button,
.conversation-item,
.order-center-row,
.card,
.analytics-panel,
.analytics-metric-card {
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease,
    opacity 150ms ease;
}

::selection {
  color: #263457;
  background: #dce7ff;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e4 transparent;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  background-color: #cbd5e4;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: #b8c4d5;
}

/* Login */
.auth {
  background:
    radial-gradient(
      circle at 18% 18%,
      rgba(133, 173, 255, 0.27),
      transparent 31%
    ),
    radial-gradient(
      circle at 86% 77%,
      rgba(211, 188, 255, 0.28),
      transparent 34%
    ),
    linear-gradient(145deg, #f9fcff 0%, #f9f7ff 100%);
}

.auth-card {
  padding: 38px;
  border: 1px solid rgba(224, 230, 241, 0.82);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 26px 80px rgba(58, 73, 104, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
}

.logo {
  gap: 11px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background:
    linear-gradient(145deg, #7192f7 0%, #816ee1 55%, #a67edb 100%);
  box-shadow:
    0 7px 18px rgba(84, 109, 215, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.auth h1 {
  font-size: 26px;
  letter-spacing: -0.045em;
}

/* Inputs */
.field {
  gap: 7px;
  color: #66748a;
  font-size: 11px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.search,
.composer textarea,
.order-bulk-actions select,
.conversation-tag-add select {
  border-color: var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 2px rgba(26, 43, 70, 0.018);
}

.field input,
.field select {
  height: 44px;
  padding-inline: 13px;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.search:hover,
.composer textarea:hover {
  border-color: #d5deeb;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search:focus,
.composer textarea:focus,
.conversation-tag-add select:focus {
  border-color: #aebff8;
  box-shadow:
    0 0 0 4px rgba(91, 121, 232, 0.09),
    inset 0 1px 2px rgba(26, 43, 70, 0.02);
}

/* Buttons */
.btn {
  min-height: 39px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn.primary {
  border-color: rgba(72, 100, 205, 0.12);
  color: #fff;
  background:
    linear-gradient(135deg, #6687f1 0%, #5575e6 56%, #786bdc 100%);
  box-shadow: 0 6px 16px rgba(75, 102, 207, 0.18);
}

.btn.primary:hover:not(:disabled) {
  box-shadow: 0 9px 22px rgba(75, 102, 207, 0.24);
}

.btn.soft {
  border-color: #e5eaf2;
  color: #57667c;
  background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
  box-shadow: 0 1px 3px rgba(43, 58, 88, 0.035);
}

.btn.soft:hover:not(:disabled) {
  border-color: #d8e0ec;
  background: #fff;
}

.btn.ghost {
  color: #748096;
  background: transparent;
}

.btn.danger {
  border-color: #f7dfe4;
  color: #b94557;
  background: #fff5f6;
}

/* Main shell */
.app-shell {
  background: transparent;
}

.app-shell.with-workspace-nav {
  grid-template-rows: 68px 58px 52px 1fr;
}

.topbar {
  min-height: 68px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(226, 232, 241, 0.82);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(22px) saturate(145%);
}

.nav {
  gap: 3px;
  padding: 5px;
  border: 1px solid #edf1f6;
  border-radius: 13px;
  background: rgba(247, 249, 253, 0.88);
  box-shadow: inset 0 1px 2px rgba(25, 43, 72, 0.02);
}

.nav button {
  height: 36px;
  padding: 0 16px;
  border-radius: 9px;
  color: #8791a2;
  font-size: 11px;
  font-weight: 700;
}

.nav button:hover {
  color: #526176;
}

.nav button.active {
  color: #33415a;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(25, 43, 72, 0.04),
    0 5px 13px rgba(37, 53, 84, 0.055);
}

.user-copy {
  gap: 2px;
  font-size: 10px;
}

.user-copy strong {
  font-weight: 500;
}

.user-copy span {
  color: #9aa4b4;
  font-size: 9px;
}

/* Store context */
.store-context-bar {
  min-height: 58px;
  padding: 0 24px;
  gap: 20px;
  border-bottom: 1px solid rgba(228, 234, 243, 0.82);
  background:
    linear-gradient(
      90deg,
      rgba(248, 251, 255, 0.92),
      rgba(251, 249, 255, 0.92)
    );
  backdrop-filter: blur(16px);
}

.store-context-heading {
  min-width: 100px;
  gap: 2px;
}

.store-context-heading strong {
  color: #33415a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.store-context-heading span {
  color: #a1a9b7;
  font-size: 8px;
}

.store-context-button {
  min-height: 36px;
  padding: 0 13px;
  border-color: #e5eaf2;
  border-radius: 11px;
  color: #66748a;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 3px rgba(37, 53, 84, 0.025);
  font-size: 9px;
}

.store-context-button:hover {
  border-color: #d5deeb;
  background: #fff;
  box-shadow: 0 5px 14px rgba(43, 61, 94, 0.055);
}

.store-context-button.active {
  border-color: #cfdbfb;
  color: #506dd4;
  background:
    linear-gradient(135deg, #f2f6ff 0%, #f6f3ff 100%);
  box-shadow:
    0 0 0 1px rgba(105, 132, 222, 0.035),
    0 5px 16px rgba(73, 99, 190, 0.07);
}

/* Workspace tabs */
.workspace-nav {
  min-height: 52px;
  gap: 4px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(228, 234, 243, 0.85);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
}

.workspace-nav button {
  height: 36px;
  border-radius: 10px;
  padding: 0 17px;
  color: #8b95a5;
  font-size: 10px;
  font-weight: 500;
}

.workspace-nav button:hover {
  color: #58677c;
  background: #f7f9fc;
}

.workspace-nav button.active {
  color: #536fd5;
  background:
    linear-gradient(135deg, #f0f5ff 0%, #f6f2ff 100%);
  box-shadow: inset 0 0 0 1px rgba(104, 131, 224, 0.08);
}

/* Support area */
.support {
  background:
    radial-gradient(
      circle at 62% 8%,
      rgba(219, 229, 255, 0.18),
      transparent 34%
    ),
    #f8fafd;
}

.conversations,
.thread,
.customer {
  border-right-color: var(--line);
}

.conversations {
  background: rgba(255, 255, 255, 0.9);
}

.conversation-head {
  padding: 16px;
  border-bottom-color: #edf1f6;
  background: rgba(255, 255, 255, 0.72);
}

.search {
  height: 40px;
  padding: 0 13px;
  background: #f8fafd;
  color: #3d4a60;
  font-size: 10px;
}

.conversation-item {
  padding: 15px 16px;
  gap: 7px;
  border-bottom-color: #f0f3f7;
  background: rgba(255, 255, 255, 0.78);
}

.conversation-item:hover {
  background:
    linear-gradient(90deg, #f8fbff 0%, #faf9ff 100%);
}

.conversation-item.active {
  position: relative;
  background:
    linear-gradient(90deg, #f1f6ff 0%, #f8f5ff 100%);
}

.conversation-item.active::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #6d8cef, #8a73dc);
}

.conversation-name {
  color: #2f3c52;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.conversation-time {
  color: #abb2be;
  font-size: 8px;
}

.conversation-subject {
  color: #566277;
  font-size: 10px;
}

.conversation-preview {
  color: #939cab;
  font-size: 9px;
  line-height: 1.45;
}

/* Open / done inbox */
.conversation-inboxes {
  gap: 7px;
  margin-bottom: 11px;
}

.conversation-inbox-button {
  min-height: 54px;
  padding: 9px 11px;
  border-color: #e8edf4;
  border-radius: 12px;
  background: #fafbfd;
  color: #758196;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 9px;
}

.conversation-inbox-button:hover {
  border-color: #dce4ef;
  background: #fff;
}

.conversation-inbox-button.open.active {
  border-color: #cdeee2;
  color: #16815f;
  background:
    linear-gradient(135deg, #edf9f4 0%, #f4fcf8 100%);
  box-shadow: 0 5px 15px rgba(37, 151, 111, 0.055);
}

.conversation-inbox-button.done.active {
  border-color: #d6e0fb;
  color: #5270d7;
  background:
    linear-gradient(135deg, #eef4ff 0%, #f5f3ff 100%);
  box-shadow: 0 5px 15px rgba(81, 110, 214, 0.055);
}

.conversation-inbox-button strong {
  min-width: 27px;
  height: 27px;
  border-color: rgba(94, 109, 135, 0.09);
  box-shadow: 0 1px 3px rgba(38, 54, 83, 0.03);
}

/* Thread */
.thread {
  grid-template-rows: 84px 1fr auto;
  background:
    radial-gradient(
      circle at 70% 0%,
      rgba(220, 229, 255, 0.22),
      transparent 32%
    ),
    #f9fbfe;
}

.thread-header {
  padding: 0 24px;
  border-bottom-color: #e9eef5;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.thread-header h2 {
  color: #2f3c52;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.thread-header span {
  color: #98a2b2;
  font-size: 9px;
}

.case-status {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 8px !important;
}

.case-status.open {
  border-color: #cbeade;
  color: #177a5b !important;
  background: #eefaf5;
}

.case-status.done {
  border-color: #d6e0fb;
  color: #506dd5 !important;
  background: #f0f4ff;
}

.messages {
  padding: 28px clamp(20px, 3vw, 34px);
  gap: 16px;
}

.message {
  max-width: min(78%, 720px);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow:
    0 2px 4px rgba(31, 47, 75, 0.025),
    0 8px 22px rgba(31, 47, 75, 0.04);
}

.message.in {
  border-color: #e7ecf3;
  background: rgba(255, 255, 255, 0.95);
}

.message.out {
  border-color: #dae4fb;
  background:
    linear-gradient(135deg, #f0f5ff 0%, #f6f2ff 100%);
}

.message-meta {
  margin-bottom: 8px;
  color: #98a2b2;
  font-size: 8px;
}

.message-body {
  color: #425067;
  font-size: 11px;
  line-height: 1.65;
}

.composer {
  padding: 15px 17px 17px;
  border-top-color: #e8edf4;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -6px 22px rgba(48, 64, 94, 0.025);
}

.composer textarea {
  min-height: 92px;
  padding: 13px 14px;
  background: #fbfcfe;
  color: #3f4c62;
  font-size: 11px;
  line-height: 1.55;
}

.composer-status-hint {
  color: #a1aaba;
  font-size: 8px;
}

/* Customer side */
.customer {
  padding: 24px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), #fbfcff);
}

.customer h3 {
  color: #2e3b51;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.customer-email {
  color: #8994a6;
  font-size: 10px;
}

.customer-section {
  margin-top: 25px;
}

.customer-section h4 {
  margin-bottom: 11px;
  color: #9ca5b4;
  font-size: 8px;
  letter-spacing: 0.11em;
}

.order-card {
  padding: 14px;
  border-color: #e5eaf2;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(41, 56, 86, 0.035);
}

/* Tags */
.conversation-tag {
  min-height: 28px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  font-size: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.conversation-tag button {
  transition: background-color 140ms ease;
}

.conversation-tag button:hover {
  background: #fff;
}

/* Settings */
.settings {
  background:
    radial-gradient(
      circle at 70% 0%,
      rgba(203, 218, 255, 0.22),
      transparent 32%
    ),
    radial-gradient(
      circle at 98% 84%,
      rgba(229, 211, 255, 0.2),
      transparent 28%
    ),
    #f8fafd;
}

.settings-nav {
  padding: 25px 14px;
  border-right-color: #e8edf4;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
}

.settings-nav button {
  min-height: 43px;
  margin-bottom: 3px;
  padding: 0 12px;
  border-radius: 11px;
  color: #7c8799;
  font-size: 10px;
  font-weight: 500;
}

.settings-nav button:hover {
  color: #526176;
  background: #f7f9fc;
}

.settings-nav button.active {
  color: #526fd7;
  background:
    linear-gradient(135deg, #eff5ff 0%, #f7f3ff 100%);
  box-shadow: inset 0 0 0 1px rgba(97, 126, 220, 0.06);
}

.settings-main {
  padding: 42px clamp(28px, 5vw, 78px) 80px;
}

.settings-header {
  margin-bottom: 27px;
}

.settings-header h1 {
  margin-bottom: 8px;
  color: #29374d;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.settings-grid {
  gap: 20px;
}

.card {
  padding: 22px;
  border-color: rgba(226, 232, 241, 0.9);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.card:hover {
  border-color: #dde5ef;
  box-shadow: var(--shadow-hover);
}

.card h3 {
  color: #334159;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card p {
  color: #8c97a8;
  font-size: 10px;
  line-height: 1.65;
}

.list {
  gap: 9px;
}

.list-row {
  min-height: 62px;
  padding: 11px 12px;
  border-color: #e9edf4;
  border-radius: 12px;
  background: rgba(252, 253, 255, 0.75);
}

.list-row:hover {
  border-color: #dfe6f0;
  background: #fff;
}

.list-main strong {
  color: #3b485e;
  font-size: 10px;
}

.list-main span {
  color: #9ba4b2;
  font-size: 8px;
}

/* Signature */
.signature-settings-layout {
  gap: 25px;
}

.signature-preview {
  min-height: 175px;
  padding: 20px;
  border-color: #e6ebf3;
  border-radius: 15px;
  background:
    linear-gradient(145deg, #fff 0%, #fafbff 100%);
  color: #405067;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Orders */
.orders-workspace,
.social-workspace {
  background:
    radial-gradient(
      circle at 72% 0%,
      rgba(213, 225, 255, 0.22),
      transparent 30%
    ),
    #f8fafd;
}

.orders-main {
  padding: 28px clamp(22px, 3vw, 46px) 70px;
}

.orders-header {
  margin-bottom: 18px;
}

.orders-header h1 {
  color: #2d3b52;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.orders-header p {
  color: #929cac;
  font-size: 9px;
}

.order-range-tabs,
.analytics-range {
  padding: 4px;
  border-color: #e6ebf3;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 2px 8px rgba(39, 54, 84, 0.035);
}

.order-range-tabs button,
.analytics-range button {
  border-radius: 9px;
}

.order-range-tabs button.active {
  color: #526fd5;
  background:
    linear-gradient(135deg, #eef4ff, #f6f3ff);
}

.order-status-tabs {
  gap: 7px;
}

.order-status-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border-color: #e6ebf3;
  border-radius: 11px;
  color: #778296;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 7px rgba(39, 54, 84, 0.025);
}

.order-status-tabs button:hover {
  border-color: #d7e0eb;
  background: #fff;
}

.order-bulk-bar {
  min-height: 56px;
  padding: 9px 12px;
  border-color: #e6ebf3;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 16px rgba(39, 54, 84, 0.035);
}

.order-center-list {
  border-color: #e5eaf2;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.order-center-row {
  border-bottom-color: #eef2f6;
  background: rgba(255, 255, 255, 0.7);
}

.order-center-open:hover {
  background: linear-gradient(90deg, #f8fbff, #fbf9ff);
}

.order-center-row.selected,
.order-center-row.selected .order-center-open {
  background: linear-gradient(90deg, #f0f5ff, #f7f3ff);
}

.order-center-number strong,
.order-center-customer strong {
  color: #344158;
  font-size: 10px;
}

.order-center-number span,
.order-center-customer span,
.order-center-store {
  color: #9aa4b3;
  font-size: 8px;
}

.order-center-products {
  color: #6d788a;
  font-size: 8px;
}

.order-status {
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 8px;
}

.order-status.status-processing {
  color: #188160;
  background: #eaf8f2;
}

.order-status.status-completed {
  color: #526fd5;
  background: #edf3ff;
}

.processing-filter-card {
  border-color: #e5eaf2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 13px rgba(39, 54, 84, 0.03);
}

.processing-filter-card:hover {
  transform: translateY(-1px);
  border-color: #d6dfeb;
  box-shadow: 0 8px 19px rgba(39, 54, 84, 0.06);
}

/* PostNord + order drawer */
.drawer-backdrop {
  inset: 68px 0 0;
  background: rgba(44, 55, 77, 0.2);
  backdrop-filter: blur(4px);
}

.drawer {
  padding: 27px;
  background:
    linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  box-shadow: -28px 0 70px rgba(35, 49, 76, 0.15);
}

.drawer-head h2 {
  color: #2d3b52;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.order-summary-card,
.order-product-list,
.order-address-card,
.order-contact-card,
.shipping-edit-form,
.postnord-card {
  border-color: #e5eaf2;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 16px rgba(39, 54, 84, 0.035);
}

.order-summary-card {
  background:
    linear-gradient(135deg, #f7faff 0%, #fbf9ff 100%);
}

.order-product {
  border-color: #edf1f5;
  background: rgba(255, 255, 255, 0.92);
}

.order-product-image,
.order-product-placeholder {
  border-color: #e5eaf2;
  border-radius: 12px;
  background: #f6f8fb;
}

.postnord-status-grid > div {
  border-color: #e8edf4;
  border-radius: 11px;
  background: #fafbfd;
}

/* Analytics */
.analytics-workspace {
  background:
    radial-gradient(
      circle at 14% -5%,
      rgba(180, 208, 255, 0.25),
      transparent 29%
    ),
    radial-gradient(
      circle at 95% 10%,
      rgba(225, 208, 255, 0.23),
      transparent 27%
    ),
    linear-gradient(180deg, #fafcff 0%, #f8fafd 100%);
}

.analytics-header h1 {
  color: #29374d;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.analytics-eyebrow,
.analytics-panel-kicker {
  color: #6680df;
}

.analytics-range button.active {
  color: #fff;
  background:
    linear-gradient(135deg, #627fe4 0%, #756bd7 100%);
  box-shadow: 0 6px 16px rgba(75, 98, 193, 0.19);
}

.analytics-metric-grid {
  gap: 13px;
}

.analytics-metric-card {
  min-height: 132px;
  padding: 18px;
  border-color: rgba(225, 231, 241, 0.9);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.analytics-metric-card:hover {
  transform: translateY(-2px);
  border-color: #dce4ef;
  box-shadow: var(--shadow-hover);
}

.analytics-metric-card::before {
  width: 0;
}

.analytics-metric-card.sales {
  background:
    linear-gradient(145deg, #fff 40%, #f2f6ff 100%);
}

.analytics-metric-card.profit {
  background:
    linear-gradient(145deg, #fff 40%, #effaf5 100%);
}

.analytics-metric-card.marketing {
  background:
    linear-gradient(145deg, #fff 40%, #f7f2ff 100%);
}

.analytics-metric-card.poas {
  background:
    linear-gradient(145deg, #fff 40%, #eefafd 100%);
}

.analytics-metric-label {
  color: #8994a5;
  font-size: 8px;
}

.analytics-metric-value {
  margin-top: 14px;
  color: #2f3d54;
  font-size: clamp(20px, 1.55vw, 28px);
  font-weight: 800;
}

.analytics-panel,
.analytics-channel-card,
.analytics-mini-card {
  border-color: rgba(225, 231, 241, 0.9);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.analytics-panel {
  border-radius: 18px;
}

.analytics-channel-card,
.analytics-mini-card {
  border-radius: 15px;
}

.analytics-channel-card:hover,
.analytics-mini-card:hover {
  border-color: #dce4ef;
  box-shadow: var(--shadow-hover);
}

.analytics-grid-line {
  stroke: #edf1f6;
}

.analytics-line.revenue {
  stroke: #6f88e9;
}

.analytics-line.profit {
  stroke: #27a47b;
}

.legend-line.revenue {
  background: #6f88e9;
}

.legend-line.profit {
  background: #27a47b;
}

/* Empty states + toast */
.social-empty-card,
.analytics-error-card {
  border-color: #e5eaf2;
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.social-empty-icon {
  border-radius: 16px;
  color: #5f79dc;
  background:
    linear-gradient(135deg, #edf4ff 0%, #f5f0ff 100%);
}

.notice {
  right: 24px;
  bottom: 24px;
  padding: 13px 16px;
  border: 1px solid rgba(222, 228, 238, 0.9);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 48px rgba(39, 54, 84, 0.13);
  backdrop-filter: blur(18px);
  font-size: 10px;
}

.notice.ok {
  border-color: #d4eee4;
  color: #176e54;
  background: rgba(242, 252, 248, 0.95);
}

.notice.error {
  border-color: #f0dce1;
  color: #a53b4b;
  background: rgba(255, 246, 247, 0.96);
}

/* Responsive polish */
@media (max-width: 800px) {
  .app-shell.with-workspace-nav {
    grid-template-rows: 64px 56px 50px auto;
  }

  .topbar {
    min-height: 64px;
    padding: 0 13px;
  }

  .store-context-bar {
    min-height: 56px;
    padding: 0 13px;
  }

  .workspace-nav {
    min-height: 50px;
    padding: 0 13px;
  }

  .drawer-backdrop {
    inset: 64px 0 0;
  }

  .settings-main,
  .orders-main {
    padding-inline: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* Kundbox 0.3.6 — unified conversations, new mail and templates */
.conversation-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.conversation-new-mail {
  min-width: 86px;
  white-space: nowrap;
}

.message-subject {
  margin: 0 0 9px;
  color: #35445c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.012em;
}

.message.out .message-subject {
  color: #536cc3;
}

.composer {
  padding: 14px 16px 16px;
}

.composer-editor {
  overflow: hidden;
  border: 1px solid #e4eaf3;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 18px rgba(42, 58, 88, 0.035);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.composer-editor:focus-within {
  border-color: #b8c8f4;
  box-shadow:
    0 0 0 4px rgba(91, 121, 232, 0.07),
    0 6px 22px rgba(42, 58, 88, 0.045);
}

.composer-editor textarea {
  height: 92px;
  min-height: 92px;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 16px 17px 12px;
  background: transparent !important;
  box-shadow: none !important;
  resize: vertical;
}

.composer-signature {
  margin: 0 17px 15px;
  padding: 14px 0 0;
  border-top: 1px solid #edf1f6;
  display: grid;
  gap: 3px;
  color: #7f8a9d;
  font-size: 9px;
  line-height: 1.5;
}

.composer-signature strong {
  color: #4e5c72;
  font-size: 9px;
  font-weight: 800;
}

.composer-signature-closing {
  margin-bottom: 5px;
  color: #66758b;
}

.composer-signature-logo {
  display: block;
  max-width: 140px;
  max-height: 56px;
  width: auto;
  height: auto;
  margin-top: 8px;
  object-fit: contain;
}

.composer-signature-empty {
  color: #adb5c2;
  font-style: italic;
}

.composer-footer {
  margin-top: 10px;
  gap: 14px;
}

.composer-left-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer-status-hint {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(54, 65, 88, 0.22);
  backdrop-filter: blur(7px);
}

.template-modal-backdrop {
  z-index: 140;
}

.app-modal {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 56px);
  overflow: auto;
  border: 1px solid rgba(225, 231, 241, 0.96);
  border-radius: 23px;
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(221, 231, 255, 0.4),
      transparent 28%
    ),
    radial-gradient(
      circle at 96% 8%,
      rgba(238, 226, 255, 0.34),
      transparent 25%
    ),
    rgba(255, 255, 255, 0.97);
  box-shadow:
    0 32px 90px rgba(42, 55, 83, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.app-modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 90px;
  padding: 22px 24px;
  border-bottom: 1px solid #edf1f6;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.app-modal-header h2 {
  margin: 3px 0 0;
  color: #29374d;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.app-modal-header p {
  margin: 7px 0 0;
  color: #8e99aa;
  font-size: 10px;
  line-height: 1.55;
}

.app-modal-eyebrow {
  color: #6880d6;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.app-modal-footer {
  padding: 15px 22px 20px;
  border-top: 1px solid #edf1f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(252, 253, 255, 0.88);
}

.app-modal-empty {
  min-height: 230px;
  padding: 40px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}

.app-modal-empty strong {
  color: #3b4a61;
  font-size: 13px;
}

.app-modal-empty span {
  max-width: 430px;
  color: #929cad;
  font-size: 10px;
  line-height: 1.6;
}

.new-mail-modal {
  width: min(820px, calc(100vw - 40px));
}

.new-mail-form {
  display: grid;
}

.new-mail-fields {
  padding: 20px 22px 14px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 12px;
}

.new-mail-fields .field:nth-child(3) {
  grid-column: 1 / -1;
}

.new-mail-editor {
  margin: 2px 22px 20px;
  overflow: hidden;
  border: 1px solid #e4eaf3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(42, 58, 88, 0.035);
}

.new-mail-editor textarea {
  width: 100%;
  min-height: 190px;
  border: 0;
  outline: 0;
  padding: 17px 18px 12px;
  background: transparent;
  color: #405067;
  font: inherit;
  font-size: 11px;
  line-height: 1.65;
  resize: vertical;
}

.new-mail-editor:focus-within {
  border-color: #b8c8f4;
  box-shadow:
    0 0 0 4px rgba(91, 121, 232, 0.07),
    0 6px 22px rgba(42, 58, 88, 0.045);
}

.new-mail-footer-actions {
  display: flex;
  gap: 8px;
}

.template-picker-modal {
  width: min(960px, calc(100vw - 40px));
}

.template-picker-grid {
  min-height: 300px;
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  align-content: start;
}

.template-picker-card {
  min-height: 160px;
  border: 1px solid #e5eaf2;
  border-radius: 16px;
  padding: 17px;
  display: grid;
  align-content: start;
  gap: 8px;
  text-align: left;
  color: #3f4d63;
  background:
    linear-gradient(145deg, #fff 0%, #fbfcff 100%);
  box-shadow: 0 5px 16px rgba(41, 56, 86, 0.035);
}

.template-picker-card:hover {
  transform: translateY(-2px);
  border-color: #d3def4;
  background:
    linear-gradient(145deg, #fff 0%, #f4f7ff 100%);
  box-shadow: 0 12px 26px rgba(53, 72, 112, 0.08);
}

.template-picker-card strong {
  color: #314058;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.template-picker-subject {
  color: #6d7da4;
  font-size: 8px;
  font-weight: 500;
}

.template-picker-card p {
  margin: 3px 0 0;
  color: #8f99aa;
  font-size: 9px;
  line-height: 1.65;
}


.template-picker-empty {
  grid-column: 1 / -1;
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: #8f99aa;
  text-align: center;
}

.template-picker-empty strong {
  color: #3d4b61;
  font-size: 13px;
}

.template-picker-empty span {
  font-size: 10px;
}

.templates-settings-grid {
  grid-template-columns: minmax(380px, 1.1fr) minmax(360px, 0.9fr);
}

.template-settings-list {
  margin-top: 17px;
  display: grid;
  gap: 10px;
}

.template-settings-card {
  min-height: 108px;
  border: 1px solid #e7ecf3;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  background:
    linear-gradient(145deg, #fff 0%, #fbfcff 100%);
}

.template-settings-card:hover {
  border-color: #dce4ef;
  box-shadow: 0 8px 20px rgba(42, 58, 88, 0.05);
}

.template-settings-card-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
}

.template-settings-card-copy strong {
  color: #344258;
  font-size: 11px;
  font-weight: 800;
}

.template-settings-subject {
  color: #6e7c94;
  font-size: 8px;
  font-weight: 700;
}

.template-settings-card-copy p {
  margin: 3px 0 0;
  color: #939cab;
  font-size: 9px;
  line-height: 1.5;
}

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

.template-body-input {
  min-height: 230px !important;
}

.template-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 900px) {
  .template-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .templates-settings-grid {
    grid-template-columns: 1fr;
  }
}

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

  .conversation-new-mail {
    width: 100%;
  }

  .composer-left-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .composer-status-hint {
    white-space: normal;
  }

  .app-modal-backdrop {
    padding: 10px;
  }

  .app-modal,
  .new-mail-modal,
  .template-picker-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 18px;
  }

  .new-mail-fields {
    grid-template-columns: 1fr;
  }

  .new-mail-fields .field:nth-child(3) {
    grid-column: auto;
  }

  .template-picker-grid {
    grid-template-columns: 1fr;
  }

  .template-settings-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Kundbox 0.3.6.1 — mallbilder */
.template-picker-card {
  overflow: hidden;
  min-height: 230px;
  grid-template-rows: auto auto minmax(42px, auto) 1fr;
}

.template-picker-image {
  width: 100%;
  margin-top: auto;
  align-self: end;
  overflow: hidden;
  border: 1px solid #edf1f6;
  border-radius: 11px;
  aspect-ratio: 500 / 130;
  background:
    linear-gradient(135deg, #f6f9ff 0%, #faf7ff 100%);
}

.template-picker-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.template-settings-banner {
  width: min(250px, 100%);
  margin-top: 8px;
  display: block;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  aspect-ratio: 500 / 130;
  object-fit: cover;
  background: #f7f9fc;
}

.template-image-field {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e8edf4;
  border-radius: 14px;
  background:
    linear-gradient(145deg, #fbfdff 0%, #faf9ff 100%);
}

.template-image-field-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.template-image-field-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.template-image-field-head strong {
  color: #44526a;
  font-size: 10px;
  font-weight: 800;
}

.template-image-field-head span {
  color: #98a2b2;
  font-size: 8px;
  line-height: 1.5;
}

.template-image-upload {
  min-height: 58px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  border: 1px dashed #cfd9ea;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.template-image-upload:hover {
  border-color: #b8c8ee;
  background: #fff;
}

.template-image-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.template-image-upload-copy {
  display: grid;
  gap: 3px;
}

.template-image-upload-copy strong {
  color: #5872cf;
  font-size: 9px;
  font-weight: 800;
}

.template-image-upload-copy small {
  color: #98a2b2;
  font-size: 8px;
}

.template-image-preview {
  width: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid #e8edf4;
  border-radius: 11px;
  aspect-ratio: 500 / 130;
  color: #a4adbb;
  background:
    linear-gradient(135deg, #f6f9ff 0%, #fbf8ff 100%);
  font-size: 10px;
  font-weight: 500;
}

.template-image-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media (max-width: 640px) {
  .template-image-field-head {
    align-items: stretch;
    flex-direction: column;
  }

  .template-picker-card {
    min-height: 210px;
  }
}
/* Kundbox 0.3.6.2 — mallkort */
.template-picker-card {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 26px 28px 20px;
}

.template-picker-card > strong {
  display: block;
  margin-bottom: 18px;
  color: #33415a;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.template-picker-preview {
  margin: 0 !important;
  color: #8793a8 !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

.template-picker-description {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf1f6;
  color: #66748a;
  font-size: 11px;
  line-height: 1.65;
}

.template-picker-image {
  width: 100%;
  height: auto;
  margin-top: auto;
  padding-top: 24px;
  display: block;
  align-self: stretch;
  overflow: visible;
  border: 0;
  border-radius: 0;
  aspect-ratio: 500 / 130;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.template-settings-description {
  display: block;
  margin-top: 5px;
  color: #6f7c90;
  font-size: 8px;
  line-height: 1.55;
}

.template-description-input {
  min-height: 92px !important;
}

@media (max-width: 640px) {
  .template-picker-card {
    min-height: 340px;
    padding: 22px 22px 17px;
  }

  .template-picker-image {
    padding-top: 20px;
  }
}
/* Kundbox 0.3.6.3 — mallkort finjustering */
.template-picker-card {
  min-height: 300px;
}

.template-picker-description {
  margin-top: 16px;
  padding-top: 14px;
  color: #5f6d83;
  font-weight: 700;
  line-height: 1.6;
}

.template-picker-image {
  width: calc(100% + 32px);
  max-width: none;
  height: auto;
  margin: 22px -16px 0;
  padding-top: 0;
  align-self: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}

@media (max-width: 640px) {
  .template-picker-card {
    min-height: 280px;
  }

  .template-picker-image {
    width: calc(100% + 20px);
    margin: 20px -10px 0;
  }
}
/* Kundbox 0.3.6.4 — mallväljare */
.template-action-button {
  border-color: #d2eee1 !important;
  color: #256b54 !important;
  background:
    linear-gradient(135deg, #f1fcf7 0%, #e6f8ef 55%, #edf9f4 100%) !important;
  box-shadow:
    0 1px 2px rgba(24, 113, 80, 0.035),
    0 7px 18px rgba(34, 139, 98, 0.07) !important;
}

.template-action-button:hover:not(:disabled) {
  border-color: #bfe5d4 !important;
  color: #165f48 !important;
  background:
    linear-gradient(135deg, #ebfaf3 0%, #dcf4e8 100%) !important;
  box-shadow:
    0 2px 4px rgba(24, 113, 80, 0.04),
    0 10px 22px rgba(34, 139, 98, 0.11) !important;
}

.template-picker-modal {
  width: min(1180px, calc(100vw - 40px));
}

.template-picker-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 20px;
}

.template-picker-card {
  min-height: 260px;
  padding: 22px 23px 18px;
}

.template-picker-card > strong {
  margin-bottom: 15px;
  font-size: 15px;
}

.template-picker-preview {
  font-size: 11.5px !important;
  line-height: 1.55 !important;
}

.template-picker-description {
  margin-top: 14px;
  padding-top: 12px;
  font-size: 10px;
  line-height: 1.55;
}

.template-picker-image {
  width: 80%;
  max-width: 400px;
  margin: 18px auto 0;
}

@media (max-width: 1050px) {
  .template-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .template-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .template-picker-card {
    min-height: 240px;
  }
}
/* Kundbox 0.3.6.5 — butiksväljare i topbaren */
.app-shell.with-workspace-nav {
  grid-template-rows: 68px 52px 1fr;
}

.topbar-with-store {
  grid-template-columns: minmax(420px, 1fr) auto minmax(220px, 1fr);
  gap: 18px;
}

.topbar-brand-area {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar-store-context {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar-store-label {
  display: flex;
  align-items: center;
}

.topbar-store-label strong {
  color: #6f7b8e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.015em;
}

.topbar-store-buttons {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 3px 1px;
  scrollbar-width: none;
}

.topbar-store-buttons::-webkit-scrollbar {
  display: none;
}

.topbar-store-context .store-context-button {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 11px;
  white-space: nowrap;
  font-size: 9px;
}

.topbar-store-domain {
  max-width: 140px;
  overflow: hidden;
  color: #a0a9b8;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-context-bar {
  display: none !important;
}

.workspace-nav {
  min-height: 52px;
  padding-inline: 24px;
}

@media (max-width: 1150px) {
  .topbar-with-store {
    grid-template-columns: minmax(320px, 1fr) auto auto;
  }

  .topbar-store-domain {
    display: none;
  }

  .topbar-brand-area {
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .topbar-with-store {
    grid-template-columns: 1fr auto;
  }

  .topbar-with-store .nav {
    order: 3;
    grid-column: 1 / -1;
    justify-self: stretch;
    margin-bottom: 7px;
  }

  .topbar-with-store {
    min-height: 108px;
    align-content: center;
    row-gap: 7px;
  }

  .app-shell.with-workspace-nav {
    grid-template-rows: 108px 50px 1fr;
  }

  .topbar-store-label {
    display: none;
  }

  .topbar-store-context .store-context-button {
    min-height: 32px;
    padding-inline: 11px;
  }
}

@media (max-width: 620px) {
  .topbar-brand-area {
    gap: 10px;
  }

  .topbar-store-context {
    flex: 1;
    min-width: 0;
  }

  .topbar-store-buttons {
    max-width: 48vw;
  }

  .topbar-store-context .store-context-button {
    font-size: 8px;
  }
}
/* Kundbox 0.3.7 — Produktcenter */
.products-workspace {
  min-height: 0;
  overflow: auto;
  background:
    radial-gradient(
      circle at 12% -4%,
      rgba(190, 220, 255, 0.26),
      transparent 28%
    ),
    radial-gradient(
      circle at 96% 10%,
      rgba(225, 208, 255, 0.22),
      transparent 28%
    ),
    #f8fafd;
}

.products-main {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 30px clamp(24px, 3vw, 48px) 80px;
}

.products-header,
.products-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.products-header {
  margin-bottom: 24px;
}

.products-eyebrow {
  color: #6982df;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.products-header h1 {
  margin: 5px 0 5px;
  color: #29374d;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.products-header p,
.products-section-head p {
  margin: 0;
  color: #909bac;
  font-size: 10px;
  line-height: 1.6;
}

.products-section {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(225, 231, 241, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.products-section-head h2,
.products-section-head h3 {
  margin: 0 0 5px;
  color: #344158;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.product-period-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  padding: 4px;
  border: 1px solid #e6ebf3;
  border-radius: 12px;
  background: #f8fafd;
}

.product-period-tabs button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: #7b8799;
  background: transparent;
  font-size: 9px;
  font-weight: 500;
}

.product-period-tabs button:hover {
  color: #536378;
  background: #fff;
}

.product-period-tabs button.active {
  color: #536fd5;
  background:
    linear-gradient(135deg, #eef4ff, #f7f3ff);
  box-shadow: 0 2px 7px rgba(50, 68, 105, 0.06);
}

.product-custom-range {
  display: flex;
  justify-content: flex-end;
  align-items: end;
  gap: 9px;
  margin-top: 14px;
}

.product-custom-range label {
  display: grid;
  gap: 5px;
  color: #7b8799;
  font-size: 8px;
  font-weight: 700;
}

.product-custom-range input {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #e2e8f1;
  border-radius: 10px;
  color: #435068;
  background: #fff;
}

.product-seller-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
  margin-top: 18px;
}

.product-seller-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  border: 1px solid #e7ecf3;
  border-radius: 15px;
  background:
    linear-gradient(145deg, #fff 46%, #f8faff 100%);
  box-shadow: 0 5px 16px rgba(39, 54, 84, 0.035);
}

.product-seller-card img,
.product-seller-image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 11px;
  object-fit: cover;
  background: #f6f8fb;
}

.product-seller-image-placeholder {
  display: grid;
  place-items: center;
  font-size: 26px;
}

.product-seller-rank {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 18px;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  color: #465b9e;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 15px rgba(41, 54, 85, 0.08);
  backdrop-filter: blur(12px);
  font-size: 9px;
  font-weight: 800;
}

.product-seller-copy {
  min-height: 57px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding-top: 10px;
}

.product-seller-copy strong {
  color: #354258;
  font-size: 10px;
  line-height: 1.4;
}

.product-seller-copy span {
  color: #929cab;
  font-size: 8px;
}

.product-seller-revenue {
  padding-top: 8px;
  border-top: 1px solid #edf1f5;
  color: #536fd5;
  font-size: 12px;
  font-weight: 800;
}

.product-seller-skeleton {
  min-height: 260px;
  border-radius: 15px;
  background:
    linear-gradient(
      90deg,
      #f3f5f9 0%,
      #fafbfd 50%,
      #f3f5f9 100%
    );
  background-size: 200% 100%;
  animation: analytics-shimmer 1.5s infinite linear;
}

.product-catalog-section {
  margin-top: 20px;
}

.product-catalog-head {
  align-items: center;
}

.product-search {
  display: flex;
  align-items: center;
  gap: 7px;
}

.product-search input {
  width: min(300px, 34vw);
  height: 39px;
  padding: 0 12px;
  border: 1px solid #e3e8f1;
  border-radius: 11px;
  outline: none;
  color: #435068;
  background: #fbfcfe;
}

.product-search input:focus {
  border-color: #aebff8;
  box-shadow: 0 0 0 4px rgba(91, 121, 232, 0.08);
}

.product-table {
  margin-top: 17px;
  overflow: hidden;
  border: 1px solid #e6ebf2;
  border-radius: 15px;
  background: #fff;
}

.product-table-header,
.product-table-row {
  display: grid;
  grid-template-columns:
    minmax(230px, 1.55fr)
    minmax(90px, 0.68fr)
    minmax(90px, 0.68fr)
    minmax(110px, 0.78fr)
    minmax(90px, 0.62fr)
    minmax(100px, 0.72fr)
    80px;
  align-items: center;
  gap: 12px;
}

.product-table-header {
  min-height: 40px;
  padding: 0 14px;
  color: #9aa4b4;
  background: #fafbfd;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-table-row {
  min-height: 74px;
  padding: 9px 14px;
  border-top: 1px solid #edf1f5;
}

.product-table-row:hover {
  background: #fbfcff;
}

.product-table-product {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.product-table-product img,
.product-table-image-placeholder {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #f5f7fb;
}

.product-table-image-placeholder {
  display: grid;
  place-items: center;
  font-size: 18px;
}

.product-table-product > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.product-table-product strong {
  overflow: hidden;
  color: #3b485e;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-table-product span,
.product-table-sku,
.product-publish-status {
  color: #929cab;
  font-size: 8px;
}

.product-table-price,
.product-table-cost {
  color: #3d4b61;
  font-size: 10px;
}

.product-table-cost {
  color: #59677c;
}

.product-stock-pill {
  width: max-content;
  min-height: 25px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #20805f;
  background: #eaf8f2;
  font-size: 8px;
  font-weight: 500;
}

.product-stock-pill.outofstock {
  color: #ad4656;
  background: #fff0f2;
}

.product-stock-pill.onbackorder {
  color: #8b6b1a;
  background: #fff8df;
}

.product-pagination {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.product-pagination span {
  color: #8b95a5;
  font-size: 9px;
}

.products-loading,
.products-error,
.products-empty {
  margin-top: 17px;
  padding: 35px 20px;
  border: 1px dashed #dfe6f0;
  border-radius: 13px;
  color: #8994a5;
  background: #fbfcfe;
  text-align: center;
  font-size: 10px;
}

.products-error {
  color: #a44353;
  border-color: #f1dfe3;
  background: #fff8f9;
}

/* Product editor */
.product-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  padding: 26px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(43, 54, 75, 0.24);
  backdrop-filter: blur(5px);
}

.product-modal {
  width: min(980px, 96vw);
  max-height: min(900px, 92vh);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(225, 231, 241, 0.95);
  border-radius: 21px;
  background:
    linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  box-shadow: 0 30px 90px rgba(38, 52, 80, 0.18);
}

.product-modal-head,
.product-modal-title {
  display: flex;
  align-items: center;
}

.product-modal-head {
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #edf1f5;
}

.product-modal-title {
  min-width: 0;
  gap: 13px;
}

.product-modal-title img {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
}

.product-modal-title > div {
  min-width: 0;
}

.product-modal-title span {
  color: #9aa4b3;
  font-size: 8px;
}

.product-modal-title h2 {
  margin: 4px 0 0;
  overflow: hidden;
  color: #344158;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-edit-form {
  padding-top: 22px;
}

.product-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.product-edit-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-edit-name {
  grid-column: span 2;
}

.product-checkbox-field {
  align-content: end;
}

.product-checkbox-field > span {
  display: block;
}

.product-checkbox-field input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 8px;
}

.product-edit-actions {
  margin-top: 17px;
  display: flex;
  justify-content: flex-end;
}

.product-variable-note {
  margin: 15px 0 0;
  padding: 11px 13px;
  border-radius: 11px;
  color: #66758a;
  background: #f3f6fc;
  font-size: 9px;
  line-height: 1.55;
}

.product-variations-section {
  margin-top: 28px;
  padding-top: 23px;
  border-top: 1px solid #edf1f5;
}

.product-variation-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.product-variation-row {
  min-height: 61px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px 100px 75px;
  align-items: center;
  gap: 12px;
  border: 1px solid #e8edf4;
  border-radius: 12px;
  background: #fff;
}

.product-variation-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.product-variation-name img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.product-variation-name > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.product-variation-name strong {
  overflow: hidden;
  color: #3b485e;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-variation-name span,
.product-variation-row > span {
  color: #8f99aa;
  font-size: 8px;
}

.product-variation-edit {
  padding: 16px;
  border: 1px solid #dfe6f1;
  border-radius: 14px;
  background: #fafdff;
}

.product-variation-edit-title {
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-variation-edit-title strong {
  color: #3b485e;
  font-size: 10px;
}

@media (max-width: 1250px) {
  .product-seller-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .product-seller-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-table-header {
    display: none;
  }

  .product-table-row {
    grid-template-columns:
      minmax(240px, 1fr)
      88px
      104px
      88px
      70px;
  }

  .product-table-sku,
  .product-publish-status {
    display: none;
  }

  .product-edit-grid,
  .product-edit-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-variation-row {
    grid-template-columns: minmax(220px, 1fr) 90px 75px;
  }

  .product-variation-row > span:nth-of-type(2) {
    display: none;
  }
}

@media (max-width: 700px) {
  .products-main {
    padding-inline: 14px;
  }

  .products-header,
  .products-section-head,
  .product-catalog-head {
    flex-direction: column;
    align-items: stretch;
  }

  .product-period-tabs {
    justify-content: flex-start;
  }

  .product-seller-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-search {
    width: 100%;
  }

  .product-search input {
    width: 100%;
  }

  .product-table-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .product-table-price,
  .product-table-cost,
  .product-stock-pill {
    display: none;
  }

  .product-edit-grid,
  .product-edit-grid.compact {
    grid-template-columns: 1fr;
  }

  .product-edit-name {
    grid-column: auto;
  }

  .product-variation-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .product-variation-row > span {
    display: none;
  }
}
/* Kundbox 0.3.8 — WooCommerce + perioder + kostnadskort */
.drawer-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.woo-order-button {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid rgba(83, 105, 215, 0.14);
  color: #fff !important;
  text-decoration: none;
  background:
    linear-gradient(
      135deg,
      #6e8cf3 0%,
      #5b75e4 50%,
      #766bdc 100%
    );
  box-shadow:
    0 7px 19px rgba(73, 96, 202, 0.19);
}

.woo-order-button:hover {
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow:
    0 10px 25px rgba(73, 96, 202, 0.25);
}

.analytics-period-control,
.product-period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e6ebf3;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 2px 8px rgba(39, 54, 84, 0.035);
}

.product-period-tabs {
  justify-content: flex-end;
}

.analytics-period-control button,
.product-period-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  color: #7d8798;
  background: transparent;
  font-size: 9px;
  font-weight: 500;
}

.analytics-period-control button:hover,
.product-period-tabs button:hover {
  color: #56657a;
  background: #f7f9fc;
}

.analytics-period-control button.active,
.product-period-tabs button.active {
  color: #fff;
  background:
    linear-gradient(
      135deg,
      #627fe4 0%,
      #756bd7 100%
    );
  box-shadow:
    0 6px 16px rgba(75, 98, 193, 0.19);
}

.analytics-custom-range,
.product-custom-range {
  margin: -7px 0 19px auto;
  width: max-content;
  max-width: 100%;
  padding: 13px;
  display: flex;
  align-items: end;
  gap: 9px;
  border: 1px solid #e7ecf3;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(39, 54, 84, 0.045);
}

.analytics-custom-range label,
.product-custom-range label {
  display: grid;
  gap: 5px;
  color: #7a8699;
  font-size: 8px;
  font-weight: 500;
}

.analytics-custom-range input,
.product-custom-range input {
  height: 39px;
  padding: 0 11px;
  border: 1px solid #e2e8f1;
  border-radius: 10px;
  outline: none;
  color: #435068;
  background: #fff;
}

.analytics-custom-range input:focus,
.product-custom-range input:focus {
  border-color: #aebff8;
  box-shadow: 0 0 0 4px rgba(91, 121, 232, 0.08);
}

.analytics-cost-card-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(155px, 1fr));
  gap: 11px;
}

.analytics-cost-card {
  position: relative;
  min-height: 145px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid #e7ecf3;
  border-radius: 15px;
  background: #fff;
  box-shadow:
    0 4px 14px rgba(39, 54, 84, 0.035);
}

.analytics-cost-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.55;
  filter: blur(2px);
}

.analytics-cost-card.tone-blue::after {
  background: #e5edff;
}

.analytics-cost-card.tone-slate::after {
  background: #e9eef5;
}

.analytics-cost-card.tone-violet::after {
  background: #eee6ff;
}

.analytics-cost-card.tone-amber::after {
  background: #fff0d8;
}

.analytics-cost-card.tone-red::after {
  background: #ffe3e8;
}

.analytics-cost-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.analytics-cost-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #edf1f5;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 15px;
}

.analytics-cost-share {
  color: #8a95a6;
  font-size: 9px;
  font-weight: 500;
}

.analytics-cost-card-label {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 16px;
  color: #7a8698;
  font-size: 9px;
  font-weight: 700;
}

.analytics-cost-card-value {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 5px;
  color: #2f3d54;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.analytics-cost-card small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 4px;
  color: #a1aab8;
  font-size: 7.5px;
}

.analytics-cost-panel {
  min-height: auto;
}

@media (max-width: 920px) {
  .analytics-header-actions {
    align-items: flex-end;
  }

  .analytics-period-control,
  .product-period-tabs {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .analytics-custom-range,
  .product-custom-range {
    width: 100%;
    margin-top: 10px;
    flex-wrap: wrap;
  }

  .analytics-custom-range label,
  .product-custom-range label {
    flex: 1 1 130px;
  }

  .drawer-head {
    align-items: flex-start;
  }

  .drawer-head-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
/* Kundbox 0.3.8.2 — mailrad, huvudnav och diskret vinstton */
.message-body {
  margin: 0;
  padding: 0;
  text-align: left;
  white-space: pre-wrap;
}

.nav button.active {
  border: 1px solid rgba(95, 122, 226, 0.12);
  color: #ffffff;
  background:
    linear-gradient(
      135deg,
      #6a87ee 0%,
      #5a74e3 54%,
      #776bdd 100%
    );
  box-shadow:
    0 6px 16px rgba(75, 98, 193, 0.16);
}

.nav button.active:hover {
  color: #ffffff;
  background:
    linear-gradient(
      135deg,
      #6381eb 0%,
      #536dde 54%,
      #7065d7 100%
    );
}

.analytics-metric-card.profit-positive {
  border-color: rgba(96, 190, 145, 0.17);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96) 45%,
      rgba(238, 250, 244, 0.82) 100%
    );
}

.analytics-metric-card.profit-positive::before {
  background: #56aa82;
}

.analytics-metric-card.profit-negative {
  border-color: rgba(213, 108, 125, 0.15);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96) 45%,
      rgba(255, 241, 244, 0.78) 100%
    );
}

.analytics-metric-card.profit-negative::before {
  background: #c96676;
}

.analytics-metric-card.profit-neutral {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96) 45%,
      rgba(247, 249, 252, 0.9) 100%
    );
}

.analytics-metric-card.profit-neutral::before {
  background: #9aa5b5;
}
/* Kundbox 0.4.0 — Meta */
.meta-main {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 30px clamp(24px, 3vw, 48px) 80px;
}

.meta-header,
.meta-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.meta-header {
  margin-bottom: 22px;
}

.meta-eyebrow {
  color: #6680df;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-header h1 {
  margin: 5px 0;
  color: #29374d;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.meta-header p,
.meta-section-head p {
  margin: 0;
  color: #909bac;
  font-size: 10px;
  line-height: 1.6;
}

.meta-connect-button {
  min-height: 43px;
  border-color: transparent;
  color: #fff !important;
  text-decoration: none;
  background:
    linear-gradient(135deg, #5686f3, #6571e5 50%, #8a68de);
  box-shadow: 0 8px 22px rgba(65, 94, 194, 0.18);
}

.meta-error {
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid #f0dce1;
  border-radius: 12px;
  color: #a13d4d;
  background: #fff7f8;
  font-size: 10px;
}

.meta-setup-card,
.meta-pending-card,
.meta-connections,
.meta-work-area {
  border: 1px solid rgba(225, 231, 241, 0.92);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.meta-setup-card {
  padding: 25px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 17px;
}

.meta-setup-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background:
    linear-gradient(135deg, #4e8bf2, #7669df);
  font-size: 19px;
  font-weight: 850;
}

.meta-env-list {
  margin: 13px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.meta-env-list code {
  padding: 7px 9px;
  border-radius: 8px;
  color: #526fd5;
  background: #f0f4ff;
  font-size: 9px;
}

.meta-pending-card {
  margin-bottom: 18px;
  padding: 22px;
  border-color: #dce6fb;
  background:
    linear-gradient(145deg, #fff 45%, #f4f7ff 100%);
}

.meta-pending-head h3,
.meta-section-head h2 {
  margin: 4px 0 5px;
  color: #344158;
  font-size: 16px;
  font-weight: 800;
}

.meta-page-options {
  margin-top: 16px;
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.meta-page-option {
  min-height: 82px;
  padding: 12px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 11px;
  border: 1px solid #e2e8f1;
  border-radius: 13px;
  color: inherit;
  background: white;
  text-align: left;
}

.meta-page-option-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: #1877f2;
  font-size: 18px;
  font-weight: 850;
}

.meta-page-option > div:nth-child(2) {
  display: grid;
  gap: 3px;
}

.meta-page-option strong {
  color: #36445b;
  font-size: 10px;
}

.meta-page-option span,
.meta-page-option small {
  color: #909aaa;
  font-size: 8px;
}

.meta-page-connect-copy {
  color: #526fd5 !important;
  font-weight: 500;
}

.meta-connections {
  padding: 20px;
}

.meta-connection-list {
  margin-top: 14px;
  display: grid;
  gap: 9px;
}

.meta-connection-card {
  min-height: 78px;
  padding: 12px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border: 1px solid #e7ecf3;
  border-radius: 14px;
  background: #fbfcfe;
}

.meta-connection-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  color: #6d62dc;
  background:
    linear-gradient(145deg, #edf3ff, #f5efff);
  font-size: 16px;
  font-weight: 850;
}

.meta-connection-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meta-connection-copy {
  display: grid;
  gap: 4px;
}

.meta-connection-copy > strong {
  color: #354258;
  font-size: 11px;
}

.meta-connection-copy > span {
  color: #8b96a7;
  font-size: 8px;
}

.meta-connection-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.meta-connection-statuses span {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 7.5px;
  font-weight: 500;
}

.meta-connection-statuses .ok {
  color: #177a5b;
  background: #ebf9f3;
}

.meta-connection-statuses .warning {
  color: #8c6d1d;
  background: #fff8df;
}

.meta-connection-statuses .info {
  color: #526277;
  background: #f1f4f8;
}

.meta-connection-webhook-time {
  margin: 3px 0 0;
  color: #7b8798;
  font-size: 8px;
}

.meta-connection-warning {
  margin: 3px 0 0;
  color: #9a6c2a;
  font-size: 8px;
}

.meta-work-area {
  margin-top: 18px;
  overflow: hidden;
}

.meta-work-tabs {
  min-height: 54px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid #e9eef5;
  background: #fbfcfe;
}

.meta-work-tabs > button,
.meta-platform-filter button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  color: #7d8798;
  background: transparent;
  font-size: 9px;
  font-weight: 500;
}

.meta-work-tabs > button.active {
  color: white;
  background:
    linear-gradient(135deg, #6280e7, #786bdc);
}

.meta-platform-filter {
  margin-left: auto;
  padding: 3px;
  display: flex;
  gap: 2px;
  border: 1px solid #e6ebf3;
  border-radius: 10px;
  background: white;
}

.meta-platform-filter button.active {
  color: #526fd5;
  background: #eef3ff;
}

.meta-inbox-layout {
  min-height: 580px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
}

.meta-thread-list {
  overflow: auto;
  border-right: 1px solid #e8edf4;
}

.meta-thread-row {
  width: 100%;
  min-height: 86px;
  padding: 13px;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  color: inherit;
  background: white;
  text-align: left;
}

.meta-thread-row.active {
  background:
    linear-gradient(90deg, #f7faff, #fbf9ff);
  box-shadow: inset 3px 0 0 #6d84e5;
}

.meta-thread-avatar {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: white;
  background:
    linear-gradient(145deg, #5b90ee, #8668dd);
  font-weight: 850;
}

.meta-thread-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meta-thread-row-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.meta-thread-row-copy > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.meta-thread-row-copy strong {
  overflow: hidden;
  color: #354258;
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-thread-row-copy span,
.meta-thread-row-copy small {
  color: #9aa3b2;
  font-size: 7.5px;
}

.meta-thread-row-copy p {
  margin: 0;
  overflow: hidden;
  color: #7e899b;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-unread {
  min-width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: #5d78e3;
  font-size: 7px;
}

.meta-thread-detail {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #f9fbfe;
}

.meta-thread-head {
  min-height: 72px;
  padding: 15px 19px;
  border-bottom: 1px solid #e7ecf3;
  background: white;
}

.meta-thread-head span {
  color: #7c88a0;
  font-size: 8px;
}

.meta-thread-head h3 {
  margin: 4px 0 0;
  color: #344158;
  font-size: 14px;
}

.meta-message-list {
  overflow: auto;
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.meta-message {
  max-width: min(74%, 620px);
  padding: 11px 13px;
  display: grid;
  gap: 6px;
  border: 1px solid #e5eaf2;
  border-radius: 14px;
  color: #435068;
  background: white;
  font-size: 10px;
}

.meta-message.outbound {
  justify-self: end;
  border-color: #d9e3fb;
  background:
    linear-gradient(145deg, #eef4ff, #f6f2ff);
}

.meta-message small {
  color: #a0a8b5;
  font-size: 7px;
}

.meta-reply-form {
  padding: 13px;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  border-top: 1px solid #e7ecf3;
  background: white;
}

.meta-reply-form textarea {
  min-height: 74px;
  flex: 1;
  padding: 11px 12px;
  border: 1px solid #e1e7f0;
  border-radius: 11px;
  resize: vertical;
}

.meta-comments-grid {
  margin: 14px;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.meta-comment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  border-radius: 0;
  background: #fff;
}

.meta-comment-card:last-child {
  border-bottom: 0;
}

.meta-comment-card.is-hidden {
  background: #fafbfc;
}

.meta-comment-card.is-reply {
  padding-left: 34px;
}

.meta-comment-main {
  min-width: 0;
}

.meta-comment-card header {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.meta-comment-card header strong {
  min-width: 0;
  color: #333;
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-comment-card header small {
  margin-left: auto;
  color: #929cab;
  font-size: 10px;
  white-space: nowrap;
}

.meta-comment-platform,
.meta-comment-reply-badge,
.meta-comment-hidden-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}

.meta-comment-platform {
  color: #65728a;
  background: #f2f5fa;
}

.meta-comment-reply-badge {
  color: #6673cf;
  background: #f1f2ff;
}

.meta-comment-hidden-badge {
  color: #8a6a31;
  background: #fff7df;
}

.meta-comment-text {
  margin: 5px 0 0;
  color: #333;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.meta-comment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.meta-comment-action {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #555f70;
  font: inherit;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.meta-comment-action:hover {
  background: #f5f7fb;
  border-color: #e6eaf1;
  color: #333;
}

.meta-comment-action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.meta-comment-like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-comment-like > span {
  font-size: 15px;
  line-height: 1;
}

.meta-comment-like.is-active {
  color: #d7476b;
  background: #fff3f6;
}

.meta-comment-action.is-danger {
  color: #a64d58;
}

.meta-comment-action.is-danger:hover {
  color: #963844;
  background: #fff2f3;
  border-color: #f4dadd;
}

.meta-comment-reply {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
}

.meta-comment-reply[hidden] {
  display: none;
}

.meta-comment-reply input {
  width: 100%;
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 11px;
  outline: none;
}

.meta-comment-reply input:focus {
  border-color: #aebbf7;
  box-shadow: 0 0 0 3px rgba(106, 121, 230, 0.09);
}

.meta-comment-reply .btn {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10px;
}

.meta-comment-send {
  color: #fff;
}

.meta-comment-cancel {
  color: #667085;
}


.meta-empty,
.meta-loading {
  min-height: 180px;
  padding: 30px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: #8b96a7;
  text-align: center;
}

.meta-empty strong {
  color: #566277;
  font-size: 11px;
}

.meta-empty span {
  font-size: 9px;
}

.meta-empty.connection {
  min-height: 120px;
  margin-top: 13px;
  border: 1px dashed #dfe6ef;
  border-radius: 13px;
}

.meta-empty.comments {
  grid-column: 1 / -1;
}

@media (max-width: 700px) {
  .meta-main {
    padding-inline: 14px;
  }

  .meta-header {
    flex-direction: column;
  }

  .meta-inbox-layout {
    grid-template-columns: 1fr;
  }

  .meta-thread-list {
    max-height: 330px;
    border-right: 0;
    border-bottom: 1px solid #e8edf4;
  }

  .meta-thread-detail {
    min-height: 500px;
  }

  .meta-work-tabs {
    flex-wrap: wrap;
  }

  .meta-platform-filter {
    width: 100%;
    margin-left: 0;
  }

  .meta-comments-grid {
    margin: 10px;
  }

  .meta-comment-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 11px 12px;
  }

  .meta-comment-card.is-reply {
    padding-left: 22px;
  }

  .meta-comment-card header {
    flex-wrap: wrap;
  }

  .meta-comment-card header small {
    width: 100%;
    margin-left: 0;
  }

  .meta-comment-actions {
    justify-content: flex-start;
  }

  .meta-comment-reply {
    grid-template-columns: 1fr auto;
  }

  .meta-comment-cancel {
    grid-column: 1 / -1;
    justify-self: start;
  }
}


/* Kundbox 0.4.1 — UI, orderperioder och social arbetsyta */
.app-shell.with-customer-service-layout {
  grid-template-rows: 68px minmax(0, 1fr);
}

.support-customer-layout {
  min-height: 0;
  grid-template-columns: 330px minmax(420px, 1fr) 300px;
}

.customer-service-center {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
  border-right: 1px solid #e3e9f2;
  background: #f9fbfe;
}

.customer-service-center > .workspace-nav {
  min-width: 0;
  min-height: 52px;
  padding-inline: 18px;
  border-bottom: 1px solid #e3e9f2;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 18px rgba(38, 53, 82, 0.035);
}

.customer-service-center > .thread {
  min-height: 0;
  border-right: 0;
}

.support-customer-layout > .conversations {
  border-right: 1px solid #dfe6ef;
  box-shadow: 8px 0 24px rgba(35, 50, 78, 0.025);
  z-index: 1;
}

.support-customer-layout > .customer {
  border-right: 0;
  border-left: 1px solid #dfe6ef;
  box-shadow: -8px 0 24px rgba(35, 50, 78, 0.025);
  z-index: 1;
}

.social-workspace {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.meta-main > .meta-work-area {
  margin-top: 0;
}

.meta-main > .meta-connections {
  margin-top: 18px;
  margin-bottom: 10px;
}

.meta-connections-head {
  align-items: center;
}

.orders-header {
  display: grid;
  grid-template-columns:
    minmax(180px, 1fr)
    auto
    minmax(120px, 1fr);
  align-items: center;
  gap: 20px;
}

.orders-header-title {
  justify-self: start;
}

.orders-header .order-period-tabs {
  justify-self: center;
  justify-content: center;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.orders-header-refresh {
  justify-self: end;
}

.orders-main .order-custom-range {
  width: max-content;
  max-width: 100%;
  margin: -5px auto 18px;
  justify-content: center;
}

@media (max-width: 1200px) and (min-width: 801px) {
  .support-customer-layout {
    grid-template-columns: 300px minmax(380px, 1fr);
  }
}

@media (max-width: 1100px) {
  .orders-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .orders-header .order-period-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-self: stretch;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .app-shell.with-customer-service-layout {
    grid-template-rows: 108px minmax(0, 1fr);
  }
}

@media (max-width: 800px) {
  .support-customer-layout {
    grid-template-columns: 1fr;
  }

  .customer-service-center {
    min-height: 700px;
    grid-template-rows: 50px minmax(650px, 1fr);
    border-right: 0;
  }

  .customer-service-center > .workspace-nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-inline: 13px;
  }

  .orders-main .order-custom-range {
    width: 100%;
    margin-top: 8px;
    flex-wrap: wrap;
  }
}

.store-button.active,
.conversation-name,
.workspace-nav button,
.order-status-tabs button,
.order-range-tabs button,
.store-context-button,
.conversation-inbox-button,
.conversation-tag,
.tag-settings-chip,
.btn,
.user-copy strong,
.settings-nav button,
.template-picker-subject,
.template-image-preview,
.product-period-tabs button,
.product-stock-pill,
.analytics-period-control button,
.analytics-custom-range label,
.product-custom-range label,
.analytics-cost-share,
.meta-page-connect-copy,
.meta-connection-statuses span,
.meta-work-tabs > button,
.meta-platform-filter button {
  font-weight: 500;
  color: #333333 !important;
}


.meta-connections-actions {
  margin-top: 14px;
  padding-top: 14px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #edf1f6;
}

.btn.primary,
.nav button.active,
.analytics-period-control button.active,
.product-period-tabs button.active,
.order-period-tabs button.active,
.meta-work-tabs > button.active {
  color: #ffffff !important;
}

.meta-inbox-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.meta-thread-statusbar {
  padding: 10px 12px;
  border-bottom: 1px solid #e9eef5;
  background: #ffffff;
}

.meta-conversation-inboxes {
  width: min(430px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.meta-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.meta-thread-status-button {
  flex: 0 0 auto;
  min-width: 168px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .meta-thread-statusbar {
    padding: 9px;
  }

  .meta-conversation-inboxes {
    width: 100%;
  }

  .meta-thread-head {
    align-items: stretch;
    flex-direction: column;
  }

  .meta-thread-status-button {
    width: 100%;
  }
}


/* Kundbox 0.4.1.2 — Anteckningar + blå knapptext */
.btn.woo-order-button,
.btn.meta-connect-button {
  color: #ffffff !important;
}

.notes-workspace {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 30px clamp(20px, 3vw, 48px) 72px;
  color: #333333;
  background:
    radial-gradient(circle at 15% 0%, rgba(91, 117, 224, 0.055), transparent 26%),
    #f7f8fa;
}

.notes-header {
  max-width: 1320px;
  margin: 0 auto 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.notes-header h1 {
  margin: 4px 0 6px;
  color: #333333;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.notes-header p {
  margin: 0;
  color: #7f8999;
  font-size: 11px;
  line-height: 1.6;
}

.notes-eyebrow {
  color: #667bd5;
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.notes-error {
  max-width: 1320px;
  margin: 0 auto 16px;
  padding: 12px 14px;
  border: 1px solid #f1dce1;
  border-radius: 12px;
  color: #a13d4d;
  background: #fff7f8;
  font-size: 11px;
}

.note-create-panel {
  max-width: 1320px;
  margin: 0 auto 22px;
  padding: 22px;
  border: 1px solid #e3e9f3;
  border-radius: 18px;
  background:
    linear-gradient(145deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 9px 28px rgba(42, 58, 90, 0.055);
}

.note-create-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.note-create-heading span {
  color: #6a7dd2;
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.note-create-heading h2 {
  margin: 4px 0 0;
  color: #333333;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.note-create-heading p {
  width: min(410px, 48%);
  margin: 2px 0 0;
  color: #8a94a4;
  font-size: 10px;
  line-height: 1.6;
}

.note-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(300px, 1.25fr) auto;
  align-items: end;
  gap: 14px;
}

.note-create-form .field textarea {
  min-height: 74px;
  max-height: 140px;
}

.note-create-actions {
  height: 74px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.notes-content {
  max-width: 1320px;
  margin: 0 auto;
}

.notes-grid,
.notes-loading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.note-card {
  position: relative;
  min-height: 152px;
  border: 1px solid #e3e9f2;
  border-radius: 17px;
  overflow: hidden;
  color: #333333;
  background:
    linear-gradient(145deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 5px 17px rgba(42, 58, 88, 0.04);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.note-card:hover {
  transform: translateY(-2px);
  border-color: #d2dcf0;
  background:
    linear-gradient(145deg, #ffffff 0%, #f6f8ff 100%);
  box-shadow: 0 13px 29px rgba(54, 72, 112, 0.08);
}

.note-card-open {
  width: 100%;
  min-height: 152px;
  border: 0;
  padding: 20px 74px 20px 20px;
  display: grid;
  align-content: start;
  gap: 10px;
  text-align: left;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.note-card h3 {
  margin: 0;
  color: #333333;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.note-card p {
  margin: 0;
  color: #7f8999;
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-line;
}

.note-card-edit {
  position: absolute;
  top: 18px;
  right: 19px;
  border: 0;
  padding: 0;
  color: #667bd5;
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.note-card-edit:hover {
  color: #4f67cf;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.note-card-skeleton {
  min-height: 152px;
  border: 1px solid #e8edf4;
  border-radius: 17px;
  background:
    linear-gradient(
      100deg,
      #f4f6f9 20%,
      #fafbfc 38%,
      #f4f6f9 56%
    );
  background-size: 200% 100%;
  animation: note-card-loading 1.3s linear infinite;
}

@keyframes note-card-loading {
  to {
    background-position-x: -200%;
  }
}

.notes-empty {
  min-height: 330px;
  border: 1px dashed #dce3ed;
  border-radius: 19px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: #8a94a4;
  background: rgba(255, 255, 255, 0.58);
}

.notes-empty-icon {
  margin-bottom: 4px;
  font-size: 28px;
}

.notes-empty strong {
  color: #4b5668;
  font-size: 13px;
  font-weight: 500;
}

.notes-empty span {
  width: min(430px, calc(100% - 40px));
  font-size: 10px;
  line-height: 1.6;
}

.note-modal-backdrop {
  padding: 24px;
}

.note-editor-modal {
  width: min(780px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden;
  border-radius: 21px;
  box-shadow: 0 28px 80px rgba(31, 45, 74, 0.2);
}

.note-editor-header {
  align-items: flex-start;
}

.note-editor-header h2 {
  margin-bottom: 5px;
  color: #333333;
  font-weight: 500;
}

.note-editor-header p {
  margin: 0;
  color: #8a94a4;
  font-size: 10px;
  line-height: 1.55;
}

.note-editor-form {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(300px, 1fr) auto;
  overflow: hidden;
}

.note-metadata-form {
  display: grid;
  gap: 18px;
}

.note-editor-meta {
  padding: 22px 22px 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1.2fr);
  gap: 14px;
}

.note-editor-meta .field textarea {
  min-height: 92px;
  max-height: 150px;
}

.note-editor-body-field {
  min-height: 0;
  padding: 18px 22px 20px;
}

.note-editor-body-field textarea {
  min-height: 360px;
  height: 100%;
  resize: vertical;
  padding: 16px;
  line-height: 1.65;
  color: #333333;
  background: #fbfcfe;
}

.note-editor-footer {
  justify-content: space-between;
}

.note-body-footer {
  justify-content: flex-end;
}

.note-editor-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-metadata-modal {
  width: min(760px, 100%);
}

@media (max-width: 1000px) {
  .notes-grid,
  .notes-loading-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .note-create-form {
    grid-template-columns: 1fr 1fr;
  }

  .note-create-actions {
    grid-column: 1 / -1;
    height: auto;
    justify-content: flex-end;
  }
}

@media (max-width: 700px) {
  .notes-workspace {
    padding: 20px 14px 56px;
  }

  .notes-header,
  .note-create-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .notes-header .btn {
    align-self: flex-start;
  }

  .note-create-heading p {
    width: 100%;
  }

  .note-create-form,
  .notes-grid,
  .notes-loading-grid,
  .note-editor-meta {
    grid-template-columns: 1fr;
  }

  .note-create-actions {
    justify-content: stretch;
  }

  .note-create-actions .btn {
    flex: 1;
  }

  .note-modal-backdrop {
    padding: 10px;
  }

  .note-editor-modal {
    max-height: calc(100vh - 20px);
  }

  .note-editor-form {
    overflow-y: auto;
    grid-template-rows: minmax(330px, 1fr) auto;
  }

  .note-metadata-form {
    overflow-y: auto;
  }

  .note-editor-body-field textarea {
    min-height: 330px;
  }

  .note-editor-footer {
    gap: 10px;
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .note-editor-footer-actions {
    width: 100%;
  }

  .note-editor-footer-actions .btn {
    flex: 1;
  }
}

/* Kundbox 0.4.1.8 — kommentararbetsflöde */
.meta-comment-statusbar {
  padding: 10px 14px 0;
  background: #fff;
}

.meta-comment-statusbar .meta-conversation-inboxes {
  width: min(430px, 100%);
}

.meta-comment-source {
  text-decoration: none;
  white-space: nowrap;
}

.meta-comment-status-action {
  border-color: #6078e3;
  color: #fff;
  background: #6078e3;
  white-space: nowrap;
}

.meta-comment-status-action:hover {
  border-color: #536bd4;
  color: #fff;
  background: #536bd4;
}

.meta-comment-status-action.is-reopen {
  border-color: #dde3ee;
  color: #566277;
  background: #f5f7fa;
}

.meta-comment-status-action.is-reopen:hover {
  border-color: #d2d9e6;
  color: #333;
  background: #eef1f6;
}

@media (max-width: 700px) {
  .meta-comment-statusbar {
    padding: 9px 10px 0;
  }

  .meta-comment-statusbar .meta-conversation-inboxes {
    width: 100%;
  }
}

/* Kundbox 0.4.1.9 — sociala ikoner + centrerad kommentarrad */
.meta-comment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 8px;
}

.meta-comment-main {
  min-width: 0;
}

.meta-comment-author-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 22px;
}

.meta-platform-icon {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.meta-platform-icon-link {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.meta-comment-time {
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  min-height: 34px;
  white-space: nowrap;
  color: #8b96a9;
  font-size: 13px;
  line-height: 1;
}

.meta-comment-actions {
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.meta-comment-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  line-height: 1;
}

.meta-comment-text {
  margin-top: 7px;
  margin-bottom: 0;
}

.meta-comment-reply {
  margin-top: 10px;
}

@media (max-width: 980px) {
  .meta-comment-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .meta-comment-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .meta-comment-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .meta-comment-time {
    justify-content: flex-start;
    min-height: auto;
  }

  .meta-comment-actions {
    grid-column: auto;
  }
}

/* Kundbox 0.4.2.0 — kompakt mailkompositor + senaste emojis */
.mail-reply-composer {
  padding: 12px 14px 14px;
}

.composer-emoji-bar {
  min-height: 38px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer-emoji-label {
  flex: 0 0 auto;
  color: #8b96a9;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.composer-emoji-list {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.composer-emoji-list::-webkit-scrollbar {
  display: none;
}

.composer-emoji-button {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border: 1px solid #e5eaf2;
  border-radius: 9px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
  color: #333;
  font-family:
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Noto Color Emoji",
    sans-serif;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.composer-emoji-button:hover {
  border-color: #cbd6f5;
  background: #f7f9ff;
  transform: translateY(-1px);
}

.composer-emoji-button:focus-visible {
  outline: 2px solid #9bb1f4;
  outline-offset: 2px;
}

.mail-reply-composer-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    clamp(132px, 10vw, 156px);
  gap: 12px;
  align-items: stretch;
}

.mail-reply-actions {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.mail-reply-actions .btn {
  width: 100%;
  min-height: 48px;
  margin: 0;
}

.mail-reply-template-button {
  align-self: flex-start;
}

.mail-reply-send-button {
  align-self: flex-end;
}

.mail-reply-composer .composer-editor {
  min-width: 0;
}

@media (max-width: 820px) {
  .mail-reply-composer-layout {
    grid-template-columns: 1fr;
  }

  .mail-reply-actions {
    flex-direction: row;
  }

  .mail-reply-actions .btn {
    width: auto;
    min-width: 128px;
  }

  .mail-reply-send-button {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .composer-emoji-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .composer-emoji-list {
    width: 100%;
  }

  .mail-reply-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mail-reply-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* Kundbox 0.4.2.1 — Sociala medier-notis */
.workspace-nav-tab {
  position: relative;
  overflow: visible;
}

.workspace-nav-notification {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(46%, -46%);
  background: #e85f70;
  color: #fff;
  box-shadow: 0 4px 10px rgb(91 103 139 / 20%);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
}

.workspace-nav-tab.active .workspace-nav-notification {
  border-color: #fff;
}

@media (max-width: 640px) {
  .workspace-nav-notification {
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 8px;
  }
}

/* Kundbox 0.4.2.2 — notisbubblor + luftigare huvudmeny */
.workspace-nav {
  min-height: 62px;
  padding: 12px 22px;
  overflow: visible;
  gap: 8px;
}

.workspace-nav-tab {
  position: relative;
  overflow: visible;
}

.meta-work-tabs {
  min-height: 62px;
  padding: 13px 16px 11px;
  overflow: visible;
}

.meta-work-tab {
  position: relative;
  overflow: visible;
}

.workspace-nav-notification.meta-tab-notification {
  top: 0;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  transform: translate(45%, -42%);
  font-size: 8px;
}

.meta-work-tab.active
  .workspace-nav-notification.meta-tab-notification {
  border-color: #fff;
}

@media (max-width: 760px) {
  .workspace-nav {
    min-height: 58px;
    padding: 10px 16px;
  }

  .meta-work-tabs {
    min-height: 58px;
    padding: 11px 13px 10px;
  }
}

/* Kundbox 0.4.2.3 — enhetlig huvudmeny */
.workspace-nav button.workspace-nav-tab {
  border: 0;
  background:
    linear-gradient(
      135deg,
      #f0f5ff 0%,
      #f6f2ff 100%
    );
  color: #333 !important;
  box-shadow:
    inset 0 0 0 1px rgba(104, 131, 224, 0.08);
}

.workspace-nav button.workspace-nav-tab:hover {
  background:
    linear-gradient(
      135deg,
      #ebf2ff 0%,
      #f1ebff 100%
    );
  color: #333 !important;
  box-shadow:
    inset 0 0 0 1px rgba(96, 124, 220, 0.13);
}

.workspace-nav button.workspace-nav-tab.active {
  background:
    linear-gradient(
      135deg,
      #dfeaff 0%,
      #e9e1ff 100%
    );
  color: #333 !important;
  box-shadow:
    inset 0 0 0 1px rgba(82, 111, 214, 0.18),
    0 6px 16px rgba(79, 103, 184, 0.07);
}

/* Kundtjänst använder samma menyhöjd och padding som övriga sidor. */
.customer-service-center {
  grid-template-rows:
    62px
    minmax(0, 1fr);
}

.customer-service-center > .workspace-nav {
  min-height: 62px;
  padding: 12px 22px;
  overflow: visible;
  gap: 8px;
}

@media (max-width: 800px) {
  .customer-service-center {
    grid-template-rows:
      58px
      minmax(650px, 1fr);
  }

  .customer-service-center > .workspace-nav {
    min-height: 58px;
    padding: 10px 16px;
    overflow-x: auto;
    overflow-y: visible;
  }
}

/* Kundbox 0.4.2.4 — slutlig huvudmenygradient */
.workspace-nav button.workspace-nav-tab {
  background:
    linear-gradient(
      135deg,
      #f5f9ff 0%,
      #efe8ff 100%
    );
  color: #333 !important;
  box-shadow: none;
}

.workspace-nav button.workspace-nav-tab:hover {
  background:
    linear-gradient(
      135deg,
      #eef5ff 0%,
      #e9deff 100%
    );
  color: #333 !important;
  box-shadow: none;
}

.workspace-nav button.workspace-nav-tab.active,
.workspace-nav button.workspace-nav-tab.active:hover {
  background:
    linear-gradient(
      135deg,
      #95b8ff 0%,
      #926aff 100%
    );
  color: #fff !important;
  box-shadow:
    inset 0 0 0 1px rgba(82, 111, 214, 0.18),
    0 6px 16px rgba(79, 103, 184, 0.07);
}

/* Kundbox 0.4.2.5 — kompakt Order Center + ordertaggar */
.order-center-list {
  overflow: visible;
}

.order-center-row {
  min-height: 66px;
  position: relative;
}

.order-center-check {
  min-height: 66px;
}

.order-center-open {
  min-height: 66px;
  padding: 9px 14px;
  display: grid;
  grid-template-columns:
    minmax(95px, 0.65fr)
    minmax(145px, 1.05fr)
    minmax(190px, 1.45fr)
    34px
    minmax(120px, 0.95fr)
    minmax(86px, auto)
    minmax(92px, auto);
  align-items: center;
  gap: 12px;
}

.order-center-row:hover .order-center-open {
  background: #fbfcff;
}

.order-center-eye {
  width: 31px;
  height: 31px;
  border: 1px solid #e1e6ef;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
  color: #6d7890;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.order-center-eye:hover {
  border-color: #bfcdf6;
  background: #f3f6ff;
  color: #5d72d9;
  transform: translateY(-1px);
}

.order-center-eye svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.order-tag-control {
  min-width: 0;
  position: relative;
}

.order-tag-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.order-tag-add {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid #dce3ee;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
  color: #627089;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.order-tag-add:hover,
.order-tag-add[aria-expanded="true"] {
  border-color: #aebff5;
  background: #f0f4ff;
  color: #6078dd;
}

.order-tag-chip {
  max-width: 92px;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  background:
    color-mix(
      in srgb,
      var(--order-tag-color) 12%,
      white
    );
  color: #4e596e;
  box-shadow:
    inset 3px 0 0 var(--order-tag-color);
  font-size: 8px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-tag-picker {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 40;
  width: 230px;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  padding: 9px;
  background: #fff;
  box-shadow: 0 14px 34px rgb(45 57 84 / 16%);
}

.order-tag-picker-head {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-tag-picker-head strong {
  font-size: 10px;
}

.order-tag-picker-head button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #7d8798;
  font-size: 18px;
  cursor: pointer;
}

.order-tag-picker-list {
  display: grid;
  gap: 4px;
}

.order-tag-picker-item {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #465064;
  text-align: left;
  font-size: 9px;
  cursor: pointer;
}

.order-tag-picker-item:hover,
.order-tag-picker-item.assigned {
  background: #f5f7fb;
}

.order-tag-picker-dot,
.order-tag-filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--order-tag-color);
}

.order-tag-picker-item strong {
  color: #6d7c9d;
  font-size: 11px;
}

.order-tag-picker-empty {
  padding: 8px 4px 4px;
  color: #929bab;
  font-size: 9px;
  line-height: 1.45;
}

.order-tag-filter-bar {
  margin: -4px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 1px 3px;
  scrollbar-width: none;
}

.order-tag-filter-bar::-webkit-scrollbar {
  display: none;
}

.order-tag-filter-label {
  margin-right: 2px;
  color: #8b96a9;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}

.order-tag-filter {
  min-height: 29px;
  border: 1px solid #e1e6ee;
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #647087;
  font-size: 9px;
  white-space: nowrap;
  cursor: pointer;
}

.order-tag-filter:hover {
  border-color: #cbd5ea;
  background: #f8faff;
}

.order-tag-filter.active {
  border-color: #aebff4;
  background: #eef3ff;
  color: #5269ca;
}

.order-center-status-cell {
  display: flex;
  align-items: center;
}

.order-status {
  min-height: 22px;
  padding: 0 8px;
  font-size: 8px;
}

@media (max-width: 1250px) {
  .order-center-open {
    grid-template-columns:
      minmax(90px, 0.7fr)
      minmax(130px, 1fr)
      minmax(170px, 1.3fr)
      32px
      minmax(100px, 0.85fr)
      minmax(82px, auto)
      minmax(86px, auto);
    gap: 9px;
  }

  .order-tag-chip {
    max-width: 72px;
  }
}

@media (max-width: 900px) {
  .order-center-open {
    grid-template-columns:
      minmax(0, 1fr)
      auto
      auto;
    gap: 7px 10px;
  }

  .order-center-customer,
  .order-center-products {
    grid-column: 1 / -1;
  }

  .order-center-eye {
    grid-column: 2;
    grid-row: 1;
  }

  .order-tag-control {
    grid-column: 1 / -1;
  }

  .order-center-status-cell {
    grid-column: 2;
  }

  .order-center-total {
    grid-column: 3;
  }

  .order-tag-picker {
    left: 0;
    right: auto;
  }
}

/* Kundbox 0.4.2.6 — separat taggsystem + exakt centrerat plus */
.order-tag-add {
  position: relative;
  display: grid;
  place-items: center;
  line-height: 0;
}

.order-tag-add-icon {
  position: relative;
  width: 12px;
  height: 12px;
  display: block;
}

.order-tag-add-icon::before,
.order-tag-add-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.order-tag-add-icon::before {
  width: 12px;
  height: 2px;
}

.order-tag-add-icon::after {
  width: 2px;
  height: 12px;
}

/* Kundbox 0.4.2.7 — mailblockering */
.thread-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.block-email-button,
.block-domain-confirm-button {
  border: 1px solid rgba(211, 62, 81, 0.18);
  background:
    linear-gradient(
      135deg,
      #ff8c9b 0%,
      #e54f67 100%
    );
  color: #fff !important;
  box-shadow:
    0 6px 14px rgba(202, 64, 84, 0.12);
}

.block-email-button:hover:not(:disabled),
.block-domain-confirm-button:hover:not(:disabled) {
  background:
    linear-gradient(
      135deg,
      #ff7a8c 0%,
      #d9425b 100%
    );
  color: #fff !important;
}

.block-email-button:disabled,
.block-domain-confirm-button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.block-domain-info-button {
  width: 37px;
  min-width: 37px;
  height: 37px;
  border: 1px solid #dde3ed;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
  color: #6c778b !important;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.block-domain-info-button:hover {
  border-color: #bcc9ed;
  background: #f4f7ff;
  color: #5369c9 !important;
}

.blocked-reply-notice {
  margin: 12px 14px 14px;
  border: 1px solid #f0d9de;
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  background:
    linear-gradient(
      135deg,
      #fff8f9 0%,
      #fff3f5 100%
    );
  color: #6d4650;
}

.blocked-reply-notice strong {
  color: #b33e53;
}

.blocked-reply-notice span {
  color: #7b6870;
  font-size: 11px;
  line-height: 1.45;
}

.block-domain-modal {
  width: min(620px, calc(100vw - 32px));
}

.block-domain-modal-body {
  padding: 18px 22px 8px;
  display: grid;
  gap: 12px;
}

.blocking-warning,
.blocking-protected,
.blocking-info-card {
  border: 1px solid #eadfd0;
  border-radius: 14px;
  padding: 14px 16px;
  background:
    linear-gradient(
      135deg,
      #fffdf8 0%,
      #fff8e9 100%
    );
  color: #67594b;
}

.blocking-warning strong,
.blocking-protected strong,
.blocking-info-card strong {
  color: #333;
}

.blocking-warning p,
.blocking-protected p,
.blocking-info-card p {
  margin: 5px 0 0;
  line-height: 1.55;
}

.blocking-protected {
  border-color: #dce4f5;
  background:
    linear-gradient(
      135deg,
      #f8fbff 0%,
      #f1f5ff 100%
    );
}

.blocking-info-card {
  margin-bottom: 16px;
  border-color: #dce4f0;
  background:
    linear-gradient(
      135deg,
      #f8fbff 0%,
      #f6f1ff 100%
    );
}

.blocking-protected-domains {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.blocking-protected-domains > span {
  color: #657188;
  font-size: 10px;
  font-weight: 500;
}

.blocking-protected-domains code {
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: #59677f;
  box-shadow:
    inset 0 0 0 1px rgba(101, 121, 164, 0.11);
  font-family: inherit;
  font-size: 9px;
}

.blocking-store-select {
  width: min(360px, 100%);
  margin-bottom: 16px;
}

.blocking-settings-grid {
  align-items: start;
}

.blocking-card {
  min-width: 0;
}

.blocking-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.blocking-add-form {
  margin: 14px 0 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.blocking-add-form input,
.blocking-search {
  width: 100%;
  min-height: 40px;
  border: 1px solid #dde3ed;
  border-radius: 10px;
  padding: 0 11px;
  background: #fff;
  color: #333;
}

.blocking-search {
  margin-bottom: 10px;
}

.blocking-list {
  display: grid;
  gap: 6px;
}

.blocking-list-row {
  min-height: 46px;
  border: 1px solid #edf0f5;
  border-radius: 11px;
  padding: 7px 8px 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fbfcfe;
}

.blocking-list-row span {
  min-width: 0;
  overflow: hidden;
  color: #4f5b70;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .thread-header-actions {
    justify-content: flex-start;
  }

  .blocking-add-form {
    grid-template-columns: 1fr;
  }

  .blocking-add-form .btn {
    width: 100%;
  }
}

/* Kundbox 0.4.2.8 — visuella finjusteringar */

/* Bild 1: kommentarens namn/rubrik ska inte dominera raden. */
.meta-comment-author-line strong {
  font-size: 11px;
  line-height: 1.25;
}

/* Bild 2: mindre, kantlös och mjukare kund-tagg. */
.conversation-tag {
  min-height: 23px;
  border: 0;
  padding: 3px 4px 3px 8px;
  gap: 4px;
  background:
    linear-gradient(
      135deg,
      #fff 0%,
      color-mix(
        in srgb,
        var(--tag-color) 18%,
        white
      ) 100%
    );
  color:
    color-mix(
      in srgb,
      var(--tag-color) 72%,
      #333
    );
  box-shadow: none;
  font-size: 9px;
}

.conversation-tag button {
  position: relative;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: block;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  font-size: 0;
  line-height: 0;
}

.conversation-tag button::before {
  content: "×";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: currentColor;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-0.25px);
}

/* Bilder 3–5: lugnare typografi i Blockering. */
.blocking-warning,
.blocking-protected,
.blocking-info-card {
  padding: 12px 14px;
}

.blocking-warning strong,
.blocking-protected strong,
.blocking-info-card strong {
  font-size: 12px;
  line-height: 1.3;
}

.blocking-warning p,
.blocking-protected p,
.blocking-info-card p {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.5;
}

.blocking-info-card {
  margin-bottom: 14px;
}

.blocking-protected-domains {
  margin-top: 10px;
}

.blocking-protected-domains > span {
  font-size: 9px;
}

.blocking-protected-domains code {
  padding: 3px 7px;
  font-size: 8px;
}

.blocking-card h3 {
  font-size: 12px;
}

.blocking-card p {
  font-size: 9px;
  line-height: 1.5;
}

.blocking-add-form input,
.blocking-search {
  min-height: 37px;
  padding: 0 10px;
  font-size: 10px;
}

.blocking-add-form .btn {
  min-height: 37px;
  padding-inline: 12px;
  font-size: 9px;
}

/* Bild 6: produktkorten cirka 30 % mindre. */
.processing-product-filters {
  align-items: center;
  gap: 8px;
  padding: 2px 0 13px;
}

.processing-filter-all-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-right: 3px;
}

.processing-filter-all-button {
  min-width: 66px;
  height: 34px;
  border: 1px solid #dfe5ef;
  border-radius: 10px;
  padding: 0 14px;
  background:
    linear-gradient(
      135deg,
      #f7faff 0%,
      #f2edff 100%
    );
  color: #5f6b80;
  font-size: 9px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.processing-filter-all-button:hover {
  border-color: #cbd5ed;
  background:
    linear-gradient(
      135deg,
      #f0f5ff 0%,
      #ebe3ff 100%
    );
}

.processing-filter-all-button.active {
  border-color: transparent;
  background:
    linear-gradient(
      135deg,
      #95b8ff 0%,
      #926aff 100%
    );
  color: #fff !important;
}

.processing-filter-card {
  flex: 0 0 88px;
  border-radius: 10px;
  padding: 6px;
  grid-template-rows: 53px auto;
  gap: 6px;
}

.processing-filter-card img,
.processing-filter-all {
  height: 53px;
  border-radius: 7px;
}

.processing-filter-card span {
  font-size: 8px;
  line-height: 1.3;
}

.processing-filter-card.active {
  box-shadow:
    0 0 0 2px rgba(49, 93, 244, 0.07);
}

/* Bild 7: "Alla" före Idag och en diskret avdelare. */
.order-period-tabs .order-period-all {
  position: relative;
  margin-right: 8px;
}

.order-period-tabs .order-period-all::after {
  content: "";
  position: absolute;
  top: 8px;
  right: -8px;
  width: 1px;
  height: calc(100% - 16px);
  background: #e1e6ef;
  pointer-events: none;
}

@media (max-width: 900px) {
  .processing-filter-card {
    flex-basis: 84px;
  }
}

/* Kundbox 0.4.2.9 — order-popup: taggar + exakt centrerade kryss */
.order-drawer-tags-section {
  overflow: visible;
}

.order-drawer-tags-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-drawer-tags-label {
  flex: 0 0 auto;
  color: #647087;
  font-size: 11px;
  font-weight: 500;
}

.order-drawer-tags-list {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.order-drawer-tag-chip {
  min-height: 25px;
  border: 0;
  border-radius: 999px;
  padding: 3px 4px 3px 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background:
    linear-gradient(
      135deg,
      #fff 0%,
      color-mix(
        in srgb,
        var(--order-tag-color) 20%,
        white
      ) 100%
    );
  color:
    color-mix(
      in srgb,
      var(--order-tag-color) 70%,
      #333
    );
  font-size: 9px;
  line-height: 1;
}

.order-drawer-tag-remove {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  display: block;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  cursor: pointer;
}

.centered-remove-icon {
  position: absolute;
  inset: 0;
  display: block;
}

.centered-remove-icon::before,
.centered-remove-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 1.6px;
  border-radius: 999px;
  background: currentColor;
}

.centered-remove-icon::before {
  transform:
    translate(-50%, -50%)
    rotate(45deg);
}

.centered-remove-icon::after {
  transform:
    translate(-50%, -50%)
    rotate(-45deg);
}

.order-drawer-tag-add-wrap {
  position: relative;
}

.order-drawer-tag-add {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
}

.order-drawer-tag-picker {
  position: absolute;
  left: 0;
  top: calc(100% + 7px);
  z-index: 70;
  width: 240px;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  padding: 9px;
  background: #fff;
  box-shadow:
    0 14px 34px rgb(45 57 84 / 16%);
}

/* Kund-taggar: ta bort fontberoende x och centrera med samma geometri. */
.conversation-tag button {
  position: relative;
  display: block;
  font-size: 0;
  line-height: 0;
}

.conversation-tag button::before {
  content: none !important;
}

.conversation-tag button .centered-remove-icon {
  color: inherit;
}

@media (max-width: 700px) {
  .order-drawer-tags-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .order-drawer-tag-picker {
    left: 0;
    right: auto;
    width: min(240px, calc(100vw - 54px));
  }
}

/* Kundbox 0.4.3.3 — Merge Orders i Order Center */
.orders-header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.orders-header-merge {
  min-width: 94px;
}

.order-center-open {
  grid-template-columns:
    minmax(95px, 0.65fr)
    minmax(145px, 1.05fr)
    minmax(190px, 1.45fr)
    minmax(112px, auto)
    minmax(120px, 0.95fr)
    minmax(86px, auto)
    minmax(92px, auto);
}

.order-center-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.order-merge-button {
  min-width: 66px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7798ff 0%, #795df2 100%);
  box-shadow: 0 6px 14px rgb(89 96 202 / 14%);
  color: #fff;
  font: inherit;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

.order-merge-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgb(89 96 202 / 20%);
}

.order-merge-button:disabled {
  opacity: 0.62;
  cursor: wait;
  transform: none;
}

.order-merge-done {
  min-height: 26px;
  border: 1px solid #dce8df;
  border-radius: 999px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f4faf6;
  color: #64806c;
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 1250px) {
  .order-center-open {
    grid-template-columns:
      minmax(90px, 0.7fr)
      minmax(130px, 1fr)
      minmax(170px, 1.3fr)
      minmax(106px, auto)
      minmax(100px, 0.85fr)
      minmax(82px, auto)
      minmax(86px, auto);
  }
}

@media (max-width: 900px) {
  .orders-header-actions {
    justify-self: end;
  }

  .order-center-open {
    grid-template-columns:
      minmax(0, 1fr)
      auto
      auto;
  }

  .order-center-actions {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 640px) {
  .orders-header-actions {
    width: 100%;
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .orders-header-actions .btn {
    flex: 1 1 0;
  }

  .order-center-actions {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

.order-status-tabs .order-status-tab.status-merged.active {
  border-color: #d7cff8;
  background: #f4f1ff;
  color: #7058d6;
}

.order-status.status-merged {
  color: #7058d6;
  background: #f4f1ff;
}


/* Kundbox 0.4.3.3 — merge controls */
.order-merge-all-button {
  min-width: 82px;
  border-color: #d9dcf8;
  color: #6555cf;
  background: #f7f5ff;
}

.order-merge-all-button:hover:not(:disabled) {
  border-color: #c8c3f5;
  background: #f1eeff;
}

.order-merge-button.is-merged {
  background: #f4faf6;
  box-shadow: none;
  color: #64806c;
  border: 1px solid #dce8df;
}

.order-merge-button.is-merged:disabled {
  opacity: 1;
  cursor: default;
}


/* User accounts */
.user-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(145deg, #5b6cf5, #8a66f4);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 18px rgba(91, 108, 245, 0.18);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

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

.profile-card {
  display: grid;
  gap: 24px;
}

.profile-avatar-panel {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-avatar {
  width: 112px;
  height: 112px;
  flex-basis: 112px;
  font-size: 26px;
  border: 5px solid #fff;
  box-shadow:
    0 0 0 1px #e6e9f0,
    0 12px 30px rgba(44, 56, 89, 0.12);
}

.profile-avatar-copy {
  display: grid;
  gap: 5px;
}

.profile-avatar-copy strong {
  font-size: 15px;
}

.profile-avatar-copy span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.profile-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invite-auth-card {
  width: min(460px, 100%);
}

.invite-loading {
  padding: 34px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.invite-team-chip {
  width: fit-content;
  margin-top: 26px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f0f2ff;
  color: #5864d9;
  font-size: 10px;
  font-weight: 800;
}

.auth-link-button {
  margin-top: 22px;
  width: 100%;
  text-decoration: none;
}

.team-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.team-current-role,
.team-role-badge,
.team-self {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef1ff;
  color: #5965d8;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 10px;
}

.team-self {
  margin-left: 6px;
  padding: 4px 7px;
  vertical-align: middle;
}

.team-invite-card,
.team-members-card,
.team-pending-card {
  margin-bottom: 16px;
}

.team-invite-form {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px auto;
  gap: 10px;
  align-items: end;
}

.team-invite-form .btn {
  height: 42px;
}

.team-invite-result {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #dde4ff;
  border-radius: 12px;
  background: #f7f8ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.team-invite-result > div {
  display: grid;
  gap: 3px;
}

.team-invite-result strong {
  font-size: 12px;
}

.team-invite-result span {
  color: var(--muted);
  font-size: 10px;
}

.team-permission-note {
  margin-bottom: 16px;
  padding: 13px 16px;
  border: 1px solid #e5e8ef;
  border-radius: 12px;
  background: #fafbfc;
  color: #667085;
  font-size: 11px;
  line-height: 1.6;
}

.team-member-list {
  display: grid;
  margin-top: 14px;
}

.team-member-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid #f0f1f4;
}

.team-member-row:first-child {
  border-top: 0;
}

.team-member-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-member-avatar {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  box-shadow: none;
}

.team-member-identity > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.team-member-identity strong {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-member-identity span:not(.team-self) {
  color: var(--muted);
  font-size: 10px;
}

.team-member-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-role-select {
  height: 38px;
  min-width: 130px;
  border: 1px solid #dfe2e8;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
  font: inherit;
  font-size: 11px;
}

.team-role-select:disabled {
  background: #f6f7f9;
  color: #8d95a3;
}

.team-invitation-row {
  min-height: 62px;
}

@media (max-width: 900px) {
  .team-invite-form {
    grid-template-columns: 1fr;
  }

  .team-member-row,
  .team-invite-result {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .team-member-actions {
    width: 100%;
  }

  .team-role-select {
    flex: 1;
  }
}


/* Teamchat keeps the same card language as the rest of Kundbox. */
.team-chat-workspace {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding: 24px clamp(20px, 3vw, 46px) 34px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  color: #333;
  background:
    radial-gradient(
      circle at 12% -4%,
      rgba(178, 214, 255, 0.24),
      transparent 29%
    ),
    radial-gradient(
      circle at 94% 4%,
      rgba(215, 199, 255, 0.2),
      transparent 26%
    ),
    #f7f8fa;
}

.team-chat-workspace.has-error {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.team-chat-page-header {
  width: min(1500px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.team-chat-page-header h1 {
  margin: 4px 0 5px;
  color: #2d364a;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.team-chat-page-header p {
  margin: 0;
  color: #8a94a4;
  font-size: 11px;
  line-height: 1.6;
}

.team-chat-eyebrow {
  color: #667bd5;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.team-chat-error {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 11px 14px;
  border: 1px solid #f1dce1;
  border-radius: 12px;
  color: #a13d4d;
  background: #fff7f8;
  font-size: 11px;
}

.team-chat-loading-card {
  width: min(1500px, 100%);
  min-height: 420px;
  margin: 0 auto;
  border: 1px solid #e2e7f0;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #8a94a4;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 18px 50px rgba(40, 55, 90, 0.06);
  font-size: 12px;
}

.team-chat-shell {
  width: min(1500px, 100%);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  border: 1px solid #e0e6f0;
  border-radius: 22px;
  display: grid;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 50px rgba(42, 56, 88, 0.075);
}

.team-chat-sidebar {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid #edf0f5;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    linear-gradient(
      160deg,
      #fbfcff 0%,
      #f8f9fd 100%
    );
}

.team-chat-sidebar-head {
  min-height: 72px;
  padding: 17px 18px;
  border-bottom: 1px solid #edf0f5;
  display: flex;
  align-items: center;
}

.team-chat-sidebar-head > div {
  display: grid;
  gap: 3px;
}

.team-chat-sidebar-head span {
  color: #7f8999;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.team-chat-sidebar-head strong {
  color: #333;
  font-size: 12px;
  font-weight: 600;
}

.team-chat-conversation-list {
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
}

.team-chat-conversation {
  width: 100%;
  min-width: 0;
  min-height: 60px;
  margin: 0 0 5px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: #333;
  background: transparent;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.team-chat-conversation:hover {
  border-color: #e3e8f3;
  background: rgba(255, 255, 255, 0.82);
}

.team-chat-conversation.active {
  border-color: #dbe3fb;
  background:
    linear-gradient(
      135deg,
      #eef5ff 0%,
      #f3edff 100%
    );
  box-shadow: 0 5px 16px rgba(76, 99, 176, 0.065);
}

.team-chat-general-icon,
.team-chat-active-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #dfe6fb;
  border-radius: 12px;
  color: #6478dc;
  background:
    linear-gradient(
      135deg,
      #edf4ff 0%,
      #f2edff 100%
    );
  font-weight: 700;
}

.team-chat-general-icon {
  width: 38px;
  height: 38px;
  font-size: 16px;
}

.team-chat-conversation-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.team-chat-conversation-copy strong {
  overflow: hidden;
  color: #344054;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-chat-conversation-copy small {
  overflow: hidden;
  color: #98a1b1;
  font-size: 9px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-chat-list-avatar {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  box-shadow: none;
}

.team-chat-unread {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #e85f70;
  font-size: 8px;
  font-weight: 700;
}

.team-chat-direct-label {
  margin: 17px 8px 8px;
  color: #9aa3b2;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.team-chat-no-members {
  margin: 8px;
  padding: 14px;
  border: 1px dashed #dce3ed;
  border-radius: 13px;
  color: #8a94a4;
  background: rgba(255, 255, 255, 0.6);
  font-size: 9px;
  line-height: 1.6;
}

.team-chat-no-members strong {
  color: #667085;
}

.team-chat-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #fbfcfe;
}

.team-chat-panel-head {
  min-height: 72px;
  padding: 13px 20px;
  border-bottom: 1px solid #edf0f5;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
}

.team-chat-active-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.team-chat-active-identity > div {
  min-width: 0;
}

.team-chat-active-identity h2 {
  margin: 0 0 2px;
  overflow: hidden;
  color: #30394d;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-chat-active-identity p {
  margin: 0;
  color: #98a1b1;
  font-size: 9px;
}

.team-chat-active-icon {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.team-chat-active-avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  box-shadow: none;
}

.team-chat-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 24px 18px;
  scroll-behavior: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(213, 201, 255, 0.12),
      transparent 28%
    ),
    #fbfcfe;
}

.team-chat-older-wrap {
  margin: 0 0 18px;
  display: flex;
  justify-content: center;
}

.team-chat-older-wrap .btn {
  min-height: 34px;
  padding: 0 13px;
  font-size: 9px;
}

.team-chat-message {
  width: 100%;
  margin: 0 0 14px;
  display: flex;
  align-items: flex-end;
  gap: 9px;
}

.team-chat-message.own {
  justify-content: flex-end;
}

.team-chat-message-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  margin-bottom: 3px;
  box-shadow: none;
}

.team-chat-message-content {
  max-width: min(68%, 720px);
  display: grid;
  gap: 4px;
}

.team-chat-message.own .team-chat-message-content {
  justify-items: end;
}

.team-chat-message-meta {
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #9aa3b2;
  font-size: 8px;
}

.team-chat-message-meta strong,
.team-chat-message-meta span {
  color: #6c7688;
  font-weight: 600;
}

.team-chat-bubble {
  padding: 11px 14px;
  border: 1px solid #e4e9f2;
  border-radius: 17px 17px 17px 6px;
  color: #354052;
  background: #fff;
  box-shadow: 0 4px 14px rgba(51, 65, 95, 0.045);
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.team-chat-message.own .team-chat-bubble {
  border-color: #d9e1ff;
  border-radius: 17px 17px 6px 17px;
  color: #39456e;
  background:
    linear-gradient(
      135deg,
      #eaf2ff 0%,
      #eee8ff 100%
    );
}

.team-chat-read-receipt {
  padding: 0 4px;
  color: #a0a8b5;
  font-size: 8px;
  font-weight: 500;
}

.team-chat-read-receipt.is-read {
  color: #6578dc;
}

.team-chat-read-receipt.is-error {
  color: #b94557;
}

.team-chat-message.is-pending {
  opacity: 0.86;
}

.team-chat-message-loading,
.team-chat-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: #9aa3b2;
  font-size: 10px;
}

.team-chat-empty {
  gap: 5px;
}

.team-chat-empty > span {
  margin-bottom: 3px;
  font-size: 26px;
}

.team-chat-empty strong {
  color: #596477;
  font-size: 12px;
  font-weight: 600;
}

.team-chat-empty p {
  margin: 0;
  color: #9aa3b2;
  font-size: 9px;
}

.team-chat-composer {
  min-height: 76px;
  padding: 12px 14px 13px 18px;
  border-top: 1px solid #edf0f5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  background: #fff;
}

.team-chat-composer textarea {
  width: 100%;
  min-height: 48px;
  max-height: 150px;
  resize: none;
  overflow-y: auto;
  padding: 13px 15px;
  border: 1px solid #e0e5ef;
  border-radius: 14px;
  outline: none;
  color: #354052;
  background: #fafbfe;
  font: inherit;
  font-size: 11px;
  line-height: 1.45;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.team-chat-composer textarea:focus {
  border-color: #b9c8f7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 120, 219, 0.08);
}

.team-chat-composer textarea::placeholder {
  color: #a6aebb;
}

.team-chat-send {
  min-width: 94px;
  min-height: 48px;
  border-radius: 13px;
}

@media (max-width: 980px) {
  .team-chat-shell {
    grid-template-columns: 245px minmax(0, 1fr);
  }

  .team-chat-message-content {
    max-width: 78%;
  }
}

@media (max-width: 720px) {
  .team-chat-workspace {
    height: auto;
    max-height: none;
    min-height: 760px;
    overflow-y: auto;
    padding: 18px 12px 26px;
  }

  .team-chat-shell {
    min-height: 760px;
    grid-template-columns: 1fr;
    grid-template-rows: 230px minmax(0, 1fr);
  }

  .team-chat-sidebar {
    border-right: 0;
    border-bottom: 1px solid #edf0f5;
  }

  .team-chat-conversation-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 78vw);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .team-chat-direct-label {
    display: none;
  }

  .team-chat-no-members {
    min-width: 220px;
  }

  .team-chat-message-content {
    max-width: 86%;
  }

  .team-chat-messages {
    padding: 18px 14px;
  }
}


/* Kundbox 0.5.2.1 — Teamchat GIF/kanal UI-fix */
.team-chat-section-heading {
  min-height: 28px;
  margin: 2px 7px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #9aa3b2;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.team-chat-add-general {
  width: 24px;
  height: 24px;
  border: 1px solid #dce4f4;
  border-radius: 8px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6679dc;
  background: #fff;
  box-shadow: 0 3px 10px rgba(73, 91, 151, 0.05);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.team-chat-add-general:hover {
  border-color: #bcc9f3;
  background: #f4f7ff;
  transform: translateY(-1px);
}

.team-chat-add-general > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.team-chat-general-list {
  max-height: 325px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d8deec transparent;
}

.team-chat-general-list::-webkit-scrollbar {
  width: 5px;
}

.team-chat-general-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d8deec;
}

.team-chat-general-list::-webkit-scrollbar-track {
  background: transparent;
}

.team-chat-edit-general {
  border: 0;
  padding: 0;
  color: #7182dc;
  background: transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.team-chat-edit-general:hover {
  color: #556bcf;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.team-chat-general-modal {
  width: min(520px, calc(100vw - 30px));
}

.team-chat-general-form {
  margin-top: 0;
  padding: 22px 24px 0;
  gap: 15px;
}

.team-chat-general-form > .app-modal-footer {
  margin: 7px -24px 0;
}

.team-chat-general-avatar-editor {
  padding: 12px;
  border: 1px solid #e5e9f1;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fafbfe;
}

.team-chat-general-avatar-editor > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.team-chat-general-avatar-editor strong {
  color: #354052;
  font-size: 11px;
  font-weight: 600;
}

.team-chat-general-avatar-editor > div > span {
  color: #8f99a9;
  font-size: 9px;
}

.team-chat-general-editor-avatar {
  width: 52px !important;
  height: 52px !important;
  flex: 0 0 52px !important;
  border-radius: 15px !important;
  overflow: hidden;
}

.team-chat-remove-general-avatar {
  justify-self: start;
}

.team-chat-composer {
  position: relative;
}

.team-chat-emoji-bar {
  grid-column: 1 / -1;
  min-height: 31px;
  margin: 0;
}

.composer-gif-button {
  min-width: 42px;
  height: 31px;
  flex: 0 0 42px;
  border: 1px solid #e5eaf2;
  border-radius: 9px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  color: #6577d7;
  background: #fff;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.composer-gif-button:hover,
.composer-gif-button.active {
  border-color: #bcc9f3;
  background:
    linear-gradient(
      135deg,
      #eef5ff 0%,
      #f1ebff 100%
    );
  transform: translateY(-1px);
}

.team-chat-gif-picker {
  position: absolute;
  left: 18px;
  bottom: calc(100% - 2px);
  z-index: 35;
  width: min(500px, calc(100% - 36px));
  max-height: min(430px, 60vh);
  border: 1px solid #dfe5ef;
  border-radius: 18px;
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 9px;
  background: #fff;
  box-shadow:
    0 22px 58px rgba(44, 56, 88, 0.18),
    0 4px 14px rgba(44, 56, 88, 0.06);
}

.team-chat-gif-search {
  position: relative;
  display: block;
}

.team-chat-gif-search input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #e0e5ef;
  border-radius: 10px;
  padding: 0 62px 0 11px;
  outline: none;
  appearance: none;
  color: #48556a;
  background: #fafbfe;
  font: inherit;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.2;
}

.team-chat-gif-search input::placeholder {
  color: #9ca6b5;
  font-weight: 400;
}

.team-chat-gif-search input:focus {
  border-color: #b9c8f7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 120, 219, 0.08);
}

.team-chat-gif-search-status {
  position: absolute;
  top: 50%;
  right: 11px;
  transform: translateY(-50%);
  color: #9aa4b3;
  font-size: 8px;
  font-weight: 500;
  pointer-events: none;
}

.team-chat-gif-grid {
  min-height: 150px;
  max-height: 310px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: #d7deeb transparent;
}

.team-chat-gif-grid.is-searching {
  opacity: 0.68;
}

.team-chat-gif-option {
  min-width: 0;
  height: 102px;
  border: 0;
  border-radius: 11px;
  padding: 0;
  overflow: hidden;
  background: #f1f3f7;
  cursor: pointer;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.team-chat-gif-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(52, 65, 95, 0.14);
}

.team-chat-gif-option img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.team-chat-gif-loading,
.team-chat-gif-empty,
.team-chat-gif-error,
.team-chat-gif-unconfigured {
  grid-column: 1 / -1;
  min-height: 110px;
  padding: 18px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
  color: #8c96a6;
  background: #fafbfe;
  font-size: 9px;
  line-height: 1.55;
}

.team-chat-gif-unconfigured strong {
  color: #566176;
  font-size: 10px;
}

.team-chat-gif-unconfigured code {
  border-radius: 5px;
  padding: 2px 5px;
  color: #5e70d3;
  background: #eef2ff;
  font-size: 9px;
}

.team-chat-gif-provider {
  color: #a0a8b6;
  font-size: 8px;
  text-align: right;
}

.team-chat-gif-message {
  max-width: min(340px, 52vw);
  border: 1px solid #e1e6f0;
  border-radius: 16px;
  overflow: hidden;
  background: #f2f4f8;
  box-shadow: 0 5px 16px rgba(49, 63, 95, 0.06);
}

.team-chat-gif-message img {
  width: 100%;
  max-height: 330px;
  display: block;
  object-fit: contain;
  background: #eef1f6;
}

@media (max-width: 720px) {
  .team-chat-conversation-list {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .team-chat-general-list {
    max-height: 190px;
  }

  .team-chat-direct-label {
    display: block;
  }

  .team-chat-gif-picker {
    left: 10px;
    width: calc(100% - 20px);
    max-height: 56vh;
  }

  .team-chat-gif-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-chat-gif-option {
    height: 96px;
  }
}


/* Kundbox 0.5.3.0 — Teamchat presence, typing and mentions */
.team-chat-conversation-badges {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.team-chat-mention-unread {
  background: #5b7bea;
}

.team-chat-presence-avatar {
  position: relative;
  width: max-content;
  height: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.team-chat-presence-dot {
  position: absolute;
  right: -1px;
  bottom: 0;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #c9ced8;
  box-shadow: 0 1px 4px rgba(43, 54, 80, 0.12);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.team-chat-presence-dot.is-online {
  background: #37b878;
  transform: scale(1.04);
}

.team-chat-presence-label {
  color: #a0a8b6;
  font-weight: 600;
}

.team-chat-presence-label.is-online {
  color: #2f9e68;
}

.team-chat-typing-indicator {
  position: absolute;
  left: 19px;
  bottom: calc(100% + 5px);
  z-index: 18;
  min-height: 20px;
  max-width: min(520px, calc(100% - 38px));
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(4px);
  color: #7c8799;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 12px rgba(51, 65, 95, 0.04);
  font-size: 8px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  pointer-events: none;
  transition:
    opacity 130ms ease,
    transform 130ms ease;
}

.team-chat-typing-indicator.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.team-chat-mention {
  border-radius: 5px;
  padding: 1px 3px;
  color: #5a6fd6;
  background: rgba(99, 120, 219, 0.11);
  font-weight: 700;
}

.team-chat-mention-picker {
  position: absolute;
  left: 18px;
  bottom: calc(100% + 4px);
  z-index: 42;
  width: min(360px, calc(100% - 36px));
  max-height: 290px;
  overflow-y: auto;
  border: 1px solid #dfe5ef;
  border-radius: 15px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 20px 50px rgba(44, 56, 88, 0.16),
    0 4px 14px rgba(44, 56, 88, 0.05);
  backdrop-filter: blur(16px);
}

.team-chat-mention-picker[hidden] {
  display: none;
}

.team-chat-mention-option {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  text-align: left;
  color: #3f4a5e;
  background: transparent;
  cursor: pointer;
}

.team-chat-mention-option:hover,
.team-chat-mention-option.is-selected {
  background:
    linear-gradient(
      135deg,
      #f0f5ff 0%,
      #f5efff 100%
    );
}

.team-chat-mention-option > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.team-chat-mention-option strong,
.team-chat-mention-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-chat-mention-option strong {
  color: #3e485a;
  font-size: 10px;
  font-weight: 650;
}

.team-chat-mention-option small {
  color: #98a1b0;
  font-size: 8px;
}

.team-chat-mention-avatar {
  width: 32px !important;
  height: 32px !important;
  flex-basis: 32px !important;
  box-shadow: none !important;
}

@media (max-width: 720px) {
  .team-chat-mention-picker {
    left: 10px;
    width: calc(100% - 20px);
  }

  .team-chat-typing-indicator {
    left: 11px;
    max-width: calc(100% - 22px);
  }
}


/* Kundbox 0.5.4.1 — Lenbird branding + display zoom */
.lenbird-logo {
  min-width: 0;
  flex: 0 0 auto;
  gap: 0;
  line-height: 0;
}

.lenbird-logo img {
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.topbar-brand-logo img {
  width: 118px;
  max-height: 48px;
}

.auth-brand {
  width: 100%;
  justify-content: flex-start;
}

.auth-brand img {
  width: min(245px, 86%);
  max-height: 98px;
}

.topbar-zoom {
  position: relative;
  flex: 0 0 auto;
  margin-right: 4px;
}

.topbar-zoom-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid #e2e7ef;
  border-radius: 11px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #66758d;
  background: #fff;
  box-shadow: 0 4px 14px rgba(53, 67, 98, 0.045);
  cursor: pointer;
  transition:
    color 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.topbar-zoom-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-zoom-toggle:hover,
.topbar-zoom-toggle[aria-expanded="true"] {
  color: #5e70d8;
  border-color: #cbd5f6;
  background:
    linear-gradient(
      135deg,
      #f3f7ff 0%,
      #f5f1ff 100%
    );
  box-shadow: 0 7px 20px rgba(70, 86, 135, 0.08);
  transform: translateY(-1px);
}

.topbar-zoom-toggle:focus-visible {
  outline: 0;
  border-color: #afbef8;
  box-shadow: 0 0 0 3px rgba(49, 93, 244, 0.08);
}

.topbar-zoom-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 90;
  width: 220px;
  border: 1px solid #e2e7f0;
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 20px 55px rgba(42, 55, 83, 0.17),
    0 4px 14px rgba(42, 55, 83, 0.05);
  backdrop-filter: blur(16px);
}

.topbar-zoom-heading {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}

.topbar-zoom-heading strong {
  color: #344157;
  font-size: 11px;
  font-weight: 800;
}

.topbar-zoom-heading span {
  color: #929cac;
  font-size: 8px;
  line-height: 1.45;
}

.topbar-zoom-controls {
  min-height: 42px;
  border: 1px solid #e6eaf1;
  border-radius: 12px;
  padding: 4px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 4px;
  background: #f8f9fc;
}

.topbar-zoom-controls button {
  width: 34px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #6071d3;
  background: #fff;
  box-shadow: 0 2px 7px rgba(55, 68, 103, 0.06);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}

.topbar-zoom-controls button:hover:not(:disabled) {
  background: #eef3ff;
}

.topbar-zoom-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}

.topbar-zoom-controls strong {
  color: #344157;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.topbar-zoom-reset {
  width: 100%;
  margin-top: 9px;
  border: 0;
  border-radius: 9px;
  padding: 7px 9px;
  color: #7180a0;
  background: transparent;
  font: inherit;
  font-size: 8px;
  font-weight: 700;
}

.topbar-zoom-reset:hover {
  color: #596bd0;
  background: #f4f6fc;
}

@media (max-width: 1150px) {
  .topbar-brand-logo img {
    width: 104px;
  }
}

@media (max-width: 620px) {
  .topbar-brand-logo img {
    width: 92px;
  }

  .topbar-zoom {
    margin-right: 0;
  }

  .topbar-zoom-popover {
    right: -54px;
    width: 210px;
  }
}

/* Kundbox 0.5.4.1 — scroll-safe zoom + roomier topbar */
html[data-ui-zoom-overflow="true"] {
  overflow: auto;
}

html[data-ui-zoom-overflow="true"] body {
  overflow: visible;
}

html[data-ui-zoom-overflow="true"] #app {
  overflow: visible;
}

@media (min-width: 901px) {
  .app-shell.with-workspace-nav {
    grid-template-rows: 84px 52px 1fr;
  }

  .topbar {
    min-height: 84px;
    padding-inline: 22px;
  }

  .topbar-brand-logo img {
    width: 144px;
    max-height: 59px;
  }
}



/* Kundbox 0.5.4.2 — enhetlig Kundtjänst-nav + zoomsäker Teamchat */
@media (min-width: 901px) {
  .app-shell.with-workspace-nav {
    grid-template-rows: 84px 62px minmax(0, 1fr);
  }

  .app-shell.with-customer-service-layout {
    grid-template-rows: 84px minmax(0, 1fr);
  }

  .customer-service-center {
    grid-template-rows: 62px minmax(0, 1fr);
  }

  .customer-service-center > .workspace-nav {
    min-height: 62px;
    height: 62px;
    padding: 12px 22px;
    justify-content: center;
    gap: 8px;
    overflow: visible;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: none;
  }

  .customer-service-center > .workspace-nav
    button.workspace-nav-tab {
    height: 34px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 11px;
  }

  .app-shell.team-chat-viewport-shell {
    height: var(
      --kundbox-ui-viewport-height,
      100vh
    );
    min-height: 0;
    overflow: hidden;
  }

  .app-shell.team-chat-viewport-shell
    .team-chat-workspace {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .app-shell.team-chat-viewport-shell
    .team-chat-shell,
  .app-shell.team-chat-viewport-shell
    .team-chat-panel,
  .app-shell.team-chat-viewport-shell
    .team-chat-messages {
    min-height: 0;
  }

  .app-shell.team-chat-viewport-shell
    .team-chat-composer {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
  }
}

/* Kundbox 0.5.5.0 — Media placeholder + Teamchat conversation scroll */
.topbar-media-button {
  min-height: 34px;
  border: 1px solid rgba(91, 113, 231, 0.18);
  border-radius: 11px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  background:
    linear-gradient(
      135deg,
      #5a7df0 0%,
      #7563e7 100%
    );
  box-shadow:
    0 5px 16px rgba(83, 105, 218, 0.16);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.topbar-media-button:hover,
.topbar-media-button.active {
  transform: translateY(-1px);
  box-shadow:
    0 8px 20px rgba(83, 105, 218, 0.22);
  filter: saturate(1.08);
}

.topbar-media-button:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(91, 113, 231, 0.14),
    0 8px 20px rgba(83, 105, 218, 0.18);
}

.media-workspace {
  min-height: 0;
}

.media-empty {
  min-height: 360px;
}

@media (max-width: 900px) {
  .topbar-media-button {
    min-height: 32px;
    padding-inline: 11px;
    font-size: 9px;
  }
}


/* Kundbox 0.5.5.0 — Media-bibliotek + kontoöversikt */
.settings-page {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background:
    radial-gradient(
      circle at 72% 0%,
      rgba(203, 218, 255, 0.16),
      transparent 30%
    ),
    #f8fafd;
}

.settings-page > .settings {
  min-height: 0;
}

.account-usage-bar {
  min-height: 92px;
  padding: 13px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid #e7ecf4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 22px rgba(44, 58, 89, 0.035);
  backdrop-filter: blur(18px);
}

.account-usage-item {
  min-width: 0;
  padding: 10px 14px 9px;
  border: 1px solid #e6ebf3;
  border-radius: 14px;
  display: grid;
  gap: 7px;
  background:
    linear-gradient(
      145deg,
      #ffffff 0%,
      #fbfcff 100%
    );
}

.account-usage-heading {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.account-usage-heading > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.account-usage-heading span {
  color: #8b96a8;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.075em;
}

.account-usage-heading strong {
  overflow: hidden;
  color: #334159;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-usage-heading b {
  flex: 0 0 auto;
  color: #6277d9;
  font-size: 9px;
  font-weight: 750;
}

.account-usage-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f7;
}

.account-usage-track > span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      #6b88ee 0%,
      #8065e7 100%
    );
  transition: width 260ms ease;
}

.account-usage-track.storage > span {
  background:
    linear-gradient(
      90deg,
      #5d8cf0 0%,
      #6d72e7 58%,
      #8b67df 100%
    );
}

.account-usage-item small {
  overflow: hidden;
  color: #99a2b1;
  font-size: 8px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-usage-error {
  grid-column: 1 / -1;
  min-height: 62px;
  border: 1px solid #e8ecf3;
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  align-content: center;
  gap: 2px;
  color: #8e98a8;
  background: #fff;
  font-size: 9px;
}

.account-usage-error strong {
  color: #46536a;
  font-size: 11px;
}

.account-usage-skeleton {
  min-height: 62px;
  border-radius: 14px;
  background:
    linear-gradient(
      90deg,
      #f1f3f7 25%,
      #fafbfc 50%,
      #f1f3f7 75%
    );
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.2s linear infinite;
}

.media-workspace {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.media-container-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.media-container-card {
  position: relative;
  min-height: 150px;
  border: 1px solid #e3e9f2;
  border-radius: 17px;
  overflow: hidden;
  background:
    linear-gradient(
      145deg,
      #ffffff 0%,
      #fbfcff 100%
    );
  box-shadow: 0 5px 17px rgba(42, 58, 88, 0.04);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.media-container-card:hover {
  transform: translateY(-2px);
  border-color: #d2dcf0;
  box-shadow: 0 13px 29px rgba(54, 72, 112, 0.08);
}

.media-container-open {
  width: 100%;
  min-height: 150px;
  border: 0;
  padding: 22px 72px 22px 20px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  text-align: left;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.media-container-icon {
  width: 48px;
  height: 48px;
  border: 1px solid #e3e8f3;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(
      145deg,
      #f4f7ff 0%,
      #f7f2ff 100%
    );
  font-size: 23px;
}

.media-container-open > div {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.media-container-card h3 {
  margin: 0;
  overflow: hidden;
  color: #334159;
  font-size: 16px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-container-card p {
  margin: 0;
  color: #909aaa;
  font-size: 9px;
  line-height: 1.5;
}

.media-card-edit,
.media-folder-edit {
  border: 0;
  padding: 0;
  color: #667bd5;
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.media-card-edit {
  position: absolute;
  top: 18px;
  right: 19px;
}

.media-card-edit:hover,
.media-folder-edit:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.media-container-skeleton {
  min-height: 150px;
  border-radius: 17px;
  background:
    linear-gradient(
      90deg,
      #f0f2f6 25%,
      #fafbfc 50%,
      #f0f2f6 75%
    );
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.2s linear infinite;
}

.media-detail-workspace {
  padding-top: 26px;
}

.media-detail-header {
  max-width: 1320px;
  margin: 0 auto 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.media-detail-header h1 {
  margin: 7px 0 0;
  color: #333;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.media-detail-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.media-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: #9aa3b2;
  font-size: 9px;
}

.media-breadcrumbs button {
  border: 0;
  padding: 2px 3px;
  color: #6b7bd0;
  background: transparent;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.media-breadcrumbs button.current {
  color: #7e899a;
  pointer-events: none;
}

.media-detail-content {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.media-section {
  display: grid;
  gap: 11px;
}

.media-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8a94a5;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.media-section-title strong {
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #6678d5;
  background: #edf2ff;
  font-size: 8px;
}

.media-folder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.media-folder-card {
  position: relative;
  min-height: 88px;
  border: 1px solid #e4e9f2;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 14px rgba(48, 62, 92, 0.035);
}

.media-folder-open {
  width: 100%;
  min-height: 88px;
  border: 0;
  padding: 15px 58px 15px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  color: #3d4a60;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.media-folder-open > span {
  font-size: 23px;
}

.media-folder-open > strong {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-folder-edit {
  position: absolute;
  top: 13px;
  right: 14px;
}

.media-file-list {
  overflow: hidden;
  border: 1px solid #e4e9f2;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 18px rgba(48, 62, 92, 0.035);
}

.media-file-row {
  min-height: 68px;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid #edf0f5;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.media-file-row:last-child {
  border-bottom: 0;
}

.media-file-icon {
  width: 40px;
  height: 40px;
  border: 1px solid #e7ebf2;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #fafbfe;
  font-size: 19px;
}

.media-file-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.media-file-copy strong {
  overflow: hidden;
  color: #3b485e;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-file-copy span {
  color: #98a1af;
  font-size: 8px;
}

.media-file-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.media-file-actions a {
  text-decoration: none;
}

.media-upload-status {
  max-width: 1320px;
  margin: 0 auto 18px;
  border: 1px solid #dfe6f3;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(48, 62, 92, 0.035);
}

.media-upload-status > div:first-child {
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #7d8797;
  font-size: 9px;
}

.media-upload-status strong {
  color: #6376d7;
  font-size: 9px;
}

.media-upload-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef1f6;
}

.media-upload-track span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      #5f86ef 0%,
      #7967e6 100%
    );
  transition: width 100ms linear;
}

.media-folder-empty {
  min-height: 300px;
}

.media-modal {
  width: min(520px, calc(100vw - 40px));
}

.media-modal-form {
  padding: 22px 24px 0;
  display: grid;
  gap: 16px;
}

.media-modal-form > .app-modal-footer {
  margin: 4px -24px 0;
}

.media-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1100px) {
  .media-container-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-folder-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .settings-page {
    overflow: visible;
  }

  .account-usage-bar {
    grid-template-columns: 1fr;
    padding: 10px 12px;
  }

  .settings-page > .settings {
    min-height: 0;
  }

  .media-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .media-container-grid,
  .media-folder-grid {
    grid-template-columns: 1fr;
  }

  .media-file-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .media-file-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}


/* Kundbox 0.5.6.0 — Media-preview + zoomsäker Kundtjänst */
.account-usage-bar {
  min-height: 108px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.media-detail-workspace {
  padding-top: 38px;
}

.media-breadcrumbs {
  gap: 7px;
}

.media-breadcrumbs .media-breadcrumb-button {
  min-height: 29px;
  border: 1px solid #dfe6f2;
  border-radius: 9px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #65738b;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 10px rgba(49, 63, 94, 0.035);
  font: inherit;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.media-breadcrumbs .media-breadcrumb-button:hover {
  border-color: #cbd6f2;
  color: #536bd5;
  background: #f7f9ff;
  transform: translateY(-1px);
}

.media-breadcrumbs .media-breadcrumb-button.current {
  border-color: transparent;
  color: #fff;
  background:
    linear-gradient(
      135deg,
      #5d83ef 0%,
      #7566e7 100%
    );
  box-shadow: 0 6px 15px rgba(83, 105, 218, 0.16);
  pointer-events: none;
}

.media-breadcrumb-separator {
  color: #b2bac7;
  font-size: 11px;
  line-height: 1;
}

.media-file-row {
  min-height: 82px;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 13px;
}

.media-file-thumbnail {
  position: relative;
  width: 58px;
  height: 58px;
  border: 1px solid #e4e9f2;
  border-radius: 13px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(
      145deg,
      #fafbfe 0%,
      #f3f6fb 100%
    );
}

.media-file-thumbnail-image,
.media-file-thumbnail-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #eef2f7;
}

.media-file-thumbnail-video {
  pointer-events: none;
}

.media-file-thumbnail-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  color: #fff;
  background: rgba(34, 47, 72, 0.72);
  box-shadow: 0 3px 9px rgba(31, 43, 68, 0.2);
  font-size: 8px;
  line-height: 1;
  padding-left: 1px;
  pointer-events: none;
}

.media-file-thumbnail-icon {
  font-size: 24px;
}

.media-preview-button {
  color: #5b70d7 !important;
  background: #f0f4ff !important;
}

.media-preview-backdrop {
  padding: 20px;
}

.media-preview-modal {
  width: min(1120px, calc(100vw - 40px));
  height: min(
    820px,
    calc(var(--kundbox-ui-viewport-height, 100vh) - 40px)
  );
  max-height: calc(
    var(--kundbox-ui-viewport-height, 100vh) - 40px
  );
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.media-preview-header {
  position: relative;
}

.media-preview-stage {
  min-width: 0;
  min-height: 0;
  padding: 20px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(220, 229, 255, 0.26),
      transparent 42%
    ),
    #f4f6fa;
}

.media-preview-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(39, 52, 78, 0.14);
}

.media-preview-video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  background: #111;
  box-shadow: 0 12px 36px rgba(28, 37, 56, 0.18);
}

.media-preview-audio-wrap {
  width: min(620px, 100%);
  padding: 38px 30px;
  border: 1px solid #e2e8f2;
  border-radius: 18px;
  display: grid;
  place-items: center;
  gap: 18px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(42, 58, 90, 0.07);
}

.media-preview-audio-wrap > span {
  font-size: 46px;
}

.media-preview-audio {
  width: 100%;
}

.media-preview-pdf {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 10px;
  background: #fff;
}

.media-preview-footer a {
  text-decoration: none;
}

@media (min-width: 901px) {
  .app-shell.customer-service-viewport-shell {
    height: var(
      --kundbox-ui-viewport-height,
      100vh
    );
    min-height: 0;
    overflow: hidden;
  }

  .app-shell.customer-service-viewport-shell
    .support-customer-layout {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .app-shell.customer-service-viewport-shell
    .customer-service-center,
  .app-shell.customer-service-viewport-shell
    .thread,
  .app-shell.customer-service-viewport-shell
    .messages {
    min-height: 0;
  }

  .app-shell.customer-service-viewport-shell
    .thread {
    height: 100%;
    overflow: hidden;
  }

  .app-shell.customer-service-viewport-shell
    .messages {
    overflow-y: auto;
  }

  .app-shell.customer-service-viewport-shell
    .mail-reply-composer,
  .app-shell.customer-service-viewport-shell
    .blocked-reply-notice {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
  }

  .app-shell.customer-service-viewport-shell
    .mail-reply-composer {
    max-height: 300px;
    overflow-y: auto;
  }
}

@media (max-width: 800px) {
  .account-usage-bar {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .media-detail-workspace {
    padding-top: 24px;
  }

  .media-file-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .media-preview-backdrop {
    padding: 10px;
  }

  .media-preview-modal {
    width: calc(100vw - 20px);
    height: calc(
      var(--kundbox-ui-viewport-height, 100vh) - 20px
    );
    max-height: calc(
      var(--kundbox-ui-viewport-height, 100vh) - 20px
    );
  }

  .media-preview-stage {
    padding: 10px;
  }
}


/* Kundbox 0.5.7.0 — butikskontext, behörigheter och kompakt mediavy */
.store-context-button.active,
.store-context-button.active:hover,
.store-context-button.active:focus-visible {
  border-color: rgba(91, 113, 231, 0.2);
  color: #fff !important;
  background:
    linear-gradient(
      135deg,
      #5a7df0 0%,
      #7563e7 100%
    );
  box-shadow:
    0 6px 18px rgba(83, 105, 218, 0.18);
}

.store-context-button.active .badge {
  color: #596dde;
  background: #fff;
}

.media-preview-backdrop {
  padding: 24px;
}

.media-preview-modal {
  width: min(980px, calc(100vw - 48px));
  height: min(
    700px,
    calc(var(--kundbox-ui-viewport-height, 100vh) - 48px)
  );
  max-height: calc(
    var(--kundbox-ui-viewport-height, 100vh) - 48px
  );
}

.media-preview-stage {
  position: relative;
  min-height: 0;
  box-sizing: border-box;
}

.media-preview-stage > .media-preview-video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.team-owner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #dfe4f4;
  border-radius: 10px;
  padding: 0 13px;
  color: #5868cf;
  background: #f3f5ff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.team-invite-form {
  grid-template-columns:
    minmax(240px, 1fr)
    180px
    auto
    auto;
}

.team-invite-permissions {
  min-width: 145px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.team-invite-permissions span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #5868d2;
  background: #eef1ff;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.team-member-actions .team-permissions-button {
  min-width: 112px;
}

.team-permissions-backdrop {
  padding: 22px;
}

.team-permissions-modal {
  width: min(640px, calc(100vw - 44px));
  max-height: calc(
    var(--kundbox-ui-viewport-height, 100vh) - 44px
  );
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.team-permissions-form {
  min-height: 0;
  padding: 22px 24px 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 18px;
}

.team-permissions-form > .app-modal-footer {
  margin: 4px -24px 0;
}

.team-permission-store-access {
  min-height: 76px;
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  background: #fbfcff;
  cursor: pointer;
}

.team-permission-store-access input,
.team-permission-feature input,
.team-chat-member-option input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: #6279ea;
}

.team-permission-store-access span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.team-permission-store-access strong {
  color: #344158;
  font-size: 11px;
}

.team-permission-store-access small {
  color: #8b96a8;
  font-size: 9px;
  line-height: 1.45;
}

.team-permission-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  transition: opacity 140ms ease;
}

.team-permission-feature-grid.disabled {
  opacity: 0.48;
}

.team-permission-feature {
  min-height: 48px;
  border: 1px solid #e1e6ef;
  border-radius: 11px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #435068;
  background: #fff;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.team-permission-feature:has(input:checked) {
  border-color: #cbd5ff;
  color: #566bd8;
  background: #f5f7ff;
}

.team-permission-feature:has(input:disabled) {
  cursor: not-allowed;
}

.team-permissions-empty {
  padding: 36px 24px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.team-chat-member-picker {
  min-width: 0;
  border: 1px solid #e1e6ef;
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.team-chat-member-picker legend {
  padding: 0 7px;
  color: #637088;
  font-size: 11px;
  font-weight: 750;
}

.team-chat-member-picker > p {
  margin: 0;
  color: #8b96a8;
  font-size: 9px;
  line-height: 1.45;
}

.team-chat-member-checklist {
  max-height: 225px;
  overflow-y: auto;
  display: grid;
  gap: 7px;
}

.team-chat-member-option {
  min-height: 54px;
  border: 1px solid #e6eaf1;
  border-radius: 11px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: auto 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  background: #fff;
  cursor: pointer;
}

.team-chat-member-option:has(input:checked) {
  border-color: #ccd6ff;
  background: #f7f8ff;
}

.team-chat-member-option:has(input:disabled) {
  cursor: default;
}

.team-chat-member-option .avatar,
.team-chat-member-option .team-member-avatar {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}

.team-chat-member-option > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.team-chat-member-option strong {
  overflow: hidden;
  color: #39465c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-chat-member-option small {
  color: #9099a8;
  font-size: 8px;
}

@media (max-width: 1100px) {
  .team-invite-form {
    grid-template-columns: minmax(220px, 1fr) 160px;
  }
}

@media (max-width: 800px) {
  .media-preview-backdrop {
    padding: 10px;
  }

  .media-preview-modal {
    width: calc(100vw - 20px);
    height: min(
      640px,
      calc(var(--kundbox-ui-viewport-height, 100vh) - 20px)
    );
    max-height: calc(
      var(--kundbox-ui-viewport-height, 100vh) - 20px
    );
  }

  .team-permissions-backdrop {
    padding: 10px;
  }

  .team-permissions-modal {
    width: calc(100vw - 20px);
    max-height: calc(
      var(--kundbox-ui-viewport-height, 100vh) - 20px
    );
  }

  .team-permission-feature-grid {
    grid-template-columns: 1fr;
  }

  .team-member-row {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .team-member-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}


.team-role-badge.owner {
  min-height: 38px;
  border: 1px solid #dfe4f4;
  border-radius: 10px;
  padding: 0 13px;
  color: #5868cf;
  background: #f3f5ff;
  white-space: nowrap;
}

.team-member-actions [data-team-permissions] {
  min-width: 112px;
}

.media-preview-stage > .media-preview-video {
  display: block;
}

/* Kundbox 0.5.7.2 — symmetrisk kontobar + vit bakgrund för transparenta avatarer */
.account-usage-bar {
  min-height: auto;
  padding: 18px clamp(18px, 3vw, 42px);
  align-items: stretch;
}

.account-usage-item {
  padding: 10px 14px;
}

.user-avatar img {
  background: #fff;
}

@media (max-width: 800px) {
  .account-usage-bar {
    padding: 14px 12px;
  }
}

/* 0.5.7.3: account usage bar top spacing */
.account-usage-bar {
  margin-top: 20px;
}
