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

body {
  font-family: 'Inter', Arial, sans-serif;
  background: linear-gradient(135deg, #f4f6fa 0%, #e9ecf5 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
}

.sidebar {
  background: linear-gradient(135deg, #e7eaf5 70%, #d6def3 100%);
  color: #22336a;
  width: 220px;
  min-width: 180px;
  max-width: 260px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  border-top-right-radius: 32px;
  border-bottom-right-radius: 32px;
  box-shadow: 1px 0 16px rgba(34,51,106,0.07);
  height: 100vh;
  border-left: 4px solid #f5f6fa;
}

.sidebar-header {
  font-size: 1.08rem;
  font-weight: 600;
  color: #3752fa;
  letter-spacing: 0.01em;
  padding: 24px 0 18px 0;
  margin-bottom: 0;
  border-bottom: none;
  background: none;
  text-align: center;
}

.tab-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
  width: 100%;
  background: none;
}

.tab-item {
  border-radius: 10px;
  margin: 0 14px;
  padding: 11px 0 11px 22px;
  font-size: 1.02rem;
  font-weight: 500;
  color: #22336a;
  background: none;
  border: none;
  outline: none;
  transition: background 0.14s, color 0.14s, font-weight 0.14s;
  cursor: pointer;
  box-shadow: none;
  position: relative;
  letter-spacing: 0.01em;
}

.tab-item.active {
  background: linear-gradient(90deg, #3752fa 80%, #7e8dfb 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(55,82,250,0.03);
}

.tab-item:hover:not(.active) {
  background: #f5f6fa;
  color: #3752fa;
}

.tab-item:before {
  content: '';
  display: block;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 3px;
  background: #e7f0fe;
  opacity: 0;
  transition: opacity 0.13s;
}

.tab-item.active:before {
  opacity: 1;
  background: #3752fa;
}

.tab-icon {
  margin-right: 10px;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  stroke: #3752fa;
  transition: stroke 0.15s;
}

.tab-item.active .tab-icon,
.tab-item:hover .tab-icon {
  stroke: #2f4de6;
}

.main-content {
  flex: 1 1 0;
  padding: 56px 32px 48px 32px;
  background: rgba(255,255,255,0.92);
  min-height: 100vh;
  border-top-left-radius: 32px;
  border-bottom-left-radius: 32px;
  box-shadow: -2px 0 16px rgba(34,51,106,0.06);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  max-width: 100vw;
  overflow-x: auto;
}

#tab-content {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.main-header {
  width: 100vw;
  background: linear-gradient(90deg, #edeaff 70%, #e7f0fe 100%);
  box-shadow: 0 2px 14px rgba(34,51,106,0.06);
  padding: 0 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 100;
  border-bottom: 1.5px solid #e5e8f1;
}

.main-header-left {
  display: flex;
  align-items: center;
  padding-left: 40px;
}

.main-header-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #3752fa;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 9px;
}

.main-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 38px;
}

.main-header-user {
  font-size: 1.08rem;
  color: #22336a;
  font-weight: 500;
}

.main-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(55,82,250,0.08);
  border: 2.5px solid #fff;
  object-fit: cover;
}

@media (max-width: 700px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    min-height: 54px;
    padding-left: 6px;
    padding-right: 6px;
  }
  .main-header-left {
    padding-left: 12px;
  }
  .main-header-right {
    padding-right: 12px;
    gap: 8px;
  }
  .main-header-logo {
    font-size: 1.05rem;
  }
  .main-header-avatar {
    width: 28px;
    height: 28px;
  }
}

/* --- Gallery Section Styles --- */
.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafd;
  border-radius: 16px 16px 0 0;
  padding: 20px 0 12px 0;
  border-bottom: 1px solid #e5e8f1;
  margin-bottom: 0.5rem;
}

.gallery-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #22336a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gallery-icon {
  font-size: 1.7rem;
}

.gallery-dropdown {
  padding: 8px 18px 8px 10px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #e5e8f1;
  background: #fff;
  color: #22336a;
  outline: none;
}

.gallery-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 10px 0;
  margin-bottom: 8px;
}

.gallery-selectall {
  font-size: 1rem;
  color: #22336a;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}

.gallery-buttons {
  display: flex;
  gap: 10px;
}

.gallery-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.15s;
  box-shadow: 0 1.5px 4px rgba(34,51,106,0.07);
}

.gallery-btn.upload {
  background: #25d366;
  color: #fff;
}

.gallery-btn.upload:hover {
  background: #1ebea5;
  color: #fff;
}

.gallery-btn.delete-selected {
  background: #e14b4b;
  color: #fff;
  border: none;
}

.gallery-btn.delete-selected:hover {
  background: #b92d2d;
  color: #fff;
}

.gallery-btn.delete-all {
  background: #e14b4b;
  color: #fff;
  border: none;
}

.gallery-btn.delete-all:hover {
  background: #b92d2d;
  color: #fff;
}

.gallery-btn.whatsapp {
  background: #25D366;
  color: #fff;
  border: none;
}

.gallery-btn.whatsapp:hover {
  background: #1fa855;
  color: #fff;
}

.gallery-btn.delete {
  background: #e14b4b;
  color: #fff;
  border: none;
}

.gallery-btn.delete:hover {
  background: #b92d2d;
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 20px 0 24px 0;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 1300px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

@media (max-width: 700px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 12px 0 18px 0;
  }
}

.gallery-card {
  background: #f9fafb;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(34,51,106,0.06);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.18s, transform 0.15s;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  border: 1.5px solid #e5e8f1;
}

.gallery-card:hover {
  box-shadow: 0 6px 24px rgba(34,51,106,0.11);
  transform: translateY(-2px) scale(1.02);
  border-color: #b3c2f5;
}

.gallery-checkbox {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  width: 18px;
  height: 18px;
}

.gallery-card img {
  width: 100%;
  height: 160px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  margin-bottom: 0;
  background: #e5e8f1;
}

.gallery-img-square {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 11px 11px 0 0;
  display: block;
}

.gallery-card-actions {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 18px 14px 0;
}

.gallery-card-btn.whatsapp, .gallery-card-btn.delete {
  background: none;
  color: inherit;
  border: none;
  border-radius: 6px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  box-shadow: none;
  transition: background 0.15s;
}

.gallery-card-btn.whatsapp:hover, .gallery-card-btn.delete:hover {
  background: #f0f1f6;
}

.gallery-card-btn.whatsapp svg, .gallery-card-btn.delete svg {
  display: block;
}

/* --- Manage Brokers Section Styles --- */
.brokers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafd;
  border-radius: 16px 16px 0 0;
  padding: 20px 0 12px 0;
  border-bottom: 1px solid #e5e8f1;
  margin-bottom: 0.5rem;
}

.brokers-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #22336a;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brokers-icon {
  font-size: 1.6rem;
}

.brokers-total {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2d8cf0;
  background: #e7f0fe;
  border-radius: 16px;
  padding: 2px 14px;
  margin-left: 8px;
}

.brokers-actions {
  display: flex;
  gap: 12px;
}

.brokers-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1.5px solid #e5e8f1;
  background: #fff;
  color: #22336a;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border 0.18s;
}

.brokers-btn.status-update {
  color: #2d8cf0;
  border-color: #c7e0fa;
  background: #f8fafd;
}

.brokers-btn.status-update:hover {
  background: #e7f0fe;
}

.brokers-btn.export {
  background: #25d366;
  color: #fff;
  border: none;
  font-weight: 500;
  border-radius: 0.75rem;
  padding: 0.45em 1.2em;
  box-shadow: 0 1px 4px 0 rgba(18,140,126,0.08);
  transition: background 0.15s;
}

.brokers-btn.export:hover {
  background: #1ebea5;
  color: #fff;
}

.brokers-btn.add {
  background: #6c63ff;
  color: #fff;
  border: none;
  font-weight: 500;
  border-radius: 0.75rem;
  padding: 0.45em 1.2em;
  box-shadow: 0 1px 4px 0 rgba(55,82,250,0.07);
  transition: background 0.15s;
}

.brokers-btn.add:hover {
  background: #3752fa;
  color: #fff;
}

.brokers-search {
  padding: 10px 0 10px 0;
}

.brokers-search-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1.5px solid #e5e8f1;
  font-size: 1rem;
  background: #fafbfc;
  color: #22336a;
  outline: none;
  transition: border 0.18s;
}

.brokers-search-input:focus {
  border-color: #3752fa;
}

.brokers-table-wrap {
  padding: 0 0 24px 0;
}

.brokers-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(34,51,106,0.08);
  overflow: hidden;
}

.brokers-table th,
.brokers-table td {
  padding: 14px 14px;
  text-align: left;
}

.brokers-table th {
  color: #22336a;
  font-weight: 700;
  font-size: 1.05rem;
  background: #f8fafd;
  border-bottom: 1.5px solid #e5e8f1;
}

.brokers-table td {
  color: #22336a;
  font-size: 1rem;
  border-bottom: 1px solid #f0f1f6;
  vertical-align: middle;
}

.brokers-table tr:last-child td {
  border-bottom: none;
}

.broker-status.active {
  background: #e6f7ee;
  color: #19c37d;
  border-radius: 12px;
  padding: 5px 16px;
  font-size: 0.98rem;
  font-weight: 600;
  display: inline-block;
}

.brokers-action-btn {
  background: none;
  color: inherit;
  border: none;
  border-radius: 6px;
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  box-shadow: none;
  transition: background 0.15s;
  margin-right: 4px;
}

.brokers-action-btn:last-child {
  margin-right: 0;
}

.brokers-action-btn.edit:hover {
  background: #e7f0fe;
}

.brokers-action-btn.delete:hover {
  background: #ffeaea;
}

.brokers-action-btn.refresh:hover {
  background: #e7f0fe;
}

.brokers-action-btn svg {
  display: block;
}

.brokers-action-btn.delete, .gallery-card-btn.delete, .add-broker-btn.delete {
  background: #fff5f5 !important;
  color: #e14b4b !important;
  border: 1px solid #f3c2c2 !important;
}

.brokers-action-btn.delete:hover, .gallery-card-btn.delete:hover, .add-broker-btn.delete:hover {
  background: #ffeaea !important;
  color: #b91c1c !important;
  border-color: #e14b4b !important;
}

.brokers-action-btn.edit, .gallery-card-btn.edit, .add-broker-btn.edit {
  background: #f8fafd !important;
  color: #3752fa !important;
  border: 1px solid #bfcfff !important;
}

.brokers-action-btn.edit:hover, .gallery-card-btn.edit:hover, .add-broker-btn.edit:hover {
  background: #e7f0fe !important;
  color: #2f4de6 !important;
  border-color: #3752fa !important;
}

.brokers-action-btn.view, .gallery-card-btn.view {
  background: #f8fafd !important;
  color: #19c37d !important;
  border: 1px solid #b7efdd !important;
}

.brokers-action-btn.view:hover, .gallery-card-btn.view:hover {
  background: #eafff6 !important;
  color: #0b9b5f !important;
  border-color: #19c37d !important;
}

.brokers-action-btn svg, .gallery-card-btn svg, .add-broker-btn svg {
  margin-right: 6px;
  width: 17px;
  height: 17px;
  vertical-align: middle;
}

@media (max-width: 900px) {
  .admin-layout {
    flex-direction: column;
    width: 100vw;
    max-width: 100vw;
  }
  .sidebar {
    flex-direction: row;
    width: 100vw;
    min-width: unset;
    max-width: unset;
    border-radius: 0 0 32px 32px;
    box-shadow: 0 2px 16px rgba(34,51,106,0.09);
    align-items: center;
    justify-content: center;
    min-height: unset;
    padding-bottom: 0;
    height: auto;
  }
  .tab-menu {
    flex-direction: row;
    gap: 0;
    margin-top: 0;
    width: 100%;
    justify-content: center;
  }
  .tab-item {
    border-radius: 0 0 20px 20px;
    margin: 0 8px;
    padding: 14px 18px;
    font-size: 1rem;
    text-align: center;
  }
  .main-content {
    border-radius: 0;
    padding: 28px 8px 24px 8px;
  }
  .brokers-header, .gallery-header, .brokers-search, .gallery-actions, .brokers-table-wrap {
    padding-left: 0;
    padding-right: 0;
  }
}

/* --- Add Broker Form Styles --- */
.add-broker-form {
  background: #fff;
  border-radius: 16px !important;
  box-shadow: 0 2px 16px rgba(34,51,106,0.10) !important;
  padding: 44px 38px 36px 38px !important;
  margin: 32px auto 0 auto !important;
  max-width: 540px !important;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.add-broker-header {
  font-size: 1.37rem !important;
  font-weight: 700 !important;
  color: #22336a !important;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px !important;
}

.add-broker-icon {
  font-size: 1.6rem;
}

.add-broker-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 32px;
}

@media (max-width: 900px) {
  .add-broker-fields {
    grid-template-columns: 1fr;
    gap: 14px 0;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  color: #22336a;
  font-size: 1.07rem;
  margin-bottom: 2px;
}

.form-control, .file-input {
  border: 1.5px solid #ececf3 !important;
  border-radius: 8px !important;
  background: #fafbfc !important;
  font-size: 1.05rem !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  padding: 13px 14px !important;
}
.form-control:focus {
  border-color: #3752fa !important;
}

.add-broker-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.add-broker-btn {
  background: #6c63ff !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 13px 32px !important;
  font-size: 1.13rem !important;
  font-weight: 600 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.16s;
  box-shadow: 0 2px 8px rgba(34,51,106,0.07) !important;
}
.add-broker-btn:hover {
  background: #3752fa !important;
}

.add-broker-btn-icon {
  font-size: 1.25em;
}

@media (max-width: 900px) {
  .add-broker-form {
    padding: 22px 7px 22px 7px !important;
    max-width: 98vw !important;
    margin: 18px auto 0 auto !important;
  }
  .add-broker-header {
    font-size: 1.14rem !important;
    gap: 8px;
  }
}

/* --- Profile Tab Styles --- */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin: 0 auto;
  max-width: 1280px;
  width: 100%;
}

.profile-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(34,51,106,0.08);
  padding: 38px 38px 32px 38px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.profile-header {
  font-size: 1.25rem;
  font-weight: 700;
  color: #22336a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-icon {
  font-size: 1.25em;
}

.profile-divider {
  border: none;
  border-top: 1.5px solid #e5e8f1;
  margin: 10px 0 18px 0;
}

.profile-info-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.profile-label {
  color: #7d8fb3;
  font-size: 1rem;
  font-weight: 600;
}

.profile-value {
  color: #22336a;
  font-size: 1.08rem;
  font-weight: 500;
  margin-top: 2px;
}

.profile-btn {
  background: #fff;
  color: #3752fa;
  border: 1.5px solid #3752fa;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 1.05rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.14s, color 0.14s, border 0.14s;
}

.profile-btn:hover {
  background: #edeaff;
  color: #2f4de6;
  border-color: #2f4de6;
}

.profile-btn.green {
  background: #19c37d;
  color: #fff;
  border: none;
  margin-bottom: 16px;
}

.profile-btn.green:hover {
  background: #0b9b5f;
}

.profile-btn.outline {
  background: #fff;
  color: #3752fa;
  border: 1.5px solid #3752fa;
  margin-top: 0;
}

.profile-btn.outline:hover {
  background: #edeaff;
  color: #2f4de6;
  border-color: #2f4de6;
}

.profile-btn-icon {
  font-size: 1.12em;
}

.profile-credits-label {
  color: #7d8fb3;
  font-size: 1.01rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.profile-credits-value {
  color: #3752fa;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  margin-top: 0;
}

.profile-history-group {
  margin-top: 16px;
}

.profile-history-label {
  color: #7d8fb3;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

@media (max-width: 1000px) {
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .profile-card {
    padding: 22px 10px 18px 10px;
  }
}

/* --- Modern Glassmorphism Profile Tab Styles --- */
.profile-bg-glass {
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f6fa 60%, #e7f0fe 100%);
  padding: 32px 0 32px 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.profile-glass-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 38px;
  width: 100%;
  max-width: 1100px;
}

.profile-glass-card {
  background: rgba(255,255,255,0.75);
  box-shadow: 0 8px 32px 0 rgba(34,51,106,0.13);
  border-radius: 22px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(220,225,245,0.44);
  padding: 44px 38px 38px 38px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  position: relative;
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 8px;
}

.profile-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e7f0fe 40%, #f5f6fa 100%);
  box-shadow: 0 2px 10px rgba(55,82,250,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #f5f6fa;
  overflow: hidden;
}

.profile-avatar.small {
  width: 48px;
  height: 48px;
}

.profile-glass-header {
  font-size: 1.25rem;
  font-weight: 700;
  color: #22336a;
  letter-spacing: 0.01em;
}

.profile-glass-divider {
  border: none;
  border-top: 1.5px solid #e5e8f1;
  margin: 10px 0 18px 0;
  opacity: 0.55;
}

.profile-glass-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
}

.profile-glass-label {
  color: #7d8fb3;
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.profile-glass-value {
  color: #22336a;
  font-size: 1.12rem;
  font-weight: 500;
  margin-bottom: 7px;
}

.profile-glass-btn {
  background: #fff;
  color: #3752fa;
  border: 1.5px solid #3752fa;
  border-radius: 10px;
  padding: 12px 26px;
  font-size: 1.09rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  margin-top: 18px;
  box-shadow: 0 2px 8px rgba(55,82,250,0.08);
  transition: background 0.14s, color 0.14s, border 0.14s, box-shadow 0.14s;
  letter-spacing: 0.01em;
}

.profile-glass-btn:hover {
  background: #edeaff;
  color: #2f4de6;
  border-color: #2f4de6;
  box-shadow: 0 4px 16px rgba(55,82,250,0.13);
}

.profile-glass-btn.green {
  background: #19c37d;
  color: #fff;
  border: none;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(25,195,125,0.09);
}

.profile-glass-btn.green:hover {
  background: #0b9b5f;
  color: #fff;
}

.profile-glass-btn.subtle {
  background: #f8fafd;
  color: #3752fa;
  border: 1.5px solid #e5e8f1;
  margin-top: 0;
  font-weight: 500;
  box-shadow: none;
}

.profile-glass-btn.subtle:hover {
  background: #e7f0fe;
  color: #2f4de6;
  border-color: #bfcfff;
}

.profile-glass-btn svg {
  display: block;
}

.profile-glass-credits {
  color: #3752fa;
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 12px;
  margin-top: 0;
  letter-spacing: 0.03em;
}

.profile-glass-history-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}

@media (max-width: 1100px) {
  .profile-glass-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 540px;
  }
  .profile-bg-glass {
    padding: 22px 0 22px 0;
  }
}

.logout-btn {
  margin-top: auto;
  margin-bottom: 24px;
  margin-left: 20px;
  margin-right: 20px;
  width: calc(100% - 40px);
  background: linear-gradient(90deg, #edeaff 70%, #e7f0fe 100%);
  color: #3752fa;
  border: none;
  border-radius: 10px;
  padding: 13px 0;
  font-size: 1.08rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(55,82,250,0.06);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.logout-btn:hover {
  background: linear-gradient(90deg, #d6d2ff 70%, #c7e0fa 100%);
  color: #2f4de6;
  box-shadow: 0 4px 16px rgba(55,82,250,0.13);
}

.logout-icon {
  font-size: 1.3em;
  margin-right: 8px;
  stroke: #e14b4b;
}

@media (max-width: 900px) {
  .sidebar {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    height: auto;
  }
  .logout-btn {
    margin: 0 8px 10px 8px;
    width: auto;
    padding: 10px 18px;
    font-size: 1rem;
  }
}

/* --- Minimalistic, Classy UI Tweaks --- */
.gallery-card, .brokers-table, .add-broker-form, .profile-glass-card {
  box-shadow: 0 2px 8px rgba(34,51,106,0.04) !important;
  border: 1px solid #ececf3 !important;
  background: #fcfcfe !important;
}
.gallery-card {
  border-radius: 11px !important;
  padding: 0 0 0 0 !important;
}
.gallery-card-actions {
  padding: 10px 14px 14px 0 !important;
}
.brokers-table {
  border-radius: 10px !important;
  font-size: 0.98rem;
  background: #fcfcfe !important;
}
.brokers-table th, .brokers-table td {
  border-bottom: 1px solid #f2f2f6 !important;
  padding: 10px 10px !important;
}
.brokers-table th {
  background: #f8fafd !important;
  font-weight: 600 !important;
  color: #3752fa !important;
  border-bottom: 1.5px solid #ececf3 !important;
}
.brokers-table td {
  color: #22336a !important;
  font-weight: 400 !important;
}
.brokers-action-btn, .gallery-card-btn {
  box-shadow: none !important;
  border-radius: 7px !important;
  background: none !important;
  border: 1px solid #ececf3 !important;
  color: #3752fa !important;
  padding: 4px 7px !important;
  font-size: 1.01rem;
  transition: background 0.13s, color 0.13s, border 0.13s;
}
.brokers-action-btn:hover, .gallery-card-btn:hover {
  background: #f5f6fa !important;
  color: #2f4de6 !important;
  border-color: #d6def3 !important;
}
.add-broker-form {
  box-shadow: 0 2px 8px rgba(34,51,106,0.04) !important;
  border-radius: 12px !important;
  padding: 24px 18px 18px 18px !important;
  max-width: 620px !important;
}
.add-broker-header {
  font-size: 1.19rem !important;
  font-weight: 700 !important;
  color: #22336a !important;
  margin-bottom: 8px !important;
}
.form-control, .file-input {
  border: 1px solid #ececf3 !important;
  border-radius: 7px !important;
  background: #fafbfc !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  padding: 10px 12px !important;
}
.form-control:focus {
  border-color: #bfcfff !important;
}
.add-broker-btn, .profile-glass-btn, .brokers-btn, .gallery-btn {
  border-radius: 8px !important;
  box-shadow: none !important;
  font-weight: 500 !important;
  background: #f8fafd !important;
  color: #3752fa !important;
  border: 1px solid #ececf3 !important;
  padding: 10px 18px !important;
  transition: background 0.13s, color 0.13s, border 0.13s;
}
.add-broker-btn:hover, .profile-glass-btn:hover, .brokers-btn:hover, .gallery-btn:hover {
  background: #e7f0fe !important;
  color: #2f4de6 !important;
  border-color: #bfcfff !important;
}
.profile-glass-card {
  border-radius: 14px !important;
  padding: 32px 22px 22px 22px !important;
  gap: 14px !important;
}
.profile-glass-header {
  font-size: 1.12rem !important;
  color: #22336a !important;
  font-weight: 600 !important;
}
.profile-glass-btn.green {
  background: #19c37d !important;
  color: #fff !important;
  border: none !important;
}
.profile-glass-btn.green:hover {
  background: #0b9b5f !important;
}
.profile-glass-credits {
  font-size: 1.7rem !important;
  color: #3752fa !important;
  font-weight: 700 !important;
}

/* --- Modern Sidebar with Accent Bar --- */
#adminTabMenu {
  background: linear-gradient(135deg, #f8fafd 70%, #e7e8fd 100%);
  border-radius: 18px;
  box-shadow: none;
  padding: 14px 0 14px 0;
  border: 1px solid #edefff;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  margin-bottom: 0 !important;
}
#adminTabMenu .nav-item {
  margin-bottom: 6px;
}
#adminTabMenu .nav-link {
  color: #22336a;
  font-weight: 500;
  font-size: 1.05rem;
  border-radius: 12px;
  margin: 0 2px;
  padding: 8px 10px 8px 16px;
  background: transparent;
  transition: background 0.15s, color 0.15s, border 0.15s;
  box-shadow: none;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.55em;
  min-height: 38px;
  white-space: nowrap;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 4px solid transparent;
  position: relative;
}
#adminTabMenu .nav-link.active, #adminTabMenu .nav-link:focus {
  background: linear-gradient(90deg, #3752fa 80%, #7e8dfb 100%);
  color: #fff;
  border-left: 4px solid #7e8dfb;
  font-weight: 600;
}
#adminTabMenu .nav-link:hover {
  background: #e7f0fe;
  color: #3752fa;
}
#adminTabMenu .tab-icon {
  min-width: 18px;
  min-height: 18px;
  opacity: 0.92;
  margin-right: 2px;
  flex-shrink: 0;
  color: #b0b6d4;
  transition: stroke 0.18s, fill 0.18s;
}
#adminTabMenu .nav-link.active .tab-icon {
  color: #fff;
  stroke: #fff;
  fill: #3752fa;
}
#adminTabMenu .nav-link:hover .tab-icon {
  stroke: #fff;
  fill: #3752fa;
}

#adminTabMenu .nav-link.active, #adminTabMenu .nav-link:hover {
  background: #3752fa;
  color: #fff;
}

/* Optional: Section label for clarity */
#adminTabMenu .menu-label {
  font-size: 0.82rem;
  color: #b0b6d4;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 10px 12px;
  user-select: none;
}

aside.col-lg-2.col-md-3.mb-4 {
  background: linear-gradient(135deg, #f8fafd 70%, #e7e8fd 100%) !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
}
.bg-white.rounded-4.shadow-sm.p-3.mb-4.text-center {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 12px !important;
  overflow: visible !important;
}

@media (min-width: 992px) {
  aside.col-lg-2 {
    border-right: 1px solid #edefff;
    min-height: 100vh;
  }
}
@media (max-width: 991.98px) {
  #adminTabMenu {
    border-radius: 10px;
    padding: 8px 0;
  }
  aside.col-lg-2 {
    border-right: none;
    min-height: auto;
  }
}

.bg-white.rounded-4.shadow-sm.p-3.mb-4.text-center {
  overflow: visible !important;
  word-break: break-word;
  white-space: normal;
}

#adminTabMenu .nav-link {
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  word-break: break-word;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-left: 16px;
  padding-right: 10px;
}

#adminTabMenu {
  width: 100%;
}

#adminTabMenu .nav-link .tab-icon {
  flex-shrink: 0;
}

#adminTabMenu .nav-link span, #adminTabMenu .nav-link {
  flex: 1 1 0;
}

/* Ensure main content doesn't drop below sidebar */
@media (min-width: 992px) {
  .container-fluid > .row {
    display: flex;
  }
}

/* Fix for .mb-4 on aside pushing content down */
@media (min-width: 992px) {
  aside.col-lg-2.mb-4 {
    margin-bottom: 0 !important;
  }
}



.brokers-count-badge {
  background: linear-gradient(90deg, #6c63ff 0%, #3752fa 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 0.75rem;
  padding: 0.22em 0.85em;
  box-shadow: 0 1px 4px 0 rgba(55,82,250,0.07);
  letter-spacing: 0.01em;
}

/* --- Main UI: Add color to cards, buttons, and backgrounds --- */
.card.shadow-sm {
  background: linear-gradient(120deg, #fff 80%, #e7f0fe 100%);
  border-radius: 20px;
  border: 1px solid #e7eaf5;
  box-shadow: 0 4px 24px 0 rgba(55,82,250,0.06);
}
.btn-primary, .btn-outline-primary {
  background: linear-gradient(90deg, #3752fa 80%, #7e8dfb 100%);
  border: none;
  color: #fff;
}
.btn-outline-primary {
  background: #fff;
  color: #3752fa;
  border: 1.5px solid #3752fa;
}
.btn-success {
  background: linear-gradient(90deg, #19c37d 80%, #3752fa 100%);
  border: none;
  color: #fff;
}
.btn-outline-secondary {
  border: 1.5px solid #3752fa;
  color: #3752fa;
  background: #f5f7fa;
}
.table thead {
  background: linear-gradient(90deg, #e7e8fd 80%, #fff0f6 100%);
  color: #22336a;
}
body.bg-light {
  background: linear-gradient(120deg, #f8fafd 60%, #e7f0fe 100%);
}

/* Sidebar container width and overflow fix */
@media (min-width: 992px) {
  aside.col-lg-2 {
    min-width: 220px;
    max-width: 260px;
    width: 100%;
  }
}

.bg-white.rounded-4.shadow-sm.p-3.mb-4.text-center {
  overflow: visible !important;
  word-break: break-word;
  white-space: normal;
}

#adminTabMenu .nav-link {
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  word-break: break-word;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-left: 16px;
  padding-right: 10px;
}

#adminTabMenu {
  width: 100%;
}

/* Ensure sidebar text does not get cut off */
#adminTabMenu .nav-link .tab-icon {
  flex-shrink: 0;
}

#adminTabMenu .nav-link span, #adminTabMenu .nav-link {
  flex: 1 1 0;
}

/* --- SIDEBAR LAYOUT FIXES --- */
@media (min-width: 992px) {
  aside.col-lg-2 {
    min-width: 220px;
    max-width: 260px;
    width: 100%;
    flex: 0 0 220px;
    /* Ensures sidebar stays left and content stays right */
    display: block;
  }
  .container-fluid > .row {
    flex-wrap: nowrap;
  }
}

.bg-white.rounded-4.shadow-sm.p-3.mb-4.text-center {
  overflow: visible !important;
  word-break: break-word;
  white-space: normal;
}

#adminTabMenu .nav-link {
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  word-break: break-word;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-left: 16px;
  padding-right: 10px;
}

#adminTabMenu {
  width: 100%;
}

#adminTabMenu .nav-link .tab-icon {
  flex-shrink: 0;
}

#adminTabMenu .nav-link span, #adminTabMenu .nav-link {
  flex: 1 1 0;
}

/* Ensure main content doesn't drop below sidebar */
@media (min-width: 992px) {
  .container-fluid > .row {
    display: flex;
  }
}

/* Fix for .mb-4 on aside pushing content down */
@media (min-width: 992px) {
  aside.col-lg-2.mb-4 {
    margin-bottom: 0 !important;
  }
}

/* --- SIDEBAR TAB MENU: Prevent Wrapping for Manage Brokers --- */
#adminTabMenu .nav-link {
  font-size: 1rem;
  padding-left: 10px;
  padding-right: 10px;
  min-width: 0;
  max-width: 210px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  height: 42px;
}

#adminTabMenu .nav-link .tab-icon {
  margin-right: 8px;
}

@media (max-width: 1200px) {
  #adminTabMenu .nav-link {
    font-size: 0.96rem;
    padding-left: 8px;
    padding-right: 8px;
    max-width: 160px;
  }
}

.btn-edit-solid {
  background: #3752fa !important;
  color: #fff !important;
  border: 2px solid #3752fa !important;
  border-radius: 0.5rem;
  padding: 6px 8px;
  transition: background 0.15s, color 0.15s, border 0.15s;
}
.btn-edit-solid svg {
  width: 22px;
  height: 22px;
}
.btn-edit-solid:hover, .btn-edit-solid:focus {
  background: #fff !important;
  color: #3752fa !important;
  border: 2px solid #3752fa !important;
}
.btn-edit-solid:hover svg rect, .btn-edit-solid:focus svg rect {
  fill: #fff !important;
}
.btn-edit-solid:hover svg path, .btn-edit-solid:focus svg path {
  stroke: #3752fa !important;
  fill: #3752fa !important;
}

.btn-delete-solid {
  background: #e14b4b !important;
  color: #fff !important;
  border: 2px solid #e14b4b !important;
  border-radius: 0.5rem;
  padding: 6px 8px;
  transition: background 0.15s, color 0.15s, border 0.15s;
}
.btn-delete-solid svg {
  width: 22px;
  height: 22px;
}
.btn-delete-solid:hover, .btn-delete-solid:focus {
  background: #fff !important;
  color: #e14b4b !important;
  border: 2px solid #e14b4b !important;
}
.btn-delete-solid:hover svg rect, .btn-delete-solid:focus svg rect {
  fill: #fff !important;
}
.btn-delete-solid:hover svg path, .btn-delete-solid:focus svg path {
  stroke: #e14b4b !important;
  fill: #e14b4b !important;
}

.btn-reset-solid {
  background: #25d366 !important;
  color: #fff !important;
  border: 2px solid #25d366 !important;
  border-radius: 0.5rem;
  padding: 6px 8px;
  transition: background 0.15s, color 0.15s, border 0.15s;
}
.btn-reset-solid svg {
  width: 22px;
  height: 22px;
}
.btn-reset-solid:hover, .btn-reset-solid:focus {
  background: #fff !important;
  color: #25d366 !important;
  border: 2px solid #25d366 !important;
}
.btn-reset-solid:hover svg rect, .btn-reset-solid:focus svg rect {
  fill: #fff !important;
}
.btn-reset-solid:hover svg path, .btn-reset-solid:focus svg path {
  stroke: #25d366 !important;
  fill: #25d366 !important;
}

.profile-btn.topup-whatsapp {
  background: #25d366 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.97rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.14s, color 0.14s, border 0.14s;
  box-shadow: 0 1px 4px rgba(34,51,106,0.06);
}
.profile-btn.topup-whatsapp:hover, .profile-btn.topup-whatsapp:focus {
  background: #1fa855 !important;
  color: #fff !important;
}
.profile-btn.topup-whatsapp svg {
  width: 18px;
  height: 18px;
}

.sidebar-admin-card {
  background: linear-gradient(120deg, #e7e8fd 60%, #edeaff 100%);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(34,51,106,0.06);
  padding: 4px 0 4px 0;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: unset;
  height: auto;
}

.sidebar-admin-name {
  color: #22336a;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.01em;
  padding: 0;
  line-height: 1.1;
}

.whatsapp-credits-display {
  font-size: 2.3rem;
  font-weight: 800;
  color: #25d366;
  margin-top: 2px;
  margin-bottom: 2px;
  letter-spacing: 0.01em;
}


.thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.thumbnail-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.thumbnail-logo {
    position: absolute;
    width: 20%; /* Reduced from 30% to match watermarked image proportion */
    z-index: 2;
}

.thumbnail-logo img {
    width: 100%;
    height: auto;
}

.thumbnail-logo.top-left {
    top: 5%;
    left: 5%;
}

.thumbnail-logo.top-right {
    top: 5%;
    right: 5%;
}

.thumbnail-logo.bottom-left {
    bottom: 5%;
    left: 5%;
}

.thumbnail-logo.bottom-right {
    bottom: 5%;
    right: 5%;
}

.thumbnail-logo.top-center {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10; /* Ensures the logo stays above the image */
}

.text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px; /* Reduced padding */
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.text-overlay .text1 {
    font-size: 12px; /* Reduced from 14px */
    font-weight: bold;
    margin-bottom: 2px; /* Reduced margin */
    width: 100%;
    text-align: center;
    line-height: 1.2;
}

.text-overlay .text2 {
    font-size: 10px; /* Reduced from 12px */
    opacity: 0.9;
    width: 100%;
    text-align: center;
    line-height: 1.2;
}

.card {
    transition: transform 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: scale(1.02);
}

.card-body {
    padding: 0.8rem;
    flex-grow: 0;
}

.btn-group {
    display: flex;
    gap: 4px;
}

.btn-group .btn {
    flex: 1;
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.modal-img {
    max-width: 100%;
    height: auto;
}

.modal-logo {
    position: absolute;
    max-width: 20%;
    z-index: 2;
}

.modal-logo img {
    width: 100%;
    height: auto;
}

.modal-logo.top-left {
    top: 20px;
    left: 20px;
}

.modal-logo.top-right {
    top: 20px;
    right: 20px;
}

/* .modal-logo.top-center {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10; 
} */

.modal-logo.bottom-left {
    bottom: 20px;
    left: 20px;
}

.modal-logo.bottom-right {
    bottom: 20px;
    right: 20px;
}

.modal-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-text-overlay .text1 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
    width: 100%;
    text-align: center;
}

.modal-text-overlay .text2 {
    font-size: 16px;
    opacity: 0.9;
    width: 100%;
    text-align: center;
}

/* Modal styling */
.modal-xl {
    max-width: 90vw !important;
}

/* .modal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px !important;
} */

.modal-image-container {
    max-width: 80%;
    max-height: 80vh;
    margin: 0 auto;
    position: relative;
}

.modal-image-container img.main-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.modal-logo {
    position: absolute;
    width: 20%;
    z-index: 2;
}

.modal-logo img {
    width: 100%;
    height: auto;
}

.modal-logo.top-left {
    top: 5%;
    left: 5%;
}

.modal-logo.top-right {
    top: 5%;
    right: 5%;
}

.modal-logo.bottom-left {
    bottom: 5%;
    left: 5%;
}

.modal-logo.bottom-right {
    bottom: 5%;
    right: 5%;
}


/*superadmin css */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-table thead {
    background-color: #f8f9fa;
}

.admin-table th {
    padding: 15px;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
}

.admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background-color: #f8f9fa;
}

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

.admin-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-header {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 500;
}

.btn-group .btn {
    padding: 6px 12px;
    margin: 0 2px;
}

.btn-group .btn i {
    margin: 0;
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.avatar-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
}