/* =========================
   TrashBeta Resident Layout
   Rechecked (Full)
   ========================= */

:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --muted: #6b7280;
  --text: #111827;
  --border: #e7eaf0;

  --primary: #2f7d32;
  --primary-600: #256628;
  --primary-soft: #eaf6ec;

  --shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
  --shadow-soft: 0 6px 18px rgba(17, 24, 39, 0.06);

  --radius: 14px;

  --sidebar-w: 280px;
  --topbar-h: 72px;

  --gap: 18px;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    "Helvetica Neue",
    "Noto Sans",
    "Liberation Sans",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* =========
   Shell
   ========= */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}

/* =========
   Sidebar
   ========= */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--border);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.sidebar__top {
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 800;
  font-size: 22px;
}

.brand__mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.brand__mark svg {
  width: 26px;
  height: 26px;
}

.nav {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 999px; /* matches the pill-ish active look */
  text-decoration: none;
  color: #374151;
  font-weight: 600;
  font-size: 14px;
}

.nav__icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #6b7280;
}

.nav__icon svg {
  width: 22px;
  height: 22px;
}

.nav__link:hover {
  background: #f3f5f9;
}

.nav__link.is-active {
  background: #e9f4ea;
  color: var(--primary);
}

.nav__link.is-active .nav__icon {
  color: var(--primary);
}

.nav__divider {
  height: 1px;
  background: var(--border);
  margin: 12px 6px;
}

.sidebar__bottom {
  padding: 14px 14px 18px;
  border-top: 1px solid var(--border);
}

.user-mini {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
}

.user-mini__avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
}

.user-mini__name {
  margin: 0;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.15;
}

.user-mini__sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.icon-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #4b5563;
  transition:
    transform 0.08s ease,
    background 0.15s ease;
}

.icon-btn:hover {
  background: #f6f7fb;
}

.icon-btn:active {
  transform: scale(0.98);
}

/* =========
   Main + Topbar
   ========= */
.main {
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr;
  min-width: 0;
}

.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  gap: 14px;
}

.topbar__menu {
  display: none;
}

.topbar__title h1 {
  font-size: 20px;
  margin: 0;
  font-weight: 800;
}

.topbar__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.bell {
  position: relative;
}

.bell__dot {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #ef4444;
  border: 2px solid #fff;
}

.bell svg {
  width: 22px;
  height: 22px;
}

.avatar-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

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

/* =========
   Content container
   ========= */
.content {
  padding: 18px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* =========
   Cards
   ========= */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* =========
   Hero + Pickup layout
   ========= */
.grid-2 {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: var(--gap);
  align-items: stretch;
}

.hero {
  background: #edf6ee;
  border: 1px solid #dfeee1;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 10px;
  padding: 20px 22px;
  min-height: 150px;
}

.hero__text h2 {
  margin: 6px 0 6px;
  font-size: 34px;
  line-height: 1.1;
  color: var(--primary);
  letter-spacing: -0.2px;
}

.hero__text p {
  margin: 0;
  color: #374151;
  font-weight: 600;
}

.hero__text strong {
  font-weight: 900;
}

.hero__art {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--primary);
  opacity: 0.9;
}

.hero__art svg {
  width: 100%;
  height: auto;
  max-width: 300px;
}

.pickup {
  padding: 18px 18px 16px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
}

.pickup__title {
  margin: 2px 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: #374151;
}

.pickup__badge {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #eaf6ec;
  border: 1px solid #d8efd9;
  display: grid;
  place-items: center;
  color: var(--primary);
}

.pickup__badge svg {
  width: 22px;
  height: 22px;
}

.pickup__date {
  margin: 6px 0 0;
  font-weight: 800;
  color: #374151;
}

.pickup__time {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.pickup__loc {
  margin: 2px 0 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.pickup__hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  min-height: 16px;
}

/* =========
   Buttons
   ========= */
.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  max-width: 240px;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(47, 125, 50, 0.18);
}

.btn--primary:hover {
  background: var(--primary-600);
}

/* =========
   Quick actions row
   ========= */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.qa-card {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.qa-card:hover {
  background: #fbfbfd;
}

.qa-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
}

.qa-card__icon svg {
  width: 20px;
  height: 20px;
}

.qa-card__icon--purple {
  background: #eef2ff;
  color: #6366f1;
  border-color: #e4e7ff;
}

.qa-card__icon--amber {
  background: #fff7ed;
  color: #f59e0b;
  border-color: #fde5c8;
}

.qa-card__icon--mint {
  background: #ecfdf5;
  color: #10b981;
  border-color: #d1fae5;
}

.qa-card__label {
  font-weight: 800;
  color: #374151;
  font-size: 14px;
}

/* =========
   Section cards
   ========= */
.section {
  padding: 14px 16px 16px;
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 4px 12px;
}

.section__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section__title h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #374151;
}

.section__icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #eef2ff;
  color: #6366f1;
  display: grid;
  place-items: center;
  border: 1px solid #e4e7ff;
}

.section__icon svg {
  width: 18px;
  height: 18px;
}

.link {
  text-decoration: none;
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
}

.link:hover {
  text-decoration: underline;
}

/* =========
   Table
   ========= */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px; /* allows horizontal scroll on small screens like screenshot behavior */
}

.table thead th {
  background: #f3f4f6;
  color: #6b7280;
  font-size: 12px;
  letter-spacing: 0.2px;
  text-align: left;
  padding: 12px 14px;
  font-weight: 900;
  border-bottom: 1px solid var(--border);
}

.table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef0f5;
  color: #374151;
  font-size: 13px;
  vertical-align: middle;
  font-weight: 600;
}

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

.thumb {
  width: 64px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #eef0f5;
}

.td-actions {
  width: 40px;
  text-align: right;
}

.kebab {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  color: #9ca3af;
}

.kebab:hover {
  background: #f6f7fb;
}

/* Priority pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid var(--border);
}

.pill--low {
  background: #f3f4f6;
  color: #374151;
}

.pill--medium {
  background: #fff7ed;
  border-color: #fde5c8;
  color: #b45309;
}

.pill--high {
  background: #fef2f2;
  border-color: #fee2e2;
  color: #b91c1c;
}

/* Status badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid var(--border);
  color: #6b7280;
  background: #fff;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.status--pending {
  background: #fff;
}

.status--pending::before {
  background: #ef4444;
}

.status--progress::before {
  background: #f59e0b;
}

.status--done::before {
  background: #22c55e;
}

/* =========
   Community news
   ========= */
.section h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #374151;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding-top: 10px;
}

.news-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.news-card h4 {
  margin: 10px 0 6px;
  font-size: 14px;
  font-weight: 900;
  color: #374151;
}

.news-card p {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.news-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
}

.news-card__icon svg {
  width: 20px;
  height: 20px;
}

.news-card__icon--amber {
  background: #fff7ed;
  color: #f59e0b;
  border-color: #fde5c8;
}

.news-card__icon--mint {
  background: #ecfdf5;
  color: #10b981;
  border-color: #d1fae5;
}

.news-card__icon--purple {
  background: #eef2ff;
  color: #6366f1;
  border-color: #e4e7ff;
}

.link-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--primary);
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

/* =========
   Overlay (mobile sidebar)
   ========= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.35);
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 40;
}

/* =========
   Hamburger icon (simple)
   ========= */
.topbar__hamburger {
  width: 18px;
  height: 2px;
  background: #374151;
  border-radius: 999px;
  position: relative;
  display: inline-block;
}
.topbar__hamburger::before,
.topbar__hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: #374151;
  border-radius: 999px;
}
.topbar__hamburger::before {
  top: -6px;
}
.topbar__hamburger::after {
  top: 6px;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 1100px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero__art {
    justify-content: flex-start;
  }
}

@media (max-width: 960px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile: collapse sidebar */
@media (max-width: 880px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(var(--sidebar-w), 88vw);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    z-index: 50;
    box-shadow: var(--shadow);
  }

  .app-shell.is-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .topbar__menu {
    display: grid;
  }

  .content {
    padding: 16px;
  }

  .topbar {
    padding: 0 16px;
  }
}

/* Small: hero text scale */
@media (max-width: 520px) {
  .hero__text h2 {
    font-size: 26px;
  }

  .btn {
    max-width: 100%;
  }
}

/* make table scrollable on small screens */
.table-wrap {
  overflow-x: auto;
}




/* Made some changes for responsiveness late */
@media (max-width: 768px) {
  .content {
    padding: 14px;
    gap: 14px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .hero__art {
    justify-content: center;
  }

  .hero__text h2 {
    font-size: 28px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .section__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .pickup {
    width: 100%;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .table {
    min-width: 760px;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 12px;
  }

  .topbar {
    padding: 0 12px;
  }

  .topbar__title h1 {
    font-size: 18px;
  }

  .hero__text h2 {
    font-size: 24px;
    line-height: 1.2;
  }

  .hero__text p {
    font-size: 15px;
  }

  .card,
  .section,
  .pickup,
  .hero,
  .qa-card,
  .news-card {
    border-radius: 12px;
  }

  .btn,
  .qa-card {
    width: 100%;
  }

  .user-mini__meta {
    min-width: 0;
  }
}



/* =========================
   RESPONSIVE (Resident Dashboard)
   Put this at the very bottom
   ========================= */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell,
.main,
.content,
.card,
.hero,
.pickup,
.quick-actions,
.news-grid,
.section,
.table-wrap {
  min-width: 0;
}

.hero__art svg {
  max-width: 100%;
  height: auto;
}

.qa-card,
.news-card,
.section__title,
.qa-card__label,
.news-card h4,
.news-card p {
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Tablet */
@media (max-width: 1100px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero__art {
    justify-content: flex-start;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile / collapsed sidebar */
@media (max-width: 880px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(var(--sidebar-w), 88vw);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    z-index: 50;
    box-shadow: var(--shadow);
  }

  .app-shell.is-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .topbar__menu {
    display: grid;
  }

  .main {
    width: 100%;
    margin: 0 auto;
  }

  .topbar {
    width: 100%;
    padding: 0 16px;
  }

  .content {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 16px;
    gap: 14px;
  }

  .grid-2,
  .quick-actions,
  .news-grid,
  .section,
  .pickup,
  .hero {
    width: 100%;
  }

  .section__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 18px;
  }

  .hero__art {
    justify-content: center;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .table {
    min-width: 760px;
  }
}

/* Small mobile */
@media (max-width: 520px) {
  .content {
    padding: 12px;
  }

  .topbar {
    padding: 0 12px;
  }

  .topbar__title h1 {
    font-size: 18px;
  }

  .hero {
    padding: 16px;
  }

  .hero__text h2 {
    font-size: 24px;
    line-height: 1.2;
  }

  .hero__text p {
    font-size: 15px;
  }

  .pickup {
    padding: 16px;
  }

  .btn {
    max-width: 100%;
  }

  .qa-card {
    padding: 12px 14px;
    width: 100%;
  }

  .section,
  .news-card {
    padding: 12px;
  }

  .card,
  .section,
  .pickup,
  .hero,
  .qa-card,
  .news-card {
    border-radius: 12px;
  }

  .table {
    min-width: 700px;
  }
}
