:root {
  --blue: #2f6bff;
  --blue-dark: #1d4ed8;
  --navy: #0b1233;
  --ink: #0f1a3c;
  --muted: #6b7280;
  --bg: #f4f6fb;
  --card: #ffffff;
  --border: #e6e9f2;
  --green: #16a34a;
  --green-bg: #eafaf0;
  --amber: #d97706;
  --amber-bg: #fef6e7;
  --red: #dc2626;
  --red-bg: #fdecec;
  --radius: 12px;
  --topbar-h: 72px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Source Sans 3', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 14px;
  overflow: hidden;
}

a {
  text-decoration: none;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 240px;
 background: linear-gradient(180deg, #f7faff 0%, #f1f6fe 100%);
  border-right: 1px solid var(--border);
  height: calc(100vh - var(--topbar-h));
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 1010;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 22px;
}

.sidebar .brand img {
  height: 28px;
}

.sidebar .brand .sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: -2px;
}

.sidebar .brand-text {
  line-height: 1.1;
}

.sidebar .brand-text .name {
  font-weight: 800;
  font-size: 17px;
  color: var(--navy);
}

.nav-link-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #3c4257;
  font-weight: 500;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.nav-link-custom i {
  font-size: 20px;
    /* width: 22px; */
    text-align: center;
    width: 25px;
    height: 25px;
    min-width: 25px;
}

.nav-link-custom.active {
  /* background: #eaf0ff;
  color: var(--blue-dark);
  font-weight: 600; */
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.28);
}

.nav-link-custom:hover:not(.active) {
 background-color: #e5effe;
 color: #0066ff;
 transform: translateX(3px);
}

.sidebar-help {
  background: #f5f8ff;
  border-radius: 12px;
  padding: 16px 14px;
  margin-top: auto;
}

.sidebar-help .help-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e4eaff;
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 15px;
}

.sidebar-help .help-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 4px;
}

.sidebar-help .help-text {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.sidebar-help .help-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-dark);
}

/* ---------- Main layout ---------- */
.main-wrap {
  margin-left: 220px;
  margin-top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--topbar-h);
  box-sizing: border-box;
  z-index: 1030;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: none;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-logo {
 height: 40px;
    max-height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.search-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  width: 100%;
  max-width: 320px;
  min-width: 0;
  flex: 1;
  font-size: 13px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 13px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.bell {
  position: relative;
  color: #4b5568;
  font-size: 18px;
}

.bell .dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid #fff;
}

.admin-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}

.admin-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dbe4ff;
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.page {
  /* padding: 26px 28px; */
  flex: 1;
  /* overflow-y: auto; */
  min-height: 0;
  background-color: #f8fafc;
  padding: 2.25rem 2.5rem;
  overflow-y: auto;
  height: 100%;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

.page-sub {
  color: var(--muted);
  font-size: 13.5px;
}

.page-date {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Cards / stats ---------- */
.card-custom {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  height: 100%;
}

.stat-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.stat-icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
}

.stat-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.stat-link {
  font-size: 12.5px;
  color: var(--blue-dark);
  font-weight: 600;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.panel-head h6 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.panel-head a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue-dark);
}

/* ---------- Table ---------- */
table.tbl-custom {
  width: 100%;
  border-collapse: collapse;
}

table.tbl-custom thead th {
  text-align: left;
  font-size: 11.5px;
  color: var(--muted);
  text-transform: none;
  font-weight: 600;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  /* background: #fafbfd; */
}

table.tbl-custom tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--ink);
  vertical-align: middle;
}

table.tbl-custom tbody tr:last-child td {
  border-bottom: none;
}

table.tbl-custom tbody tr:hover {
  background: #fafbfd;
}

.badge-status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-live {
  background: var(--green-bg);
  color: var(--green);
}

.badge-pending {
  background: var(--amber-bg);
  color: var(--amber);
}

.badge-rejected {
  background: var(--red-bg);
  color: var(--red);
}

.badge-active {
  background: var(--green-bg);
  color: var(--green);
}

.badge-inactive {
  background: var(--red-bg);
  color: var(--red);
}

.btn-view {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 7px;
  padding: 4px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.btn-view:hover {
  background: #f5f6fa;
}

.action-dots {
  color: #9aa3b8;
  cursor: pointer;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-dots:hover {
  background: #f0f2f7;
  color: var(--ink);
}

.actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-blue {
  background: var(--blue);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13.5px;
}

.btn-blue:hover {
  background: var(--blue-dark);
  color: #fff;
}

.btn-outline-custom {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Tabs / pills ---------- */
.pill-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
}

.pill-tabs a {
  padding: 12px 4px;
  margin-right: 22px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

.pill-tabs a.active {
  color: var(--blue-dark);
  border-color: var(--blue);
}

/* ---------- Chip-style filter tabs (Models page) ---------- */
.chip-tabs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.chip-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}

.chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.chip:hover:not(.active) {
  background: #f5f6fa;
  color: var(--ink);
}

.chip-count {
  opacity: .85;
}

.chip-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mini-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

.mini-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  width: 70px;
  color: var(--ink);
  min-width: 0;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-btn:hover {
  background: #f5f6fa;
}

/* progressively hide non-essential bits so the row never wraps/scrolls */
@media (max-width:1400px) {
  .mini-search input {
    width: 50px;
  }
}

@media (max-width:1250px) {
  .chip-count {
    display: none;
  }

  .filter-label {
    display: none;
  }

  .mini-search input {
    width: 45px;
  }
}

@media (max-width:991.98px) {
  .chip-count {
    display: inline;
  }

  .filter-label {
    display: inline;
  }

  .mini-search input {
    width: 80px;
  }
}

@media (max-width:576px) {
  .chip-count {
    display: none;
  }

  .filter-label {
    display: none;
  }

  .mini-search input {
    width: 40px;
  }

  .chip {
    padding: 5px 8px;
    font-size: 11px;
  }
}

.summary-strip {
  display: flex;
  gap: 10px;
  padding: 16px 18px;
  flex-wrap: wrap;
}

.summary-pill {
  background: var(--bg);
  border-radius: 9px;
  padding: 10px 16px;
  min-width: 110px;
}

.summary-pill .num {
  font-weight: 800;
  font-size: 17px;
  color: var(--navy);
}

.summary-pill .lbl {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Chat side panel ---------- */
.chat-side {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eef1fb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.chat-tabs {
  display: flex;
  gap: 18px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.chat-tabs a {
  padding: 10px 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}

.chat-tabs a.active {
  color: var(--blue-dark);
  border-color: var(--blue);
}

.chat-body {
  padding: 14px 16px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg {
  display: flex;
  gap: 8px;
  max-width: 88%;
}

.msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}

.msg-avatar.av-durrun {
  background: var(--blue);
}

.msg-avatar.av-partner {
  background: #1a1f2e;
}

.msg-avatar.av-admin {
  background: var(--blue);
}

.msg-avatar.av-user {
  background: #94a3b8;
}

.msg-content {
  flex: 1;
  min-width: 0;
}

.msg .who {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.msg .time {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 6px;
}

.msg .bubble {
  background: #f5f6fa;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: #333;
}

.msg.me {
  margin-left: auto;
  text-align: right;
}

.msg.me .bubble {
  background: #eaf0ff;
}

.chat-input {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-input input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  outline: none;
}

/* ---------- Forms ---------- */
.form-label-custom {
  /* font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  text-align: left;
  display: block; */
  font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    display: block;
     text-align: left;

}

.form-control-custom {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
 font-size: 0.95rem;
  width: 100%;
  background: #fff;
  text-align: left;
  height: 50px;
}

.form-control-custom:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}

/* ---------- Login page ---------- */
.login-outer {
  min-height: 100vh;
  background: linear-gradient(180deg, #eef2fb, #e6ecfa);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(120, 150, 255, .18);
}

.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(20, 30, 80, .08);
    /* padding: 36px 34px; */
    width: 450px;
    position: relative;
    z-index: 2;
    padding: 4rem 2.75rem;
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 18px;
}

.login-logo img {
  height: 34px;
}

.login-logo .tag {
  font-size: 12.5px;
  color: var(--muted);
}

.login-title {
     font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.login-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa3b8;
  font-size: 14px;
}

.input-icon input {
  padding-left: 36px;
}

.input-icon .toggle-eye {
  left: auto;
  right: 13px;
  cursor: pointer;
}

.remember-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 18px;
  font-size: 12.5px;
}

.copyright {
  text-align: center;
  color: #9aa3b8;
  font-size: 12px;
  margin-top: 18px;
  position: relative;
  z-index: 2;
}

.signbtn{
/* background-color: var(--primary-color); */
/* border-color: var(--primary-color); */
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    height: 48px;
    border-radius: 10px;
    width: 100%;
    margin-top: 1.25rem;
    /* transition: background-color 0.2s ease, transform 0.1s ease; */
}

/* ---------- Mobile topbar toggle ---------- */
.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 16px;
  flex: none;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: var(--topbar-h);
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(15, 20, 50, .45);
  z-index: 1005;
}

.sidebar-backdrop.show {
  display: block;
}

/* ---------- Detail / chat side panel as slide-over on smaller screens ---------- */
.detail-close-btn {
  display: block;
  cursor: pointer;
  font-size: 16px;
}

.detail-close-btn:hover {
  color: var(--ink);
}

/* ---------- Responsive breakpoints ---------- */
@media (max-width:991.98px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 1050;
    box-shadow: 0 0 30px rgba(0, 0, 0, .15);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-wrap {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  /* detail/chat panel becomes a right-side slide-over */
  .detail-panel-col {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(380px, 92vw);
    z-index: 1060;
    transform: translateX(100%);
    transition: transform .25s ease;
    padding: 0;
  }

  .detail-panel-col.open {
    transform: translateX(0);
  }

  .detail-panel-col .chat-side {
    height: 100vh;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    border-right: none;
  }
}

@media (max-width:767.98px) {
  .page {
    padding: 18px 16px;
  }

  .page-head {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .page-title {
    font-size: 20px;
  }

  .topbar {
    padding: 10px 16px;
  }

  .search-box {
    width: 100%;
  }

  .admin-chip span.chip-label {
    display: none;
  }

  .panel-head {
    flex-wrap: wrap;
    gap: 6px;
  }

  .pill-tabs {
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
  }

  .pill-tabs a {
    margin-right: 16px;
    flex: none;
  }

  .summary-strip {
    padding: 12px;
  }

  .login-card {
    width: 92vw;
    padding: 28px 22px;
  }
}

@media (max-width:575.98px) {
  .stat-value {
    font-size: 22px;
  }

  .page-title {
    font-size: 19px;
  }
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Force a min-width (and thus a horizontal scrollbar) ONLY below tablet size.
   Above that, the table just shrinks to fit its column — no scroll, ever. */
@media (max-width: 767.98px) {
  .table-scroll table.tbl-custom {
    min-width: 640px;
  }
}

/* Durrun Logo */
.sidebar .brand img {
  height: 40px;
  max-height: 45px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;

  position: relative;
  bottom: 10px;
  right: 8px;
}

/* Admin Panel Text */
.sidebar .admin-panel-text {
  font-size: 10.5px;
  letter-spacing: 0.03em;

  position: relative;
  top: -3em;
  left: 5em;
}


.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    display: flex
;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.stat-icon-blue {
    background-color: #e0edff;
    color: #0066ff;
}

/* =====================================================
   Chat drawer — full-height right panel (matches PDF)
   ===================================================== */
.page-shell {
  display: flex;
  flex: 1;
  min-height: 0;
}

.page-shell > .page {
  flex: 1;
  min-width: 0;
}

.detail-panel-col {
  background: #fff;
}

.chat-side {
  border: none;
  border-radius: 0;
  background: #fff;
}

.chat-head {
  align-items: center;
  gap: 14px;
  padding: 20px 20px 16px;
  border-bottom: none;
}

.chat-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 22px;
  flex: none;
}

.chat-tabs {
  gap: 22px;
  padding: 0 20px;
}

.chat-tabs a {
  padding: 12px 2px;
  font-size: 13px;
}

.chat-body {
  padding: 18px 20px;
  gap: 20px;
}

.msg {
  max-width: 100%;
  gap: 10px;
}

.msg-avatar {
  width: 34px;
  height: 34px;
  font-size: 15px;
  margin-top: 0;
}

.msg-avatar.av-durrun,
.msg-avatar.av-admin {
  background: #e4ecff;
  color: var(--blue);
}

.msg-avatar.av-user {
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
}

.msg-avatar.av-partner {
  font-size: 14px;
}

.msg .who {
  font-size: 12.5px;
  margin-bottom: 4px;
}

.msg .time {
  font-size: 11px;
}

.msg .bubble {
  background: #f3f4f8;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.msg:has(.av-durrun) .bubble,
.msg:has(.av-admin) .bubble {
  background: #e9f0ff;
}

.chat-input {
  padding: 14px 20px;
}

@media (min-width: 992px) {
  .detail-panel-col {
    flex: 0 0 380px;
    width: 380px;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .detail-panel-col .chat-side {
    flex: 1;
    min-height: 0;
    height: auto;
  }
}

@media (min-width: 992px) and (max-width: 1279.98px) {
  .detail-panel-col {
    flex-basis: 330px;
    width: 330px;
  }
}


/* =====================================================
   PDF match pass
   ===================================================== */
:root { --blue: #1a5cff; --blue-dark: #1246d6; }

/* topbar */
.bell .dot {
  top: -7px; right: -8px; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff; border: none;
}
.admin-chip .chip-label { display: flex; flex-direction: column; line-height: 1.15; }
.admin-chip .chip-label b { font-size: 13.5px; }
.admin-chip .chip-label small { font-size: 11px; color: var(--muted); font-weight: 500; }

/* Add Model */
.page-head .btn-blue { padding: 11px 20px; border-radius: 8px; font-size: 14px; box-shadow: 0 1px 2px rgba(26,92,255,.25); }
.page-title { font-size: 28px; }
.page-head { margin-bottom: 20px; }

/* stat tiles */
.stat-tile { display: flex; align-items: center; gap: 14px; padding: 16px 18px; height: 100%; }
.stat-ico { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.ico-blue { background: #e8f0ff; color: var(--blue); }
.ico-green { background: #e3f7ea; color: var(--green); }
.ico-amber { background: #fdf0d8; color: #f59e0b; }
.ico-red { background: #fde6e6; color: var(--red); }
.stat-num { font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat-lbl { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.stat-sub { font-size: 11.5px; color: var(--muted); }

/* chips */
.chip { background: #fff; color: #3c4257; border-radius: 8px; padding: 6px 12px; }
.chip.active { background: #e8f0ff; color: var(--blue); border-color: #b9d0ff; }
.chip-tabs { overflow: visible; }

/* table */
table.tbl-custom thead th { font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    text-align: left; }
.th-sorted { color: var(--blue); }
table.tbl-custom tbody td { padding: 12px 16px; }
.name-cell { display: flex; align-items: center; gap: 12px; }
.name-ico { width: 24px; text-align: center; font-size: 18px; color: var(--blue); flex: none; display: inline-flex; justify-content: center; }
.name-ico i { color: inherit !important; margin: 0 !important; }
.name-ico .oa-logo { width: 22px; height: 22px; color: #111827; }
.name-main { font-weight: 600; font-size: 13.5px; color: var(--navy); }
.name-sub { font-size: 11.5px; color: var(--muted); }
.type-pill { display: inline-block; padding: 3px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.type-model { background: #e8f0ff; color: var(--blue); }
.type-template { background: #efeaff; color: #6d4fd6; }
.actions-cell { gap: 8px; }
.btn-view { padding: 5px 16px; border-radius: 8px; }
.action-dots { width: 32px; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--ink); }

/* chat drawer details */
.oa-logo { width: 1em; height: 1em; display: block; }
.chat-avatar { background: #f3f4f8; color: #111827; font-size: 30px; width: 56px; height: 56px; border-radius: 12px; }
.chat-tabs a { white-space: nowrap; }
.chat-tabs { gap: 20px; }
.msg-avatar.av-partner { background: #111827; font-size: 20px; }
.msg-avatar.av-partner .oa-logo { width: 20px; height: 20px; color: #fff; }

.chat-tabs { gap: 16px; padding: 0 20px; overflow-x: auto; scrollbar-width: none; }
.chat-tabs::-webkit-scrollbar { display: none; }
.chat-tabs a { font-size: 12.5px; flex: none; cursor: pointer; }

/* community: keep "Open in Community" on its own line so title doesn't squeeze */
.chat-head { flex-wrap: wrap; }
.chat-head > a.ms-auto { flex-basis: 100%; margin-left: 0 !important; padding-left: 70px; }

/* dashboard stat icons — bordered tint box, image icon inside */
.stat-icon {
  border: 1px solid transparent;
  padding: 8px;
  box-sizing: border-box;
}
.stat-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.stat-icon.ic-blue  { background: #e7efff; border-color: #b9d2ff; }
.stat-icon.ic-amber { background: #fff3e0; border-color: #ffd699; }
.stat-icon.ic-red   { background: #fdeaeb; border-color: #f7b6bb; }
.stat-icon.ic-green { background: #e3f7ea; border-color: #a9e6c0; }
/* ---------- View button popup modal (Models page) ---------- */
.chat-modal-backdrop{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(15,20,50,.55);
  z-index:1070;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.chat-modal-backdrop.show{display:flex;}
.chat-modal{
  width:100%;
  max-width:460px;
}
.chat-modal .chat-side{
  height:min(620px,85vh);
  border-radius:16px;
  box-shadow:0 25px 70px rgba(10,15,40,.35);
  border:none;
}
.chat-modal .detail-close-btn{display:block;}
@media (max-width:575.98px){
  .chat-modal{max-width:100%;}
  .chat-modal .chat-side{height:88vh;border-radius:14px;}
}

/* ---------- Submission Details popup (Models + Community) ---------- */
.submission-modal{
  width:100%;
  max-width:940px;
  height:min(680px,90vh);
  background:#fff;
  border-radius:18px;
  box-shadow:0 30px 80px rgba(10,15,40,.4);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.submission-modal-head{
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:22px 26px;
  border-bottom:1px solid var(--border);
  flex:none;
}

.submission-modal-icon{
  width:44px;height:44px;min-width:44px;
  border-radius:10px;
  background:#e7efff;
  color:var(--blue);
  display:flex;align-items:center;justify-content:center;
  font-size:19px;
}

.submission-modal-heading{ min-width:0; }
.submission-modal-title{ font-size:19px; font-weight:800; color:var(--navy); line-height:1.25; }
.submission-modal-sub{ font-size:12.5px; color:var(--muted); margin-top:3px; }

.submission-modal-close{
  margin-left:auto;
  cursor:pointer;
  color:var(--muted);
  font-size:18px;
  padding:4px;
  flex:none;
}
.submission-modal-close:hover{ color:var(--ink); }

.submission-modal-body{
  display:flex;
  flex:1;
  min-height:0;
}

.submission-left{
  flex:0 0 44%;
  max-width:44%;
  border-right:1px solid var(--border);
  padding:20px 22px;
  overflow-y:auto;
}

.submission-right{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  min-height:0;
  background:#fafbff;
}

.submission-tabs{
  display:flex;
  gap:20px;
  border-bottom:1px solid var(--border);
  margin-bottom:18px;
}

.submission-tabs a{
  font-size:13px;
  font-weight:600;
  color:var(--muted);
  padding:0 0 10px;
  cursor:pointer;
  border-bottom:2px solid transparent;
  white-space:nowrap;
}

.submission-tabs a.active{ color:var(--blue-dark); border-bottom-color:var(--blue); }
.submission-tabs a:hover:not(.active){ color:var(--ink); }

.info-card{
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
}

.info-card-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  background:#f5f8ff;
  border-bottom:1px solid var(--border);
}

.info-card-icon{
  width:30px;height:30px;min-width:30px;
  border-radius:8px;
  background:#e7efff;
  color:var(--blue);
  display:flex;align-items:center;justify-content:center;
  font-size:13px;
}

.info-card-title{ font-weight:700; font-size:13.5px; color:var(--navy); }

.info-card-id{
  margin-left:auto;
  font-size:11.5px;
  font-weight:700;
  color:var(--blue-dark);
  background:#e7efff;
  padding:3px 10px;
  border-radius:6px;
  white-space:nowrap;
}

.info-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  border-bottom:1px solid var(--border);
  font-size:13px;
}
.info-row:last-child{ border-bottom:none; }
.info-row i{ width:16px; text-align:center; color:var(--muted); font-size:13px; flex:none; }
.info-label{ color:var(--muted); min-width:100px; }
.info-value{ font-weight:600; color:var(--ink); margin-left:auto; text-align:right; }

.file-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding:11px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  margin-bottom:10px;
}
.file-row .file-ico{
  width:34px;height:34px;min-width:34px;
  border-radius:8px;
  background:#f5f6fa;
  color:var(--blue);
  display:flex;align-items:center;justify-content:center;
  font-size:15px;
}
.file-row .file-name{ font-size:13px; font-weight:600; color:var(--ink); }
.file-row .file-size{ font-size:11.5px; color:var(--muted); margin-top:1px; }
.file-row .file-download{ margin-left:auto; color:var(--muted); font-size:14px; }
.file-row .file-download:hover{ color:var(--blue-dark); }

.screenshot-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.screenshot-thumb{
  aspect-ratio:16/10;
  border:1px solid var(--border);
  border-radius:10px;
  background:#f5f6fa;
  display:flex;align-items:center;justify-content:center;
  color:#c2c8d6;
  font-size:24px;
}

.conversation-head{
  display:flex;
  align-items:center;
  gap:8px;
  padding:16px 20px;
  border-bottom:1px solid var(--border);
  font-weight:700;
  font-size:13.5px;
  color:var(--navy);
  background:#fff;
  flex:none;
}
.conversation-head i{ color:var(--blue); }
.sort-select{
  margin-left:auto;
  font-size:12px;
  border:1px solid var(--border);
  border-radius:8px;
  padding:5px 10px;
  color:var(--ink);
  background:#fff;
}

.conversation-body{
  flex:1;
  overflow-y:auto;
  padding:18px 20px;
  display:flex;
  flex-direction:column;
  gap:16px;
  min-height:0;
}

.conversation-input{
  border-top:1px solid var(--border);
  padding:14px 20px;
  background:#fff;
  flex:none;
}
.conversation-input textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 12px;
  font-size:13px;
  resize:none;
  min-height:56px;
  font-family:inherit;
  outline:none;
}
.conversation-input textarea:focus{ border-color:var(--blue); }
.conversation-input-row{
  display:flex;
  align-items:center;
  gap:18px;
  margin-top:10px;
  flex-wrap:wrap;
}
.attach-link{ font-size:12.5px; color:var(--muted); display:flex; align-items:center; gap:6px; cursor:pointer; }
.attach-link:hover{ color:var(--ink); }
.file-size-note{ font-size:11.5px; color:var(--muted); display:flex; align-items:center; gap:6px; }
.btn-send{ margin-left:auto; padding:9px 18px; border-radius:8px; font-size:13px; display:flex; align-items:center; gap:8px; }

.msg-avatar.av-partner,
.msg-avatar.av-user{ background:#efe6ff; color:#7c3aed; }
.msg:has(.av-partner) .bubble,
.msg:has(.av-user) .bubble{ background:#f3ecff; }

@media (max-width:767.98px){
  .submission-modal{ height:92vh; }
  .submission-modal-body{ flex-direction:column; }
  .submission-left{ max-width:100%; flex:none; border-right:none; border-bottom:1px solid var(--border); max-height:42vh; }
  .submission-right{ min-height:0; }
}
@media (max-width:575.98px){
  .submission-modal-head{ padding:18px 18px; }
  .submission-left{ padding:16px 16px; }
  .conversation-head, .conversation-body, .conversation-input{ padding-left:16px; padding-right:16px; }
}

/* ---------- Account form popup (Support Access page) ---------- */
.account-modal{
  width:100%;
  max-width:440px;
  max-height:88vh;
  overflow-y:auto;
  background:#fff;
  border-radius:16px;
  box-shadow:0 25px 70px rgba(10,15,40,.35);
  padding:22px;
}
@media (max-width:575.98px){
  .account-modal{max-width:100%;max-height:92vh;padding:18px;}
}

/* ---------- Admin profile dropdown ---------- */
.admin-chip{ position:relative; cursor:pointer; -webkit-tap-highlight-color:transparent; }

.profile-menu{
  display:none;
  position:absolute;
  top:calc(100% + 14px);
  right:0;
  width:250px;
  background:#fff;
  border-radius:14px;
  border:1px solid var(--border);
  box-shadow:0 18px 45px rgba(10,15,40,.18);
  padding:14px 0 8px;
  z-index:1090;
  text-align:left;
  cursor:default;
}

.profile-menu.show{ display:block; }

.profile-menu-head{
  padding:0 18px 12px;
  border-bottom:1px solid var(--border);
  margin-bottom:6px;
}

.profile-menu-name{ font-weight:700; font-size:14px; color:var(--navy); }
.profile-menu-email{ font-size:12px; color:var(--muted); margin-top:2px; word-break:break-all; }

.profile-menu-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 18px;
  font-size:13.5px;
  font-weight:500;
  color:var(--ink);
  cursor:pointer;
}

.profile-menu-item:hover{ background:var(--bg); }

.profile-menu-item i{ width:16px; text-align:center; color:var(--muted); font-size:14px; }

.profile-menu-divider{ height:1px; background:var(--border); margin:6px 0; }

.profile-menu-item.danger{ color:var(--red); }
.profile-menu-item.danger i{ color:var(--red); }

@media (max-width:575.98px){
  .profile-menu{ width:220px; }
}