* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #fff;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, #1b57ff, transparent 30%),
    radial-gradient(circle at bottom right, #ff2e63, transparent 35%),
    linear-gradient(135deg, #080b2a, #10194a);
}

a {
  color: inherit;
  text-decoration: none;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.container {
  width: min(1100px, 94%);
  margin: 30px auto;
}

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
  text-align: center;
}

.hero h1 {
  font-size: clamp(36px, 7vw, 76px);
  margin-bottom: 10px;
}

.hero p {
  max-width: 720px;
  margin: auto;
  font-size: 18px;
  opacity: 0.9;
}

.glass-card {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 20px;
}

.form-card {
  max-width: 440px;
  margin: 60px auto;
}

input,
textarea,
select {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  border: none;
  margin: 8px 0 14px;
  outline: none;
}

textarea {
  min-height: 110px;
}

button,
.btn,
.cta-btn {
  border: none;
  padding: 12px 18px;
  border-radius: 16px;
  background: #ffffff;
  color: #10194a;
  font-weight: bold;
  cursor: pointer;
  display: inline-block;
}

button:hover,
.btn:hover,
.cta-btn:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}

.feed {
  display: grid;
  gap: 20px;
}

.advert-card h3 {
  margin-bottom: 5px;
}

.advert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  padding: 6px 10px;
  background: #ffcf33;
  color: #111;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
}

.media {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 18px;
  margin: 12px 0;
}

.stats,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.stats span {
  opacity: 0.9;
  font-size: 14px;
}

.comment-box {
  margin-top: 15px;
}

.small-comment {
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.hidden {
  display: none !important;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
}

.metric-card {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  text-align: center;
}

.metric-card h3 {
  font-size: 34px;
  margin: 0;
}

.user-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 0.7fr;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  width: 100%;
  padding-right: 55px;
}

#togglePassword {
  position: absolute;
  right: 14px;
  top: 43%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  color: #10194a;
  font-size: 13px;
  font-weight: bold;
}

.post-composer textarea {
  min-height: 130px;
  resize: vertical;
}

.upload-box {
  position: relative;
  border: 2px dashed rgba(255,255,255,0.5);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  margin: 10px 0 18px;
  background: rgba(255,255,255,0.1);
}

.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-box p {
  margin: 0;
  font-weight: bold;
}

.upload-box small {
  opacity: 0.85;
}

.media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 16px;
  background: #000;
}

.sponsor-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin: 18px 0;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
}

.sponsor-row p {
  margin: 4px 0 0;
  opacity: 0.85;
  font-size: 14px;
}

.switch {
  position: relative;
  width: 56px;
  height: 30px;
  flex: 0 0 auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: rgba(255,255,255,0.35);
  border-radius: 999px;
  transition: 0.25s;
}

.slider:before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.25s;
}

.switch input:checked + .slider {
  background: #00d084;
}

.switch input:checked + .slider:before {
  transform: translateX(26px);
}

.payment-panel {
  padding: 18px;
  margin-bottom: 18px;
  border-radius: 20px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.2);
}

.payment-panel h3 {
  margin-top: 0;
}

.create-post-btn {
  width: 100%;
  margin-top: 10px;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  width: 100%;
  padding-right: 60px;
}

#togglePassword {
  position: absolute;
  right: 14px;
  top: 43%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  color: #10194a;
  font-size: 13px;
  font-weight: bold;
}


.feed-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.feed-media {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 18px;
  cursor: pointer;
  background: #000;
}

.star-row {
  display: flex;
  gap: 8px;
  font-size: 30px;
  cursor: pointer;
  margin: 10px 0;
}

.star-row span {
  color: #ffcf33;
}

.review-box textarea {
  width: 100%;
  min-height: 80px;
}

.discussion-list {
  margin-top: 15px;
}

.discussion-item {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.12);
  margin-top: 10px;
}

.discussion-item p {
  margin: 5px 0;
}

.discussion-item small {
  opacity: 0.75;
}

.review-stars {
  margin-left: 8px;
  color: #ffcf33;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.88);
  display: grid;
  place-items: center;
  padding: 20px;
}

.image-preview-modal img {
  max-width: 95%;
  max-height: 90vh;
  border-radius: 18px;
}

.image-preview-modal button {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 26px;
}

.danger-btn {
  background: #ff3b3b;
  color: #fff;
}

.icon-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.icon-actions button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 22px;
  background: rgba(255,255,255,0.14);
  color: #fff;
}

.icon-actions button i {
  display: block;
  line-height: 1;
}

.icon-actions button:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.06);
}

.icon-actions button.liked {
  background: #ff2e63;
  color: #fff;
}

.review-stars {
  display: inline-flex;
  gap: 2px;
  margin-left: 8px;
  vertical-align: middle;
}

.review-stars i {
  font-size: 22px;
  color: #ffcf33;
}

.star-row {
  display: flex;
  gap: 8px;
  font-size: 34px;
  cursor: pointer;
  margin: 10px 0;
}

.star-row .star {
  color: #ffcf33;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.88);
  display: grid;
  place-items: center;
  padding: 20px;
}

.image-preview-modal img {
  max-width: 95%;
  max-height: 90vh;
  border-radius: 18px;
}

.preview-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: #fff;
  color: #10194a;
  z-index: 10000;
}

.preview-close i {
  line-height: 1;
}

.interaction-area {
  margin-top: 14px;
}

.comment-box,
.review-box {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.1);
}

.comment-box {
  display: flex;
  gap: 10px;
}

.comment-box input {
  flex: 1;
  margin: 0;
}

.review-box textarea {
  width: 100%;
  min-height: 80px;
}

.star-row {
  display: flex;
  gap: 10px;
  font-size: 32px;
  margin-bottom: 10px;
}

.star {
  cursor: pointer;
  color: #ddd;
  transition: 0.2s;
}

.star.active {
  color: #ffcf33;
}

.load-more-btn {
  margin-top: 12px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px 14px;
  border-radius: 14px;
}

.load-more-btn:hover {
  background: rgba(255,255,255,0.25);
}

.create-post-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

.feed-search-card input {
  margin: 0;
}

.feed-search-card button {
  width: 100%;
}

.feed-loader {
  text-align: center;
  padding: 16px;
  opacity: 0.85;
}

.skeleton-card {
  height: 260px;
  border-radius: 24px;
  margin-bottom: 20px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.08),
    rgba(255,255,255,0.22),
    rgba(255,255,255,0.08)
  );
  background-size: 200% 100%;
  animation: skeletonMove 1.2s infinite;
}

@keyframes skeletonMove {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.advert-card {
  animation: fadeUp 0.25s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-picker {
  position: relative;
}

.category-suggestions {
  position: absolute;
  top: 105%;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(20, 25, 60, 0.96);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.suggestion-item {
  padding: 12px 14px;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
}

.suggestion-item:hover {
  background: rgba(255,255,255,0.16);
}

#searchFeedBtn {
  background: linear-gradient(135deg, #051EDD, #FF0000);
  color: white;
  font-weight: bold;
  border-radius: 25px;
  padding: 12px;
  transition: 0.2s;
}

#searchFeedBtn:hover {
  transform: scale(1.03);
}

.smart-sections {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
}

.smart-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.smart-card {
  min-width: 190px;
  max-width: 190px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  cursor: pointer;
  transition: 0.2s;
  overflow: hidden;
}

.smart-card img,
.smart-card video {
  transition: transform 0.25s ease;
}

.smart-card:hover img,
.smart-card:hover video {
  transform: scale(1.04);
}

.smart-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.18);
}

.smart-card img,
.smart-card video,
.smart-placeholder {
  width: 100%;
  height: 120px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(0,0,0,0.35);
  display: grid;
  place-items: center;
  color: #fff;
}

.smart-card h4 {
  margin: 10px 0 4px;
  font-size: 15px;
}

.smart-card p {
  margin: 0 0 6px;
  opacity: 0.85;
  font-size: 13px;
}

.smart-card small {
  opacity: 0.75;
}

@media (max-width: 700px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .nav,
  .nav-links {
    flex-direction: column;
    gap: 10px;
  }

  .container {
    width: 94%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .glass-card,
  .feed-search-card,
  .advert-card,
  .smart-sections {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .icon-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
  }

  .icon-actions button {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    min-width: 46px;
    max-width: 46px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .icon-actions button i {
    line-height: 1;
    font-size: 22px;
  }

  .smart-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 10px;
  }

  .smart-strip::-webkit-scrollbar {
    display: none;
  }

  .smart-card {
    flex: 0 0 160px;
    min-width: 160px;
    max-width: 160px;
  }

  .smart-card img,
  .smart-card video,
  .smart-placeholder {
    width: 100%;
    height: 120px;
    object-fit: cover;
  }

  .user-row {
    grid-template-columns: 1fr;
  }
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.analytics-grid .metric-card {
  background: rgba(255,255,255,0.14);
  border-radius: 20px;
  padding: 18px;
  text-align: center;
}

.analytics-grid .metric-card h3 {
  margin: 0;
  font-size: 32px;
}

.analytics-grid .metric-card p {
  margin: 6px 0 0;
  opacity: 0.85;
}

@media (max-width: 700px) {
  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.chart-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}

.chart-tabs button {
  flex: 1;
  min-width: 110px;
}

.performance-chart {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  overflow-x: auto;
  min-height: 230px;
  padding: 12px 4px;
}

.chart-bar-wrap {
  min-width: 64px;
  text-align: center;
}

.chart-value {
  font-size: 13px;
  margin-bottom: 6px;
  opacity: 0.9;
}

.chart-bar {
  width: 34px;
  margin: auto;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #ffffff, #ff2e63);
}

.chart-bar-wrap small {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.75;
}

@media (max-width: 700px) {
  .performance-chart {
    max-width: 100%;
    overflow-x: auto;
  }

  .chart-tabs button {
    min-width: 45%;
  }
}

.create-post-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.btn-loader {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.feed-mode-tabs {
  display: flex;
  gap: 10px;
  margin: 16px 0 20px;
}

.feed-mode-tabs button {
  flex: 1;
}

.feed-mode-tabs button.active {
  background: linear-gradient(135deg, #051EDD, #FF0000);
  color: #fff;
}

.icon-actions button.saved {
  background: #ffcf33;
  color: #10194a;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.container {
  max-width: 100%;
  overflow-x: hidden;
}

.smart-sections,
.glass-card,
.advert-card,
.feed,
.feed-media-grid {
  max-width: 100%;
  overflow-x: hidden;
}

.smart-strip {
  max-width: 100%;
  overflow-x: auto;
}

.feed-media {
  max-width: 100%;
}

@media (max-width: 700px) {
  .smart-card {
    flex: 0 0 155px;
    min-width: 155px;
    max-width: 155px;
  }

  .icon-actions {
    max-width: 100%;
    overflow-x: hidden;
  }
}

.icon-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow: visible !important;
  max-height: none !important;
}

.icon-actions button {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  min-width: 46px;
  max-width: 46px;
  overflow: hidden;
}

.advertiser-link {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.advertiser-link:hover {
  text-decoration: underline;
}

.advertiser-profile-header {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 900;
  background: linear-gradient(135deg, #051EDD, #FF0000);
}

@media (max-width: 700px) {
  .advertiser-profile-header {
    align-items: flex-start;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
    font-size: 28px;
  }
}

.notifications-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.notification-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ff2e63;
  color: #fff;
  font-size: 13px;
}

.notification-item {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.1);
  margin-top: 10px;
}

.notification-item.unread {
  border-left: 4px solid #ffcf33;
  background: rgba(255,255,255,0.18);
}

.notification-item p {
  margin: 0 0 5px;
}

.notification-item small {
  opacity: 0.75;
}

@media (max-width: 700px) {
  .notifications-head {
    flex-direction: column;
    align-items: stretch;
  }
}

.report-card {
  background: rgba(255,255,255,0.1);
  padding: 12px;
  border-radius: 12px;
  margin-top: 10px;
}

.report-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.report-actions button {
  flex: 1;
}

.report-card strong {
  font-size: 18px;
}

.report-card p {
  margin: 6px 0;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 207, 51, 0.18);
  color: #ffcf33;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.premium-status-card {
  border: 1px solid rgba(255, 207, 51, 0.35);
}

.premium-status-card h2 {
  margin-bottom: 10px;
}

#premiumStatusBox {
  margin-bottom: 15px;
}

#premiumStatusBox p {
  margin: 6px 0;
}

.premium-note {
  display: block;
  margin-top: 6px;
  color: #ffcf33;
  font-weight: 700;
}

.pulse-badge {
  animation: pulseBadge 1.2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.schedule-box {
  margin: 22px 0;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(47, 140, 255, 0.8);
  background: rgba(5, 20, 70, 0.35);
}

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

.schedule-head h3 {
  margin: 0 0 6px;
}

.schedule-head p {
  margin: 0;
  opacity: 0.9;
}

.schedule-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.schedule-switch input {
  display: none;
}

.schedule-slider {
  width: 58px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  position: relative;
  cursor: pointer;
}

.schedule-slider::before {
  content: '';
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  left: 3px;
  top: 3px;
  transition: 0.25s ease;
}

.schedule-switch input:checked + .schedule-slider {
  background: #22c55e;
}

.schedule-switch input:checked + .schedule-slider::before {
  transform: translateX(28px);
}

.schedule-panel {
  margin-top: 18px;
}

.schedule-note {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.45);
}

#scheduled_for {
  width: 100%;
  margin-top: 8px;
}

.schedule-panel small {
  display: block;
  margin-top: 8px;
  opacity: 0.85;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.catalog-public-card {
  overflow: hidden;
  padding: 0;
}

.catalog-public-content {
  padding: 16px;
}

.catalog-media-grid {
  width: 100%;
}

.catalog-media {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  border-radius: 18px 18px 0 0;
}

.catalog-price {
  font-size: 1.3rem;
  font-weight: bold;
  color: #FFD700;
  margin: 10px 0;
}

.modal-overlay {
  position: fixed;
  inset: 0; 
  display: flex; 
  justify-content: center; 
  overflow-y: auto;

  background: rgba(3, 8, 30, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(8px);

  align-items: flex-start;
  padding: 90px 16px 40px;
  z-index: 9999;
}

.modal-card {
  width: min(560px, 96%);
  max-height: 92vh;
  overflow-y: auto;
}

.modal-card input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

.catalog-public-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
  padding: 16px;
  overflow: hidden;
}

.catalog-public-content {
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.catalog-public-content .cta-btn {
  margin-top: 18px !important;
  margin-bottom: 18px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.catalog-swipe-box {
  position: relative;
  width: 260px;
  height: 260px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(0,0,0,0.35);
}

.catalog-swipe-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.catalog-swipe-track::-webkit-scrollbar {
  display: none;
}

.catalog-swipe-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
}

.catalog-swipe-slide img,
.catalog-swipe-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* clean CSS-only arrow buttons */
.catalog-swipe-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;

  width: 42px !important;
  height: 42px !important;

  min-width: 42px !important;
  max-width: 42px !important;

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

  border: none !important;
  border-radius: 50% !important;

  background: rgba(0,0,0,0.58) !important;
  backdrop-filter: blur(8px);

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

  z-index: 30 !important;
  cursor: pointer;

  overflow: hidden !important;
}

.catalog-swipe-left {
  left: 10px !important;
}

.catalog-swipe-right {
  right: 10px !important;
}

.catalog-swipe-btn::before {
  content: "";

  width: 10px;
  height: 10px;

  border-top: 3px solid #fff;
  border-right: 3px solid #fff;

  display: block;
}

.catalog-swipe-btn::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
}

@media (max-width: 700px) {
  .catalog-public-card {
    grid-template-columns: 1fr;
  }

  .catalog-swipe-box {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

.catalog-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,0.92);
  display: none;
  place-items: center;
  padding: 20px;
}

.catalog-preview-modal.show {
  display: grid;
}

.catalog-preview-content {
  width: min(900px, 94vw);
  max-height: 88vh;
  display: grid;
  place-items: center;
}

.catalog-preview-content img,
.catalog-preview-content video {
  max-width: 100%;
  max-height: 86vh;
  border-radius: 22px;
  object-fit: contain;
  background: #000;
}

.catalog-preview-close {
  position: fixed !important;
  top: 20px;
  right: 20px;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  background: rgba(255,255,255,0.95) !important;
  z-index: 1000000;
}

.catalog-preview-close::before,
.catalog-preview-close::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 3px;
  background: #10194a;
  left: 12px;
  top: 20px;
  border-radius: 999px;
}

.catalog-preview-close::before {
  transform: rotate(45deg);
}

.catalog-preview-close::after {
  transform: rotate(-45deg);
}

.catalog-preview-nav {
  position: fixed !important;
  top: 50%;
  transform: translateY(-50%);
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  background: rgba(255,255,255,0.18) !important;
  z-index: 1000000;
}

.catalog-preview-prev {
  left: 24px;
}

.catalog-preview-next {
  right: 24px;
}

.catalog-preview-nav::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-top: 4px solid #fff;
  border-right: 4px solid #fff;
  top: 16px;
}

.catalog-preview-prev::before {
  transform: rotate(-135deg);
  left: 19px;
}

.catalog-preview-next::before {
  transform: rotate(45deg);
  left: 14px;
}

.catalog-preview-count {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000000;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 8px 13px;
  border-radius: 999px;
  font-weight: 800;
}

@media (max-width: 700px) {
  .catalog-preview-nav {
    width: 42px !important;
    height: 42px !important;
  }

  .catalog-preview-prev {
    left: 10px;
  }

  .catalog-preview-next {
    right: 10px;
  }
}

/* Advertiser dashboard catalog cards */
#catalogItems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}

#catalogItems .catalog-item {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.22);
  overflow: hidden;
}

#catalogItems .catalog-swipe-box {
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 1 / 1;
  margin-bottom: 16px;
}

#catalogItems .catalog-swipe-slide {
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.25);
}

#catalogItems .catalog-placeholder {
  font-weight: 800;
  opacity: 0.75;
}

#catalogItems h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

#catalogItems p {
  margin: 0 0 12px;
  opacity: 0.9;
}

#catalogItems strong {
  display: inline-block;
  margin-bottom: 14px;
  color: #ffcf33;
  font-size: 18px;
}

#catalogItems button {
  margin-right: 8px;
  margin-bottom: 8px;
}

@media (max-width: 700px) {
  #catalogItems {
    grid-template-columns: 1fr;
  }
}

.catalog-hidden-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 59, 59, 0.18);
  color: #ff8080;
  font-size: 12px;
  font-weight: 800;
}

.feed-swipe-box {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
  margin-top: 14px;
  padding: 0 46px;
}

.feed-swipe-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.feed-swipe-slide {
  min-width: 100%;
}

.feed-swipe-track::-webkit-scrollbar {
  display: none;
}

.feed-swipe-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: center;
}

.feed-media {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

.feed-swipe-btn {
  position: absolute !important;
  top: 50%;
  transform: translateY(-50%);
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: rgba(0,0,0,0.55) !important;
  border: none !important;
  z-index: 20;
}

.feed-swipe-btn::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  top: 11px;
}

.feed-swipe-left {
  left: 10px;
}

.feed-swipe-left::before {
  transform: rotate(-135deg);
  left: 14px;
}

.feed-swipe-right {
  right: 10px;
}

.feed-swipe-right::before {
  transform: rotate(45deg);
  left: 9px;
}

.feed-preview-modal,
.smart-modal,
.media-preview-modal {
  position: fixed;
  inset: 0;

  z-index: 999999;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  overflow-y: auto;

  padding-top: 80px;
  padding-bottom: 40px;
  padding-left: 15px;
  padding-right: 15px;

  box-sizing: border-box;

  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(10px);
}

.feed-preview-modal.show {
  display: flex;
}

.feed-preview-content {
  width: min(1000px, 95vw);
  max-height: 90vh;
  display: grid;
  place-items: center;
  margin-top: 0;
}

.feed-preview-content img,
.feed-preview-content video {
  background: #000;
}

.feed-preview-content img,
.feed-preview-content video {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 22px;
  object-fit: contain;
}

.feed-preview-close {
  position: fixed !important;
  top: 20px;
  right: 20px;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.95) !important;
  z-index: 1000000;
}

.feed-preview-close::before,
.feed-preview-close::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 3px;
  background: #111;
  left: 12px;
  top: 20px;
}

.feed-preview-close::before {
  transform: rotate(45deg);
}

.feed-preview-close::after {
  transform: rotate(-45deg);
}

.feed-preview-nav {
  position: fixed !important;
  top: 50%;
  transform: translateY(-50%);
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.16) !important;
  z-index: 1000000;
}

.feed-preview-nav::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-top: 4px solid #fff;
  border-right: 4px solid #fff;
  top: 17px;
}

.preview-prev {
  left: 20px;
}

.preview-prev::before {
  transform: rotate(-135deg);
  left: 20px;
}

.preview-next {
  right: 20px;
}

.preview-next::before {
  transform: rotate(45deg);
  left: 14px;
}

.feed-preview-counter {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  z-index: 1000000;
}

.feed-swipe-left {
  left: 6px !important;
}

.feed-swipe-right {
  right: 6px !important;
}

/* FINAL FEED MEDIA FIX */
.feed-swipe-box {
  position: relative !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 18px 0 24px !important;
  overflow: hidden !important;
  border-radius: 22px !important;
  background: rgba(0,0,0,0.35);
}

.feed-swipe-track {
  width: 100% !important;
  height: 100% !important;
}

.feed-swipe-slide {
  height: 100% !important;
}

.feed-swipe-slide img,
.feed-swipe-slide video,
.feed-media {
  width: 100% !important;
  height: 520px !important;
  max-height: 520px !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 22px !important;
}

.feed-swipe-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 50 !important;
}

.feed-swipe-left {
  left: 18px !important;
}

.feed-swipe-right {
  right: 18px !important;
}

.advert-card .cta-btn {
  margin-top: 24px !important;
  margin-bottom: 18px !important;
  display: inline-flex !important;
  width: fit-content !important;
}

@media (max-width: 700px) {
  .feed-swipe-slide img,
  .feed-swipe-slide video,
  .feed-media {
    height: 330px !important;
    max-height: 330px !important;
  }
}

/* Advertiser profile advert media swipe */
.profile-advert-swipe-box {
  position: relative;
  width: 100%;
  margin: 16px 0 24px;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(0,0,0,0.35);
}

.profile-advert-swipe-track {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.profile-advert-swipe-track::-webkit-scrollbar {
  display: none;
}

.profile-advert-swipe-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: center;
}

.profile-advert-swipe-slide img,
.profile-advert-swipe-slide video {
  width: 100%;
  height: 520px;
  object-fit: cover;
  display: block;
  border-radius: 22px;
}

.profile-advert-swipe-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  background: rgba(0,0,0,0.6) !important;
  z-index: 50 !important;
}

.profile-advert-swipe-btn::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  top: 14px;
}

.profile-advert-swipe-left {
  left: 18px !important;
}

.profile-advert-swipe-left::before {
  transform: rotate(-135deg);
  left: 16px;
}

.profile-advert-swipe-right {
  right: 18px !important;
}

.profile-advert-swipe-right::before {
  transform: rotate(45deg);
  left: 11px;
}

@media (max-width: 700px) {
  .profile-advert-swipe-slide img,
  .profile-advert-swipe-slide video {
    height: 330px;
  }
}

.feed-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 18px;
  align-items: center;
}

.feed-cta-row .cta-btn {
  margin: 0 !important;
}

.inquiry-btn {
  background: rgba(255,255,255,0.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}

@media (max-width: 700px) {
  .feed-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .feed-cta-row .cta-btn,
  .feed-cta-row .inquiry-btn {
    width: 100% !important;
    text-align: center;
  }
}

.inbox-card {
  margin-bottom: 24px;
}

#messageThreadList {
  max-height: 420px;
  overflow-y: auto;
  padding: 10px 0;
  margin-bottom: 18px;
}

.message-bubble {
  max-width: 80%;
  padding: 14px;
  border-radius: 18px;
  margin-bottom: 14px;
  word-break: break-word;
}

.message-bubble.mine {
  margin-left: auto;
  background: linear-gradient(135deg, #1f6fff, #0044ff);
  color: #fff;
}

.message-bubble.theirs {
  margin-right: auto;
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.message-bubble small {
  opacity: 0.7;
  display: block;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .message-bubble {
    max-width: 92%;
  }
}

/* WhatsApp-style message bubbles */
#messageThreadList {
  max-height: 430px;
  overflow-y: auto;
  padding: 14px;
  margin-bottom: 18px;
}

.message-row {
  display: flex;
  width: 100%;
  margin-bottom: 14px;
}

.mine-row {
  justify-content: flex-end;
}

.theirs-row {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 78%;
  padding: 13px 15px;
  border-radius: 18px;
  word-break: break-word;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.message-bubble.mine {
  background: linear-gradient(135deg, #145cff, #0047d9);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.message-bubble.theirs {
  background: rgba(255,255,255,0.16);
  color: #fff;
  border-bottom-left-radius: 5px;
}

.message-bubble strong {
  display: block;
  margin-bottom: 6px;
}

.message-bubble p {
  margin: 0;
}

.message-bubble small {
  display: block;
  margin-top: 8px;
  opacity: 0.75;
  font-size: 12px;
}

@media (max-width: 700px) {
  .message-bubble {
    max-width: 78vw !important;
    width: fit-content !important;
  }
}

/* Custom app scrollbar */
* {
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 1px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffffff, #ff2e63);
  border-radius: 999px; 
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffcf33, #ff2e63);
}

/* FINAL NAV FIX */
.nav {
  position: fixed !important;
  top: 12px !important;
  z-index: 9999 !important;
  width: min(1120px, 94%) !important;
  margin: 12px auto 24px !important;
  border-radius: 24px !important;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(18, 27, 87, 0.78) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  box-shadow: 0 12px 35px rgba(0,0,0,0.28) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
}

.nav-links {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.nav-toggle {
  display: none !important;
}

@media (max-width: 900px) {
  .nav {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
  }

  .nav-toggle {
    display: inline-flex !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .nav-toggle i {
    font-size: 24px;
  }

  .nav-links {
    grid-column: 1 / -1 !important;
    display: none !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    margin-top: 10px !important;
  }

  .nav.nav-open .nav-links {
    display: flex !important;
  }

  .nav-links .btn,
  .nav-links button,
  .nav-links a {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

main.container,
.container {
  padding-top: 110px !important;
}

@media (max-width: 768px) {

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin-top: 14px;
  }

  .nav.nav-open .nav-links {
    display: flex;
  }

  .nav {
    align-items: flex-start;
    flex-wrap: wrap;
  }

}

.chat-updated-text {
  display: block;
  margin-top: -8px;
  margin-bottom: 14px;
  opacity: 0.7;
  font-size: 13px;
}

/* Chat modal header fixed inside modal */
#messageThreadTitle,
#customerThreadTitle {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0;
  padding: 18px 0 4px;
  background: rgba(45, 53, 78, 0.96);
}

#messageThreadUpdated,
#customerThreadUpdated {
  position: sticky;
  top: 48px;
  z-index: 20;
  padding: 0 0 14px;
  background: rgba(45, 53, 78, 0.96);
}

/* Remove inner chat scrollbar */
#messageThreadList,
#customerThreadList {
  scrollbar-width: none;
  padding-right: 18px;
}

#messageThreadList::-webkit-scrollbar,
#customerThreadList::-webkit-scrollbar {
  display: none;
}

/* Nicer outer modal scrollbar */
.modal-card {
  scrollbar-width: thin;
  scrollbar-color: #1f6fff rgba(255,255,255,0.08);
  padding-right: 24px !important;
}

.modal-card::-webkit-scrollbar {
  width: 8px;
}

.modal-card::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  margin: 18px 8px;
}

.modal-card::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1f6fff, #0044ff);
  border-radius: 999px;
}

.modal-card::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #4f8dff, #1f6fff);
}

/* Fullscreen chat modal */
#messageThreadModal,
#customerThreadModal {
  padding: 0 !important;
}

#messageThreadModal .modal-card,
#customerThreadModal .modal-card {
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
}

#messageThreadTitle,
#customerThreadTitle {
  border-radius: 0 !important;
  padding-right: 76px !important;
}

/* move close button to top-right */
#messageReplyForm .danger-btn,
#customerReplyForm .danger-btn {
  position: fixed !important;
  top: 18px !important;
  right: 22px !important;
  z-index: 100000 !important;
  grid-column: auto !important;
  grid-row: auto !important;
  background: rgba(255,255,255,0.16) !important;
}

/* bottom input now only textarea + send */
#messageReplyForm,
#customerReplyForm {
  grid-template-columns: 1fr 48px !important;
}

#messageReplyText,
#customerReplyText {
  grid-column: 1 !important;
}

#messageReplyForm button[type="submit"],
#customerReplyForm button[type="submit"] {
  grid-column: 2 !important;
}

/* FINAL FULLSCREEN CHAT POLISH */

/* true edge-to-edge chat */
#messageThreadModal,
#customerThreadModal {
  padding: 0 !important;
  background: rgba(0,0,0,0.86) !important;
}

#messageThreadModal .modal-card,
#customerThreadModal .modal-card {
  width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* remove all chat scrollbars visually */
#messageThreadModal .modal-card,
#customerThreadModal .modal-card,
#messageThreadList,
#customerThreadList {
  scrollbar-width: none !important;
}

#messageThreadModal .modal-card::-webkit-scrollbar,
#customerThreadModal .modal-card::-webkit-scrollbar,
#messageThreadList::-webkit-scrollbar,
#customerThreadList::-webkit-scrollbar {
  display: none !important;
}

/* clean full-width top chat bar */
#messageThreadTitle,
#customerThreadTitle {
  position: sticky !important;
  top: 0 !important;
  z-index: 60 !important;
  padding: 18px 72px 4px 18px !important;
  margin: 0 !important;
  width: 100% !important;
  border-radius: 0 !important;
  background: linear-gradient(135deg, rgba(12,24,70,0.98), rgba(28,54,130,0.98)) !important;
}

#messageThreadUpdated,
#customerThreadUpdated {
  position: sticky !important;
  top: 50px !important;
  z-index: 60 !important;
  padding: 0 72px 14px 18px !important;
  margin: 0 !important;
  width: 100% !important;
  background: linear-gradient(135deg, rgba(12,24,70,0.98), rgba(28,54,130,0.98)) !important;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* messages scroll internally but scrollbar is hidden */
#messageThreadList,
#customerThreadList {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  max-height: none !important;
  padding: 20px 16px 100px !important;
  margin: 0 !important;
}

/* bottom composer */
#messageReplyForm,
#customerReplyForm {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 70 !important;
  display: grid !important;
  grid-template-columns: 1fr 50px !important;
  gap: 10px !important;
  align-items: end !important;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important;
  margin: 0 !important;
  background: rgba(10,18,54,0.98) !important;
  border-top: 1px solid rgba(255,255,255,0.12);
}

/* adaptive input */
#messageReplyText,
#customerReplyText {
  grid-column: 1 !important;
  min-height: 46px !important;
  height: auto !important;
  max-height: 135px !important;
  overflow-y: auto !important;
  resize: none !important;
  margin: 0 !important;
  padding: 13px 16px !important;
  border-radius: 22px !important;
  line-height: 1.35 !important;
  background: rgba(255,255,255,0.96) !important;
  color: #10194a !important;
}

/* top-right close button */
#messageReplyForm .danger-btn,
#customerReplyForm .danger-btn {
  position: fixed !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 100000 !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.15) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  font-size: 0 !important;
}

#messageReplyForm .danger-btn::before,
#messageReplyForm .danger-btn::after,
#customerReplyForm .danger-btn::before,
#customerReplyForm .danger-btn::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 3px;
  background: #fff;
  left: 13px;
  top: 20px;
  border-radius: 999px;
}

#messageReplyForm .danger-btn::before,
#customerReplyForm .danger-btn::before {
  transform: rotate(45deg);
}

#messageReplyForm .danger-btn::after,
#customerReplyForm .danger-btn::after {
  transform: rotate(-45deg);
}

/* proper send icon button */
#messageReplyForm button[type="submit"],
#customerReplyForm button[type="submit"] {
  grid-column: 2 !important;
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  background: linear-gradient(135deg, #1f6fff, #0044ff) !important;
  position: relative !important;
}

#messageReplyForm button[type="submit"]::before,
#customerReplyForm button[type="submit"]::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 14px;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #fff;
}

@media (max-width: 700px) {
  #messageThreadTitle,
  #customerThreadTitle {
    padding-left: 14px !important;
  }

  #messageThreadUpdated,
  #customerThreadUpdated {
    padding-left: 14px !important;
  }

  #messageThreadList,
  #customerThreadList {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  #messageReplyForm,
  #customerReplyForm {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

.message-bubble p {
  white-space: pre-wrap !important;
}

/* Final close chat position fix */
#messageReplyForm .danger-btn,
#customerReplyForm .danger-btn {
  position: fixed !important;
  top: 18px !important;
  right: 18px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 1000000 !important;

  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;

  transform: none !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

/* prevent close button from joining the bottom input grid */
#messageReplyForm .report-actions .danger-btn,
#customerReplyForm .report-actions .danger-btn {
  align-self: unset !important;
}

/* Final clean top-right chat close button */
.chat-close-btn {
  position: fixed !important;
  top: 18px !important;
  right: 18px !important;
  z-index: 1000000 !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  background: rgba(255,255,255,0.16) !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
  backdrop-filter: blur(10px);
}

.chat-close-btn::before,
.chat-close-btn::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 3px;
  background: #fff;
  left: 13px;
  top: 21px;
  border-radius: 999px;
}

.chat-close-btn::before {
  transform: rotate(45deg);
}

.chat-close-btn::after {
  transform: rotate(-45deg);
}

/* Reply form now has only input + send */
#messageReplyForm,
#customerReplyForm {
  grid-template-columns: 1fr 50px !important;
}

/* Keep line breaks in messages */
.message-bubble p {
  white-space: pre-wrap !important;
}

/* RESTORE CHAT LAYOUT - FINAL */
#messageThreadModal,
#customerThreadModal {
  padding: 0 !important;
}

#messageThreadModal .modal-card,
#customerThreadModal .modal-card {
  width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-rows: auto auto 1fr auto !important;
}

/* clean top bar */
#messageThreadTitle,
#customerThreadTitle {
  position: relative !important;
  top: auto !important;
  z-index: 20 !important;
  margin: 0 !important;
  padding: 18px 72px 4px 18px !important;
  background: linear-gradient(135deg, rgba(12,24,70,0.98), rgba(28,54,130,0.98)) !important;
  border-radius: 0 !important;
}

#messageThreadUpdated,
#customerThreadUpdated {
  position: relative !important;
  top: auto !important;
  z-index: 20 !important;
  margin: 0 !important;
  padding: 0 72px 14px 18px !important;
  background: linear-gradient(135deg, rgba(12,24,70,0.98), rgba(28,54,130,0.98)) !important;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* this restores chat scrolling */
#messageThreadList,
#customerThreadList {
  overflow-y: auto !important;
  max-height: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 22px 14px 24px !important;
  margin: 0 !important;
  scrollbar-width: none !important;
}

#messageThreadList::-webkit-scrollbar,
#customerThreadList::-webkit-scrollbar {
  display: none !important;
}

/* bottom input bar */
#messageReplyForm,
#customerReplyForm {
  position: relative !important;
  bottom: auto !important;
  z-index: 30 !important;
  display: grid !important;
  grid-template-columns: 1fr 54px !important;
  gap: 10px !important;
  align-items: end !important;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important;
  margin: 0 !important;
  background: rgba(10,18,54,0.98) !important;
  border-top: 1px solid rgba(255,255,255,0.12);
}

#messageReplyText,
#customerReplyText {
  grid-column: 1 !important;

  min-height: 46px !important;
  max-height: 135px !important;

  resize: none !important;
  overflow-y: auto !important;

  margin: 0 !important;
  padding: 13px 16px !important;

  border-radius: 999px !important;

  line-height: 1.45 !important;

  white-space: pre-wrap !important;
  word-break: break-word !important;

  scrollbar-width: none !important;
}

#messageReplyText::-webkit-scrollbar,
#customerReplyText::-webkit-scrollbar {
  display: none !important;
}

/* send icon */
#messageReplyForm button[type="submit"],
#customerReplyForm button[type="submit"] {
  grid-column: 2 !important;
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  font-size: 0 !important;
  background: linear-gradient(135deg, #1f6fff, #0044ff) !important;
}

#messageReplyForm button[type="submit"]::before,
#customerReplyForm button[type="submit"]::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 16px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #fff;
}

/* top-right close icon */
.chat-close-btn {
  position: fixed !important;
  top: 16px !important;
  right: 16px !important;
  z-index: 1000000 !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  background: rgba(255,255,255,0.16) !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
}

.chat-close-btn::before,
.chat-close-btn::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 3px;
  background: #fff;
  left: 12px;
  top: 20px;
  border-radius: 999px;
}

.chat-close-btn::before {
  transform: rotate(45deg);
}

.chat-close-btn::after {
  transform: rotate(-45deg);
}

.message-bubble p {
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

@media (max-width: 768px) {
  .message-bubble {
    max-width: 78vw !important;
  }
}

/* FINAL CHAT BUBBLE WIDTH FIX */
@media (min-width: 769px) {
  .message-bubble {
    max-width: 50vw !important;
    width: fit-content !important;
  }
}

@media (max-width: 768px) {
  .message-bubble {
    max-width: 78vw !important;
    width: fit-content !important;
  }
}

.msg-ticks {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.8;
}

.msg-ticks.blue {
  color: #4fc3ff;
  opacity: 1;
}

.typing-bubble {
  width: fit-content;
  max-width: 90px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.16);
  display: flex;
  gap: 5px;
  margin: 10px 0;
}

.typing-bubble span {
  width: 7px;
  height: 7px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  animation: typingPulse 1.2s infinite ease-in-out;
}

.typing-bubble span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-bubble span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingPulse {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.35;
  }

  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.new-message-pill {
  position: absolute;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  z-index: 80;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(31, 111, 255, 0.95);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(0,0,0,0.28);
}

.conversation-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:12px;
  flex-wrap:wrap;
}

.conversation-unread-badge{
  background:#0b5cff;
  color:#fff;
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  box-shadow:0 4px 12px rgba(11,92,255,0.35);
}

.chat-send-btn i {
  font-size: 26px;
  color: #fff;
  line-height: 1;
}

.chat-send-btn::before,
.chat-send-btn::after {
  content: none !important;
}

.wa-chat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  cursor: pointer;
  transition: 0.2s ease;
  background: rgba(255,255,255,0.08);
  margin-bottom: 10px;
}

.wa-chat-row:hover {
  background: rgba(255,255,255,0.16);
}

.wa-chat-row.unread {
  background: rgba(31,111,255,0.18);
}

.wa-chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  font-weight: 900;
  background: linear-gradient(135deg, #1f6fff, #ff2e63);
  color: #fff;
}

.wa-chat-main {
  min-width: 0;
  flex: 1;
}

.wa-chat-top,
.wa-chat-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wa-chat-top strong,
.wa-chat-bottom p {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wa-chat-bottom p {
  margin: 4px 0 0;
  opacity: 0.78;
  font-size: 14px;
}

.wa-chat-top small {
  opacity: 0.7;
  flex: 0 0 auto;
  font-size: 12px;
}

.wa-unread-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #22c55e;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}

/* MOBILE SCHEDULING FIX */
@media (max-width: 700px) {
  .schedule-box {
    padding: 16px !important;
  }

  .schedule-head {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .schedule-switch {
    width: 100% !important;
    justify-content: space-between !important;
    white-space: normal !important;
    padding: 12px !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,0.1);
  }

  .schedule-switch strong {
    font-size: 14px !important;
    line-height: 1.3 !important;
  }

  #scheduled_for {
    font-size: 14px !important;
    padding: 12px !important;
  }
}

/* CATALOG SWIPE ARROW CLEAN FIX */
.catalog-swipe-btn {
  font-size: 0 !important;
}

.catalog-swipe-left::before {
  transform: rotate(-135deg) !important;
  left: 16px !important;
}

.catalog-swipe-right::before {
  transform: rotate(45deg) !important;
  left: 11px !important;
}

.admin-user-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.reply-preview-bubble {
  border-left: 4px solid rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.14);
  padding: 8px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.reply-preview-bubble p {
  margin: 3px 0 0;
  opacity: 0.85;
  font-size: 13px;
}

.reply-mini-btn {
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  opacity: 0.85;
}

.active-reply-preview {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: rgba(31,111,255,0.18);
  border-left: 4px solid #1f6fff;
  padding: 10px 12px;
  border-radius: 14px;
  margin-bottom: 8px;
}

.active-reply-preview p {
  margin: 3px 0 0;
  font-size: 13px;
  opacity: 0.85;
}

.active-reply-preview button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.reply-clear-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
}

.reply-clear-btn i {
  font-size: 22px;
  line-height: 1;
}

.message-reactions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.message-reactions button {
  border: none;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
}

.active-reaction {
  margin-top: 6px;
  font-size: 20px;
}

.message-reactions button i,
.active-reaction i {
  font-size: 18px;
  color: #fff;
  line-height: 1;
}

.message-reactions button {
  min-width: 34px;
  height: 28px;
  display: inline-grid;
  place-items: center;
}

.message-reactions button.reaction-active {
  background: linear-gradient(135deg, #1f6fff, #22c55e) !important;
  box-shadow: 0 8px 22px rgba(31,111,255,0.35);
  transform: translateY(-1px) scale(1.05);
}

.message-reactions button.reaction-active i {
  color: #ffffff !important;
}

.message-options-menu {
  position: fixed;
  z-index: 999999;
  width: 220px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(20, 25, 40, 0.96);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
  backdrop-filter: blur(16px);
}

.message-options-menu button {
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
}

.message-options-menu button:hover {
  background: rgba(255,255,255,0.1);
}

.message-options-menu .danger-option {
  color: #ff6b6b;
}

.deleted-message-text {
  opacity: 0.75;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 6px;
}

.message-focus-overlay {
  position: fixed;
  inset: 0;
  z-index: 999990;
  background: rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(7px);
  animation: focusFadeIn 0.18s ease forwards;
}

.message-focus-target {
  position: relative;
  z-index: 999999 !important;
  transform: scale(1.035);
  box-shadow: 0 22px 70px rgba(0,0,0,0.45) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.message-options-menu {
  animation: optionsPop 0.18s cubic-bezier(.2,.9,.25,1.2);
}

.long-press-warming {
  transform: scale(0.985);
  filter: brightness(1.08);
  transition: transform 0.18s ease, filter 0.18s ease;
}

@keyframes focusFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes optionsPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-attachment-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.chat-attach-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  transition: 0.2s ease;
}

.chat-attach-btn:hover {
  transform: scale(1.05);
  background: rgba(255,255,255,0.2);
}

.chat-media-preview {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
}

.chat-media-preview img,
.chat-media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-media-preview.hidden {
  display: none;
}

#messageReplyForm .report-actions,
#customerReplyForm .report-actions {
  margin: 0;
  display: flex;
  justify-content: flex-end;
}

#messageReplyForm .chat-send-btn,
#customerReplyForm .chat-send-btn {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  border-radius: 50% !important;
  padding: 0 !important;
}

.chat-attach-btn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 12px !important;
  background: rgba(31, 111, 255, 0.12) !important;
  color: #1f6fff !important;
  border: 1px solid rgba(31, 111, 255, 0.25) !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
}

.chat-attach-btn i {
  font-size: 21px !important;
}

/* CLEAN CHAT COMPOSER - FINAL */
#messageReplyForm,
#customerReplyForm {
  position: relative !important;
  z-index: 30 !important;
  display: grid !important;
  grid-template-columns: 1fr 54px !important;
  gap: 10px !important;
  align-items: end !important;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important;
  margin: 0 !important;
  background: rgba(10,18,54,0.98) !important;
  border-top: 1px solid rgba(255,255,255,0.12) !important;
}

#messageReplyText,
#customerReplyText {
  grid-column: 1 !important;
  width: 100% !important;
  min-height: 46px !important;
  max-height: 135px !important;
  resize: none !important;
  overflow-y: auto !important;
  margin: 0 !important;
  padding: 13px 62px 13px 16px !important;
  border-radius: 10px !important;
  line-height: 1.45 !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  scrollbar-width: none !important;
  background: rgba(255,255,255,0.96) !important;
  color: #10194a !important;
}

#messageReplyText::-webkit-scrollbar,
#customerReplyText::-webkit-scrollbar {
  display: none !important;
}

#messageReplyForm .report-actions,
#customerReplyForm .report-actions {
  grid-column: 2 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: end !important;
  justify-content: center !important;
}

#messageReplyForm .chat-send-btn,
#customerReplyForm .chat-send-btn {
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
  flex: 0 0 54px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  background: linear-gradient(135deg, #1f6fff, #0044ff) !important;
  position: relative !important;
}

#messageReplyForm .chat-send-btn i,
#customerReplyForm .chat-send-btn i {
  display: none !important;
}

#messageReplyForm .chat-send-btn::before,
#customerReplyForm .chat-send-btn::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 16px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #fff;
}

#messageReplyForm .chat-attachment-row,
#customerReplyForm .chat-attachment-row {
  position: absolute !important;
  right: 82px !important;
  bottom: calc(18px + env(safe-area-inset-bottom)) !important;
  z-index: 200 !important;
  width: 38px !important;
  height: 38px !important;
  margin: 0 !important;
  display: block !important;
}

#messageReplyForm .chat-attach-btn,
#customerReplyForm .chat-attach-btn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  border-radius: 12px !important;
  background: rgba(31,111,255,0.12) !important;
  color: #1f6fff !important;
  border: 1px solid rgba(31,111,255,0.25) !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
}

#messageReplyForm .chat-attach-btn i,
#customerReplyForm .chat-attach-btn i {
  display: block !important;
  font-size: 22px !important;
  line-height: 1 !important;
}

#messageReplyForm .chat-attach-btn input,
#customerReplyForm .chat-attach-btn input {
  display: none !important;
}

#messageReplyForm .chat-media-preview,
#customerReplyForm .chat-media-preview {
  display: none !important;
}

/* RESTORE CLEAN SEND BUTTON */
#messageReplyForm .chat-send-btn,
#customerReplyForm .chat-send-btn {
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  background: linear-gradient(135deg, #1f6fff, #0044ff) !important;
  color: #fff !important;
  font-size: 24px !important;
  position: relative !important;
}

#messageReplyForm .chat-send-btn::before,
#customerReplyForm .chat-send-btn::before {
  display: none !important;
  content: none !important;
}

#messageReplyForm .chat-send-btn i,
#customerReplyForm .chat-send-btn i {
  display: block !important;
  color: #fff !important;
  font-size: 26px !important;
  line-height: 1 !important;
}

/* MAKE PAPERCLIP CLICKABLE */
#messageReplyForm .chat-attach-btn,
#customerReplyForm .chat-attach-btn {
  position: relative !important;
  overflow: hidden !important;
}

#messageReplyForm .chat-media-input,
#customerReplyForm .chat-media-input {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 5 !important;
}

#messageReplyForm .chat-attach-btn i,
#customerReplyForm .chat-attach-btn i {
  position: relative !important;
  z-index: 2 !important;
}

#messageReplyForm .chat-media-preview,
#customerReplyForm .chat-media-preview {
  position: absolute !important;
  bottom: 72px !important;
  left: 14px !important;
  width: 86px !important;
  height: 86px !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background: rgba(255,255,255,0.14) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  z-index: 300 !important;
  display: block !important;
}

#messageReplyForm .chat-media-preview.hidden,
#customerReplyForm .chat-media-preview.hidden {
  display: none !important;
}

#messageReplyForm .chat-media-preview img,
#messageReplyForm .chat-media-preview video,
#customerReplyForm .chat-media-preview img,
#customerReplyForm .chat-media-preview video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.chat-media-bubble {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.chat-media-bubble img,
.chat-media-bubble video {
  width: min(280px, 65vw);
  max-height: 320px;
  object-fit: cover;
  border-radius: 16px;
  background: #000;
  display: block;
}

.chat-download-btn {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.chat-download-btn:hover {
  background: rgba(255,255,255,0.26);
}

.chat-media-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000000;
  display: none;
  place-items: center;
  background: rgba(0,0,0,0.94);
  padding: 20px;
}

.chat-media-viewer.show {
  display: grid;
}

.chat-media-viewer-content {
  width: min(1000px, 96vw);
  max-height: 88vh;
  display: grid;
  place-items: center;
}

.chat-media-viewer-content img,
.chat-media-viewer-content video {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 20px;
  background: #000;
}

.chat-media-viewer-close {
  position: fixed !important;
  top: 18px;
  right: 18px;
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  background: rgba(255,255,255,0.18) !important;
  z-index: 10000001;
}

.chat-media-viewer-close::before,
.chat-media-viewer-close::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 3px;
  background: #fff;
  left: 13px;
  top: 21px;
  border-radius: 999px;
}

.chat-media-viewer-close::before {
  transform: rotate(45deg);
}

.chat-media-viewer-close::after {
  transform: rotate(-45deg);
}

.chat-media-viewer-download {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10000001;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-weight: 800;
}

#messageThreadList,
#customerThreadList {
  scroll-behavior: auto !important;
  contain: content;
}

.message-row {
  animation: chatRowSoftIn 0.14s ease both;
}

@keyframes chatRowSoftIn {
  from {
    opacity: 0.85;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-row-focus-target {
  position: relative;
  z-index: 999999 !important;
  transform: scale(1.015);
  box-shadow: 0 20px 55px rgba(0,0,0,0.42) !important;
  transition: 0.18s ease;
}

/* Prevent mobile browsers from zooming into inputs */
input,
textarea,
select,
button {
  font-size: 16px !important;
}

/* Keep chat typing area stable on mobile */
#messageInput,
#customerMessageInput,
#messageReplyInput,
#customerReplyInput,
.chat-input,
.message-input,
textarea[name="message"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"] {
  font-size: 16px !important;
}

/* Better mobile input stability */
@media (max-width: 768px) {
  input,
  textarea,
  select {
    font-size: 16px !important;
    line-height: 1.4;
  }

  textarea,
  input {
    touch-action: manipulation;
  }
}

.in-app-message-toast {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 1000000;
  width: min(360px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border-radius: 22px;
  background: rgba(10, 18, 54, 0.96);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 22px 70px rgba(0,0,0,0.35);
  backdrop-filter: blur(18px);
  color: #fff;
  animation: toastSlideUp 0.25s ease both;
}

/* Chat inbox search */
.chat-search-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 14px;
  padding: 0 14px;
  min-height: 48px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.chat-search-box i {
  flex: 0 0 auto;
  font-size: 21px;
  color: #123;
  opacity: 0.72;
  line-height: 1;
}

.chat-search-box input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #111 !important;
  font-size: 16px !important;
  padding: 0 !important;
}

.chat-search-box input::placeholder {
  color: rgba(0, 0, 0, 0.55);
}

/* Chat selected media preview */
.chat-selected-media-preview {
  width: 100%;
  margin-bottom: 10px;
}

.chat-selected-media-preview.hidden {
  display: none !important;
}

.chat-selected-media-card {
  position: relative;
  overflow: hidden;
  width: min(240px, 82vw);
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 12px 35px rgba(0,0,0,0.22);
}

.chat-selected-media-card img,
.chat-selected-media-card video {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(0,0,0,0.25);
}

.chat-selected-media-card small {
  display: block;
  margin-top: 7px;
  color: rgba(255,255,255,0.82);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-selected-media-remove {
  position: absolute;
  top: -9px;
  right: -9px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ff333b;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);
}

.chat-selected-media-remove i {
  font-size: 20px; 
}

/* Chat selected media preview */
.chat-selected-media-preview {
  width: 100%;
  margin-bottom: 10px;
}

.chat-selected-media-preview.hidden {
  display: none !important;
}

.chat-selected-media-card {
  position: relative;
  width: min(240px, 82vw);
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 12px 35px rgba(0,0,0,0.22);
}

.chat-selected-media-card img,
.chat-selected-media-card video {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(0,0,0,0.25);
}

.chat-selected-media-card small {
  display: block;
  margin-top: 7px;
  color: rgba(255,255,255,0.82);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-selected-media-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  padding: 0 !important;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 45, 65, 0.95);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.28);
  line-height: 1;
}

.chat-selected-media-remove i {
  font-size: 18px;
  line-height: 1;
}

.chat-selected-media-remove:hover {
  transform: scale(1.06);
  background: #ff1f35;
}

.chat-selected-media-remove i {
  font-size: 20px;
}

/* Smart advert popup */
.smart-advert-modal-card {
  width: min(760px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
}

.smart-advert-preview h2 {
  margin-top: 12px;
  margin-bottom: 8px;
}

.smart-advert-preview p {
  line-height: 1.5;
}

.smart-modal-media-box {
  margin: 16px 0;
}

.smart-modal-media-box .feed-media {
  max-height: 420px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.35);
}

.smart-modal-actions {
  margin-top: 14px;
}

/* Customer chat back-to-top */
#customerThreadModal .modal-card {
  position: relative;
}

.chat-back-top {
  position: absolute;
  right: 22px;
  bottom: 104px;
  z-index: 10;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #051EDD, #FF0000);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(0,0,0,0.35);
}

/* Customer chat back-to-bottom */
#customerThreadModal .modal-card {
  position: relative;
}

.chat-back-bottom {
  position: absolute;
  right: 22px;
  bottom: 104px;
  z-index: 10;
  width: 42px;
  height: 42px;
  padding: 0 !important;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #051EDD, #FF0000);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(0,0,0,0.35);
  line-height: 1;
}

.chat-back-bottom i {
  display: block;
  font-size: 26px;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.chat-back-bottom.hidden {
  display: none !important;
}

.premium-locked-card {
  text-align: center;
  padding: 22px;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
}

.premium-locked-card i {
  font-size: 34px;
  display: block;
  margin-bottom: 8px;
}

.premium-locked-card h3 {
  margin: 6px 0;
}

.premium-locked-card p {
  opacity: 0.9;
  line-height: 1.45;
}

.premium-locked-card button {
  margin-top: 10px;
}

.advertiser-profile-info {
  flex: 1;
}

.profile-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 6px 0 8px;
}

.profile-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0;
  opacity: 0.95;
}

.business-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.follow-business-btn,
.business-profile-actions .cta-btn {
  min-width: 170px;
  justify-content: center;
}

.follow-business-btn {
  margin-top: 10px;
  width: fit-content; 
  display: inline-flex;
  align-items: center; 
  gap: 8px;
}

.follow-business-btn i {
  font-size: 20px;
  line-height: 1;
}

.follow-business-btn.following {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.32);
}

.catalog-public-content .inquiry-btn {
  margin-top: 10px;
  display: inline-flex;
  width: fit-content;
}

.notification-toolbar {
  display: flex;
  justify-content: stretch;
  gap: 10px;
  margin: 12px 0 16px;
}

.notification-action-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  border: none;
  background: #fff;
  color: #07123f;
  font-weight: 700;
  cursor: pointer;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

.notification-delete-btn {
  width: 38px;
  height: 38px;
  padding: 0 !important;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.notification-delete-btn i {
  font-size: 19px;
  line-height: 1;
}

.notification-delete-btn:hover {
  background: rgba(255,0,0,0.38);
}

.wa-chat-preview {
  min-width: 0;
}

.chat-reference-line {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notifications-load-more-btn {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  border-radius: 14px;
  border: none;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.notifications-load-more-btn:hover {
  background: rgba(255,255,255,0.24);
}

.profile-photos-form {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.14);
}

.profile-photo-preview-wrap {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: start;
}

.business-photo-preview {
  width: 100%;
  min-height: 130px;
  border-radius: 18px;
  background: rgba(255,255,255,0.10);
  border: 1px dashed rgba(255,255,255,0.28);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.8);
}

.business-photo-preview.small {
  aspect-ratio: 1 / 1;
}

.business-photo-preview.cover {
  min-height: 160px;
}

.business-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 720px) {
  .profile-photo-preview-wrap {
    grid-template-columns: 1fr;
  }
}

.save-profile-photos-btn {
  display: block;
  width: fit-content;
  min-width: 190px;
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 13px 22px;
  border-radius: 16px;
  font-weight: 800;
  text-align: center;
}

.profile-photos-divider {
  width: 100%;
  height: 1px;
  margin: 22px 0 0;
  border: 0;
  background: rgba(255,255,255,0.22);
}

@media (max-width: 720px) {
  .save-profile-photos-btn {
    width: 100%;
  }
}

/* Public business profile header */
.business-profile-card {
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
}

.business-cover-wrap {
  width: 100%;
  height: 190px;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(5,30,221,0.65), rgba(255,0,0,0.45));
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

.business-cover-wrap img,
.business-cover-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.business-profile-main {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 20px;
  align-items: start;
  padding: 0 24px 24px;
  margin-top: -52px;
}

.business-profile-avatar {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.92);
  background: linear-gradient(135deg, #051EDD, #FF0000);
  color: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 3rem;
  font-weight: 900;
  box-shadow: 0 14px 35px rgba(0,0,0,0.35);
}

.business-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.business-profile-info {
  padding-top: 58px;
  min-width: 0;
}

.business-profile-info h1 {
  margin: 0 0 8px;
  line-height: 1.1;
}

.profile-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

.profile-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 10px 0;
  opacity: 0.95;
}

.follow-business-btn {
  margin-top: 10px;
  width: fit-content;
  min-width: 170px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.follow-business-btn i {
  font-size: 20px;
  line-height: 1;
}

.follow-business-btn.following {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.32);
}

@media (max-width: 720px) {
  .business-cover-wrap {
    height: 150px;
  }

  .business-profile-main {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 18px 22px;
    margin-top: -46px;
  }

  .business-profile-avatar {
    width: 96px;
    height: 96px;
    font-size: 2.4rem;
  }

  .business-profile-info {
    padding-top: 0;
  }

  .business-profile-info h1 {
    font-size: 1.55rem;
  }
}

/* WhatsApp-style stable chat modal layout */
#messageThreadModal,
#customerThreadModal {
  align-items: stretch;
  justify-content: stretch;
}

#messageThreadModal .modal-card,
#customerThreadModal .modal-card {
  width: min(720px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
}

/* Keep chat top bar visible */
#messageThreadModal .chat-thread-header,
#customerThreadModal .chat-thread-header,
#messageThreadModal .thread-header,
#customerThreadModal .thread-header,
#messageThreadModal .modal-header,
#customerThreadModal .modal-header {
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
  background: rgba(7, 18, 63, 0.96);
  backdrop-filter: blur(14px);
}

/* Message list takes remaining space */
#messageThreadList,
#customerThreadList {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Input remains at bottom above keyboard */
#messageReplyForm,
#customerReplyForm {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 45;
  background: rgba(7, 18, 63, 0.96);
  backdrop-filter: blur(14px);
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

/* Public catalog layout */
.catalog-public-card .catalog-swipe-box {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.catalog-public-card .catalog-swipe-slide img,
.catalog-public-card .catalog-swipe-slide video {
  width: 100%;
  display: block;
  object-fit: cover;
}

.catalog-action-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.catalog-action-row .cta-btn {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  justify-content: center;
  text-align: center;
}

@media (max-width: 520px) {
  .catalog-action-row {
    gap: 8px;
  }

  .catalog-action-row .cta-btn {
    font-size: 0.85rem;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Business hours settings */
.business-hours-box {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.16);
}

.business-hours-grid {
  display: grid;
  gap: 12px;
}

.business-hour-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 100px;
  gap: 10px;
  align-items: center;
}

.business-hour-row label:first-child {
  font-weight: 800;
}

.hours-closed-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Public business hours */
.business-hours-public {
  margin-top: 18px;
  margin-bottom: 22px;
}

.business-hours-public-list {
  display: grid;
  gap: 8px;
}

.business-hours-public-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.business-hours-public-row:last-child {
  border-bottom: none;
}

.business-hours-public-row span {
  text-align: right;
}

@media (max-width: 720px) {
  .business-hour-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.07);
  }

  .business-hours-public-row {
    align-items: flex-start;
  }
}

/* Final mobile chat stability fix */
#messageThreadModal,
#customerThreadModal {
  padding: 0 !important;
  align-items: stretch !important;
  justify-content: stretch !important;
}

#messageThreadModal .modal-card,
#customerThreadModal .modal-card {
  width: min(760px, 100vw) !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 auto !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

#messageThreadModal .thread-header,
#messageThreadModal .chat-thread-header,
#messageThreadModal .modal-header,
#customerThreadModal .thread-header,
#customerThreadModal .chat-thread-header,
#customerThreadModal .modal-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 90 !important;
  flex-shrink: 0 !important;
  background: rgba(7, 18, 63, 0.98) !important;
  backdrop-filter: blur(14px);
}

#messageThreadList,
#customerThreadList {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

#messageReplyForm,
#customerReplyForm {
  flex-shrink: 0 !important;
  position: sticky !important;
  bottom: 0 !important;
  z-index: 95 !important;
  background: rgba(7, 18, 63, 0.98) !important;
  backdrop-filter: blur(14px);
  padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
}

.chat-back-bottom {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 130;
  width: 44px;
  height: 44px;
  padding: 0 !important;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #051EDD, #FF0000);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(0,0,0,0.35);
}

.chat-back-bottom i {
  font-size: 27px;
  line-height: 1;
}

.chat-back-bottom.hidden {
  display: none !important;
}

/* FINAL OVERRIDE: full-screen chat modal */
#messageThreadModal,
#customerThreadModal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  z-index: 9999 !important;
}

#messageThreadModal .modal-card,
#customerThreadModal .modal-card {
  width: 100vw !important;
  max-width: none !important;
  min-width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#messageThreadModal .thread-header,
#messageThreadModal .chat-thread-header,
#messageThreadModal .modal-header,
#customerThreadModal .thread-header,
#customerThreadModal .chat-thread-header,
#customerThreadModal .modal-header {
  flex-shrink: 0 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 10000 !important;
  background: rgba(7, 18, 63, 0.98) !important;
  backdrop-filter: blur(14px);
}

#messageThreadList,
#customerThreadList {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

#messageReplyForm,
#customerReplyForm {
  flex-shrink: 0 !important;
  position: sticky !important;
  bottom: 0 !important;
  z-index: 10001 !important;
}

/* FINAL FIX: Business profile photo upload layout */
.profile-photos-form {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.profile-photo-preview-wrap {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  box-sizing: border-box;
}

.profile-photo-upload-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.profile-photo-upload-card > label:first-child {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.business-photo-preview {
  width: 100%;
  max-width: 100%;
  border-radius: 18px;
  background: rgba(255,255,255,0.10);
  border: 1px dashed rgba(255,255,255,0.28);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: rgba(255,255,255,0.82);
  box-sizing: border-box;
}

.business-photo-preview.small {
  width: 180px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.business-photo-preview.cover {
  width: 100%;
  height: 180px;
  min-height: 0;
  max-height: 180px;
}

.business-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.custom-file-picker {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  cursor: pointer;
}

.custom-file-picker input {
  display: none;
}

.custom-file-picker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.95);
  color: #07123f;
  font-weight: 800;
  white-space: nowrap;
}

.save-profile-photos-btn {
  display: block;
  width: fit-content;
  min-width: 190px;
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 13px 22px;
  border-radius: 16px;
  font-weight: 800;
  text-align: center;
}

.profile-photos-divider {
  width: 100%;
  height: 1px;
  margin: 22px 0 0;
  border: 0;
  background: rgba(255,255,255,0.22);
}

@media (max-width: 720px) {
  .profile-photo-preview-wrap {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .business-photo-preview.small {
    width: 150px;
    height: 150px;
  }

  .business-photo-preview.cover {
    height: 145px;
    max-height: 145px;
  }

  .custom-file-picker,
  .custom-file-picker span,
  .save-profile-photos-btn {
    width: 100%;
  }
}

/* CLEAN FINAL: Business Hours independent section */
.business-hours-box {
  width: 100%;
  max-width: 100%;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.16);
  overflow: visible !important;
  max-height: none !important;
  box-sizing: border-box;
}

.business-hours-grid {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

.business-hour-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) 90px;
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.business-hour-row > label:first-child {
  font-weight: 800;
}

.business-hour-row input[type="time"] {
  width: 100%;
  min-width: 0;
}

.hours-closed-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.hours-closed-check input {
  width: auto;
  margin: 0;
}

.save-business-hours-btn {
  width: 100%;
  margin-top: 16px;
}

@media (max-width: 720px) {
  .business-hours-box {
    overflow: visible !important;
    max-height: none !important;
    padding-right: 0;
  }

  .business-hours-grid {
    gap: 10px;
  }

  .business-hour-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.07);
  }

  .business-hour-row > label:first-child {
    grid-column: 1 / -1;
  }

  .hours-closed-check {
    grid-column: 1 / -1;
  }

  .business-hour-row input[type="time"] {
    min-height: 42px;
  }
}

/* Admin moderation cards */
.admin-report-card {
  display: grid;
  gap: 10px;
}

.admin-report-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.report-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 207, 51, 0.18);
  color: #ffcf33;
  font-weight: 900;
  white-space: nowrap;
}

.admin-report-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

@media (max-width: 720px) {
  .admin-report-head {
    flex-direction: column;
  }

  .report-count-badge {
    width: fit-content;
  }

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

/* Admin subscriptions */
.admin-subscription-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.admin-subscription-toolbar button {
  flex: 1;
  min-width: 180px;
}

.admin-manual-premium-box {
  margin: 18px 0 24px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
}

.admin-premium-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.admin-premium-form-grid input {
  margin: 0;
}

.admin-subscription-card {
  padding: 14px;
  margin-top: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
}

.admin-subscription-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.admin-subscription-head p {
  margin: 5px 0 0;
  opacity: 0.82;
}

.subscription-status-badge {
  padding: 7px 11px;
  border-radius: 999px;
  font-weight: 900;
  background: rgba(255,255,255,0.16);
  white-space: nowrap;
}

.subscription-status-badge.active {
  background: rgba(34,197,94,0.18);
  color: #86efac;
}

.subscription-status-badge.expired,
.subscription-status-badge.cancelled {
  background: rgba(255,59,59,0.18);
  color: #ff9b9b;
}

.subscription-status-badge.grace {
  background: rgba(255,207,51,0.18);
  color: #ffcf33;
}

.admin-subscription-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px 14px;
  margin: 12px 0;
}

.admin-subscription-details p {
  margin: 0;
}

.admin-subscription-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-subscription-actions button {
  flex: 1;
  min-width: 150px;
}

@media (max-width: 720px) {
  .admin-premium-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-subscription-head {
    flex-direction: column;
  }

  .admin-subscription-actions {
    flex-direction: column;
  }
}

/* Admin Load More buttons */
.admin-load-more-btn {
  width: 100%;
  margin-top: 14px;
  min-height: 44px;
  border-radius: 16px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
  font-weight: 900;
}

.admin-load-more-btn:hover {
  background: rgba(255,255,255,0.24);
}

/* Admin user management */
.admin-user-tools {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.admin-user-tools input,
.admin-user-tools select {
  margin: 0;
}

.admin-user-summary {
  margin-bottom: 12px;
  opacity: 0.9;
  font-weight: 700;
}

.admin-user-card {
  padding: 14px;
  margin-top: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
}

.admin-user-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-user-main p {
  margin: 5px 0;
  opacity: 0.85;
}

.admin-user-main small {
  display: block;
  opacity: 0.78;
}

.admin-user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.admin-role-badge,
.admin-premium-badge,
.admin-verified-badge,
.admin-muted-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.admin-role-badge {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.admin-premium-badge {
  background: rgba(255,207,51,0.18);
  color: #ffcf33;
}

.admin-verified-badge {
  background: rgba(34,197,94,0.18);
  color: #86efac;
}

.admin-muted-badge {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.78);
}

.admin-user-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px 14px;
  margin: 12px 0;
}

.admin-user-details p {
  margin: 0;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-user-actions button {
  flex: 1;
  min-width: 130px;
}

@media (max-width: 720px) {
  .admin-user-tools {
    grid-template-columns: 1fr;
  }

  .admin-user-main {
    flex-direction: column;
  }

  .admin-user-badges {
    justify-content: flex-start;
  }

  .admin-user-actions {
    flex-direction: column;
  }
}

/* Admin user details modal */
.admin-user-details-modal {
  width: min(900px, 96vw);
  max-height: 90vh;
}

.admin-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.admin-modal-head h2 {
  margin: 0;
}

.admin-modal-head small {
  opacity: 0.8;
}

.admin-modal-close {
  width: 44px;
  height: 44px;
  padding: 0 !important;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 26px;
}

.admin-details-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.admin-details-box {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  margin-bottom: 14px;
}

.admin-details-box h3 {
  margin-top: 0;
}

.admin-details-box p {
  margin: 7px 0;
}

.admin-details-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.admin-mini-advert-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.admin-mini-advert-row:last-child {
  border-bottom: none;
}

.admin-mini-advert-row p {
  margin: 4px 0 0;
  opacity: 0.8;
}

.admin-details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-details-actions button {
  flex: 1;
  min-width: 160px;
}

@media (max-width: 720px) {
  .admin-user-details-modal {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }

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

  .admin-mini-advert-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-details-actions {
    flex-direction: column;
  }
}

/* FINAL FIX: Admin user details modal top clearance */
#adminUserDetailsModal {
  align-items: flex-start !important;
  padding-top: 95px !important;
  padding-bottom: 28px !important;
}

#adminUserDetailsModal .admin-user-details-modal {
  max-height: calc(100dvh - 125px) !important;
  overflow-y: auto !important;
  margin-top: 0 !important;
}

#adminUserDetailsModal .admin-modal-head {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-bottom: 12px;
  background: rgba(33, 42, 84, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (max-width: 720px) {
  #adminUserDetailsModal {
    padding-top: 82px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
  }

  #adminUserDetailsModal .admin-user-details-modal {
    width: 100vw !important;
    height: calc(100dvh - 82px) !important;
    max-height: calc(100dvh - 82px) !important;
    border-radius: 22px 22px 0 0 !important;
  }
}

/* FINAL FIX: My Messages modal top clearance */
#customerInboxModal,
#myMessagesModal,
#messagesModal,
#inboxModal {
  align-items: flex-start !important;
  padding-top: 96px !important;
  padding-bottom: 28px !important;
}

#customerInboxModal .modal-card,
#myMessagesModal .modal-card,
#messagesModal .modal-card,
#inboxModal .modal-card {
  max-height: calc(100dvh - 126px) !important;
  overflow-y: auto !important;
  margin-top: 0 !important;
}

/* Keep inbox modal content readable */
#customerInboxModal .modal-card,
#myMessagesModal .modal-card,
#messagesModal .modal-card,
#inboxModal .modal-card {
  background: rgba(33, 42, 84, 0.96) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (max-width: 720px) {
  #customerInboxModal,
  #myMessagesModal,
  #messagesModal,
  #inboxModal {
    padding-top: 88px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-bottom: 18px !important;
  }

  #customerInboxModal .modal-card,
  #myMessagesModal .modal-card,
  #messagesModal .modal-card,
  #inboxModal .modal-card {
    width: 100% !important;
    max-height: calc(100dvh - 106px) !important;
  }
}

/* Admin platform maintenance */
.admin-maintenance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.admin-maintenance-grid button {
  width: 100%;
  min-height: 46px;
}

.admin-maintenance-result {
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
}

.admin-maintenance-result ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.admin-maintenance-result li {
  margin: 5px 0;
}

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

/* Admin activity logs */
.admin-logs-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.admin-logs-toolbar button {
  flex: 1;
  min-width: 150px;
}

.admin-log-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 13px;
  margin-top: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
}

.admin-log-item p {
  margin: 5px 0 0;
  opacity: 0.78;
}

.admin-log-item small {
  white-space: nowrap;
  opacity: 0.75;
}

@media (max-width: 720px) {
  .admin-log-item {
    flex-direction: column;
  }

  .admin-log-item small {
    white-space: normal;
  }
}

/* Admin analytics */
.admin-analytics-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.admin-analytics-toolbar button {
  min-width: 170px;
}

.admin-analytics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.admin-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.admin-analytics-box {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
}

.admin-analytics-box h3 {
  margin-top: 0;
  margin-bottom: 14px;
}

.admin-mini-chart {
  display: grid;
  gap: 12px;
}

.admin-chart-row {
  display: grid;
  gap: 6px;
}

.admin-chart-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.92rem;
}

.admin-chart-label span {
  opacity: 0.88;
}

.admin-chart-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.14);
}

.admin-chart-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2418ff, #ff003d);
}

.admin-analytics-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.admin-analytics-list-item:last-child {
  border-bottom: none;
}

.admin-analytics-list-item p {
  margin: 4px 0;
  opacity: 0.82;
}

.admin-analytics-list-item small {
  display: block;
  opacity: 0.74;
}

.admin-analytics-list-item span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  font-weight: 900;
  white-space: nowrap;
}

.admin-analytics-list-item button {
  min-width: 80px;
}

@media (max-width: 820px) {
  .admin-analytics-grid {
    grid-template-columns: 1fr;
  }

  .admin-analytics-list-item {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-analytics-list-item span,
  .admin-analytics-list-item button {
    width: 100%;
    text-align: center;
  }
}

/* Admin Meta-style line charts */
.admin-line-chart-wrap {
  width: 100%;
  overflow: hidden;
}

.admin-line-chart-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  opacity: 0.88;
}

.admin-line-chart-top strong {
  font-size: 0.95rem;
  opacity: 1;
}

.admin-line-chart-top span:last-child {
  text-align: right;
}

.admin-line-chart {
  width: 100%;
  height: 220px;
  display: block;
}

.admin-chart-axis {
  stroke: rgba(255,255,255,0.22);
  stroke-width: 2;
}

.admin-chart-axis.soft {
  stroke: rgba(255,255,255,0.10);
}

.admin-line-area {
  fill: rgba(255,255,255,0.10);
}

.admin-line-path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.22));
}

.admin-line-point {
  fill: #ffffff;
  stroke: rgba(36,24,255,0.9);
  stroke-width: 4;
}

.admin-line-chart-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.74rem;
  opacity: 0.72;
}

.admin-line-chart-bottom span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .admin-line-chart {
    height: 180px;
  }

  .admin-line-chart-top {
    font-size: 0.76rem;
  }

  .admin-line-chart-bottom {
    font-size: 0.68rem;
  }
}

/* Analytics timeline controls */
.analytics-timeline-tools {
  display: grid;
  grid-template-columns: 220px 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.analytics-timeline-tools select,
.analytics-timeline-tools input {
  margin: 0;
}

.advertiser-analytics-controls {
  margin-bottom: 18px;
}

@media (max-width: 760px) {
  .analytics-timeline-tools {
    grid-template-columns: 1fr;
  }

  .analytics-timeline-tools button {
    width: 100%;
  }
}

/* Reusable Meta-style analytics line charts */
.admin-line-chart-wrap {
  width: 100%;
  overflow: hidden;
}

.admin-line-chart-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  opacity: 0.88;
}

.admin-line-chart-top strong {
  font-size: 0.95rem;
  opacity: 1;
}

.admin-line-chart-top span:last-child {
  text-align: right;
}

.admin-line-chart {
  width: 100%;
  height: 220px;
  display: block;
}

.admin-chart-axis {
  stroke: rgba(255,255,255,0.22);
  stroke-width: 2;
}

.admin-chart-axis.soft {
  stroke: rgba(255,255,255,0.10);
}

.admin-line-area {
  fill: rgba(255,255,255,0.10);
}

.admin-line-path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.22));
}

.admin-line-point {
  fill: #ffffff;
  stroke: rgba(36,24,255,0.9);
  stroke-width: 4;
}

.admin-line-chart-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.74rem;
  opacity: 0.72;
}

.admin-line-chart-bottom span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .admin-line-chart {
    height: 180px;
  }

  .admin-line-chart-bottom {
    font-size: 0.68rem;
  }
}

/* Platform settings */
.platform-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.platform-settings-grid label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.platform-settings-grid input,
.platform-settings-grid select,
.platform-settings-grid textarea {
  width: 100%;
  margin: 0;
}

.platform-settings-wide {
  grid-column: 1 / -1;
}

.platform-settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.platform-settings-actions button {
  min-width: 190px;
}

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

  .platform-settings-actions button {
    width: 100%;
  }
}

/* Maintenance mode */
.maintenance-card {
  text-align: center;
  max-width: 620px;
  margin: 80px auto;
}

.maintenance-card h2 {
  margin-bottom: 12px;
}

.maintenance-card p {
  line-height: 1.6;
  opacity: 0.92;
}

.maintenance-login-notice {
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: rgba(255, 193, 7, 0.16);
  border: 1px solid rgba(255, 193, 7, 0.35);
}

.maintenance-login-notice p {
  margin: 8px 0;
}

.maintenance-login-notice small {
  opacity: 0.82;
}

.hidden {
  display: none !important;
}

.modal-overlay.hidden {
  display: none !important;
}

.admin-line-chart {
  width: 100%;
  max-width: 100%;
  display: block;
}

.admin-line-chart-wrap {
  overflow: hidden;
}

html,
body {
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

.admin-line-chart {
  width: 100%;
  max-width: 100%;
  display: block;
}

.admin-line-chart-wrap {
  overflow: hidden;
}

.smart-modal {
  width: min(900px, 95%);
  max-height: 90vh;
  overflow-y: auto;
}

.smart-modal-media {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.smart-modal-media img,
.smart-modal-media video {
  width: 100%;
  border-radius: 14px;
}

body.modal-open {
  overflow: hidden;
}

.smart-close-btn,
.modal-close,
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 9999;

  width: 40px;
  height: 40px;

  border-radius: 50%;
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.admin-analytics-box {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

.admin-analytics-box canvas {
  max-width: 100% !important;
}

@media (max-width: 700px) {
  .admin-analytics-box {
    padding: 12px;
    overflow-x: auto;
  }
}

.chart-container canvas {
  max-width: 100%;
}

.chart-container {
  width: 100%;
  overflow-x: auto;
}

.close-modal-btn {
  position: absolute;

  top: 18px;
  right: 18px;

  width: 46px;
  height: 46px;

  border: none;
  border-radius: 50%;

  background: #ffffff;
  color: #1b1f5f;

  font-size: 24px;
  font-weight: bold;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 10001;

  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.admin-advert-overlay {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* FINAL ADMIN MODAL BACKGROUND FIX */
.modal {
  position: fixed;
  inset: 0;

  background: rgba(3, 8, 30, 0.82) !important;

  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;

  z-index: 999999 !important;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  overflow-y: auto;

  padding: 80px 16px 40px;
}

.modal.hidden {
  display: none !important;
}

.business-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.business-tab-btn {
  flex: 1;
  min-width: 120px;
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.business-tab-btn.active {
  background: linear-gradient(135deg, #051EDD, #FF0000);
  color: #fff;
}

.business-tab-section {
  animation: fadeUp 0.25s ease;
}

.whatsapp-btn {
  background: #25D366 !important;
  color: #fff !important;
  margin-top: 12px;
}

@media (max-width: 700px) {
  .business-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

.followed-card {
  border: 1px solid rgba(0, 200, 120, 0.25);
}

.smart-empty-state {
  text-align: center;
  padding: 28px 18px;
}

.smart-empty-state i {
  font-size: 46px;
  margin-bottom: 10px;
  opacity: 0.7;
}

.smart-empty-state h3 {
  margin-bottom: 8px;
}

.smart-empty-state p {
  opacity: 0.8;
}

.nav-toggle {
  display: none;
}

@media (max-width: 700px) {

  .nav {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
  }

  .nav.nav-open .nav-links {
    display: flex;
  }
}

/* PREMIUM GATING SYSTEM */

.premium-locked-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  min-height: 260px;
}

.premium-lock-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.35);
}

.premium-lock-content {
  position: relative;
  z-index: 2;
}

.premium-lock-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 215, 0, 0.12);
  font-size: 34px;
}

.premium-lock-icon i {
  color: gold;
}

.premium-benefits-list {
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.premium-benefits-list li {
  margin-bottom: 10px;
  opacity: 0.92;
}

.premium-upgrade-btn {
  margin-top: 12px;
}

.typing-bubble {
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.12);
  width: fit-content;
  margin: 8px 0;
  font-size: 14px;
  opacity: 0.85;
}