:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --line: #dde3ea;
  --soft: #f6f7fb;
  --surface: #fff;
  --teams: #6264a7;
  --teams-dark: #1f2d4d;
  --green: #008069;
  --line-green: #06c755;
  --danger: #e11d2e;
  --orange: #d88100;
  --purple: #8256c5;
  --blue: #1976d2;
  --shadow: 0 10px 30px rgba(20, 30, 55, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #eef2f6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.platform-frame {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(760px, 1fr);
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.hidden-switcher[hidden] {
  display: none;
}

.chat-client {
  min-width: 0;
  display: grid;
  grid-template-columns: 76px 260px minmax(420px, 1fr);
  height: 100vh;
  background: #fff;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.app-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 8px;
  color: #fff;
  background: var(--rail-bg, #223154);
}

.rail-button {
  width: 60px;
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 0;
  color: inherit;
  background: transparent;
  border-radius: 8px;
}

.rail-button.team-active,
.rail-button.active {
  background: var(--rail-active, rgba(98, 100, 167, .95));
}

.rail-button em {
  font-style: normal;
  font-size: 11px;
}

.rail-button.compact {
  min-height: 48px;
}

.rail-svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail-spacer {
  flex: 1;
}

.rail-avatar,
.profile-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #17324c;
  background: #cfe8ff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 13px;
}

.line-compose-dot {
  display: none;
}

.team-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--side-bg, #f8f8fc);
  border-right: 1px solid var(--line);
}

.sidebar-title {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.sidebar-title h1 {
  margin: 0;
  font-size: 18px;
}

.sidebar-title small {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
}

.plain-icon {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #354052;
}

.search-wrap {
  display: none;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.search-wrap input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.teams-list,
.wa-chat-list,
.line-list {
  min-height: 0;
  overflow-y: auto;
}

.teams-list {
  display: block;
  padding: 14px 10px;
}

.team-root {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 6px 10px 16px;
}

.team-badge {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--teams);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
}

.team-root button {
  border: 0;
  background: transparent;
}

.channel {
  width: 100%;
  padding: 12px 18px 12px 50px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #273142;
  text-align: left;
  font-weight: 700;
}

.channel.active {
  background: #e6e8ef;
}

.wa-chat-list,
.line-list {
  display: none;
}

.conversation {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--chat-bg, #fff);
}

.conversation-header {
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title actions" "tabs tabs";
  align-items: center;
  padding: 16px 24px 0;
  border-bottom: 1px solid var(--line);
  background: var(--chat-header, #fff);
}

.conversation-title {
  grid-area: title;
  display: flex;
  align-items: center;
  gap: 12px;
}

.conversation-avatar {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 50%;
  font-weight: 900;
}

.conversation-title h2 {
  margin: 0;
  font-size: 20px;
}

.conversation-title h2 span {
  margin-left: 6px;
}

.conversation-title p {
  display: none;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.teams-tabs {
  grid-area: tabs;
  display: flex;
  gap: 22px;
  align-self: end;
}

.teams-tabs button {
  padding: 0 0 10px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #3c4458;
  font-weight: 650;
}

.teams-tabs button.active {
  color: var(--teams);
  border-bottom-color: var(--teams);
}

.conversation-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 16px;
}

.conversation-actions button {
  border: 0;
  background: transparent;
  color: #1d2635;
  font-weight: 700;
}

.chat-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 24px 18px;
}

.date-chip {
  display: none;
  width: fit-content;
  margin: 0 auto 18px;
  padding: 5px 14px;
  color: #596274;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.chat-message {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  max-width: 700px;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: 12px;
}

.msg-avatar.nurse { color: #a91a47; background: #f9cde0; }
.msg-avatar.doctor { color: #184177; background: #d9e8ff; }
.msg-avatar.iv { color: #fff; background: var(--teams); }

.msg-body header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.msg-body header strong {
  font-size: 14px;
}

.msg-body time {
  color: var(--muted);
  font-size: 12px;
}

.msg-body p {
  margin: 0;
  color: #253044;
  line-height: 1.45;
  font-size: 14px;
}

.platform-card {
  width: min(100%, 500px);
  margin-top: 6px;
  padding: 16px;
  background: #fff;
  border: 1px solid #cdd4df;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(31, 42, 68, .03);
}

.card-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-alert span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--danger);
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 900;
}

.platform-card.success .card-alert span {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.card-alert strong {
  font-size: 16px;
}

.card-columns {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 22px;
}

.card-columns dl:first-child,
.task-grid dl:not(:last-child) {
  border-right: 1px solid var(--line);
}

dl {
  margin: 0;
}

dl div {
  margin-bottom: 12px;
}

dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 0;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

dd.danger {
  color: var(--danger);
  font-size: 15px;
}

.card-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.platform-card.success .card-buttons {
  grid-template-columns: 120px 120px;
}

.card-buttons button {
  min-height: 34px;
  padding: 0 12px;
  color: #2236a8;
  background: #fff;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  font-weight: 750;
}

.card-buttons .danger-fill {
  color: #fff;
  background: linear-gradient(#ef3338, #dc252c);
  border-color: #dc252c;
}

.card-buttons .success-fill {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.task-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr .8fr;
  gap: 16px;
}

.status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 750;
}

.status.pending,
.action-row b {
  color: #a76b00;
  background: #ffe4a8;
}

.composer {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr 44px;
  gap: 12px;
  align-items: center;
  padding: 14px 24px;
  background: var(--composer-bg, #fff);
  border-top: 1px solid var(--line);
}

.composer-icons {
  display: flex;
  gap: 12px;
  color: #526176;
}

.composer-icons span {
  font-size: 15px;
}

.composer input {
  height: 46px;
  min-width: 0;
  padding: 0 18px;
  border: 1px solid #cbd3df;
  border-radius: var(--input-radius, 7px);
  outline: none;
}

.composer button {
  width: 40px;
  height: 40px;
  border: 0;
  color: #5b6475;
  background: transparent;
  font-size: 22px;
}

.ivflow-webapp {
  min-height: 0;
  overflow-y: auto;
  padding: 22px 18px 24px;
  background: #fff;
}

.case-window-page {
  min-height: 100vh;
  overflow: auto;
  background: #fff;
}

.standalone-case {
  width: min(100%, 980px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: visible;
  padding: 30px 34px 40px;
}

.task-window-page {
  min-height: 100vh;
  overflow: auto;
  background: #f4f7f9;
}

.task-detail {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.task-hero {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.task-hero p {
  margin: 0 0 5px;
  color: #00756d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.task-hero h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.task-hero span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.task-status {
  padding: 8px 13px;
  color: #a76b00;
  background: #ffe4a8;
  border-radius: 8px;
  font-size: 13px;
}

.task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  margin-top: 18px;
}

.task-primary,
.task-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.task-primary {
  padding: 22px;
}

.task-section {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.task-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.task-section h2,
.task-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.task-script {
  margin: 0;
  color: #273142;
  font-size: 18px;
  line-height: 1.55;
}

.script-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #eefaf5;
  border: 1px solid #c7eadc;
  border-radius: 10px;
}

.script-card p {
  margin: 0;
  color: #123f37;
  line-height: 1.55;
}

.task-context-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.task-section textarea {
  width: 100%;
  min-height: 118px;
  padding: 14px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  font: inherit;
}

.task-section textarea:focus {
  border-color: #00756d;
  box-shadow: 0 0 0 3px rgba(0, 117, 109, .12);
}

.task-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-card {
  padding: 16px;
}

.task-card dl {
  display: grid;
  gap: 10px;
}

.task-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.task-card dl div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.task-card dt {
  color: var(--muted);
}

.task-card dd {
  text-align: right;
}

.source-message {
  margin: 0 0 10px;
  color: #273142;
  line-height: 1.5;
}

.task-card small {
  color: var(--muted);
}

.task-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.task-timeline li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
}

.task-timeline strong {
  color: #00756d;
}

.task-timeline span {
  color: #4d596c;
}

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

.task-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #00756d;
  font-weight: 850;
}

.task-actions .primary {
  color: #fff;
  background: #00756d;
  border-color: #00756d;
}

.case-header {
  display: grid;
  grid-template-columns: 46px 1fr auto 32px;
  align-items: center;
  gap: 12px;
}

.case-logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #00756d;
  border-radius: 50%;
  font-weight: 900;
}

.case-header h2 {
  margin: 0;
  font-size: 19px;
}

.case-header h2 small {
  color: #4e596b;
  font-size: 13px;
}

.case-header p {
  margin: 4px 0 0;
  color: #233044;
  font-size: 13px;
}

.active-cycle {
  padding: 8px 12px;
  color: #007a59;
  background: #dcf5ea;
  border-radius: 7px;
  font-weight: 800;
  font-size: 12px;
}

.case-header button {
  border: 0;
  background: transparent;
  color: #263044;
  font-size: 20px;
}

.case-tabs {
  display: flex;
  gap: 32px;
  margin: 26px -18px 18px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.case-tabs button {
  padding: 0 0 13px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #465166;
  font-weight: 650;
}

.case-tabs button.active {
  color: #00756d;
  border-bottom-color: #00756d;
}

.case-section {
  margin-bottom: 22px;
}

.case-section h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.emr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.emr-grid div {
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.emr-grid span {
  display: block;
  margin-bottom: 10px;
  color: #5d687a;
  font-size: 12px;
}

.emr-grid strong {
  display: block;
  line-height: 1.45;
  font-size: 14px;
}

.emr-grid b {
  color: #008069;
  font-size: 18px;
}

.emr-grid small {
  display: block;
  margin-top: 9px;
  color: #667085;
  font-size: 11px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-heading h3 {
  margin: 0;
}

.section-heading small {
  padding: 2px 7px;
  background: #eef1f5;
  border-radius: 999px;
  color: #596274;
}

.section-heading a {
  color: #00756d;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.actions-table,
.timeline-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.action-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px 1fr 92px 70px 48px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-left: 4px solid var(--orange);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

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

.action-row.blue { border-left-color: var(--blue); }
.action-row.purple { border-left-color: var(--purple); }

.action-row p {
  margin: 0;
  font-weight: 700;
}

.action-row small {
  color: #4d596c;
  font-weight: 500;
}

.action-row em,
.action-row time {
  color: #4d596c;
  font-style: normal;
}

.action-row b {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11px;
}

.action-row b.done {
  color: #007a59;
  background: #dff5e9;
}

.timeline-table div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.timeline-table div:last-child {
  border-bottom: 0;
}

.timeline-table time {
  color: #475266;
}

.timeline-table p {
  margin: 0;
  color: #475266;
}

.hidden-switcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.hidden-switcher button {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  font-weight: 800;
}

.platform-frame[data-platform="whatsapp"] {
  --rail-bg: #fff;
  --rail-active: transparent;
  --side-bg: #fff;
  --chat-bg: #efe9df;
  --chat-header: #f0f2f5;
  --composer-bg: #f0f2f5;
  --input-radius: 9px;
  grid-template-columns: minmax(760px, 1fr);
}

.platform-frame[data-platform="whatsapp"] .chat-client {
  grid-template-columns: 356px minmax(420px, 1fr);
}

.platform-frame[data-platform="whatsapp"] .app-rail,
.platform-frame[data-platform="whatsapp"] .teams-list,
.platform-frame[data-platform="whatsapp"] .teams-tabs {
  display: none;
}

.platform-frame[data-platform="whatsapp"] .team-sidebar {
  display: flex;
}

.platform-frame[data-platform="whatsapp"] .sidebar-title {
  min-height: 74px;
  background: #f0f2f5;
}

.platform-frame[data-platform="whatsapp"] .sidebar-title h1,
.platform-frame[data-platform="whatsapp"] .sidebar-title small {
  display: none;
}

.platform-frame[data-platform="whatsapp"] .profile-avatar {
  color: #fff;
  background: #0b6b5f;
}

.platform-frame[data-platform="whatsapp"] .search-wrap,
.platform-frame[data-platform="whatsapp"] .wa-chat-list {
  display: block;
}

.wa-row,
.line-row {
  position: relative;
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid #eef0f2;
  background: #fff;
  color: inherit;
  text-align: left;
}

.wa-row.active {
  border-left: 3px solid #00a884;
  background: #f0f7f4;
}

.wa-row span,
.line-row span {
  min-width: 0;
}

.wa-row strong,
.line-row strong {
  display: block;
  font-size: 15px;
}

.wa-row small,
.line-row small {
  display: block;
  margin-top: 5px;
  color: #344054;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.wa-row em,
.line-row em {
  align-self: start;
  margin-top: 5px;
  color: #586476;
  font-style: normal;
  font-size: 11px;
}

.wa-row b,
.line-row b {
  position: absolute;
  right: 18px;
  bottom: 16px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #00a884;
  border-radius: 999px;
  font-size: 11px;
}

.wa-avatar,
.line-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
}

.wa-avatar.group { background: #17735f; }
.wa-avatar.nurse { background: #d95665; }
.wa-avatar.lab { background: #8b68b9; }
.wa-avatar.ops { background: #f5a000; }

.platform-frame[data-platform="whatsapp"] .conversation-header {
  min-height: 74px;
  display: flex;
  padding: 0 22px;
}

.platform-frame[data-platform="whatsapp"] .conversation-avatar,
.platform-frame[data-platform="line"] .conversation-avatar {
  display: grid;
}

.platform-frame[data-platform="whatsapp"] .conversation-title h2 span,
.platform-frame[data-platform="line"] .conversation-title h2 span {
  display: none;
}

.platform-frame[data-platform="whatsapp"] .conversation-title p,
.platform-frame[data-platform="line"] .conversation-title p {
  display: block;
}

.platform-frame[data-platform="whatsapp"] .chat-scroll {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-color: #efe9df;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(0, 0, 0, .025) 1px, transparent 1px),
    radial-gradient(circle at 50px 50px, rgba(0, 0, 0, .025) 1px, transparent 1px);
  background-size: 70px 70px;
}

.platform-frame[data-platform="whatsapp"] .chat-message {
  grid-template-columns: 34px minmax(0, 390px);
}

.platform-frame[data-platform="whatsapp"] .msg-body {
  width: fit-content;
  max-width: 390px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(20, 30, 55, .12);
}

.platform-frame[data-platform="whatsapp"] .bot-message .msg-body {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.platform-frame[data-platform="whatsapp"] .platform-card {
  width: 390px;
  border-color: #dfe4ea;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(20, 30, 55, .12);
}

.platform-frame[data-platform="whatsapp"] .platform-card.critical .card-columns {
  display: block;
}

.platform-frame[data-platform="whatsapp"] .platform-card.critical .card-columns dl:first-child {
  border-right: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.platform-frame[data-platform="whatsapp"] .card-buttons {
  margin: 14px -16px -16px;
  gap: 0;
}

.platform-frame[data-platform="whatsapp"] .card-buttons button {
  border-radius: 0;
  border-right: 0;
  border-bottom: 0;
  color: #008069;
}

.platform-frame[data-platform="whatsapp"] .card-buttons .danger-fill,
.platform-frame[data-platform="whatsapp"] .card-buttons .success-fill {
  color: #008069;
  background: #fff;
  border-color: #cbd3df;
}

.platform-frame[data-platform="whatsapp"] .composer {
  grid-template-columns: 70px 1fr 38px;
  min-height: 72px;
}

.platform-frame[data-platform="line"] {
  --rail-bg: #132433;
  --rail-active: transparent;
  --side-bg: #fff;
  --chat-bg: #fff;
  --chat-header: #fff;
  --composer-bg: #fff;
  --input-radius: 7px;
}

.platform-frame[data-platform="line"] .chat-client {
  grid-template-columns: 72px 330px minmax(420px, 1fr);
}

.platform-frame[data-platform="line"] .rail-button {
  min-height: 58px;
}

.platform-frame[data-platform="line"] .rail-button em {
  display: none;
}

.platform-frame[data-platform="line"] .rail-button.active,
.platform-frame[data-platform="line"] .rail-button.team-active {
  background: transparent;
}

.platform-frame[data-platform="line"] .line-compose-dot {
  display: block;
  width: 32px;
  height: 28px;
  margin: 8px 0 18px;
  background: var(--line-green);
  border-radius: 17px 17px 17px 4px;
  box-shadow: 9px -8px 0 -7px #ff5660;
}

.platform-frame[data-platform="line"] .teams-list,
.platform-frame[data-platform="line"] .wa-chat-list,
.platform-frame[data-platform="line"] .teams-tabs {
  display: none;
}

.platform-frame[data-platform="line"] .search-wrap,
.platform-frame[data-platform="line"] .line-list {
  display: block;
}

.platform-frame[data-platform="line"] .sidebar-title {
  display: none;
}

.line-tabs {
  display: flex;
  gap: 22px;
  padding: 4px 24px 14px;
}

.line-tabs button {
  padding: 0 0 10px;
  border: 0;
  border-bottom: 4px solid transparent;
  background: transparent;
  color: #425066;
  font-weight: 650;
}

.line-tabs button.active {
  color: #009f46;
  border-bottom-color: var(--line-green);
}

.line-row {
  min-height: 78px;
  padding: 12px 16px;
  border-bottom: 0;
}

.line-row.active {
  background: #e7f7ed;
}

.line-avatar.iv { background: #00756d; }
.line-avatar.ns { color: #e24d36; background: #ffe0dc; }
.line-avatar.lu { background: #8b62d6; }
.line-avatar.po { color: #d54f6c; background: #ffe1e8; }
.line-avatar.ed { color: #ae7620; background: #fff0cc; }

.platform-frame[data-platform="line"] .conversation-header {
  min-height: 78px;
  display: flex;
  padding: 0 24px;
}

.platform-frame[data-platform="line"] .chat-scroll {
  padding: 16px 24px 18px;
}

.platform-frame[data-platform="line"] .date-chip {
  display: block;
}

.platform-frame[data-platform="line"] .chat-message {
  grid-template-columns: 44px minmax(0, 420px);
  max-width: 580px;
}

.platform-frame[data-platform="line"] .msg-body {
  width: fit-content;
  max-width: 420px;
}

.platform-frame[data-platform="line"] .user-message .msg-body > p {
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.platform-frame[data-platform="line"] .bot-message .msg-body {
  padding: 0;
}

.platform-frame[data-platform="line"] .platform-card {
  width: 390px;
  border-radius: 10px;
}

.platform-frame[data-platform="line"] .card-buttons {
  grid-template-columns: repeat(3, 1fr);
}

.platform-frame[data-platform="line"] .card-buttons button {
  color: #00756d;
}

.platform-frame[data-platform="line"] .card-buttons .danger-fill,
.platform-frame[data-platform="line"] .card-buttons .success-fill {
  color: #fff;
  background: linear-gradient(#00b86b, #009e5a);
  border-color: #009e5a;
}

@media (max-width: 1220px) {
  .platform-frame { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .chat-client,
  .platform-frame[data-platform="line"] .chat-client,
  .platform-frame[data-platform="whatsapp"] .chat-client {
    grid-template-columns: 1fr;
  }

  .app-rail,
  .team-sidebar {
    display: none !important;
  }

  .conversation-header {
    padding-inline: 16px;
  }

  .chat-scroll {
    padding-inline: 14px;
  }
}
