/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background: #f5f6fa;
  color: #111827;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* SIDEBAR */
.sidebar {
  width: 250px;
  background: linear-gradient(160deg, #1e293b, #0f172a);
  color: #fff;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
}

.sidebar h2 {
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: 600;
  text-align: center;
}

.sidebar a {
  padding: 12px 15px;
  border-radius: 8px;
  display: block;
  margin-bottom: 10px;
  color: #cbd5e1;
  font-weight: 500;
  transition: 0.3s;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* MAIN */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* NAVBAR */
.navbar {
  background: #fff;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.navbar h1 {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
}



/* CONTENT */
.content {
  padding: 25px;
  flex: 1;
  overflow-y: auto;
  background: #f9fafb;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #1e293b;
}

/* TABLE */
.table-container {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 15px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

th {
  background: #f1f5f9;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

td {
  font-size: 14px;
  color: #334155;
}

tr:hover {
  background: #f8fafc;
}

/* BUTTONS */
.btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin: 2px;
  transition: 0.2s;
}

.btn-verify {
  background: #2563eb;
  color: #fff;
}

.btn-verify:hover {
  background: #1e40af;
}

.btn-approve {
  background: #10b981;
  color: #fff;
}

.btn-approve:hover {
  background: #047857;
}

.btn-decline {
  background: #ef4444;
  color: #fff;
}

.btn-decline:hover {
  background: #b91c1c;
}

.btn-taken {
  background: #f59e0b;
  color: #fff;
}

.btn-taken:hover {
  background: #b45309;
}

.btn-chat {
  background: #25d366;
  color: #fff;
}

.btn-chat:hover {
  background: #128c7e;
}

/* DARK MODE */
body.dark {
  background: #0f172a;
  color: #f1f5f9;
}

body.dark .navbar {
  background: #1e293b;
}

body.dark .content {
  background: #0f172a;
}

body.dark .table-container {
  background: #1e293b;
  color: #f1f5f9;
}

body.dark th {
  background: #334155;
}


/* === Dashboard Responsive Styles (desktop -> tablet -> mobile) === */
/* Keep your existing rules above; this block focuses on responsive behavior */

:root{
  --sidebar-width: 250px;
  --sidebar-bg: linear-gradient(160deg, #1e293b, #0f172a);
  --main-bg: #f9fafb;
}

/* Off-canvas / default desktop */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  position: relative;
  transform: translateX(0);
  transition: transform 300ms ease;
  height: 100vh;
  overflow-y: auto;
}

/* Mobile-specific off-canvas hidden state */
.sidebar.mobile-hidden {
  transform: translateX(calc(-1 * var(--sidebar-width)));
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  height: 100vh;
}

/* overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms ease;
  z-index: 1050;
}
.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* make main area full width when sidebar hidden on mobile */
.main {
  transition: margin-left 300ms ease;
  margin-left: var(--sidebar-width);
}

/* when sidebar is hidden (mobile), allow main full width */
body.sidebar-open .sidebar {
  transform: translateX(0);
}
body.sidebar-open .overlay {
  opacity: 1;
  visibility: visible;
}

/* Table responsiveness: allow horizontal scroll on small screens */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Reduce paddings and font-sizes on smaller screens */
@media (max-width: 1024px) {
  :root { --sidebar-width: 220px; }
  .cards { gap: 14px; }
  .card { padding: 16px; }
  th, td { padding: 10px 12px; font-size: 13px; }
  .navbar h1 { font-size: 16px; }
}

/* Tablet: collapse sidebar to off-canvas */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(calc(-1 * var(--sidebar-width)));
    height: 100vh;
    z-index: 1100;
  }

  .main { margin-left: 0; }

  /* show the hamburger (menu-toggle) */
  .menu-toggle { display: inline-flex; }

  
}

/* Mobile: stacked content, smaller typography, friendly touch sizes */
@media (max-width: 640px) {
  :root { --sidebar-width: 200px; }
  body { font-size: 14px; }
  .sidebar { width: var(--sidebar-width); min-width: var(--sidebar-width); }
  .navbar h1 { font-size: 15px; }
  .section-title { font-size: 15px; }
  th, td { padding: 10px; font-size: 13px; }
  .btn { padding: 8px 10px; font-size: 13px; border-radius: 8px; }
  .table-container { padding: 8px; border-radius: 10px; }
}

/* Accessibility: ensure hamburger visible only when needed */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: inherit;
  padding: 8px;
  border-radius: 6px;
}

/* Keep overlay hidden for desktop and shown when body.sidebar-open */
body.sidebar-open .overlay { visibility: visible; opacity: 1; }

