:root{--ink:#071017;--muted:#65757f;--line:#dce8ee;--blue:#08a6e8;--blue2:#047bc2;--soft:#f5fafc;--white:#fff}*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,sans-serif;color:var(--ink);background:var(--soft)}button,input,textarea{font:inherit}.eyebrow{font-size:.72rem;letter-spacing:.17em;text-transform:uppercase;font-weight:900;color:var(--blue2)}h1,h2,h3{font-family:"Space Grotesk",Inter,sans-serif;margin:0;letter-spacing:-.04em}a{text-decoration:none;color:inherit}
.login-view{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 10% 10%,#d8f4ff,transparent 35%),linear-gradient(135deg,#fff,#eef9fd)}.login-card{width:min(460px,100%);background:#fff;border:1px solid var(--line);border-radius:30px;padding:42px;box-shadow:0 25px 80px rgba(4,31,44,.12)}.admin-logo img{width:170px;height:auto;display:block;margin-bottom:36px}.login-card h1{font-size:3rem;margin:8px 0}.login-card>p{color:var(--muted);margin:0 0 26px}.login-card form{display:grid;gap:16px}.login-card label{display:grid;gap:7px;font-size:.82rem;font-weight:800}.login-card input{border:1px solid var(--line);border-radius:14px;padding:14px 15px;outline:none}.login-card input:focus{border-color:var(--blue)}.primary-btn,.preview-btn{border:0;border-radius:14px;padding:14px 18px;background:var(--ink);color:#fff;font-weight:900;cursor:pointer}.prototype-note{margin-top:20px;padding:14px;border-radius:15px;background:#eef8fc;color:#52656f;font-size:.78rem;display:grid;gap:4px}.prototype-note b{color:var(--blue2)}.back-link{display:block;margin-top:20px;color:var(--blue2);font-weight:800;font-size:.85rem}
.admin-app{min-height:100vh;display:grid;grid-template-columns:260px 1fr}.sidebar{background:#071017;color:#fff;padding:28px 18px;display:flex;flex-direction:column;min-height:100vh;position:sticky;top:0;height:100vh}.sidebar .admin-logo{padding:8px 12px}.sidebar .admin-logo img{filter:none;width:155px;margin:0}.sidebar-label{font-size:.68rem;text-transform:uppercase;letter-spacing:.16em;color:#71858e;font-weight:900;margin:34px 12px 10px}.side-link{border:0;background:transparent;color:#9eb0b8;text-align:left;padding:13px 14px;border-radius:12px;font-weight:800;cursor:pointer}.side-link:hover,.side-link.active{background:#10242d;color:#fff}.sidebar-bottom{margin-top:auto;display:grid;gap:6px;padding:12px}.sidebar-bottom a,.sidebar-bottom button{font-size:.82rem;color:#9eb0b8;background:none;border:0;text-align:left;padding:9px 0;cursor:pointer}.admin-main{padding:34px 42px 70px;max-width:1500px;width:100%;margin:auto}.topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:22px}.topbar h1{font-size:2.4rem;margin-top:4px}.preview-btn{font-size:.82rem}.prototype-banner{padding:13px 16px;border-radius:14px;background:#fff5d8;border:1px solid #f2dc9c;color:#705d20;font-size:.82rem;margin-bottom:28px}.view{display:none}.view.active{display:block}
.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:18px}.metric,.panel,.media-card,.product-edit-card,.empty-state,.content-card{background:#fff;border:1px solid var(--line);border-radius:22px}.metric{padding:24px}.metric span{display:block;color:var(--muted);font-size:.8rem}.metric b{display:block;font-family:"Space Grotesk";font-size:2.5rem;margin:7px 0}.metric small{color:var(--blue2);font-weight:700}.panel{padding:26px;margin-bottom:18px}.panel-head{display:flex;justify-content:space-between;gap:20px;align-items:start;margin-bottom:20px}.panel h2,.section-intro h2{font-size:1.5rem}.panel p,.section-intro p{color:var(--muted);margin:6px 0 0}.text-btn{border:0;background:none;color:var(--blue2);font-weight:900;cursor:pointer}.quick-media,.media-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.media-card{overflow:hidden}.media-preview{aspect-ratio:16/10;background:#eaf3f7}.media-preview img{width:100%;height:100%;object-fit:cover;display:block}.media-card-body{padding:16px}.media-card-body b{display:block}.media-card-body span{display:block;color:var(--muted);font-size:.75rem;margin:4px 0 12px}.upload-btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:10px;padding:9px 12px;font-size:.78rem;font-weight:850;cursor:pointer;background:#fff}.upload-btn:hover{border-color:var(--blue);color:var(--blue2)}.upload-btn input{display:none}.check-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;color:#3d5662;font-weight:700;font-size:.9rem}.section-intro{margin-bottom:22px}
.product-search{margin:0 0 16px}.product-search input{width:min(460px,100%);border:1px solid var(--line);border-radius:14px;padding:13px 15px;background:#fff;outline:none}.product-search input:focus{border-color:var(--blue)}.product-editor-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.product-edit-card{overflow:hidden}.product-edit-card img{width:100%;aspect-ratio:16/9;object-fit:contain;background:#f5fafc;padding:8px}.product-edit-body{padding:15px}.product-edit-body h3{font-size:1rem}.product-edit-body span{display:block;color:var(--muted);font-size:.72rem;margin:4px 0 12px}
.content-editor{display:grid;gap:18px}.content-card{padding:24px}.content-card-head{display:flex;justify-content:space-between;gap:16px;align-items:start;margin-bottom:18px}.content-card h3{font-size:1.2rem}.content-card p{margin:4px 0 0;color:var(--muted);font-size:.84rem}.content-fields{display:grid;gap:14px}.content-fields label{display:grid;gap:7px;font-size:.78rem;font-weight:800;color:#334851}.content-fields input,.content-fields textarea{border:1px solid var(--line);border-radius:12px;padding:12px 13px;outline:none;width:100%;resize:vertical;background:#fff}.content-fields input:focus,.content-fields textarea:focus{border-color:var(--blue)}.content-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.save-btn,.reset-section-btn{border-radius:11px;padding:10px 14px;font-size:.8rem;font-weight:900;cursor:pointer}.save-btn{border:0;background:var(--ink);color:#fff}.reset-section-btn{border:1px solid var(--line);background:#fff;color:var(--muted)}.content-status{font-size:.78rem;color:var(--blue2);font-weight:800;min-height:1.1em}.empty-state{padding:42px;display:grid;gap:7px;color:var(--muted)}.empty-state b{color:var(--ink);font-size:1.1rem}.danger-btn{margin-top:18px;border:1px solid #f0b8b8;background:#fff5f5;color:#b43030;border-radius:12px;padding:11px 14px;font-weight:900;cursor:pointer}
@media(max-width:1100px){.quick-media,.media-grid{grid-template-columns:repeat(2,1fr)}.product-editor-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:800px){.admin-app{grid-template-columns:1fr}.sidebar{position:static;height:auto;min-height:auto}.sidebar-bottom{display:none}.admin-main{padding:24px 18px}.stats-grid{grid-template-columns:1fr}.quick-media,.media-grid,.product-editor-grid{grid-template-columns:1fr}.check-grid{grid-template-columns:1fr}.topbar{align-items:start}.preview-btn{display:none}.sidebar{gap:2px}.sidebar-label{margin-top:15px}.side-link{padding:10px 12px}.content-card{padding:18px}}
/* Respect the HTML hidden attribute even when component styles set display values. */
[hidden]{display:none!important}

.logo-preview{background:#f5fafc;padding:22px}.logo-preview img{object-fit:contain;background:transparent}


/* Admin live chat */
.chat-nav-label{margin-top:26px}.chat-unread-badge{float:right;min-width:20px;padding:2px 6px;border-radius:999px;background:#08a6e8;color:#fff;text-align:center;font-size:.65rem}.chat-admin-layout{display:grid;grid-template-columns:340px 1fr;min-height:620px;background:#fff;border:1px solid var(--line);border-radius:22px;overflow:hidden}.chat-admin-list-panel{border-right:1px solid var(--line);display:flex;flex-direction:column;min-width:0}.chat-admin-list-head{padding:18px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.admin-chat-list{overflow:auto;max-height:700px}.admin-chat-row{width:100%;display:grid;gap:5px;padding:15px 17px;text-align:left;border:0;border-bottom:1px solid #edf3f6;background:#fff;cursor:pointer}.admin-chat-row:hover,.admin-chat-row.active{background:#f2f9fc}.admin-chat-row-top{display:flex;justify-content:space-between;gap:10px}.admin-chat-row-top small{text-transform:capitalize;color:#047bc2;font-weight:800}.admin-chat-row>span:not(.admin-chat-row-top),.admin-chat-row>small{color:var(--muted);font-size:.72rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-admin-thread-panel{min-width:0;display:flex;flex-direction:column}.admin-chat-empty{height:100%;min-height:420px;display:grid;place-content:center;text-align:center;gap:6px;color:var(--muted);padding:30px}.admin-chat-empty b{color:var(--ink)}.admin-chat-empty.small{min-height:180px}.admin-chat-thread-head{padding:18px 20px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:16px}.admin-chat-thread-head b{display:block}.admin-chat-thread-head small{display:block;color:var(--muted);font-size:.72rem;margin-top:4px;max-width:560px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-chat-thread-head select{height:38px;border:1px solid var(--line);border-radius:10px;padding:0 10px}.admin-chat-messages{height:430px;overflow:auto;padding:20px;background:#f5fafc;display:grid;align-content:start;gap:10px}.admin-msg{max-width:76%;padding:11px 13px;border-radius:14px;font-size:.84rem;line-height:1.45}.admin-msg.visitor{justify-self:start;background:#fff;border:1px solid #e2edf1}.admin-msg.admin{justify-self:end;background:#071017;color:#fff}.admin-msg small{display:block;font-size:.62rem;opacity:.62;margin-top:4px}.admin-chat-composer{display:flex;gap:10px;padding:14px;border-top:1px solid var(--line)}.admin-chat-composer input{flex:1;min-width:0;border:1px solid var(--line);border-radius:12px;padding:12px 13px}.admin-chat-composer button{border:0;border-radius:12px;background:#071017;color:#fff;padding:0 18px;font-weight:900;cursor:pointer}@media(max-width:900px){.chat-admin-layout{grid-template-columns:1fr}.chat-admin-list-panel{border-right:0;border-bottom:1px solid var(--line)}.admin-chat-list{max-height:260px}.admin-chat-messages{height:380px}}

/* Admin live chat message deletion */
.admin-msg-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:4px}.admin-msg-delete{border:0;background:transparent;color:inherit;opacity:.7;padding:2px 0;font-size:.66rem;font-weight:800;cursor:pointer}.admin-msg-delete:hover{opacity:1;text-decoration:underline;color:#e65a5a}.admin-msg.visitor .admin-msg-delete{color:#a53d3d}.admin-msg-text{word-break:break-word}

/* Inbox conversation deletion */
.admin-chat-row-wrap{position:relative;border-bottom:1px solid #edf3f6;background:#fff;transition:background .18s ease,box-shadow .18s ease}.admin-chat-row-wrap:hover{background:#f7fbfd}.admin-chat-row-wrap.active{background:#e8f6fc;box-shadow:inset 4px 0 0 var(--blue)}.admin-chat-row-wrap .admin-chat-row{border-bottom:0;padding-right:48px;background:transparent}.admin-chat-row-wrap.active .admin-chat-row{background:transparent}.admin-chat-row-wrap.active .admin-chat-row b{color:#047bc2}.admin-chat-delete{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:28px;height:28px;border:0;border-radius:9px;background:transparent;color:#9aafb8;font-size:1.35rem;line-height:1;cursor:pointer;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .16s ease,background .16s ease,color .16s ease}.admin-chat-row-wrap:hover .admin-chat-delete,.admin-chat-row-wrap:focus-within .admin-chat-delete{opacity:1;visibility:visible;pointer-events:auto}.admin-chat-delete:hover{background:#fff1f1;color:#d44a4a}.admin-chat-delete:disabled{cursor:wait;opacity:.45}


/* Fixed live chat workspace: only inbox and conversation content scroll */
.admin-main.chat-mode{height:100vh;overflow:hidden;padding-bottom:28px;display:flex;flex-direction:column}
.admin-main.chat-mode .view-chat.active{display:flex;flex:1;min-height:0;flex-direction:column}
.admin-main.chat-mode .view-chat .section-intro{flex:0 0 auto;margin-bottom:22px}
.admin-main.chat-mode .chat-admin-layout{flex:1;min-height:0;height:auto}
.admin-main.chat-mode .chat-admin-list-panel{min-height:0}
.admin-main.chat-mode .admin-chat-list{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain}
.admin-main.chat-mode .chat-admin-thread-panel{min-height:0}
.admin-main.chat-mode #adminChatThread{display:flex;flex:1;min-height:0;flex-direction:column}
.admin-main.chat-mode .admin-chat-messages{flex:1;min-height:0;height:auto;overflow-y:auto;overscroll-behavior:contain}
.admin-main.chat-mode .admin-chat-composer{flex:0 0 auto}
.admin-main.chat-mode .admin-chat-empty{flex:1;min-height:0}

@media(max-width:900px){
  .admin-main.chat-mode{height:auto;overflow:visible;padding-bottom:70px;display:block}
  .admin-main.chat-mode .view-chat.active{display:block}
  .admin-main.chat-mode .chat-admin-layout{min-height:620px}
  .admin-main.chat-mode .admin-chat-list{max-height:260px;overflow:auto}
  .admin-main.chat-mode #adminChatThread{display:block}
  .admin-main.chat-mode .admin-chat-messages{height:380px}
}


/* Live chat viewport sizing fix: keep composer visible and constrain inner scroll areas */
.admin-app:has(.admin-main.chat-mode){height:100dvh;overflow:hidden}
.admin-main.chat-mode{
  box-sizing:border-box;
  height:100dvh;
  min-height:0;
  max-height:100dvh;
  overflow:hidden;
}
.admin-main.chat-mode .view-chat.active{
  min-height:0;
  overflow:hidden;
}
.admin-main.chat-mode .chat-admin-layout{
  min-height:0;
  height:100%;
  overflow:hidden;
  grid-template-columns:340px minmax(0,1fr);
}
.admin-main.chat-mode .chat-admin-list-panel,
.admin-main.chat-mode .chat-admin-thread-panel{
  min-height:0;
  height:100%;
  overflow:hidden;
}
.admin-main.chat-mode .admin-chat-list{
  min-height:0;
  height:auto;
  overflow-y:auto;
}
.admin-main.chat-mode #adminChatThread{
  min-height:0;
  height:100%;
  overflow:hidden;
}
.admin-main.chat-mode .admin-chat-messages{
  min-height:0;
  overflow-y:auto;
}


/* Live chat hard frame: only inbox and message history scroll */
@media (min-width:901px){
  .admin-main.chat-mode{
    box-sizing:border-box;
    width:100%;
    max-width:none;
    height:100dvh;
    min-height:0;
    max-height:100dvh;
    overflow:hidden;
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr);
  }

  .admin-main.chat-mode .topbar{margin-bottom:22px}
  .admin-main.chat-mode .prototype-banner{margin-bottom:28px}

  .admin-main.chat-mode #view-chat.view.active{
    display:grid;
    grid-template-rows:auto minmax(0,1fr);
    min-height:0;
    height:100%;
    overflow:hidden;
  }

  .admin-main.chat-mode #view-chat .section-intro{
    margin-bottom:22px;
  }

  .admin-main.chat-mode .chat-admin-layout{
    height:100%;
    min-height:0;
    max-height:100%;
    overflow:hidden;
  }

  .admin-main.chat-mode .chat-admin-list-panel{
    min-height:0;
    height:100%;
    overflow:hidden;
  }

  .admin-main.chat-mode .admin-chat-list{
    flex:1 1 auto;
    min-height:0;
    max-height:none;
    overflow-y:auto;
    overscroll-behavior:contain;
  }

  .admin-main.chat-mode .chat-admin-thread-panel{
    min-height:0;
    height:100%;
    overflow:hidden;
  }

  .admin-main.chat-mode #adminChatThread:not([hidden]){
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto;
    min-height:0;
    height:100%;
    overflow:hidden;
  }

  .admin-main.chat-mode .admin-chat-messages{
    height:auto;
    min-height:0;
    max-height:none;
    overflow-y:auto;
    overscroll-behavior:contain;
  }

  .admin-main.chat-mode .admin-chat-composer{
    flex:none;
    position:relative;
    z-index:2;
    background:#fff;
  }
}


/* Mobile live chat: keep the chat workspace immediately visible */
@media (max-width:900px){
  /* The earlier mobile rule intentionally returned chat to normal page flow.
     Keep the conversation workspace visible directly after the intro instead. */
  .admin-main.chat-mode{
    height:auto;
    min-height:0;
    max-height:none;
    overflow:visible;
    padding-bottom:24px;
  }

  .admin-main.chat-mode .chat-admin-layout{
    display:grid;
    grid-template-columns:1fr;
    min-height:0;
    height:auto;
    max-height:none;
    overflow:visible;
  }

  .admin-main.chat-mode .chat-admin-list-panel{
    height:auto;
    min-height:0;
    overflow:visible;
  }

  .admin-main.chat-mode .admin-chat-list{
    display:block;
    max-height:260px;
    min-height:0;
    overflow-y:auto;
  }

  .admin-main.chat-mode .chat-admin-thread-panel{
    height:auto;
    min-height:0;
    overflow:visible;
  }

  .admin-main.chat-mode #adminChatThread:not([hidden]){
    display:flex;
    height:auto;
    min-height:0;
    max-height:none;
    flex-direction:column;
    overflow:visible;
  }

  .admin-main.chat-mode .admin-chat-messages{
    display:block;
    height:380px;
    min-height:220px;
    max-height:55dvh;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }

  .admin-main.chat-mode .admin-chat-composer{
    position:sticky;
    bottom:0;
    z-index:3;
    background:#fff;
  }
}


/* Mobile admin navigation compact layout */
@media (max-width:800px){
  /* The previous change affected the chat frame, but the full-height mobile
     navigation was still pushing that frame far below the first viewport. */
  .admin-app{
    display:block;
    min-height:100dvh;
  }

  .sidebar{
    position:static;
    top:auto;
    height:auto;
    min-height:0;
    padding:14px 12px;
    display:flex;
    flex-direction:row;
    flex-wrap:wrap;
    align-items:center;
    gap:5px;
  }

  .sidebar .admin-logo{
    flex:0 0 auto;
    padding:4px 8px;
    margin-right:auto;
  }

  .sidebar .admin-logo img{
    width:118px;
  }

  .sidebar-label{
    display:none;
  }

  .side-link{
    flex:0 0 auto;
    width:auto;
    padding:8px 10px;
    font-size:.76rem;
    line-height:1.1;
    border-radius:9px;
  }

  .sidebar-bottom{
    display:none;
  }

  .admin-main.chat-mode{
    padding-top:18px;
    padding-bottom:24px;
  }

  .admin-main.chat-mode .topbar{
    margin-bottom:14px;
  }

  .admin-main.chat-mode .topbar h1{
    font-size:2rem;
  }

  .admin-main.chat-mode .prototype-banner{
    margin-bottom:18px;
  }

  .admin-main.chat-mode .section-intro{
    margin-bottom:16px;
  }

  .admin-main.chat-mode .section-intro h2{
    font-size:1.35rem;
  }

  .admin-main.chat-mode .section-intro p{
    font-size:.95rem;
  }

  .admin-main.chat-mode .chat-admin-layout{
    border-radius:18px;
    overflow:hidden;
  }
}


/* Mobile navigation: compact hamburger menu */
.mobile-nav-toggle{display:none}
.admin-chat-thread-actions{display:flex;align-items:center;gap:8px}
.mobile-chat-close{display:none}

@media (max-width:800px){
  .sidebar{
    position:sticky;
    top:0;
    z-index:900;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:0;
    padding:10px 16px;
    box-shadow:0 8px 24px rgba(0,0,0,.18);
  }
  .sidebar .admin-logo{
    grid-column:1;
    grid-row:1;
    margin:0;
    padding:4px 0;
  }
  .sidebar .admin-logo img{width:122px}
  .mobile-nav-toggle{
    display:inline-flex;
    grid-column:2;
    grid-row:1;
    width:42px;
    height:42px;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:11px;
    background:#10242d;
    color:#fff;
    cursor:pointer;
  }
  .mobile-nav-toggle span{
    display:block;
    width:18px;
    height:2px;
    border-radius:99px;
    background:#dbe9ee;
    transition:transform .18s ease,opacity .18s ease;
  }
  .sidebar.mobile-open .mobile-nav-toggle span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  .sidebar.mobile-open .mobile-nav-toggle span:nth-child(2){opacity:0}
  .sidebar.mobile-open .mobile-nav-toggle span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
  .sidebar .side-link{
    display:none;
    grid-column:1 / -1;
    width:100%;
    padding:13px 14px;
    font-size:.92rem;
    text-align:left;
    border-radius:10px;
  }
  .sidebar.mobile-open .side-link{display:block}
  .sidebar.mobile-open{row-gap:4px;padding-bottom:14px}
}

/* Mobile live chat: open the selected conversation as a focused full-screen sheet */
@media (max-width:900px){
  body.mobile-chat-open{overflow:hidden}
  .admin-main.chat-mode .chat-admin-thread-panel{display:none}
  .admin-main.chat-mode.mobile-chat-open .chat-admin-thread-panel{
    display:flex;
    position:fixed;
    inset:0;
    z-index:1200;
    width:100%;
    height:100dvh;
    min-height:100dvh;
    background:#f5fafc;
    overflow:hidden;
  }
  .admin-main.chat-mode.mobile-chat-open #adminChatThread:not([hidden]){
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto;
    width:100%;
    height:100%;
    min-height:0;
    overflow:hidden;
  }
  .admin-main.chat-mode.mobile-chat-open .admin-chat-thread-head{
    padding:14px 16px;
    background:#fff;
  }
  .admin-main.chat-mode.mobile-chat-open .admin-chat-thread-head small{
    max-width:62vw;
  }
  .admin-main.chat-mode.mobile-chat-open .admin-chat-messages{
    display:grid;
    height:auto;
    min-height:0;
    max-height:none;
    overflow-y:auto;
    padding:16px;
  }
  .admin-main.chat-mode.mobile-chat-open .admin-chat-composer{
    position:relative;
    bottom:auto;
    padding:12px;
    background:#fff;
    padding-bottom:max(12px,env(safe-area-inset-bottom));
  }
  .admin-main.chat-mode.mobile-chat-open .admin-chat-composer button{padding:0 15px}
  .mobile-chat-close{
    display:inline-grid;
    place-items:center;
    width:38px;
    height:38px;
    border:1px solid var(--line);
    border-radius:11px;
    background:#fff;
    color:#52656f;
    font-size:1.55rem;
    line-height:1;
    cursor:pointer;
  }
}


/* Mobile chat sheet sizing fix: keep every chat element inside the visible viewport */
@media (max-width:900px){
  .admin-main.chat-mode.mobile-chat-open,
  .admin-main.chat-mode.mobile-chat-open *{
    box-sizing:border-box;
  }

  .admin-main.chat-mode.mobile-chat-open .chat-admin-thread-panel{
    left:0;
    right:0;
    top:0;
    bottom:0;
    width:100vw;
    max-width:100vw;
    min-width:0;
    overflow:hidden;
  }

  .admin-main.chat-mode.mobile-chat-open #adminChatThread:not([hidden]){
    width:100%;
    max-width:100%;
    min-width:0;
  }

  .admin-main.chat-mode.mobile-chat-open .admin-chat-thread-head{
    width:100%;
    max-width:100%;
    min-width:0;
    gap:10px;
    padding:12px 14px;
    overflow:hidden;
  }

  .admin-main.chat-mode.mobile-chat-open .admin-chat-thread-head > div:first-child{
    min-width:0;
    flex:1 1 auto;
    overflow:hidden;
  }

  .admin-main.chat-mode.mobile-chat-open .admin-chat-thread-head small{
    width:100%;
    max-width:100%;
  }

  .admin-main.chat-mode.mobile-chat-open .admin-chat-thread-actions{
    flex:0 0 auto;
    min-width:0;
    gap:6px;
  }

  .admin-main.chat-mode.mobile-chat-open #adminChatStatus{
    width:auto;
    max-width:118px;
    min-width:0;
    padding-left:10px;
    padding-right:8px;
  }

  .admin-main.chat-mode.mobile-chat-open .admin-chat-messages{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow-x:hidden;
    padding:14px;
  }

  .admin-main.chat-mode.mobile-chat-open .admin-msg{
    width:fit-content;
    max-width:min(82%, calc(100vw - 28px));
    min-width:0;
    overflow-wrap:anywhere;
    word-break:break-word;
  }

  .admin-main.chat-mode.mobile-chat-open .admin-msg-foot{
    min-width:0;
    gap:8px;
  }

  .admin-main.chat-mode.mobile-chat-open .admin-msg-foot small{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .admin-main.chat-mode.mobile-chat-open .admin-chat-composer{
    width:100%;
    max-width:100%;
    min-width:0;
    gap:8px;
    padding:10px 12px max(10px,env(safe-area-inset-bottom));
    overflow:hidden;
  }

  .admin-main.chat-mode.mobile-chat-open .admin-chat-composer input{
    min-width:0;
    width:0;
    flex:1 1 auto;
  }

  .admin-main.chat-mode.mobile-chat-open .admin-chat-composer button{
    flex:0 0 auto;
    white-space:nowrap;
    padding-left:14px;
    padding-right:14px;
  }

  @supports (width:100dvw){
    .admin-main.chat-mode.mobile-chat-open .chat-admin-thread-panel{
      width:100dvw;
      max-width:100dvw;
    }
  }
}


/* Inbox preview: latest customer message */
.admin-chat-row .admin-chat-preview{
  color:#667985;
  font-size:.74rem;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  padding-right:4px;
}
.admin-chat-row-wrap.active .admin-chat-preview{color:#4f6875}
@media(max-width:900px){
  .admin-chat-row .admin-chat-preview{
    font-size:.78rem;
    padding-right:38px;
  }
}

/* iPhone viewport stability */
html,body{width:100%;max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
@media(max-width:760px){
  input,textarea,select{font-size:16px}
}
