:root {
  --green: #0b7a55;
  --green-2: #075f43;
  --green-soft: #dff5eb;
  --mint: #eef8f4;
  --ink: #13251f;
  --muted: #687a73;
  --line: #dce8e3;
  --paper: #ffffff;
  --canvas: #e9f0ed;
  --danger: #c63737;
  --shadow: 0 20px 70px rgba(19, 48, 38, 0.17);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  font-size: 16px;
  background: radial-gradient(circle at 8% 8%, #d5eee5 0, transparent 30%), var(--canvas);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

input,
textarea {
  color: var(--ink);
}

textarea {
  resize: none;
}

[hidden] {
  display: none !important;
}

.guest-page {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 18px;
}

.guest-shell {
  width: min(100%, 760px);
  height: min(900px, calc(100dvh - 36px));
  min-height: 560px;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.chat-header,
.admin-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: white;
}

.avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ebfff7, #c0efdc);
  color: var(--green-2);
  font-weight: 900;
  letter-spacing: -.02em;
}

.avatar-support {
  border: 2px solid rgba(255, 255, 255, .65);
}

.header-copy {
  min-width: 0;
  flex: 1;
}

.header-copy h1,
.header-copy h2 {
  margin: 0;
  overflow: hidden;
  font-size: 1.05rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-copy p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 3px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: .81rem;
}

.recipient-phone {
  color: white;
  font-weight: 750;
  letter-spacing: .02em;
}

.header-separator {
  color: rgba(255, 255, 255, .48);
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #7fffc5;
  box-shadow: 0 0 0 3px rgba(127, 255, 197, .16);
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
  color: inherit;
}

.icon-button:hover {
  background: rgba(255, 255, 255, .2);
}

.icon-button svg,
.composer-button svg,
.send-button svg,
.sidebar-search svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-info {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff9d8;
  color: #745e12;
  font-size: .81rem;
  text-align: center;
}

.messages {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px 12px;
  background-color: #edf4f1;
  background-image: radial-gradient(rgba(11, 122, 85, .06) 1px, transparent 1px);
  background-size: 20px 20px;
  scroll-behavior: smooth;
}

.day-pill {
  width: max-content;
  margin: 0 auto 16px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: var(--muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  font-size: .75rem;
}

.message {
  display: flex;
  margin: 7px 0;
  direction: ltr;
}

.message.incoming {
  justify-content: flex-start;
}

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

.bubble {
  max-width: min(82%, 540px);
  padding: 10px 12px 6px;
  border-radius: 5px 17px 17px 17px;
  background: white;
  box-shadow: 0 2px 8px rgba(32, 58, 49, .08);
  color: var(--ink);
  direction: auto;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.outgoing .bubble {
  border-radius: 17px 5px 17px 17px;
  background: #d8f8e9;
}

.bubble time {
  display: block;
  min-width: 55px;
  margin-top: 5px;
  color: #778880;
  font-size: .68rem;
  text-align: end;
  direction: ltr;
}

.bubble img {
  display: block;
  max-width: 100%;
  max-height: 340px;
  border-radius: 12px;
  object-fit: contain;
}

.bubble audio {
  display: block;
  width: min(320px, 70vw);
  height: 42px;
}

.file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 8px;
  color: inherit;
  text-decoration: none;
}

.file-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(11, 122, 85, .12);
  color: var(--green);
  font-weight: 800;
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: white;
  direction: ltr;
}

.composer textarea {
  min-height: 44px;
  max-height: 130px;
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: #f7faf9;
  direction: auto;
  line-height: 1.35;
}

.composer textarea:focus {
  border-color: #55b793;
  box-shadow: 0 0 0 3px rgba(11, 122, 85, .1);
}

.composer-button,
.send-button {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 15px;
  color: var(--green);
  background: var(--mint);
}

.send-button {
  color: white;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(11, 122, 85, .24);
}

.send-button svg {
  fill: currentColor;
  stroke: none;
}

.mic-button.recording {
  color: white;
  background: var(--danger);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  50% {
    transform: scale(.92);
  }
}

.upload-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  background: #f7faf9;
  color: var(--muted);
  font-size: .85rem;
}

.upload-preview button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #e7eeeb;
}

.recording-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: white;
  border-top: 1px solid var(--line);
}

.recording-bar button {
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
}

.recording-bar button:last-child {
  background: var(--green);
  color: white;
}

.recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--danger);
  animation: pulse 1s infinite;
}

.recording-bar strong {
  margin-inline-start: auto;
  direction: ltr;
}

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 29, 22, .74);
  backdrop-filter: blur(10px);
}

.gate-card {
  width: min(100%, 430px);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 26px;
  background: white;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .28);
  text-align: center;
}

.gate-mark,
.empty-chat-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--green-2), #18a876);
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(11, 122, 85, .25);
}

.gate-card h2 {
  margin: 0;
  font-size: 1.45rem;
}

.gate-card>p {
  margin: 9px 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.gate-card form {
  display: grid;
  gap: 9px;
  text-align: start;
}

label {
  color: #344b42;
  font-size: .86rem;
  font-weight: 750;
}

input,
.gate-card textarea,
.dialog-card input,
.dialog-card textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: #f9fbfa;
}

input:focus,
.gate-card textarea:focus,
.dialog-card input:focus,
.dialog-card textarea:focus {
  border-color: #55b793;
  box-shadow: 0 0 0 3px rgba(11, 122, 85, .1);
}

.primary-button,
.primary-small,
.danger-button,
.secondary-button {
  padding: 12px 18px;
  border: 0;
  border-radius: 13px;
  font-weight: 800;
}

.primary-button,
.primary-small {
  color: white;
  background: var(--green);
}

.primary-button {
  width: 100%;
  margin-top: 5px;
}

.gate-card small {
  display: block;
  margin-top: 16px;
  color: #819088;
}

.ban-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #ffe7e7;
  color: var(--danger);
  font-size: 2rem;
  font-weight: 900;
}

.success-note {
  margin-top: 14px;
  padding: 10px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-2);
}

.toast {
  position: fixed;
  z-index: 100;
  inset-inline-start: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border-radius: 12px;
  background: #14231e;
  color: white;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .23);
  font-size: .88rem;
  text-align: center;
}

.admin-page {
  min-height: 100dvh;
  overflow: hidden;
  background: #dfe9e5;
}

.admin-login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 20% 10%, #c8eadc, transparent 32%), #e9f0ed;
}

.login-card {
  width: min(100%, 430px);
  padding: 30px;
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.admin-brand .gate-mark {
  width: 54px;
  height: 54px;
  margin: 0;
  border-radius: 17px;
}

.admin-brand h1 {
  margin: 0;
  font-size: 1.28rem;
}

.admin-brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .85rem;
}

.login-card form {
  display: grid;
  gap: 9px;
}

.login-card .primary-button {
  margin-top: 10px;
}

.form-error {
  margin: 4px 0 0;
  color: var(--danger);
  font-size: .85rem;
}

.admin-shell {
  width: 100%;
  height: 100dvh;
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  background: white;
}

.admin-sidebar {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  border-inline-end: 1px solid var(--line);
  background: #fbfdfc;
}

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

.admin-brand.compact {
  margin: 0;
}

.admin-brand.compact .gate-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: .86rem;
}

.admin-brand.compact h1 {
  font-size: 1.04rem;
}

.sidebar-header .icon-button {
  background: #eef4f1;
  color: var(--muted);
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  min-width: 0;
  padding: 9px 8px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 750;
}

.tab-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-button b {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  margin-inline-start: 4px;
  padding: 0 5px;
  border-radius: 99px;
  background: #e8efec;
}

.tab-button.active {
  color: var(--green-2);
  background: var(--green-soft);
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  color: var(--muted);
}

.sidebar-search svg {
  width: 19px;
}

.sidebar-search input {
  padding: 11px 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.conversation-list {
  min-height: 0;
  overflow-y: auto;
}

.conversation-item {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #eef3f1;
  background: transparent;
  text-align: start;
}

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

.conversation-copy {
  min-width: 0;
}

.conversation-copy strong,
.conversation-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: .78rem;
}

.conversation-copy small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: #7f9189;
  font-size: .7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-side {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: var(--muted);
  font-size: .68rem;
}

.unread-badge {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--green);
  color: white;
  font-weight: 800;
}

.banned-badge {
  color: var(--danger);
  font-weight: 800;
}

.sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-weight: 750;
}

.admin-workspace {
  min-width: 0;
  min-height: 0;
  position: relative;
  background: #edf4f1;
}

.empty-chat {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.empty-chat h2 {
  margin: 2px 0;
  color: var(--ink);
}

.empty-chat p {
  margin: 6px 0;
}

.empty-chat-mark {
  margin-bottom: 14px;
}

.admin-chat {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.admin-chat-header {
  background: white;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.admin-chat-header .header-copy p {
  color: var(--muted);
}

.danger-outline {
  padding: 9px 14px;
  border: 1px solid #f0b0b0;
  border-radius: 11px;
  background: #fff7f7;
  color: var(--danger);
  font-weight: 800;
}

.danger-outline.unban {
  border-color: #9ed8c0;
  background: #effaf5;
  color: var(--green);
}

.admin-messages {
  padding-bottom: 20px;
}

.admin-composer {
  padding-bottom: 12px;
}

.mobile-back {
  display: none;
  color: var(--muted);
  background: #eff4f2;
}

.admin-panel-view {
  height: 100%;
  overflow-y: auto;
  padding: 26px;
  background: #f3f7f5;
}

.admin-panel-view>header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-panel-view h2 {
  margin: 0;
}

.admin-panel-view header p {
  margin: 5px 0 0;
  color: var(--muted);
}

.primary-small {
  width: auto;
  padding: 10px 14px;
}

.card-list {
  display: grid;
  gap: 12px;
}

.review-card,
.staff-row {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.review-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
}

.review-card h3,
.staff-row h3 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.review-card p,
.staff-row p {
  margin: 4px 0;
  color: var(--muted);
}

.review-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-actions button {
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  font-weight: 750;
}

.approve-button {
  background: var(--green-soft);
  color: var(--green);
}

.reject-button {
  background: #ffebeb;
  color: var(--danger);
}

.status-pill {
  width: max-content;
  padding: 5px 9px;
  border-radius: 99px;
  background: #edf1ef;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 750;
}

.staff-table {
  display: grid;
  gap: 10px;
}

.staff-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.staff-row button {
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  font-weight: 750;
}

.staff-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.staff-actions .auto-reply-button {
  background: var(--green-soft);
  color: var(--green-2);
}

.auto-reply-preview {
  max-width: 720px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

dialog {
  width: min(92vw, 470px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 25px 100px rgba(0, 0, 0, .32);
}

dialog::backdrop {
  background: rgba(8, 29, 22, .6);
  backdrop-filter: blur(5px);
}

.dialog-card {
  display: grid;
  gap: 9px;
  padding: 26px;
}

.dialog-card h2 {
  margin: 0;
}

.dialog-card>p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.5;
}

.dialog-card small {
  color: var(--muted);
  line-height: 1.45;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 12px;
}

.secondary-button {
  background: #edf2f0;
  color: var(--ink);
}

.danger-button {
  background: var(--danger);
  color: white;
}

@media (max-width: 760px) {
  .guest-page {
    padding: 0;
  }

  .guest-shell {
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .chat-header {
    min-height: 68px;
    padding: 9px 12px;
  }

  .messages {
    padding-inline: 11px;
  }

  .bubble {
    max-width: 88%;
  }

  .gate-card {
    padding: 24px 20px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    width: 100%;
  }

  .admin-workspace {
    position: fixed;
    inset: 0;
    z-index: 5;
    transform: translateX(100%);
    transition: transform .2s ease;
  }

  .admin-workspace.mobile-open {
    transform: translateX(0);
  }

  .mobile-back {
    display: grid;
  }

  .admin-panel-view {
    padding: 18px 14px;
  }

  .review-card {
    grid-template-columns: 1fr;
  }

  .review-actions {
    justify-content: flex-start;
  }

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

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   WHATSAPP STYLE SELECTED MEDIA PREVIEW
========================================================= */

.upload-preview {
  width: 220px;
  max-width: calc(100% - 24px);

  display: flex;
  align-items: center;
  gap: 9px;

  margin: 8px 12px 0 auto;
  padding: 7px;

  border: 1px solid #dce8e3;
  border-radius: 14px;

  background: #ffffff;

  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.08);

  direction: ltr;
}


/* IMAGE / VIDEO BOX */

.upload-preview-media {
  width: 48px;
  height: 48px;

  flex: 0 0 48px;

  overflow: hidden;

  border-radius: 10px;

  background: #e9f0ed;
}


/* ACTUAL IMAGE */

.upload-preview-media img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}


/* ACTUAL VIDEO */

.upload-preview-media video {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  background: #000;
}


/* NAME AREA */

.upload-preview-info {
  min-width: 0;

  flex: 1;

  overflow: hidden;
}


.upload-preview-info strong {
  display: block;

  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  color: #13251f;

  font-size: 12px;
  font-weight: 700;

  text-align: left;
}


.upload-preview-info small {
  display: block;

  margin-top: 3px;

  color: #687a73;

  font-size: 10px;

  text-align: left;
}


/* REMOVE BUTTON */

.upload-preview #cancelUpload {
  width: 25px;
  height: 25px;

  flex: 0 0 25px;

  display: grid;
  place-items: center;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background: #e7eeeb;
  color: #344b42;

  font-size: 16px;
  line-height: 1;
}


/* DOCUMENT ICON */

.upload-file-icon {
  width: 100%;
  height: 100%;

  display: grid;
  place-items: center;

  color: #0b7a55;

  font-size: 10px;
  font-weight: 900;
}


/* MOBILE */

@media (max-width: 760px) {

  .upload-preview {
    width: 210px;
    margin-right: 8px;
  }

}

/* Picture aur video ka same exact chat size */
.bubble img,
.bubble video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 340px;
  border-radius: 12px;
  object-fit: contain;
}

/* Video ko picture ki tarah normal size mein rakho */
.bubble video {
  width: min(320px, 70vw);
  height: auto;
  background: #000;
}

/* ===== FINAL ASSIGNMENT WORK HEADER LOGO FIX ===== */

.chat-header .avatar.avatar-support {
  width: 60px !important;
  height: 60px !important;
  min-width: 60px !important;
  min-height: 60px !important;

  padding: 0 !important;
  margin: 0 !important;

  border-radius: 50% !important;
  overflow: hidden !important;

  background: transparent !important;
  border: 2px solid rgba(255, 255, 255, 0.85) !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.chat-header .avatar.avatar-support img.header-logo-img {
  display: block !important;

  width: 100% !important;
  height: 100% !important;

  min-width: 100% !important;
  min-height: 100% !important;

  max-width: none !important;
  max-height: none !important;

  margin: 0 !important;
  padding: 0 !important;

  border-radius: 50% !important;
  object-fit: cover !important;

  opacity: 1 !important;
  visibility: visible !important;
}
/* =====================================================
   FINAL ADMIN + WORKER RESPONSIVE / SCROLL / LOGO FIX
   ===================================================== */

/* ---------- ADMIN LOGOS ---------- */

.brand-logo-box {
  padding: 0 !important;
  overflow: hidden !important;
  background: #ffffff !important;
  color: transparent !important;
}

.brand-logo-box img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
  border-radius: inherit !important;
}


/* ---------- DESKTOP TABS FULL TEXT ---------- */

.admin-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.tab-button {
  min-height: 48px;
  line-height: 1.15;
}

.tab-button span {
  display: inline !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: normal !important;
}


/* ---------- WHATSAPP STYLE CHAT LIST ---------- */

.admin-shell,
.admin-sidebar,
.admin-workspace,
.admin-chat {
  min-height: 0 !important;
}

.admin-sidebar {
  height: 100dvh !important;
  overflow: hidden !important;
}

.conversation-list {
  min-height: 0 !important;
  height: 100% !important;

  overflow-y: auto !important;
  overflow-x: hidden !important;

  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain;
  touch-action: pan-y;

  scrollbar-width: thin;
}

.conversation-item {
  flex-shrink: 0;
}

.admin-messages {
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y;
}


/* ---------- CHAT SCREEN ---------- */

.admin-chat {
  height: 100dvh !important;
  grid-template-rows:
    auto
    minmax(0, 1fr)
    auto
    auto !important;
}

.admin-composer {
  min-width: 0;
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 760px) {

  html,
  body,
  body.admin-page {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .admin-shell {
    width: 100vw !important;
    height: 100dvh !important;
    grid-template-columns: 1fr !important;
    overflow: hidden !important;
  }

  .admin-sidebar {
    width: 100vw !important;
    height: 100dvh !important;

    display: grid !important;
    grid-template-rows:
      auto
      auto
      auto
      minmax(0, 1fr)
      auto !important;

    overflow: hidden !important;
  }


  /* HEADER */

  .sidebar-header {
    min-height: 62px !important;
    padding: 8px 10px !important;
    gap: 8px;
  }

  .admin-brand.compact {
    min-width: 0 !important;
    gap: 8px !important;
  }

  .admin-brand.compact .gate-mark {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    flex: 0 0 44px !important;
    margin: 0 !important;
  }

  .admin-brand.compact h1 {
    font-size: 16px !important;
  }

  .admin-brand.compact p {
    max-width: calc(100vw - 135px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px !important;
  }


  /* CHATS / REVIEW / STAFF */

  .admin-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 6px !important;
  }

  .tab-button {
    min-width: 0 !important;
    min-height: 49px !important;
    padding: 6px 2px !important;
    font-size: 10.5px !important;
    line-height: 1.15 !important;
  }

  .tab-button span {
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .tab-button b {
    margin-top: 3px !important;
    margin-inline-start: 2px !important;
  }


  /* SEARCH */

  .sidebar-search {
    margin: 7px 8px !important;
    padding: 0 10px !important;
  }

  .sidebar-search input {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 14px !important;
  }


  /* CHAT LIST */

  .conversation-list {
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .conversation-item {
    width: 100% !important;

    grid-template-columns:
      45px
      minmax(0, 1fr)
      auto !important;

    gap: 8px !important;
    padding: 10px 9px !important;
  }

  .conversation-item .avatar {
    width: 45px !important;
    height: 45px !important;
  }

  .conversation-copy {
    min-width: 0 !important;
  }

  .conversation-copy strong {
    font-size: 14px !important;
  }

  .conversation-copy span {
    font-size: 12px !important;
  }

  .conversation-copy small {
    font-size: 10px !important;
  }

  .conversation-side {
    font-size: 10px !important;
  }


  /* OPENED CHAT */

  .admin-workspace {
    width: 100vw !important;
    height: 100dvh !important;
  }

  .admin-workspace.mobile-open {
    transform: translateX(0) !important;
  }

  .admin-chat {
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 0 !important;

    grid-template-rows:
      auto
      minmax(0, 1fr)
      auto
      auto !important;
  }

  .admin-chat-header {
    min-height: 62px !important;
    padding: 8px !important;
    gap: 7px !important;
  }

  .admin-chat-header .avatar {
    width: 42px !important;
    height: 42px !important;
  }

  .admin-chat-header .header-copy h2 {
    font-size: 15px !important;
  }

  .admin-chat-header .header-copy p {
    font-size: 11px !important;
  }

  .danger-outline {
    padding: 7px 9px !important;
    font-size: 12px !important;
  }


  /* MESSAGE INPUT */

  .composer {
    width: 100% !important;
    min-width: 0 !important;
    gap: 5px !important;

    padding:
      7px
      6px
      calc(7px + env(safe-area-inset-bottom)) !important;
  }

  .composer textarea {
    min-width: 0 !important;
    width: 100% !important;
    padding: 10px !important;
    font-size: 14px !important;
  }

  .composer-button,
  .send-button {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    flex: 0 0 40px !important;
  }


  /* REVIEW + STAFF MOBILE */

  .admin-panel-view {
    width: 100vw !important;
    height: 100dvh !important;
    overflow-y: auto !important;
    padding: 15px 10px !important;
  }

  .admin-panel-view > header {
    align-items: flex-start !important;
    gap: 10px !important;
  }

  .staff-row,
  .review-card {
    grid-template-columns: 1fr !important;
  }

  .staff-actions,
  .review-actions {
    justify-content: flex-start !important;
  }
}
/* =====================================================
   FINAL CUSTOMER CHAT MOBILE FIX
   ===================================================== */

@media (max-width: 760px) {

  html,
  body,
  body.guest-page {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .guest-page {
    display: block !important;
    min-height: 100dvh !important;
  }

  .guest-shell {
    width: 100vw !important;
    max-width: 100vw !important;

    height: 100dvh !important;
    min-height: 0 !important;

    margin: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    display: grid !important;

    grid-template-rows:
      auto
      auto
      minmax(0, 1fr)
      auto
      auto !important;

    overflow: hidden !important;
  }

  /* TOP HEADER */

  .chat-header {
    width: 100% !important;
    min-height: 64px !important;

    padding:
      calc(8px + env(safe-area-inset-top))
      10px
      8px !important;

    gap: 9px !important;
  }

  .chat-header .avatar.avatar-support {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
  }

  .chat-header .header-copy {
    min-width: 0 !important;
  }

  .chat-header .header-copy h1 {
    font-size: 15px !important;
  }

  .chat-header .header-copy p {
    font-size: 11px !important;
    gap: 4px !important;
  }

  .chat-header .icon-button {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }


  /* MESSAGES AREA */

  .guest-shell .messages {
    width: 100% !important;

    min-height: 0 !important;
    height: 100% !important;

    padding: 12px 9px !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }

  .guest-shell .message {
    width: 100% !important;
  }

  .guest-shell .bubble {
    max-width: 88% !important;
    font-size: 14px !important;
  }

  .guest-shell .bubble img,
  .guest-shell .bubble video {
    max-width: 100% !important;
    max-height: 300px !important;
  }

  .guest-shell .bubble audio {
    width: min(270px, 72vw) !important;
  }


  /* BOTTOM MESSAGE BOX */

  .guest-shell .composer {
    width: 100% !important;
    min-width: 0 !important;

    gap: 5px !important;

    padding:
      7px
      6px
      calc(7px + env(safe-area-inset-bottom)) !important;
  }

  .guest-shell .composer textarea {
    min-width: 0 !important;
    width: 100% !important;

    min-height: 40px !important;

    padding: 10px !important;

    font-size: 14px !important;
  }

  .guest-shell .composer-button,
  .guest-shell .send-button {
    width: 40px !important;
    height: 40px !important;

    min-width: 40px !important;

    flex: 0 0 40px !important;
  }

  .guest-shell .upload-preview {
    max-width: calc(100vw - 16px) !important;
  }
}
/* NAME SCREEN ROUND PICTURE */
#nameGate img {
  width: 85px !important;
  height: 85px !important;
  display: block !important;
  margin: 0 auto 15px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center !important;
}
/* =====================================================
   FINAL CUSTOMER COMPOSER FIX - WHATSAPP STYLE
   ===================================================== */

@media (max-width: 760px) {

  .guest-shell {
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;

    grid-template-rows:
      auto
      auto
      minmax(0, 1fr)
      auto
      auto !important;
  }

  /* Sirf messages scroll honge */
  .guest-shell .messages {
    min-height: 0 !important;
    height: auto !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
  }

  /* Attachment preview bhi composer ke upar rahe */
  .guest-shell .upload-preview {
    position: relative !important;
    z-index: 20 !important;
    flex-shrink: 0 !important;
  }

  /* Message box hamesha bottom par */
  .guest-shell .composer {
    position: relative !important;
    z-index: 30 !important;

    width: 100% !important;
    min-width: 0 !important;
    flex-shrink: 0 !important;

    margin: 0 !important;

    padding:
      7px
      6px
      calc(10px + env(safe-area-inset-bottom)) !important;

    border-top: 1px solid #dce8e3 !important;
    background: #ffffff !important;
  }

  .guest-shell .composer textarea {
    min-width: 0 !important;
    min-height: 42px !important;
    max-height: 120px !important;
  }

  /* Voice recording bar bhi bottom me hi */
  .guest-shell .recording-bar {
    position: relative !important;
    z-index: 30 !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
  }
}
/* =====================================================
   CUSTOMER CHAT HARD BOTTOM LOCK
   ===================================================== */

@media (max-width: 760px) {

  html,
  body,
  body.guest-page {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;
  }

  body.guest-page {
    position: fixed !important;
    inset: 0 !important;
  }

  .guest-shell {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;

    margin: 0 !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important;

    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* Header kabhi move nahi hoga */
  .guest-shell .chat-header {
    flex: 0 0 auto !important;
  }

  .guest-shell .chat-info {
    flex: 0 0 auto !important;
  }

  /* Sirf chat area scroll hoga */
  .guest-shell .messages {
    flex: 1 1 0 !important;

    width: 100% !important;
    height: 0 !important;
    min-height: 0 !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  /* Attachment preview composer ke upar */
  .guest-shell .upload-preview {
    flex: 0 0 auto !important;
  }

  /* Ye hamesha bottom par rahega */
  .guest-shell .composer {
    position: relative !important;

    flex: 0 0 auto !important;

    width: 100% !important;

    margin: 0 !important;

    background: #fff !important;

    z-index: 50 !important;

    padding:
      7px
      6px
      calc(8px + env(safe-area-inset-bottom)) !important;
  }

  .guest-shell .recording-bar {
    flex: 0 0 auto !important;
    margin: 0 !important;
    z-index: 50 !important;
  }
}