/* ✅ Base layout */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #f5f5f5;
  display: flex;
  transition: background 0.3s, color 0.3s;
}

body.dark-theme {
  background: #1e293b;
  color: #e2e8f0;
}

/* ✅ Sidebar */
.sidebar {
  width: 220px;
  background: #1e1e2f;
  color: white;
  height: 100vh;
  padding: 20px;
}

.sidebar h2 {
  margin-top: 0;
  font-size: 22px;
  margin-bottom: 30px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar ul li {
  padding: 12px 10px;
  cursor: pointer;
  border-radius: 6px;
  margin-bottom: 10px;
  transition: background 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar ul li:hover,
.sidebar ul li.active {
  background: #de1a24;
  color: white;
}

.sidebar ul li::after {
  content: "›";
  color: #ccc;
  font-size: 16px;
}

/* ✅ Main area */
.main {
  flex-grow: 1;
  padding: 30px;
  transition: background 0.3s;
}

/* ✅ Dashboard header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.theme-toggle:hover {
  background: #eee;
}

body.dark-theme .theme-toggle:hover {
  background: #333;
}

/* ✅ Cards Grid */
.cards,
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

/* ✅ Card Base Style */
.card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  padding: 25px;
  text-align: center;
  transition: transform 0.2s, background 0.3s, color 0.3s;
}

.card:hover {
  transform: translateY(-4px);
}

.card h2,
.card-info h3 {
  margin: 0;
  font-size: 18px;
  color: #444;
}

.card p,
.card-info p {
  font-size: 30px;
  font-weight: bold;
  margin: 10px 0 0;
}

/* ✅ Card Icons */
.card-icon {
  background: #f0f0f0;
  padding: 14px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  width: 42px;
  height: 42px;
}

.card {
  text-align: center;
}
.card-info {
  text-align: center !important;
}


/* ✅ Card Color Variants */
.card.sheba { background: #e3f2fd; }
.card.mart { background: #e8f5e9; }
.card.food { background: #fff3e0; }
.card.users { background: #f3e5f5; }

/* ✅ Dark Theme Overrides */
body.dark-theme .card {
  background: #273549;
  box-shadow: none;
}

body.dark-theme .card-icon {
  background: #334155;
}

body.dark-theme .card h2,
body.dark-theme .card-info h3,
body.dark-theme .card p,
body.dark-theme .card-info p {
  color: #e2e8f0;
}

/* ✅ Order Table Styles */
.orders-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 20px;
}

.orders-table th, .orders-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.orders-table th {
  background: #1e1e2f;
  color: white;
}

.orders-table button {
  margin-right: 5px;
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  background: #444;
  color: white;
  cursor: pointer;
  font-size: 12px;
}

.orders-table button:hover {
  background: #222;
}

/* ✅ Order Detail Card */
.order-details-box .card {
  background: white;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-width: 600px;
  margin-top: 30px;
}

.order-details-box .card p {
  margin: 10px 0;
  font-size: 16px;
}

/* ✅ Header */
.top-header {
  background: #1e1e2f;
  color: white;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
}

/* ✅ Modern Sidebar */
.modern-sidebar {
  width: 240px;
  background: #1e1e2f;
  color: white;
  height: 100vh;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
}

body.dark-theme .modern-sidebar {
  background: #1a2532;
}

.profile {
  text-align: center;
}

.profile img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin-bottom: 10px;
  border: 2px solid #39d353;
}

.profile .info {
  font-size: 14px;
  color: #ccc;
}

.profile .info strong {
  display: block;
  font-size: 16px;
  color: white;
}

/* SIDEBAR ITEMS */
.nav ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: white;
  position: relative;
}

.nav ul li .arrow {
  margin-left: auto;
  color: #ccc;
  font-size: 16px;
}

.sidebar ul li::after {
  content: none !important;
}

.nav ul li span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav ul li:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.nav ul li.active {
  background-color: #de1a24;
  color: white;
}

body.dark-theme .nav ul li:hover,
body.dark-theme .nav ul li.active {
  background: #de1a24;
}

/* ✅ Dashboard Tiles Section */
.dashboard-section {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.tile {
  flex: 1 1 calc(25% - 12px);
  background: #056517;
  border-radius: 10px;
  height: 65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Hind', sans-serif;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.tile:hover {
  background: #0a7d21;
  transform: translateY(-2px);
}

.tile-icon {
  font-size: 16px;
  color: #fff;
  margin-bottom: 2px;
}

.tile-label {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

body.dark-theme .tile {
  background: #056517;
}

body.dark-theme .tile-icon,
body.dark-theme .tile-label {
  color: #ffffff;
}

.tile.tile-green {
  background: #e6f4ea;
  border: 1px solid #a6d5b9;
}
.tile.tile-green:hover {
  background: #c8e6c9;
}
.tile.tile-red {
  background: #fdeaea;
  border: 1px solid #f5c6cb;
}
.tile.tile-red:hover {
  background: #f8d7da;
}

body.dark-theme .tile.tile-green {
  background: #244032;
  border-color: #3a5f45;
}
body.dark-theme .tile.tile-red {
  background: #422626;
  border-color: #6c2f33;
}

.card-green {
  background-color: #056517;
  color: white;
  border: 1px solid #056517;
}

.card-red {
  background-color: #de1a24;
  color: white;
  border: 1px solid #de1a24;
}

.card-green .card-icon,
.card-red .card-icon,
.card-green .card-info h3,
.card-red .card-info h3 {
  color: white;
}

/* Apply serif font for whole dashboard */
body {
  font-family: serif;
}

/* Override card-icon circle to inherit tile background color for icon */
.card-icon {
  background: white;
  padding: 14px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  width: 42px;
  height: 42px;
}

/* Center icon and text inside card */
.card {
  text-align: center;
}

/* Update icon inside card icon to match tile bg */
.card.card-green .card-icon i,
.tile.tile-green .tile-icon {
  color: #056517;
}

.card.card-red .card-icon i,
.tile.tile-red .tile-icon {
  color: #de1a24;
}

.card.card-green .card-icon svg,
.tile.tile-green .tile-icon svg {
  color: #056517 !important;
}

.card.card-red .card-icon svg,
.tile.tile-red .tile-icon svg {
  color: #de1a24 !important;
}

body.dark-theme .card.card-green .card-icon svg,
body.dark-theme .tile.tile-green .tile-icon svg {
  color: #ffffff !important;
}

body.dark-theme .card.card-red .card-icon svg,
body.dark-theme .tile.tile-red .tile-icon svg {
  color: #ffffff !important;
}

.loader-center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.spinner {
  border: 5px solid #eee;
  border-top: 5px solid #de1a24;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite;
}

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

.error-message {
  text-align: center;
  color: #de1a24;
  font-weight: bold;
  padding: 20px;
  font-family: serif;
}

/* ✅ Manage Post UI */

.post-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  padding: 20px;
  margin-bottom: 20px;
  font-family: serif;
}

body.dark-theme .post-card {
  background: #273549;
  border: 1px solid #334155;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #39d353;
  object-fit: cover;
}

.post-user {
  flex: 1;
}

.post-name {
  font-weight: bold;
  font-size: 15px;
}

body.dark-theme .post-name {
  color: #f8fafc;
}

.verified {
  color: #2196f3;
  font-size: 14px;
}

.post-time {
  font-size: 13px;
  color: gray;
}

body.dark-theme .post-time,
body.dark-theme .status {
  color: #94a3b8;
}

.post-caption {
  font-size: 16px;
  font-family: 'Hind', serif;
  color: #333;
  padding: 8px 16px;
  line-height: 1.5;
  white-space: pre-line;
}

body.dark-theme .post-caption {
  color: #e2e8f0;
}

.post-img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 12px;
}

.post-stats {
  font-size: 14px;
  color: #444;
  margin-bottom: 12px;
}

.post-stats .likes {
  color: #056517;
  font-weight: 600;
  margin-right: 16px;
}

.post-stats .comments {
  color: #de1a24;
  font-weight: 600;
}

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

.post-actions button {
  flex: 1;
  padding: 10px;
  border: none;
  font-size: 14px;
  font-family: serif;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-delete {
  background: #de1a24;
  color: white;
}

.btn-delete:hover {
  background: #b9131d;
}

.btn-approve {
  background: #056517;
  color: white;
}

.btn-approve:hover {
  background: #044b10;
}

.dots {
  font-size: 20px;
  color: gray;
  cursor: pointer;
}
.coupon-list,
.coupon-form {
  max-width: 90%;
  min-height: 90vh;
  margin: 40px auto;
}
.back-button {
  margin: 20px;
  background: #273549;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  max-width: 100px;
  max-height: 50px;
  line-height: 1;
}
.loader-center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  margin-top: 20px;
}

.spinner {
  border: 5px solid #eee;
  border-top: 5px solid #de1a24;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e1e2f;
  color: white;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 99;
  min-height: 56px;
}

.action-bar h2 {
  flex-grow: 1;
  text-align: center;
  font-size: 18px;
  margin: 0;
  font-family: serif;
}

.back-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 50%;
  transition: background 0.2s;
}

.back-btn:hover {
  background: rgba(255,255,255,0.1);
}

.right-space {
  width: 40px; /* same as back button to balance */
}

