:root {
  --lime: #00b900;
  --lime-dark: #078a16;
  --ink: #1c2733;
  --muted: #7d8a9a;
  --line: #dfe5eb;
  --panel: #ffffff;
  --soft: #f5f7fa;
  --blue: #3b6ea8;
  --green-bubble: #bff1bd;
  --gray-bubble: #d9e3f7;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #eef2f5;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 56px 1fr;
  min-height: 100vh;
}

.rail {
  background: #f8fafc;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 14px 8px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  background: var(--lime);
}

.rail-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #405064;
  font-size: 20px;
}

.rail-btn.active,
.rail-btn:hover {
  color: var(--lime-dark);
  background: #e8f9ea;
}

.workspace {
  min-width: 0;
  background: var(--panel);
}

.view {
  display: none;
}

.active-view {
  display: grid;
}

.topbar {
  height: 56px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 0 16px;
}

.product strong {
  font-size: 24px;
  letter-spacing: 0;
}

.product span {
  display: inline-block;
  max-width: 96px;
  margin-left: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.05;
  vertical-align: middle;
}

.account-switch,
.operator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-avatar,
.operator-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: #26384c;
  font-size: 11px;
}

.operator-dot {
  background: #b92424;
}

.badge {
  border-radius: 3px;
  padding: 3px 7px;
  font-size: 12px;
  color: white;
}

.paid {
  background: #5678dc;
}

.help-btn {
  border: 0;
  background: transparent;
  color: #536172;
}

.logout-btn {
  border: 1px solid #cfd8e3;
  border-radius: 3px;
  background: white;
  color: #304053;
  padding: 6px 10px;
}

.logout-btn:hover {
  border-color: #ef9a9a;
  color: #b42318;
  background: #fff5f5;
}

.content-grid {
  height: calc(100vh - 56px);
  grid-template-columns: 280px minmax(360px, 1fr) 312px;
}

.home-page {
  height: calc(100vh - 56px);
  grid-template-rows: auto auto 1fr;
  gap: 18px;
  overflow: auto;
  background: #f6f8fb;
  padding: 22px;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-large {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: #26384c;
  font-size: 24px;
  font-weight: 800;
}

.home-header h1 {
  margin: 0;
  font-size: 26px;
}

.home-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.home-actions {
  display: flex;
  gap: 10px;
}

.secondary-btn {
  border: 1px solid #b9c4d1;
  border-radius: 3px;
  padding: 10px 18px;
  color: #304053;
  background: white;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.metric-card,
.home-panel {
  border: 1px solid var(--line);
  background: white;
}

.metric-card {
  display: grid;
  gap: 6px;
  padding: 18px;
}

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

.metric-card strong {
  font-size: 30px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 18px;
}

.profile-room-section {
  border: 1px solid var(--line);
  background: white;
  padding: 18px;
}

.profile-room-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.profile-room-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  background: white;
  text-align: left;
  padding: 14px;
}

.profile-room-card:hover {
  border-color: var(--lime);
  background: #f0fbf2;
}

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

.profile-room-card span,
.profile-room-card small {
  color: var(--muted);
  font-size: 12px;
}

.home-panel {
  min-height: 260px;
  padding: 18px;
}

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

.panel-heading h2 {
  margin: 0;
  font-size: 17px;
}

.panel-heading button {
  border: 0;
  background: transparent;
  color: var(--lime-dark);
}

.home-list {
  display: grid;
  gap: 10px;
}

.home-list-item {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  padding: 12px;
}

.home-list-item strong {
  font-size: 14px;
}

.home-list-item span {
  color: var(--muted);
  font-size: 12px;
}

.conversation-list,
.chat-panel,
.detail-panel {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.list-toolbar {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.menu-btn {
  border: 0;
  background: transparent;
  color: #607085;
  font-size: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 10px 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: white;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
}

.contacts {
  overflow: auto;
  height: calc(100% - 112px);
}

.contact {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  border: 0;
  border-left: 4px solid transparent;
  padding: 10px 10px 10px 14px;
  background: transparent;
  text-align: left;
}

.contact.active {
  border-left-color: var(--lime);
  background: #eef2f5;
}

.contact img,
.selected-user img,
.profile-card img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.contact-name {
  display: block;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-preview {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-tag {
  display: inline-block;
  margin-top: 4px;
  border: 1px solid #7da6ff;
  border-radius: 4px;
  padding: 1px 5px;
  color: #3568cf;
  font-size: 11px;
}

.contact-tag.pending {
  border-color: var(--lime);
  color: var(--lime-dark);
  background: #eefaf0;
}

.contact-tag.done {
  border-color: #b9c4d1;
  color: #536172;
  background: #f5f7fa;
}

.contact-time {
  color: #9aa8b8;
  font-size: 12px;
}

.chat-panel {
  display: grid;
  grid-template-rows: 50px 1fr 118px;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
}

.selected-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.selected-user h1 {
  overflow: hidden;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.chat-actions {
  display: flex;
  gap: 8px;
}

.chat-actions button,
.composer-tools button,
.note-actions button {
  border: 1px solid #b9c4d1;
  border-radius: 3px;
  background: white;
  color: #304053;
  padding: 6px 10px;
}

.chat-actions .status-action {
  min-width: 104px;
  border-color: #8fa5db;
  color: #3157b8;
  background: white;
  line-height: 1.25;
}

.chat-actions .status-action.active {
  font-weight: 600;
}

.chat-actions .status-action.pending-active {
  border-color: var(--lime);
  color: var(--lime-dark);
  background: #effaf1;
}

.chat-actions .status-action.done-active {
  border-color: #b9c4d1;
  color: #536172;
  background: #f5f7fa;
}

.message-stream {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 28px;
  background: #fbfcfd;
}

.day-divider {
  align-self: center;
  border-radius: 999px;
  padding: 5px 18px;
  color: white;
  background: #c7c7c7;
  font-size: 12px;
}

.message {
  display: flex;
  gap: 8px;
  max-width: 76%;
}

.message.outgoing {
  align-self: flex-end;
  justify-content: flex-end;
}

.message.incoming {
  align-self: flex-start;
}

.bubble {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.incoming .bubble {
  background: var(--gray-bubble);
}

.outgoing .bubble {
  background: var(--green-bubble);
}

.message-time {
  align-self: end;
  color: var(--muted);
  font-size: 11px;
}

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

.composer input {
  width: 100%;
  height: 46px;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  outline: 0;
  padding: 0 10px;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
}

.composer-tools .send-btn,
.note-actions button[type="submit"] {
  margin-left: auto;
  border-color: var(--lime);
  color: white;
  background: var(--lime);
}

.detail-panel {
  overflow: auto;
  border-right: 0;
}

.profile-card {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 22px 16px;
}

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

.profile-main h2 {
  overflow: hidden;
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-main span {
  color: var(--lime-dark);
  font-size: 13px;
}

.profile-main p {
  margin: 12px 0 0;
  color: #49586a;
  font-size: 13px;
}

.panel-section {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

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

.section-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
}

.section-title button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: var(--lime);
  background: #ecfbef;
}

.note-form {
  display: grid;
  gap: 8px;
}

.note-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  padding: 9px;
  resize: vertical;
}

.notes-list {
  display: grid;
  gap: 10px;
}

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

.note strong {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
}

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

.hidden {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #edf3f0;
  color: var(--ink);
  padding: 24px;
}

.login-screen.hidden,
.auth-form.hidden {
  display: none;
}

.login-card {
  width: min(1040px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border: 1px solid #d4ddd8;
  border-radius: 10px;
  overflow: hidden;
  background: white;
  box-shadow: 0 28px 80px rgba(40, 67, 55, 0.18);
}

.login-brand-panel,
.login-form-panel {
  padding: 52px;
}

.login-brand-panel {
  display: grid;
  align-content: space-between;
  gap: 28px;
  background:
    linear-gradient(rgba(13, 70, 40, 0.82), rgba(13, 70, 40, 0.9)),
    linear-gradient(135deg, #23c65b, #0a6f3d);
  color: white;
}

.login-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #075e2d;
  background: white;
  font-weight: 900;
}

.login-logo-row strong {
  font-size: 22px;
}

.login-brand-panel h1 {
  max-width: 460px;
  margin: 0;
  font-size: 42px;
  line-height: 1.12;
}

.login-brand-panel p {
  max-width: 460px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.login-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.login-proof-grid span {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 6px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
}

.login-form-panel {
  display: grid;
  align-content: center;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: #f7f9fb;
}

.auth-tabs button {
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #536172;
}

.auth-tabs button.active {
  color: white;
  background: var(--lime);
  font-weight: 700;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form h2 {
  margin: 0;
  font-size: 26px;
}

.auth-form p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-form input {
  height: 48px;
  border: 1px solid #cfd8e3;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  outline: 0;
  padding: 0 14px;
}

.auth-form input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px #dff7e4;
}

.auth-form button {
  height: 48px;
  border: 0;
  border-radius: 5px;
  background: var(--lime);
  color: white;
  font-weight: 800;
}

.auth-message {
  min-height: 22px;
  margin-top: 14px;
  color: #536172;
  font-size: 13px;
}

.auth-message.error {
  color: #b42318;
}

.auth-message.success {
  color: var(--lime-dark);
}

.customer-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 70px 1fr;
  background: #252729;
  color: #edf1f5;
}

.customer-app.hidden {
  display: none;
}

.customer-rail {
  display: grid;
  align-content: start;
  gap: 22px;
  border-right: 1px solid #34383d;
  background: #1f2123;
  padding: 12px 14px;
}

.customer-menu,
.customer-avatar,
.customer-rail-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #aeb4ba;
  background: transparent;
}

.customer-avatar,
.customer-rail-btn.active {
  background: #18c75a;
  color: white;
  font-weight: 800;
}

.customer-shell {
  min-width: 0;
}

.customer-auth {
  max-width: 420px;
  margin: 9vh auto;
  padding: 32px;
}

.customer-auth h1 {
  color: #28c755;
  font-size: 42px;
  text-align: center;
}

.customer-auth form {
  display: grid;
  gap: 10px;
}

.customer-auth input,
.customer-auth button {
  height: 48px;
  border: 1px solid #55595e;
  background: #2d2f31;
  color: white;
  padding: 0 14px;
}

.customer-auth button {
  border: 0;
  background: #28c755;
  font-weight: 700;
}

.customer-chat-app {
  height: 100vh;
  display: grid;
  grid-template-columns: 480px 1fr;
}

.customer-chat-app.hidden {
  display: none;
}

.customer-room-list {
  border-right: 1px solid #34383d;
  padding: 16px 14px;
}

.customer-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.customer-tabs strong {
  border-bottom: 3px solid white;
  padding-bottom: 12px;
}

.customer-tabs span {
  color: #8f969e;
}

.customer-search {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 6px;
  background: #4a4d50;
  padding: 0 14px;
}

.customer-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
}

#customerRooms {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.customer-room-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  border: 0;
  background: transparent;
  color: white;
  text-align: left;
  padding: 10px 8px;
}

.customer-room-item.active {
  background: #33373a;
}

.customer-photo {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #18c75a;
  color: white;
  font-weight: 800;
}

.customer-room-item small,
.customer-chat-title span {
  color: #a0a8b0;
}

.customer-chat {
  display: grid;
  grid-template-rows: 114px 1fr 74px;
  min-width: 0;
}

.customer-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #34383d;
  padding: 0 24px;
}

.customer-chat-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.customer-chat-title h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.customer-chat-icons {
  color: #c4c9ce;
  word-spacing: 14px;
}

.customer-messages {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
}

.customer-message {
  max-width: 72%;
  border-radius: 18px;
  padding: 10px 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.customer-message.in {
  align-self: flex-start;
  background: #4b4f53;
}

.customer-message.out {
  align-self: flex-end;
  background: #85e275;
  color: #122019;
}

.customer-message img {
  display: block;
  max-width: 260px;
  max-height: 260px;
  border-radius: 10px;
  object-fit: cover;
}

.customer-composer {
  display: grid;
  grid-template-columns: 46px 1fr 64px;
  gap: 8px;
  border-top: 1px solid #34383d;
  padding: 12px 14px;
}

.customer-composer button,
.customer-composer input {
  border: 0;
  background: transparent;
  color: white;
}

.customer-composer input {
  outline: 0;
}

.rooms-page {
  height: calc(100vh - 56px);
  grid-template-rows: auto 1fr;
  overflow: auto;
  background: #f6f8fb;
}

.rooms-grid {
  display: grid;
  grid-template-columns: 320px minmax(360px, 1fr) 360px;
  gap: 18px;
  padding: 18px;
}

.room-create-panel,
.room-list-panel,
.room-detail-panel {
  border: 1px solid var(--line);
  background: white;
  padding: 18px;
}

.room-create-panel,
.room-detail-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.room-create-panel h2,
.room-list-panel h2,
.room-detail-panel h2 {
  margin: 0;
  font-size: 18px;
}

.room-create-panel label,
.room-detail-panel label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.room-create-panel input,
.room-create-panel textarea,
.invite-row input {
  width: 100%;
  border: 1px solid #cfd8e3;
  outline: 0;
  padding: 10px;
}

.room-list {
  display: grid;
  gap: 10px;
}

.room-card {
  width: 100%;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  background: white;
  text-align: left;
  padding: 12px;
}

.room-card.active {
  border-color: var(--lime);
  background: #f0fbf2;
}

.room-card small,
.room-detail-panel p,
.room-detail-panel small {
  color: var(--muted);
}

.invite-row {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 8px;
}

.invite-row button,
#copyActiveInviteBtn {
  border: 1px solid #b9c4d1;
  border-radius: 3px;
  background: white;
  color: #304053;
}

.broadcast-page {
  height: calc(100vh - 56px);
  grid-template-rows: auto 1fr;
  overflow: auto;
  background: #f6f8fb;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: white;
  padding: 22px 28px;
}

.page-title h1,
.placeholder-page h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
}

.page-title p,
.placeholder-page p {
  margin: 5px 0 0;
  color: var(--muted);
}

.count-pill {
  border: 1px solid #cfe8d4;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--lime-dark);
  background: #effaf1;
  font-size: 13px;
  white-space: nowrap;
}

.broadcast-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 360px;
  gap: 18px;
  padding: 18px;
}

.broadcast-composer,
.broadcast-preview,
.broadcast-history {
  border: 1px solid var(--line);
  background: white;
}

.broadcast-composer {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px;
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-row label {
  font-weight: 600;
}

.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  outline: 0;
  padding: 10px;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px #dff7e4;
}

.image-input-grid {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 10px;
}

.recipient-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #536172;
  font-size: 13px;
}

.recipient-tools label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.recipient-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  padding: 10px;
  background: #fbfcfd;
}

.recipient {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  background: white;
  padding: 8px;
}

.recipient img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.recipient span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.primary-btn {
  justify-self: end;
  border: 1px solid var(--lime);
  border-radius: 3px;
  padding: 10px 18px;
  color: white;
  background: var(--lime);
}

.broadcast-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.broadcast-preview,
.broadcast-history {
  padding: 18px;
}

.broadcast-preview h2,
.broadcast-history h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.phone-preview {
  border: 1px solid #d3dae4;
  background: #eef2f6;
  padding: 18px;
}

.preview-brand {
  display: inline-block;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 4px 10px;
  color: white;
  background: var(--lime);
  font-size: 12px;
  font-weight: 700;
}

.phone-preview strong {
  display: block;
  margin-bottom: 8px;
}

.preview-image-link,
.message-image-link {
  display: block;
  margin: 10px 0;
}

.preview-image-link img,
.message-image-link img {
  display: block;
  width: 100%;
  max-height: 220px;
  border-radius: 6px;
  object-fit: cover;
}

.message-image-link img {
  max-width: 260px;
  background: #edf1f5;
}

.message-image-link:hover img {
  outline: 2px solid var(--lime);
}

.origin-card {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
  border-left: 3px solid var(--lime);
  background: rgba(255, 255, 255, 0.55);
  padding: 8px 10px;
}

.origin-card span,
.origin-card small {
  color: #5f6d7c;
  font-size: 11px;
}

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

.phone-preview p {
  margin: 0;
  color: #405064;
  line-height: 1.45;
  white-space: pre-wrap;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  border: 1px solid var(--line);
  padding: 12px;
}

.history-item strong {
  display: block;
  margin-bottom: 5px;
}

.history-item small {
  color: var(--muted);
}

.history-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.history-stats span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: #405064;
  background: #f7f9fb;
  font-size: 12px;
}

.simulate-reply-btn {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 3px;
  background: white;
  color: #304053;
  padding: 7px 10px;
}

.simulate-reply-btn:hover {
  border-color: var(--lime);
  color: var(--lime-dark);
}

.placeholder-page {
  height: calc(100vh - 56px);
  align-content: center;
  justify-items: center;
  background: #f6f8fb;
  text-align: center;
}

@media (max-width: 980px) {
  .content-grid {
    grid-template-columns: 240px 1fr;
  }

  .detail-panel {
    display: none;
  }

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

  .metric-grid,
  .home-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .rail,
  .operator,
  .product span {
    display: none;
  }

  .topbar {
    grid-template-columns: auto 1fr;
  }

  .content-grid {
    height: calc(100vh - 56px);
    grid-template-columns: 96px 1fr;
  }

  .broadcast-grid,
  .page-title {
    padding: 12px;
  }

  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .image-input-grid {
    grid-template-columns: 1fr;
  }

  .home-page {
    padding: 12px;
  }

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

  .metric-grid,
  .home-grid {
    grid-template-columns: 1fr;
  }

  .login-screen {
    padding: 0;
  }

  .login-card {
    min-height: 100vh;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
  }

  .login-brand-panel,
  .login-form-panel {
    padding: 28px;
  }

  .login-brand-panel h1 {
    font-size: 30px;
  }

  .login-proof-grid {
    grid-template-columns: 1fr;
  }

  .conversation-list {
    overflow: hidden;
  }

  .list-toolbar strong,
  .search-box,
  .contact-copy,
  .contact-time {
    display: none;
  }

  .contact {
    grid-template-columns: 48px;
    justify-content: center;
    padding: 10px;
  }

  .chat-actions {
    display: none;
  }

  .message {
    max-width: 92%;
  }
}
