
/* Make the right side expand beside the menubar */
.ADwholeframe {
  padding: 15px;
  position: absolute;
  width: 100%;
  height: 100%;                 /* give it a fixed height */
  display: flex;
  overflow: hidden;             /* prevent frame overflow */
}

.ADdashboardcontainer {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;             /* enable vertical scrolling */
  scrollbar-width: thin;        /* Firefox scrollbar */
  scrollbar-color: #c2a986 transparent;
}

/* optional prettier scrollbar for webkit browsers */
.ADdashboardcontainer::-webkit-scrollbar {
  width: 8px;
}

.ADdashboardcontainer::-webkit-scrollbar-thumb {
  background: #c2a986;
  border-radius: 10px;
}

.ADdashboardcontainer::-webkit-scrollbar-track {
  background: transparent;
}



.ADdashboardtext {
  color: #6F4F37;   /* coffee brown */
  font-family: 'Poppins', sans-serif;
  font-size: 40px;
  font-weight: 1000;
  margin: 15px;
}

/* Sales distribution top bar */
.ADsalesdistributiontop {
  min-height: 250px;
  margin: 15px;
  background-color: #E1C191;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  color: #fff;
  background-position: center;
  background-size: cover;
}

.ADS1 {
  font-size: 30px;
  font-weight: 700;
  margin: 0;
  color: #fff9f2;
  text-shadow: 2px 2px 4px rgba(87, 56, 2, 0.5);
}

.ADS2 {
  font-size: 14px;
  margin: 0;
  opacity: 0.9;
}

/* Top stats cards */
/* Now horizontal scroll inside works fine */
.ADdashboardinside {
  display: flex;
  gap: 15px;
  padding: 10px 0;
  flex-wrap: wrap; /* Allow cards to wrap to next line */
}

.ADdashboardinside::-webkit-scrollbar {
  height: 8px; /* slim horizontal scrollbar */
}

.ADdashboardinside::-webkit-scrollbar-thumb {
  background: #caa06f;   /* scrollbar color */
  border-radius: 10px;
}

.ADdashboardinside::-webkit-scrollbar-track {
  background: #F1E0C6;   /* scrollbar track */
}

/* Each card */
.ADdashboardinside > div {   /* fixed width for each card */
  height: 150px;
  flex: 1 1 200px; /* Grow, shrink, and have a base width */
  min-width: 200px; /* Minimum width before wrapping */
  border-radius: 14px;
  background: #a17c46;
  padding: 15px;
  display: flex;
  flex-direction: column;
  color: #ffffff;
  font-weight: 700;
  font-size: 20px;
} 

.ADsamplesaletext {
  font-size: 20px;
}

/* Sales distribution card content styles */
.ADsales-card-title {
  font-weight: bold;
}

.ADsales-card-value {
  text-align: center;
}

/* Bottom container */
/* bottom container layout - matching the image design */
.ADbottomcontainer {
  width: 95%;
  margin: 20px auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* 3 equal columns for top row */
  grid-template-rows: auto auto; /* 2 rows */
  gap: 20px; /* spacing between cards */
  grid-template-areas: 
      "sales-dist yearly-sales payment-gateway"
      "active-user revenue-updates payment-gateway";
}

/* each card */
.ADbottomcontainer > div {
  border-radius: 20px;
  background-color: #f3e1c8;   /* soft beige like your sample */
  padding: 25px 30px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Specific heights for all cards except payment gateway */
.ADsalesdistributionbox,
.ADrevenueupdates,
.ADyearlysales,
.ADactiveuser {
  height: 280px;
}

/* Grid area assignments for specific cards */
.ADsalesdistributionbox {
  grid-area: sales-dist;
}

.ADrevenueupdates {
  grid-area: revenue-updates;
}

.ADyearlysales {
  grid-area: yearly-sales;
}

.ADactiveuser {
  grid-area: active-user;
}

.ADpaymentgw {
  grid-area: payment-gateway;
}

/* Payment Gateway specific styling */
.ADpayment-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.ADpayment-method {
  font-size: 1.1rem;
  font-weight: 600;
  color: #6F4F37;
  margin: 0 0 8px 0;
}

.ADpayment-bar {
  width: 100%;
  height: 8px;
  background-color: #e1c191;
  border-radius: 10px;
  margin-top: 5px;
}

.ADbottomcontainer > div:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

/* top row: title + menu button */
.ADcard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ADcard-header p {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6F4F37;
  margin: 0;
}

/* the menu button (•••) */
.ADbtnlower {
  background-color: transparent;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 20px;
  font-weight: bold;
  color: #5a3f2e;
  cursor: pointer;
  transition: background 0.2s;
}

.ADbtnlower:hover {
  background-color: #d3a96f;
}


/* Tablet (≤1024px) */
@media (max-width: 1024px) {



  .ADdashboardtext {
    font-size: 28px;
    margin: 10px;
  }

  .ADsalesdistributiontop {
    padding: 15px;
    min-height: 420px;
  }

  .ADtotalsales,
  .ADtotalsales2,
  .ADtotalsales3,
  .ADtotalsales4,
  .ADtotalsales5,
  .ADtotalsales6 {
    flex: 1 1 160px; /* Allow cards to grow and shrink */
    min-height: 100px;
  }

  .ADbottomcontainer {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
      "sales-dist revenue-updates"
      "yearly-sales yearly-sales"
      "active-user payment-gateway";
    gap: 15px;
  }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  .ADwholeframe {
    flex-direction: column;   /* stack menu + dashboard */
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }

  .ADdashboardcontainer {
    width: 100%;
    padding: 10px;
  }

  .ADdashboardtext {
    font-size: 24px;
    margin: 8px;
  }

  .ADsalesdistributiontop {
    margin: 10px 0;
    gap: 10px;
    min-height: 900px;
  }

  .ADdashboardinside {
    gap: 10px;
    padding: 5px 0;
    flex-direction: column; /* Stack cards vertically on mobile */
  }

  .ADtotalsales,
  .ADtotalsales2,
  .ADtotalsales3,
  .ADtotalsales4,
  .ADtotalsales5,
  .ADtotalsales6 {
    flex: 1 1 auto; /* Allow cards to grow and fill width */
    min-height: 50px;
    width: 100%; /* Full width on mobile */
  }

  .ADbottomcontainer {
    grid-template-columns: 1fr; /* single column cards */
    grid-template-areas: 
      "sales-dist"
      "revenue-updates"
      "yearly-sales"
      "active-user"
      "payment-gateway";
    gap: 12px;
  }

  .ADbottomcontainer > div {
    height: auto; /* let cards expand naturally */
    min-height: 50px;
    padding: 20px 25px;
  }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
  .ADdashboardtext {
    font-size: 20px;
  }

  .ADS1 {
    font-size: 18px;
  }

  .ADS2 {
    font-size: 12px;
  }

  .ADtotalsales,
  .ADtotalsales2,
  .ADtotalsales3,
  .ADtotalsales4,
  .ADtotalsales5,
  .ADtotalsales6 {
    flex: 1 1 auto; /* Allow cards to grow and fill width */
    min-height: 60px;
    padding: 8px;
    width: 100%; /* Full width on small mobile */
  }

  .ADbottomcontainer {
    gap: 10px;
  }

  .ADbtnlower {
    font-size: 12px;
    padding: 3px 8px;
  }
}

/* Modal Styles */
.ADmodal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
padding: 20px;
}

.ADmodal {
background: white;
border-radius: 20px;
max-width: 1000px;
width: 100%;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
from {
  opacity: 0;
  transform: translateY(-50px);
}
to {
  opacity: 1;
  transform: translateY(0);
}
}

.ADmodal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 25px;
border-bottom: 2px solid #f0f0f0;
background: linear-gradient(135deg, #6F4F37, #8B5A3C);
color: white;
border-radius: 20px 20px 0 0;
}

.ADmodal-header h3 {
margin: 0;
font-size: 1.5rem;
font-weight: 600;
}

.ADmodal-close {
background: none;
border: none;
font-size: 2rem;
color: white;
cursor: pointer;
padding: 0;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background-color 0.2s ease;
}

.ADmodal-close:hover {
background-color: rgba(255, 255, 255, 0.2);
}

.ADmodal-content {
padding: 25px;
}

/* Split Layout Styles */
.ADmodal-split-layout {
display: flex;
gap: 30px;
min-height: 400px;
}

.ADmodal-left-section,
.ADmodal-right-section {
flex: 1;
display: flex;
flex-direction: column;
}

.ADsection-header {
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #f0f0f0;
}

.ADsection-header h4 {
margin: 0;
font-size: 1.1rem;
font-weight: 600;
color: #6F4F37;
display: flex;
align-items: center;
gap: 8px;
}

.ADno-cancelled-orders {
display: flex;
align-items: center;
justify-content: center;
height: 200px;
color: #888;
font-style: italic;
}

/* Trend Summary Styles */
.ADtrend-summary {
margin-top: 20px;
}

.ADtrend-summary h4 {
color: #6F4F37;
margin-bottom: 15px;
font-size: 1.2rem;
}

.ADtrend-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 10px;
}

.ADtrend-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 15px;
background: #f8f8f8;
border-radius: 8px;
border-left: 4px solid #6F4F37;
}

.ADtrend-month {
font-weight: 600;
color: #6F4F37;
}

.ADtrend-amount {
color: #333;
font-weight: 500;
}

.ADtrend-arrow {
font-weight: bold;
font-size: 1.2rem;
}

.ADtrend-arrow.up {
color: #4CAF50;
}

.ADtrend-arrow.down {
color: #f44336;
}

/* Ranking Styles */
.ADranking-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.ADranking-list::-webkit-scrollbar {
  width: 6px;
}

.ADranking-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.ADranking-list::-webkit-scrollbar-thumb {
  background: #6F4F37;
  border-radius: 3px;
}

.ADranking-list::-webkit-scrollbar-thumb:hover {
  background: #5a3f2a;
}

.ADranking-item {
display: flex;
align-items: center;
padding: 15px;
background: #f8f8f8;
border-radius: 12px;
border-left: 4px solid #6F4F37;
transition: transform 0.2s ease;
min-height: 60px;
gap: 12px;
}

.ADranking-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ADranking-number {
background: #6F4F37;
color: white;
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 0.8rem;
}

.ADranking-info {
flex: 1;
}

.ADranking-info h4 {
margin: 0 0 4px 0;
color: #6F4F37;
font-size: 0.95rem;
}

.ADranking-level {
margin: 0;
color: #666;
font-size: 0.9rem;
}

.ADranking-points {
color: #6F4F37;
font-weight: bold;
font-size: 1.1rem;
}

/* Enhanced Payment Gateway Styles */
.ADpayment-method-item {
display: flex;
align-items: center;
margin-bottom: 20px;
padding: 15px;
background: #f8f8f8;
border-radius: 8px;
border-left: 4px solid #6F4F37;
}

.ADpayment-method-info {
display: flex;
flex-direction: column;
min-width: 140px;
margin-right: 20px;
}

.ADpayment-method {
font-weight: 700;
color: #6F4F37;
margin: 0 0 8px 0;
font-size: 1rem;
}

.ADpayment-amount {
color: #6F4F37;
margin: 0;
font-size: 0.95rem;
font-weight: 500;
}

.ADpayment-bar-container {
flex: 1;
height: 8px;
background: #e0e0e0;
border-radius: 4px;
margin-right: 15px;
overflow: hidden;
}

.ADpayment-bar {
height: 100%;
background: linear-gradient(90deg, #6F4F37, #8B5A3C);
border-radius: 4px;
transition: width 0.3s ease;
}

.ADpayment-percentage {
  color: #6F4F37;
  font-weight: 700;
  font-size: 1rem;
  min-width: 50px;
  text-align: right;
  margin: 0;
}

/* Bottom container card content styles */
.ADcard-header-title {
  font-weight: bold;
}

.ADcard-content {
  padding: 10px;
  text-align: center;
}

.ADcard-large-value {
  font-size: 40px;
  font-weight: bold;
  color: #6F4F37;
  margin-bottom: 10px;
}

.ADcard-medium-text {
  font-size: 25px;
  color: #666;
  margin-bottom: 5px;
}

.ADcard-small-text {
  font-size: 15px;
  color: #888;
  margin-top: 5px;
}

.ADcard-growth-text {
  font-size: 20px;
  margin-bottom: 5px;
}

.ADcard-growth-text.positive {
  color: #4CAF50;
}

.ADcard-growth-text.negative {
  color: #f44336;
}

.ADrevenue-card-content {
  padding: 20px;
  text-align: center;
}

.ADyearly-card-content {
  padding: 10px;
  text-align: center;
}

.ADyearly-large-value {
  font-size: 40px;
  font-weight: bold;
  color: #6F4F37;
  margin-bottom: 5px;
}

.ADyearly-medium-text {
  font-size: 25px;
  color: #666;
}

.ADyearly-growth-text {
  font-size: 20px;
  margin-top: 5px;
}

.ADyearly-growth-text.positive {
  color: #4CAF50;
}

.ADyearly-growth-text.negative {
  color: #f44336;
}

.ADactive-growth-text.positive {
  color: #4CAF50;
}

.ADactive-growth-text.negative {
  color: #f44336;
}

.ADactive-card-content {
  padding: 10px;
  text-align: center;
}

.ADactive-large-value {
  font-size: 40px;
  font-weight: bold;
  color: #6F4F37;
  margin-bottom: 10px;
}

.ADactive-medium-text {
  font-size: 25px;
  color: #666;
  margin-bottom: 5px;
}

.ADactive-growth-text {
  font-size: 20px;
}

.ADactive-click-text {
  font-size: 15px;
  color: #888;
  margin-top: 5px;
}

/* Cancelled Customer Section Styles - Updated for split layout */

.ADcancelled-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.ADcancelled-ranking-list::-webkit-scrollbar {
  width: 6px;
}

.ADcancelled-ranking-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.ADcancelled-ranking-list::-webkit-scrollbar-thumb {
  background: #d32f2f;
  border-radius: 3px;
}

.ADcancelled-ranking-list::-webkit-scrollbar-thumb:hover {
  background: #b71c1c;
}

.ADcancelled-ranking-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
  border-radius: 12px;
  border-left: 4px solid #d32f2f;
  box-shadow: 0 2px 8px rgba(211, 47, 47, 0.1);
  transition: all 0.3s ease;
  gap: 12px;
  min-height: 60px;
}

.ADcancelled-ranking-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
}

.ADcancelled-ranking-number {
  background: #d32f2f;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.ADcancelled-ranking-info {
  flex: 1;
  min-width: 0;
}

.ADcancelled-ranking-info h5 {
  margin: 0 0 4px 0;
  color: #d32f2f;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ADcancelled-ranking-username {
  margin: 0 0 4px 0;
  color: #666;
  font-size: 0.85rem;
  font-weight: 500;
}

.ADcancelled-ranking-contact {
  margin: 0;
  color: #888;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ADcancelled-ranking-stats {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ADcancelled-count-badge {
  background: #d32f2f;
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(211, 47, 47, 0.3);
}

.ADcancelled-ranking-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ADrestrict-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.ADrestrict-btn.unrestricted {
  background: #d32f2f;
  color: white;
}

.ADrestrict-btn.unrestricted:hover {
  background: #b71c1c;
  transform: translateY(-1px);
}

.ADrestrict-btn.restricted {
  background: #4caf50;
  color: white;
}

.ADrestrict-btn.restricted:hover {
  background: #388e3c;
  transform: translateY(-1px);
}

.ADrestrict-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ADloading-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
.ADmodal {
  margin: 10px;
  max-height: 95vh;
}

.ADmodal-header {
  padding: 15px 20px;
}

.ADmodal-header h3 {
  font-size: 1.2rem;
}

.ADmodal-content {
  padding: 20px;
}

.ADmodal-split-layout {
  flex-direction: column;
  gap: 20px;
  min-height: auto;
}

.ADmodal-left-section,
.ADmodal-right-section {
  flex: none;
}

.ADtrend-list {
  grid-template-columns: 1fr;
}

.ADranking-item {
  flex-direction: column;
  text-align: center;
  gap: 10px;
}

.ADranking-number {
  margin-right: 0;
}

.ADcancelled-ranking-item {
  flex-direction: column;
  text-align: center;
  gap: 15px;
  padding: 15px;
}

.ADcancelled-ranking-number {
  margin: 0 auto;
}

.ADcancelled-ranking-info {
  text-align: center;
}

.ADcancelled-ranking-stats {
  justify-content: center;
}

.ADcancelled-ranking-actions {
  justify-content: center;
}

.ADpayment-method-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.ADpayment-method-info {
  margin-right: 0;
  min-width: auto;
}

.ADpayment-bar-container {
  width: 100%;
  margin-right: 0;
}

.ADpayment-percentage {
  text-align: left;
}
}