/* v39 dashboard order table + sticky logout */

/* Special message bubble types */
.unsupported-bubble,.reaction-bubble,.contacts-bubble,.system-bubble,.ephemeral-bubble,.order-bubble{
  display:inline-block;padding:6px 10px;border-radius:12px;font-size:13px;line-height:1.4;
  background:rgba(0,0,0,.06);color:#555;
}
.unsupported-bubble{color:#888;font-style:italic;}
.reaction-bubble{background:rgba(0,0,0,.04);font-size:20px;padding:4px 8px;}
.system-bubble{background:rgba(0,100,200,.08);color:#0055aa;font-size:12px;}
.order-bubble{background:rgba(0,160,80,.1);color:#0a5e30;}
.ephemeral-bubble{background:rgba(180,0,180,.07);color:#5e0077;font-style:italic;}
#clientDashboardWidgets > .dashboard-widget-row.wide-layout:nth-of-type(3){display:none!important}
.dash-orders-widget{overflow:hidden}
.dash-orders-table-wrap{max-height:390px;overflow:auto}
.dash-orders-table td,.dash-orders-table th{vertical-align:middle}
.dash-orders-table .btn{white-space:normal;line-height:1.25;min-width:96px}
.product-pages{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;padding-top:12px;border-top:1px solid rgba(0,0,0,.06)}
.order-actions{margin-top:0}
.order-actions .btn{min-width:92px;white-space:normal}
.order-filter-row{margin:12px 0}
@media (min-width:901px){
  .sidebar{height:100vh!important;min-height:100vh!important;position:sticky!important;top:0!important;display:flex!important;flex-direction:column!important;padding-bottom:0!important}
  .sidebar-foot.logout-only{position:sticky!important;bottom:12px!important;margin-top:auto!important;padding:8px!important;background:#1c1c1e!important;z-index:80!important;border-top:0!important}
  .sidebar-foot.logout-only:after{display:none!important}
  .sidebar-foot.logout-only .btn{display:flex!important;width:52px!important;height:52px!important;min-height:52px!important;padding:0!important;border-radius:18px!important;background:#e8f9ef!important;color:#ff3b30!important;font-size:0!important;box-shadow:0 8px 22px rgba(0,0,0,.18)!important}
  .sidebar-foot.logout-only .btn .logout-icon{display:grid!important;place-items:center!important;font-size:15px!important;font-weight:900!important;color:#ff3b30!important;line-height:1!important}
  .sidebar-foot.logout-only .btn b{display:none!important}
  .sidebar-foot.logout-only .btn:hover{background:#25d366!important}
  .sidebar-foot.logout-only .btn:hover .logout-icon{color:#fff!important}
}
@media (max-width:760px){
  .orders-table thead{display:none}
  .orders-table,.orders-table tbody,.orders-table tr,.orders-table td{display:block;width:100%}
  .orders-table tr{border:1px solid rgba(0,0,0,.08);border-radius:18px;margin-bottom:12px;padding:10px;background:#fff}
  .orders-table td{border-bottom:0!important;padding:8px!important}
  .contact-detail-panel .detail-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
}

/* WATI-style High-Fidelity UI Redesign Overrides */

/* Typography & Global */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');
body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif !important;
}

/* WATI Branding Color Schema */
:root {
  --wati-teal: #00a884;
  --wati-blue: #00c0f9;
  --wati-dark: #0f172a;
}

/* Sidebar Styling - WATI Theme */
.sidebar {
  background: var(--wati-dark) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.sidebar-profile-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.nav-item {
  transition: all 0.2s ease;
  border-radius: 12px !important;
  margin-bottom: 4px;
}
.nav-item:hover, .nav-item.active {
  background: rgba(0, 168, 132, 0.12) !important;
  color: var(--wati-teal) !important;
}
.nav-item.active span {
  filter: drop-shadow(0 0 5px var(--wati-teal));
}
.sidebar-foot.logout-only .btn {
  border-radius: 12px !important;
}

/* Live Inbox WATI Makeover */
.inbox {
  border-radius: 16px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

/* Search bar styling */
.search {
  background: #f8fafc !important;
  padding: 12px 16px !important;
}
.search input {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  padding: 8px 16px !important;
  font-size: 13px;
  color: var(--text);
}
.search button {
  background: var(--wati-teal) !important;
  color: #fff !important;
  border-radius: 50% !important;
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  display: grid;
  place-items: center;
}

/* Chat list active rows */
.chat-row {
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 12px 16px !important;
  height: 68px !important;
}
.chat-row.active {
  background: rgba(0, 168, 132, 0.05) !important;
}
.chat-row.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--wati-teal);
  border-radius: 0 4px 4px 0;
}
.chat-row .avatar {
  background: #e2f7f0 !important;
  color: var(--wati-teal) !important;
  border-radius: 50%;
  font-weight: 600;
}
.chat-row b {
  color: #1e293b !important;
  font-weight: 600 !important;
}
.chat-row p {
  color: #64748b !important;
}

/* Unread Badge */
.chat-row .pill.green, #unreadBadge {
  background: var(--wati-teal) !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 3px 6px !important;
  min-width: 18px !important;
  height: 18px !important;
  border-radius: 99px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* Chat Header */
.chat-head {
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 0 20px !important;
}
.chat-head .avatar {
  background: #e2f7f0 !important;
  color: var(--wati-teal) !important;
  font-weight: 600;
}
.chat-head b {
  color: #0f172a !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}
.chat-head span {
  color: #64748b !important;
}

/* WhatsApp Doodle Wallpaper style background */
.chat-messages {
  background-color: #efeae2 !important;
  background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px) !important;
  background-size: 18px 18px !important;
  padding: 24px !important;
}

/* Message Bubbles */
.msg {
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
  font-size: 14.5px !important;
  line-height: 1.5 !important;
  padding: 10px 14px !important;
  margin-bottom: 10px !important;
}
.msg.in {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  border-top-left-radius: 2px !important;
}
.msg.out {
  background: #d9fdd3 !important;
  color: #0f172a !important;
  border: 1px solid #c3edd0 !important;
  border-top-right-radius: 2px !important;
}
.msg small {
  color: #64748b !important;
  font-weight: 500 !important;
  font-size: 10px !important;
  margin-top: 4px !important;
}


/* Quick templates bar */
.template-send-bar {
  background: #ffffff !important;
  padding: 8px 16px !important;
  border-top: 1px solid #f1f5f9 !important;
}
.template-send-bar select {
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
}
.template-send-bar .btn.soft {
  background: rgba(0, 168, 132, 0.08) !important;
  color: var(--wati-teal) !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
}
.template-send-bar .btn.soft:hover {
  background: var(--wati-teal) !important;
  color: #ffffff !important;
}

/* Details Panel sidebar on the right */
.contact-detail-panel {
  background: #ffffff !important;
  border-left: 1px solid #e2e8f0 !important;
}
.contact-detail-panel h3 {
  color: #0f172a !important;
}
.contact-detail-panel .pill.green {
  background: rgba(0, 168, 132, 0.12) !important;
  color: var(--wati-teal) !important;
}

/* WATI Branding Send Button - Rounded Square with Icon Only */
.inbox.whatsapp-mobile .reply .btn.primary,
.reply .btn.primary {
  background: var(--wati-teal, #00a884) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  height: 44px !important;
  width: 44px !important; /* Square shape */
  min-width: 44px !important;
  max-width: 44px !important;
  flex-shrink: 0 !important;
  font-size: 0 !important; /* Hides text */
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(0, 168, 132, 0.15) !important;
}

.inbox.whatsapp-mobile .reply .btn.primary::before,
.reply .btn.primary::before {
  content: "" !important;
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  background-color: #ffffff !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M2.01 3L2 10l15 2-15 2 .01 7L23 12 2.01 3z'/%3E%3C/svg%3E") no-repeat center !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M2.01 3L2 10l15 2-15 2 .01 7L23 12 2.01 3z'/%3E%3C/svg%3E") no-repeat center !important;
  mask-size: contain !important;
  -webkit-mask-size: contain !important;
  margin-left: 2px !important;
}

.inbox.whatsapp-mobile .reply .btn.primary:hover,
.reply .btn.primary:hover {
  background: #009675 !important;
  transform: scale(1.05) !important;
  box-shadow: 0 6px 16px rgba(0, 168, 132, 0.25) !important;
}

.inbox.whatsapp-mobile .reply .btn.primary:active,
.reply .btn.primary:active {
  transform: scale(0.95) !important;
}
