/* ---------- Base layout ---------- */

:root {
  --bg-deep: #020617;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --slate-50: #f8fafc;
  --slate-100: #e2e8f0;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --glass-bg: rgba(15, 23, 42, 0.72);
  --glass-border: rgba(148, 163, 184, 0.45);
  --radius-xl: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- App / Auth bodies ---------- */

/* Default app body (for dashboards, projects, etc.) — LIGHT THEME */
.app-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.06), transparent 55%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.06), transparent 55%),
    #f5f5f7;
  color: #111827;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

/* Auth layout body (we'll use on login) — stays dark/glassy */
.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.35), transparent 55%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.28), transparent 60%),
    radial-gradient(circle at top right, rgba(94, 234, 212, 0.25), transparent 55%),
    #020617;
  color: var(--slate-50);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

/* ---------- Generic nav / buttons / user chip ---------- */

.nav-link {
  font-size: 13px;
  color: #4b5563;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.16s ease-out;
}

.nav-link:hover {
  border-color: #e5e7eb;
  background: #f3f4f6;
}

.nav-link-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.primary-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.7);
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  color: #f9fafb;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.primary-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.45);
}

/* User chip (top-right) */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: white;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.user-name {
  font-size: 12px;
  color: #111827;
}

/* ---------- Messages ---------- */

.messages-stack {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.message {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
}

.message-success {
  border-color: rgba(34, 197, 94, 0.4);
  background: #ecfdf3;
}

.message-error {
  border-color: rgba(248, 113, 113, 0.6);
  background: #fef2f2;
}

/* ---------- Auth layout (login like Nouvel) ---------- */

.auth-main {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-shell {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

/* Left side (headline) */

.auth-hero {
  padding: 22px 22px 26px;
  border-radius: 28px;
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.35), transparent 60%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.3), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow:
    0 30px 80px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(15, 23, 42, 0.7);
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  font-size: 11px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  margin-bottom: 14px;
}

.auth-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.auth-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.auth-subtitle {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.9);
  margin-bottom: 16px;
}

.auth-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.auth-highlights-item {
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 11px;
}

/* Right side (form card) */

.auth-card {
  width: 100%;
  padding: 22px 22px 24px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.7);
  margin-left: 24px;
  margin-right: 24px;
}

.auth-card-header {
  margin-bottom: 18px;
  text-align: center;
}

.auth-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.auth-card-sub {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.95);
}

/* Forms */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-label {
  font-size: 12px;
  color: #374151;
}

.auth-card .form-label {
  color: rgba(226, 232, 240, 0.9);
}

.form-help {
  font-size: 11px;
  color: #6b7280;
}

.auth-card .form-help {
  color: rgba(148, 163, 184, 0.95);
}

.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"] {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.65);
  color: rgba(248, 250, 252, 0.95);
  padding: 10px 14px;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-card input::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.auth-card input:focus {
  outline: none;
  border-color: rgba(94, 234, 212, 0.85);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.3);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.9);
  cursor: pointer;
  padding: 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.password-toggle:hover {
  color: #a5f3fc;
  background: rgba(15, 23, 42, 0.45);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(94, 234, 212, 0.75);
  outline-offset: 2px;
}

.password-toggle-active {
  color: #34d399;
}

.password-toggle-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.password-toggle-icon svg {
  width: 100%;
  height: 100%;
}

.password-toggle-icon-hide {
  display: none;
}

.password-toggle-active .password-toggle-icon-hide {
  display: inline-flex;
}

.password-toggle-active .password-toggle-icon-show {
  display: none;
}

.form-error {
  font-size: 11px;
  color: #f87171;
  margin: 0;
}

.auth-card .form-error {
  color: #fecdd3;
}

.form-error-global {
  font-size: 12px;
  line-height: 1.4;
  color: #fee2e2;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(185, 28, 28, 0.25);
  margin-bottom: 14px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.95);
}

.checkbox-row input[type="checkbox"] {
  width: 13px;
  height: 13px;
}

.link-sm {
  font-size: 11px;
  color: rgba(94, 234, 212, 0.9);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

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

.btn-primary {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 999px;
  background: radial-gradient(circle at top, #22c55e, #0f766e);
  color: #f9fafb;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.45);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(16, 185, 129, 0.6);
}

.auth-footer {
  margin-top: 16px;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.95);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-logo-oval {
  width: 140px;
  height: 80px;
  border-radius: 500px / 220px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.92), rgba(59, 130, 246, 0.85));
  box-shadow:
    0 20px 40px rgba(16, 185, 129, 0.35),
    inset 0 1px 9px rgba(255, 255, 255, 0.35);
  display: grid;
  place-items: center;
  color: #f0fdf4;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.auth-logo-oval img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.password-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 80;
}

.password-modal[aria-hidden="false"] {
  display: flex;
}

.password-modal-card {
  width: 100%;
  max-width: 380px;
  background: rgba(15, 23, 42, 0.97);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 20px;
  box-shadow:
    0 24px 55px rgba(2, 6, 23, 0.65),
    0 0 0 1px rgba(2, 6, 23, 0.65);
}

.password-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.password-modal-title {
  font-size: 16px;
  font-weight: 600;
}

.password-modal-close {
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.9);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
}

.password-modal .form-field {
  margin-bottom: 0;
}

.password-modal .btn-primary {
  width: 100%;
  margin-top: 16px;
}

.password-modal .form-help {
  margin-top: 8px;
}

.password-modal-success {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #ecfdf5;
  font-size: 12px;
}

/* ---------- Sidebar + Topbar layout ---------- */

.app-shell {
  min-height: 100vh;
  display: flex;
  max-width: 1600px;
  margin: 0 auto;
  padding: 12px 12px 24px;
  
  box-sizing: border-box;
  gap: 18px;

}

/* Left sidebar */

.sidebar {
  width: 230px;
  background: #ffffff;
  border-radius: 26px;
  border: 1px solid #e5e7eb;
  box-shadow:
    0 22px 55px rgba(15, 23, 42, 0.10),
    0 0 0 1px rgba(148, 163, 184, 0.08);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: fit-content;
}

body.sidebar-collapsed .sidebar {
  display: none;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 8px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 4px;
}

.sidebar-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: conic-gradient(from 160deg, #22c55e, #14b8a6, #38bdf8, #22c55e);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.sidebar-logo-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.sidebar-logo-sub {
  font-size: 11px;
  color: #9ca3af;
}

/* Sidebar nav – pill buttons */

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.sidebar-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f5f5f5);
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  font-size: 13px;
  font-weight: 700;
  color: #15803d; /* green text */
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out,
    border-color 0.12s ease-out, background 0.12s ease-out;
}

.sidebar-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  border-color: #d1fae5;
  background: linear-gradient(180deg, #ffffff, #ecfdf3);
}

.sidebar-pill-active {
  background: linear-gradient(180deg, #ffffff, #eafbea);
  border-color: #16a34a;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.28);
  color: #166534;
}

.sidebar-pill-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}


.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.12s ease-out, border-color 0.12s ease-out,
    transform 0.08s ease-out, box-shadow 0.12s ease-out;
}

.sidebar-link:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.sidebar-link-active {
  background: #ecfdf3;
  border-color: rgba(34, 197, 94, 0.7);
  color: #166534;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.25);
}

.sidebar-link-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sidebar-icon {
  width: 18px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid #f3f4f6;
}

.sidebar-footer-label {
  font-size: 11px;
  color: #9ca3af;
}

/* Right side: topbar + content */

.app-shell-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Top bar at the top of main area */

.topbar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  background-color: white;
  border-radius: 60px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.10),
    0 0 0 1px rgba(148, 163, 184, 0.12);
}

.topbar-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-workspace-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.sidebar-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sidebar-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.sidebar-toggle:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.8);
  outline-offset: 2px;
}

.sidebar-toggle-icon {
  font-size: 16px;
  line-height: 1;
}

body.sidebar-collapsed .sidebar-toggle {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.45);
}

.topbar-avatar-button {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.topbar-avatar-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.topbar-avatar-button:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.6);
  outline-offset: 2px;
}

.workspace-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: #ecfdf5;
  color: #065f46;
  font-size: 12px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.workspace-chip:hover {
  background: #d1fae5;
  border-color: rgba(16, 185, 129, 0.55);
}

.workspace-chip-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
  color: #047857;
}

.workspace-chip-name {
  font-weight: 600;
}

.topbar-brand {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

/* Main content area next to sidebar */

.app-main {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 10px 24px 24px 24px;
}

/* ---------- Page shell for dashboard & inner pages (LIGHT) ---------- */

.page-shell {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Big outer dashboard container */
.page-header-panel {
  border-radius: 28px;
  padding: 24px 26px 26px;
  background: radial-gradient(circle at top left, #f9fafb, #ffffff);
  border: 1px solid #e5e7eb;
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.10),
    0 0 0 1px rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(16px);
  min-height: calc(100vh - 140px);
}

.page-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #020617;
}

.page-subtitle {
  margin-top: 6px;
  font-size: 14px;
  color: #6b7280;
}

.page-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  background: #ecfdf3;
  border: 1px solid rgba(34, 197, 94, 0.55);
  color: #166534;
}

.page-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

/* Glass card — bright / light */

.glass-card {
  border-radius: 18px;
  padding: 14px 14px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(10px);
}

.glass-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.glass-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.glass-card-sub {
  font-size: 11px;
  color: #6b7280;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  background: #ecfdf3;
  border: 1px solid rgba(34, 197, 94, 0.55);
  color: #166534;
}

/* ---------- Dashboard layout (cards like example screenshot) ---------- */

/* Top metrics row */
.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

/* Generic stat card */
.stat-card {
  background: linear-gradient(180deg, #ffffff, #f9fafb);
  border-radius: 22px;
  border: 1px solid #e5e7eb;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(148, 163, 184, 0.12);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  font-weight: 600;
}

.stat-card-value {
  font-size: 24px;
  font-weight: 700;
  color: #020617;
}

.stat-card-sub {
  font-size: 11px;
  color: #9ca3af;
}

/* Second row sections */
.dashboard-section-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .dashboard-section-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Large section card */
.section-card {
  background: linear-gradient(180deg, #ffffff, #f9fafb);
  border-radius: 24px;
  border: 1px solid #e5e7eb;
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.10),
    0 0 0 1px rgba(148, 163, 184, 0.10);
  padding: 18px 22px 22px;
}

/* Title / sub inside section */
.section-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #020617;
  margin-bottom: 6px;
}

.section-card-sub {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 12px;
}

/* Two-column layout inside the big status card */
.status-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px 32px;
  margin-top: 8px;
}

/* Status list */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

/* Colored pill rows like the screenshot */
.status-pill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.status-pill-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: #111827;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

/* Colors for status dots / pills */
.status-green {
  background: #22c55e;
}

.status-blue {
  background: #3b82f6;
}

.status-amber {
  background: #f59e0b;
}

.status-red {
  background: #ef4444;
}

.status-purple {
  background: #a855f7;
}

.status-slate {
  background: #64748b;
}

.status-pill-count {
  font-size: 11px;
  font-weight: 600;
  color: #111827;
}

/* Recent activities list */
.activity-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.activity-item {
  padding: 8px 11px;
  border-radius: 13px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  color: #374151;
}



/* ---------- Mobile bottom nav + offcanvas menu ---------- */

.mobile-nav {
  display: none;
}

.mobile-offcanvas {
  display: none;
}

@media (max-width: 768px) {
  /* Hide desktop sidebar/topbar; adjust shell padding */
  .sidebar {
    display: none;
  }

  .sidebar-toggle {
    display: none;
  }

  .app-shell {
    padding: 8px 8px 100px; /* space for bottom nav */
  }

  .topbar {
    height: auto;
    border-radius: 28px;
    padding: 12px;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .topbar-left {
    order: 0;
    flex: 1;
  }

  .topbar-right {
    order: 0;
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
    margin-left: auto;
  }

  .workspace-chip {
    flex: 0 0 auto;
  }

  .page-shell {
    margin-top: 0;
    gap: 12px;
  }

  .page-header-panel {
    border-radius: 22px;
    padding: 18px;
    min-height: auto;
  }

  .page-header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

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

  .app-main {
    padding-bottom: 12px;
  }

  /* Bottom pill nav */
  .mobile-nav {
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(310px, 100% - 30px);
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #e0f2fe, #dcfce7);
    border: 1px solid #bae6fd;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
    margin-top: 30px;
   
  }

  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #4b5563;
    text-decoration: none;
  }

  .mobile-nav-circle {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    display: grid;
    place-items: center;
    font-size: 20px;
  }

  .mobile-nav-circle-primary {
    background: linear-gradient(135deg, #22c55e, #14b8a6);
    border-color: rgba(16, 185, 129, 0.8);
    color: #ecfeff;
  }

  .mobile-nav-icon {
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-icon-img {
    width: 20px;
    height: 20px;
    display: block;
  }

  .mobile-nav-dots {
    font-size: 14px;
    letter-spacing: 0.18em;
  }

  .mobile-nav-label {
    font-size: 11px;
    font-weight: 500;
    color: #111827;
  }

  .mobile-nav-item-active .mobile-nav-circle {
    border-color: rgba(34, 197, 94, 0.8);
    box-shadow: 0 10px 22px rgba(34, 197, 94, 0.35);
  }

  /* Offcanvas overlay */
  .mobile-offcanvas {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-out;
  }

  .mobile-offcanvas-open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-offcanvas-panel {
    width: 160px;
    max-width: 80%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.257), rgba(255, 255, 255, 0.286));
    border-radius: 0 28px 28px 0;
    padding: 16px 14px 18px;
    
    box-shadow:
      0 26px 60px rgba(15, 23, 42, 0.9),
      0 0 0 1px rgba(173, 237, 186, 0.9);
    transform: translateX(-100%);
    transition: transform 0.18s ease-out;
  }

  .mobile-offcanvas-open .mobile-offcanvas-panel {
    transform: translateX(0);
  }

  .mobile-offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    color: #e5e7eb;
  }

  .mobile-offcanvas-title {
    font-size: 15px;
    font-weight: 600;
  }

  .mobile-offcanvas-close {
    border: none;
    background: #0f172a;
    color: #e5e7eb;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
  }

  .mobile-offcanvas-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-offcanvas-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 16px;
    color: #414143;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
  }

  .mobile-offcanvas-item-disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  .mobile-offcanvas-item-danger span:last-child {
    color: #f90000;
  }

  .mobile-offcanvas-circle {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #06f52e;
    display: grid;
    place-items: center;
    color: #0f172a;
    font-size: 20px;
  }

  .mobile-offcanvas-circle-danger {
    background: #ff9b9b;
    color: #b91c1c;
  }
}


/* ---------- Overdue tasks blinking card ---------- */

.overdue-card-blink {
  animation: overduePulse 1.4s infinite;
}

@keyframes overduePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(248, 113, 113, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0);
  }
}
