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

/* VARIABLES */
:root {
  --green: #7a9e2e;
  --green-dark: #5f7d1f;
  --green-light: #a8c84a;
  --cream: #fdf3e7;
  --cream-dark: #f0e0c8;
  --sidebar-bg: #fff;
  --text: #2b2b2b;
  --text-muted: #888;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(0,0,0,0.08);
}

/* BASE */
body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* SIDEBAR */
.sidebar {
  width: 190px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--sidebar-bg);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--cream-dark);
  z-index: 10;
}

/* MAIN CONTENT (IMPORTANT FIX) */
.main {
  margin-left: 190px;
  padding: 36px 40px;
  min-height: 100vh;
  width: calc(100% - 190px);
  display: block;
}

/* LOGO */
.sidebar-logo img {
  width: 160px;
  height: auto;
}

/* USER */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font: 800 14px 'Nunito', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* NAV */
.nav-link,
.logout-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.nav-link {
  color: var(--text);
}

.nav-link:hover,
.nav-link.active {
  background: var(--green);
  color: #fff;
}

/* POSTS SECTION (NEW — THIS WAS MISSING) */
.posts-container {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-card {
  background: #fff;
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--green);
}

.post-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.post-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.post-desc {
  font-size: 14px;
  line-height: 1.4;
}

/* STAT CARDS */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 30px 0;
}

.stat-card {
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  padding: 25px;
  text-align: center;
  box-shadow: var(--shadow);
}

/* ADS */
.ad-grid {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* COLUMN */
.ad-column {
  background: var(--cream-dark);
  border-radius: var(--radius);
  padding: 15px;
  width: 300px;
  min-height: 400px;
  box-shadow: var(--shadow);
}

/* COLUMN HEADER */
.ad-column-header {
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--green-dark);
}

/* COLUMN BODY */
.ad-column-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* POST-IT STYLE */
.post-it {
  background: #fff8a6;
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
  transform: rotate(-1.5deg);
  transition: all 0.2s ease;
}

.post-link {
  text-decoration: none;
  color: inherit;
}

/* Alternate tilt */
.post-it:nth-child(even) {
  transform: rotate(1.5deg);
  background: #fff3b0;
}

/* Hover */
.post-it:hover {
  transform: scale(1.05) rotate(0deg);
}

/* Title */
.post-it h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
}

/* Description */
.post-it p {
  font-size: 13px;
  margin-bottom: 10px;
}

/* Meta */
.post-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Empty */
.empty {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}


/* ✅ RESPONSIVE (ONLY responsive stuff here) */
@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ad-grid {
    flex-direction: column;
  }

  .main {
    margin-left: 0;
    width: 100%;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }
}

.token-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: bold;
  color: white;
  opacity: 0;
  transform: translateY(-10px);
  transition: 0.25s ease;
  z-index: 9999;
}

.token-popup.show {
  opacity: 1;
  transform: translateY(0);
}

.token-popup.plus {
  background: #2ecc71;
}

.token-popup.minus {
  background: #e74c3c;
}