@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-w: 240px;
  --topbar-h: 70px;
  --sidebar-bg: #1a1a2e;
  --sidebar-text: #c8cfe8;
  --sidebar-active-bg: #27ae60;
  --sidebar-active-text: #fff;
  --sidebar-hover-bg: rgba(255,255,255,0.07);
  --body-bg: #f0f2f5;
  --topbar-bg: #fff;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 14px;
  --font: 'Nunito', sans-serif;
}

html, body { height: 100%; font-family: var(--font); background: var(--body-bg); color: #222; }

.admin-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

/* ── Logo ── */
.sidebar-logo {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo-img {
  width: 100%;
  max-width: 180px;
  height: auto;
  object-fit: contain;
  display: block;
}

nav { padding: 12px 0; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.18s, color 0.18s;
  position: relative;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--sidebar-hover-bg);
  color: #fff;
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #fff;
  border-radius: 0 3px 3px 0;
}

/* ── Main ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--body-bg);
}

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  background: var(--topbar-bg);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  z-index: 50;
}

.search-wrap {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}

.search {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1.5px solid #e5e9f0;
  border-radius: 30px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: #444;
  background: #f7f9fc;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search:focus {
  border-color: #27ae60;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(39,174,96,0.12);
}

.search::placeholder { color: #aab0be; font-weight: 600; }

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

.topbar-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #e5e9f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  background: #f7f9fc;
  transition: background 0.18s;
}

.topbar-icon:hover { background: #eef1f7; }

.topbar-bell { position: relative; }

.topbar-bell .badge {
  position: absolute;
  top: 4px; right: 5px;
  width: 8px; height: 8px;
  background: #e74c3c;
  border-radius: 50%;
  border: 2px solid #fff;
}

.admin-avatar {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 5px 12px 5px 6px;
  border-radius: 30px;
  border: 1.5px solid #e5e9f0;
  background: #f7f9fc;
  transition: background 0.18s;
}

.admin-avatar:hover { background: #eef1f7; }

.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dde3ee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.admin-name {
  font-size: 13px;
  font-weight: 800;
  color: #333;
}

/* ── Content ── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* ── Cards Grid ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-card {
  border-radius: var(--radius);
  padding: 22px 22px 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 148px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.13);
  transition: transform 0.18s, box-shadow 0.18s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}

.stat-card::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
}

.stat-card.green      { background: linear-gradient(135deg, #27ae60, #1e8449); }
.stat-card.purple     { background: linear-gradient(135deg, #9b59b6, #7d3c98); }
.stat-card.red        { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.stat-card.dark-green { background: linear-gradient(135deg, #1a7a3c, #145c2e); }
.stat-card.orange     { background: linear-gradient(135deg, #f39c12, #d68910); }
.stat-card.blue       { background: linear-gradient(135deg, #2980b9, #1a6491); }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.card-top span {
  font-size: 15px;
  font-weight: 700;
  opacity: 0.95;
}

.card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.card-number {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-top: 6px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.card-footer small {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
}

.dots-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.75;
  line-height: 1;
  padding: 0 2px;
  transition: opacity 0.18s;
}

.dots-btn:hover { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  :root { --sidebar-w: 200px; }
  .cards-grid { grid-template-columns: 1fr; }
  .content { padding: 16px; }
}

@media (max-width: 560px) {
  .sidebar { display: none; }
  .topbar { padding: 0 16px; }
}


/* ── Ads sub-menu ── */
.nav-parent {
  cursor: pointer;
  justify-content: space-between;
}
.nav-arrow {
  margin-left: auto;
  font-size: 13px;
  transition: transform 0.25s;
}
.nav-arrow.rotated { transform: rotate(180deg); }

.sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0,0,0,0.18);
}
.sub-menu.open { max-height: 400px; }

.sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px 9px 38px;
  color: #a8b4d0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.18s, color 0.18s;
}
.sub-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.sub-item.sub-active { color: #fff; }

.sub-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #5a6585;
  flex-shrink: 0;
}
.sub-item.sub-active .sub-dot { background: #27ae60; }

.sub-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255,255,255,0.15);
  padding: 1px 8px;
  border-radius: 20px;
  color: #fff;
}
.badge-red    { background: rgba(231,76,60,0.7); }
.badge-green  { background: rgba(39,174,96,0.7); }
.badge-orange { background: rgba(243,156,18,0.7); }
.badge-gray   { background: rgba(127,140,141,0.7); }
.badge-blue   { background: rgba(41,128,185,0.7); }
.badge-purple { background: rgba(155,89,182,0.7); }

/* ── Ads page header ── */
.ads-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.ads-title-wrap { display: flex; align-items: center; gap: 12px; }
.ads-page-title { font-size: 22px; font-weight: 900; color: #1a1a2e; }
.ads-count-badge {
  background: #27ae60;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
}
.ads-filter-wrap { display: flex; align-items: center; gap: 10px; }
.filter-label { font-size: 13px; font-weight: 700; color: #666; }
.filter-select {
  padding: 7px 14px;
  border: 1.5px solid #e5e9f0;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  background: #fff;
  cursor: pointer;
  outline: none;
}
.filter-select:focus { border-color: #27ae60; }

/* ── Ad card ── */
.ads-list { display: flex; flex-direction: column; gap: 14px; }

.ad-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s, transform 0.18s;
  position: relative;
}
.ad-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.ad-img-wrap {
  width: 120px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f2f5;
}
.ad-img { width: 100%; height: 100%; object-fit: cover; }
.ad-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #bbb;
}

.ad-info { flex: 1; min-width: 0; }
.ad-info-top { margin-bottom: 10px; }
.ad-title {
  font-size: 15px;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.ad-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #555;
  font-weight: 600;
}
.ad-meta-item i { font-size: 13px; color: #27ae60; }
.ad-meta-item strong { color: #999; font-size: 11px; margin-right: 2px; }

.ad-actions { margin-top: 10px; }
.btn-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: #1a1a2e;
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s;
}
.btn-view:hover { background: #27ae60; }

/* ── Status badges ── */
.ad-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  flex-shrink: 0;
}
.status-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 6px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-pending  { background: #e74c3c; color: #fff; }
.badge-featured { background: #f39c12; color: #fff; }
.badge-managed  { background: #27ae60; color: #fff; }
.badge-active   { background: #2980b9; color: #fff; }
.badge-expired  { background: #7f8c8d; color: #fff; }
.badge-sold     { background: #8e44ad; color: #fff; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #aaa;
}
.empty-state i { font-size: 56px; display: block; margin-bottom: 14px; }
.empty-state p { font-size: 16px; font-weight: 700; }

/* ── Responsive ads ── */
@media (max-width: 700px) {
  .ad-card { flex-wrap: wrap; }
  .ad-img-wrap { width: 100%; height: 180px; }
  .ad-badges { flex-direction: row; flex-wrap: wrap; width: 100%; }
}


/* ── Users List ── */
.users-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s, transform 0.18s;
}

.user-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Avatar */
.user-avatar-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #dde3ee;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.user-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #888;
}

/* Info */
.user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.user-see-profile {
  font-size: 11px;
  font-weight: 700;
  color: #27ae60;
  text-decoration: none;
  margin-bottom: 2px;
}

.user-see-profile:hover { text-decoration: underline; }

.user-name {
  font-size: 15px;
  font-weight: 800;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 12px;
  font-weight: 600;
  color: #777;
}

.user-id-badge {
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  margin-top: 2px;
}

/* Ads count */
.user-ads-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  color: #444;
  min-width: 80px;
}

.user-ads-count i { color: #27ae60; font-size: 16px; }

/* Actions */
.user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-user-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.18s;
}

.btn-chat {
  background: #f39c12;
  color: #fff;
}

.btn-chat:hover { opacity: 0.85; }

.user-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #27ae60;
  background: rgba(39,174,96,0.1);
  padding: 5px 12px;
  border-radius: 20px;
}

.user-unverified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #e74c3c;
  background: rgba(231,76,60,0.1);
  padding: 5px 12px;
  border-radius: 20px;
}

/* Responsive */
@media (max-width: 700px) {
  .user-card { flex-wrap: wrap; }
  .user-ads-count { min-width: unset; }
}


/* ── Orders List ── */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.18s;
}

.order-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Image */
.order-img-wrap {
  width: 130px;
  min-height: 160px;
  flex-shrink: 0;
  position: relative;
  background: #f0f2f5;
}

.order-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #bbb;
  min-height: 160px;
}

.order-img-count {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Main content */
.order-main {
  flex: 1;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-ad-title {
  font-size: 16px;
  font-weight: 800;
  color: #1a1a2e;
}

.order-price {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
}

.order-price strong {
  font-size: 20px;
  font-weight: 900;
  color: #1a1a2e;
}

/* Action row */
.order-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-view-order {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: #27ae60;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s;
}

.btn-view-order:hover { background: #1e8449; }

.order-pkg-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 6px;
  text-transform: capitalize;
}

.pkg-feature { background: #f39c12; color: #fff; }
.pkg-manage  { background: #27ae60; color: #fff; }
.pkg-renew   { background: #7f8c8d; color: #fff; }

/* Details grid */
.order-details-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  border-top: 1px solid #f0f2f5;
  padding-top: 10px;
}

.order-detail-cell {
  display: flex;
  flex-direction: column;
  min-width: 140px;
  padding: 4px 14px 4px 0;
  border-right: 1px solid #f0f2f5;
  margin-right: 14px;
}

.order-detail-cell:last-child {
  border-right: none;
}

.order-detail-label {
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-detail-value {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-top: 2px;
}

.phone-big {
  font-size: 18px;
  font-weight: 900;
  color: #1a1a2e;
}

/* Status */
.order-status-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  gap: 8px;
  min-width: 100px;
  border-left: 1px solid #f0f2f5;
}

.order-status-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.order-status-active   { background: #27ae60; color: #fff; }
.order-status-pending  { background: #f39c12; color: #fff; }
.order-status-rejected { background: #e74c3c; color: #fff; }

.order-unchecked-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e74c3c;
  display: block;
}

/* Responsive */
@media (max-width: 700px) {
  .order-card { flex-wrap: wrap; }
  .order-img-wrap { width: 100%; min-height: 180px; }
  .order-status-wrap { flex-direction: row; border-left: none;
    border-top: 1px solid #f0f2f5; width: 100%; }
}

/* ── Ad Preview Modal ── */
.ad-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ad-modal-box {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ad-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.ad-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  gap: 14px;
  color: #888;
  font-size: 16px;
}

.spin { animation: spin 1s linear infinite; display: inline-block; font-size: 36px; }
@keyframes spin { to { transform: rotate(360deg); } }

.ad-modal-content {
  display: flex;
  gap: 0;
}

/* LEFT */
.modal-left {
  flex: 1.2;
  padding: 20px;
  border-right: 1px solid #f0f2f5;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-main-img-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f2f5;
  height: 300px;
}

.modal-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  font-size: 28px;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img-nav.prev { left: 10px; }
.modal-img-nav.next { right: 10px; }

.modal-img-counter {
  position: absolute;
  bottom: 10px; right: 14px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.modal-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-thumb {
  width: 70px; height: 52px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.18s;
}

.modal-thumb.active-thumb { border-color: #27ae60; }

.modal-details-box, .modal-desc-box {
  background: #f9f5ec;
  border-radius: 10px;
  padding: 14px;
}

.modal-details-title {
  font-size: 14px;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 10px;
}

.modal-attrs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.modal-attr-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-attr-label {
  font-size: 10px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
}

.modal-attr-value {
  font-size: 13px;
  font-weight: 800;
  color: #1a1a2e;
}

.modal-desc-text {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

/* RIGHT */
.modal-right {
  width: 280px;
  flex-shrink: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-owner-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0faf4;
  border-radius: 10px;
  padding: 10px 12px;
}

.modal-owner-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #dde3ee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  overflow: hidden;
  flex-shrink: 0;
}

.modal-owner-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-verified-badge {
  font-size: 11px;
  font-weight: 700;
  color: #27ae60;
}

.modal-owner-name {
  font-size: 14px;
  font-weight: 800;
  color: #1a1a2e;
}

.modal-owner-ads {
  font-size: 11px;
  color: #888;
  font-weight: 600;
}

.modal-chat-btn {
  background: #f39c12;
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.modal-adid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #444;
}

.modal-adid-value { color: #1a1a2e; font-weight: 800; }

.modal-price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-price-value {
  font-size: 24px;
  font-weight: 900;
  color: #1a1a2e;
}

.modal-phone-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f7f9fc;
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.modal-wa-icon { color: #25D366; font-size: 22px; }
.modal-phone-num { font-size: 16px; font-weight: 800; }

.modal-updated {
  font-size: 12px;
  color: #999;
  font-weight: 600;
  text-align: center;
}

.modal-label {
  font-size: 12px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
}

.modal-status-section {
  border: 1.5px solid #e5e9f0;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-status-row, .modal-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-status-val {
  font-size: 13px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 6px;
}

.status-active   { background: #27ae60; color: #fff; }
.status-pending  { background: #f39c12; color: #fff; }
.status-expired  { background: #7f8c8d; color: #fff; }
.status-rejected { background: #e74c3c; color: #fff; }
.status-sold     { background: #8e44ad; color: #fff; }

.modal-action-btns {
  display: flex;
  gap: 8px;
}

.modal-btn-approve {
  background: #27ae60;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s;
}

.modal-btn-approve:hover { background: #1e8449; }

.modal-btn-reject {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s;
}

.modal-btn-reject:hover { background: #c0392b; }

/* Responsive modal */
@media (max-width: 700px) {
  .ad-modal-content { flex-direction: column; }
  .modal-right { width: 100%; border-top: 1px solid #f0f2f5; }
  .modal-attrs-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Package control rows ── */
.pkg-control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f5;
}

.pkg-label {
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 6px;
  min-width: 110px;
  text-align: center;
  color: #fff;
}

.pkg-label.approved { background: #27ae60; }
.pkg-label.managed  { background: #27ae60; }
.pkg-label.featured { background: #f39c12; }
.pkg-label.expired  { background: #7f8c8d; }
.pkg-label.renew    { background: #95a5a6; }
.pkg-label.sold     { background: #e74c3c; }

.pkg-actions { display: flex; gap: 8px; margin-left: auto; }

.pkg-btn-remove {
  background: #7f8c8d; color: #fff; border: none;
  padding: 5px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.pkg-btn-edit {
  background: #1a1a2e; color: #fff; border: none;
  padding: 5px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 700; cursor: pointer;
}

.pkg-toggle-wrap {
  display: flex; align-items: center; gap: 6px;
}

.pkg-toggle {
  position: relative; display: inline-block;
  width: 42px; height: 22px;
}
.pkg-toggle input { opacity: 0; width: 0; height: 0; }
.pkg-slider {
  position: absolute; cursor: pointer;
  inset: 0; background: #ccc; border-radius: 22px;
  transition: 0.3s;
}
.pkg-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: 0.3s;
}
.pkg-toggle input:checked + .pkg-slider { background: #27ae60; }
.pkg-toggle input:checked + .pkg-slider::before { transform: translateX(20px); }

.pkg-toggle-label {
  font-size: 11px; font-weight: 700;
  color: #888; min-width: 22px;
}

.pkg-days {
  font-size: 11px; font-weight: 700;
  color: #aaa; margin-left: auto;
}

.pkg-days-select {
  font-size: 11px; font-weight: 700;
  border: 1px solid #ddd; border-radius: 6px;
  padding: 3px 6px; margin-left: auto;
}

/* Edit button in modal titles */
.modal-edit-btn {
  float: right; background: #f0f2f5; border: none;
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700; cursor: pointer;
  color: #555;
}
.modal-edit-btn:hover { background: #e0e3ea; }

/* Attr input */
.modal-attr-input {
  width: 100%; border: 1px solid #ddd; border-radius: 6px;
  padding: 4px 8px; font-size: 12px; margin-top: 4px;
}

/* Description textarea */
.modal-desc-edit {
  width: 100%; border: 1.5px solid #e5e9f0; border-radius: 8px;
  padding: 10px; font-size: 13px; font-family: inherit;
  min-height: 100px; resize: vertical; outline: none;
}
.modal-desc-edit:focus { border-color: #27ae60; }

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0;
}
.modal-title-display {
  font-size: 15px;
  font-weight: 800;
  color: #1a1a2e;
  flex: 1;
}
.modal-title-input {
  flex: 1;
  border: 1.5px solid #27ae60;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  outline: none;
}
.modal-title-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ── Attribute select/input in edit mode ── */
.attr-input-wrap {
  width: 100%;
  margin-top: 4px;
}

.attr-select-input {
  width: 100%;
  border: 1.5px solid #27ae60;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
  outline: none;
}

.attr-select-input:focus { border-color: #1e8449; }

.attr-loading {
  font-size: 11px;
  color: #aaa;
  font-style: italic;
}

/* ── Login Page ── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
  margin-bottom: 24px;
}

.login-logo-img {
  max-width: 160px;
  height: auto;
}

.login-title {
  font-size: 24px;
  font-weight: 900;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: #888;
  font-weight: 600;
  margin-bottom: 32px;
}

.login-error {
  background: rgba(231,76,60,0.1);
  color: #e74c3c;
  border: 1.5px solid rgba(231,76,60,0.3);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-google-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  border: 2px solid #e5e9f0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 20px;
  font-family: var(--font);
}

.btn-google-login:hover {
  background: #f7f9fc;
  border-color: #27ae60;
  box-shadow: 0 4px 16px rgba(39,174,96,0.15);
  transform: translateY(-1px);
}

.google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.login-note {
  font-size: 12px;
  color: #aaa;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(231,76,60,0.1);
  color: #e74c3c;
  text-decoration: none;
  font-size: 15px;
  transition: background 0.18s;
  margin-left: 4px;
}
.logout-btn:hover { background: #e74c3c; color: #fff; }