/* =============================================
   ROOT & SHARED
   ============================================= */

:root {
  --brand-purple:      #7b68ee;
  --brand-purple-dark: #6a5acd;
  --brand-purple-light:#ede9ff;
  --sidebar-bg:        #1a1a2e;
  --sidebar-width:     240px;
  --bottom-nav-height: 64px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
}

.brand-logo {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: -1px;
  flex-shrink: 0;
}

.brand-name    { font-weight: 700; letter-spacing: -0.3px; }
.brand-tagline { margin-top: 1px; }

.btn-brand {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-dark));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-brand:hover  { opacity: 0.9; transform: translateY(-1px); color: #fff; }
.btn-brand:active { transform: translateY(0); color: #fff; }

/* =============================================
   SHARED FORM STYLES
   ============================================= */

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.35rem;
}

.form-control,
.form-select {
  border-radius: 8px;
  border: 1.5px solid #e5e7eb;
  padding: 0.6rem 0.875rem;
  font-size: 0.9rem;
  color: #1e1e2e;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.15);
}

.input-group .form-control { border-right: none; }
.input-group .btn-outline-secondary {
  border: 1.5px solid #e5e7eb;
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: #9ca3af;
  background: #fff;
}
.input-group .btn-outline-secondary:hover    { background: #f9fafb; color: #6b7280; }
.input-group:focus-within .btn-outline-secondary { border-color: var(--brand-purple); }

.form-check-input:checked { background-color: var(--brand-purple); border-color: var(--brand-purple); }
.form-check-input:focus   { box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.15); }
.form-check-label         { font-size: 0.8375rem; color: #6b7280; }

/* =============================================
   LOGIN PAGE
   ============================================= */

.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-body .brand-logo    { width: 44px; height: 44px; font-size: 1.35rem; }
.login-body .brand-name    { font-size: 1.25rem; color: #1e1e2e; }
.login-body .brand-tagline { font-size: 0.78rem; color: #8e8ea0; }

.login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 2.25rem;
}

h1.login-title  { font-size: 1.5rem; font-weight: 700; color: #1e1e2e; margin: 0; }
.login-subtitle { font-size: 0.875rem; color: #6b7280; }

.forgot-link { font-size: 0.8125rem; color: var(--brand-purple); text-decoration: none; font-weight: 500; }
.forgot-link:hover { color: var(--brand-purple-dark); text-decoration: underline; }

/* =============================================
   DASHBOARD — LAYOUT
   ============================================= */

.dashboard-body { background: #f5f5f7; min-height: 100vh; }

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  z-index: 100;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar .brand-logo    { width: 38px; height: 38px; font-size: 1.05rem; }
.sidebar .brand-name    { font-size: 1rem; color: #fff; }
.sidebar .brand-tagline { font-size: 0.7rem; color: rgba(255,255,255,0.42); }

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: rgba(255,255,255,0.52);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.sidebar-link i          { font-size: 1.05rem; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-link:hover      { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.9); }
.sidebar-link.active     { background: rgba(123,104,238,0.22); color: #c4baff; }
.sidebar-link .badge     { background: var(--brand-purple); font-size: 0.68rem; padding: 0.18em 0.5em; border-radius: 10px; }

.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-user { display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0; }

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-dark));
  color: #fff;
  font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-info  { min-width: 0; }
.user-name  { font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 0.68rem; color: rgba(255,255,255,0.36); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-logout {
  color: rgba(255,255,255,0.35);
  font-size: 1.1rem;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.sidebar-logout:hover { color: #ff6b6b; background: rgba(255,107,107,0.12); }

/* --- Sidebar: Spaces expandable section --- */

.sidebar-chevron {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

.sidebar-spaces-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}
.sidebar-spaces-list.open { max-height: 320px; }

.sidebar-space-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.75rem 0.42rem 2.35rem;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s;
  margin: 1px 0;
}
.sidebar-space-item:hover { background: rgba(255,255,255,0.06); }

.sidebar-space-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-space-name {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.48);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.12s;
}
.sidebar-space-item:hover .sidebar-space-name { color: rgba(255,255,255,0.82); }

.sidebar-space-menu {
  background: none;
  border: none;
  color: transparent;
  font-size: 0.85rem;
  padding: 2px 5px;
  border-radius: 5px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.12s, background 0.12s;
  flex-shrink: 0;
}
.sidebar-space-item:hover .sidebar-space-menu       { color: rgba(255,255,255,0.35); }
.sidebar-space-menu:hover                            { color: #fff !important; background: rgba(255,255,255,0.1); }

/* Main content */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 1.75rem 2rem;
  min-height: 100vh;
}

.page        { display: none; }
.page.active { display: block; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.page-title    { font-size: 1.4rem; font-weight: 700; color: #1e1e2e; margin: 0; }
.page-subtitle { font-size: 0.8125rem; color: #9ca3af; margin: 2px 0 0; }

/* =============================================
   DASHBOARD — FILTER BAR
   ============================================= */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

/* Search input */
.filter-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.filter-search-icon {
  position: absolute;
  left: 0.65rem;
  color: #9ca3af;
  font-size: 0.8rem;
  pointer-events: none;
}
.filter-search-input {
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.375rem 0.75rem 0.375rem 2rem;
  font-size: 0.8125rem;
  color: #374151;
  background: #fff;
  width: 200px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.filter-search-input::placeholder { color: #b0b7c3; }
.filter-search-input:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(123,104,238,0.15);
}

.filter-select {
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  color: #374151;
  background: #fff;
  cursor: pointer;
  appearance: auto;
  transition: border-color 0.15s;
}
.filter-select:focus {
  outline: none;
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(123,104,238,0.15);
}

/* =============================================
   DASHBOARD — TASK LIST (Grid.js)
   ============================================= */

.task-list-wrap {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* Strip all Grid.js default chrome */
.gridjs-wrapper          { border: none !important; box-shadow: none !important; border-radius: 0 !important; }
.gridjs-head,
.gridjs-footer           { display: none !important; }
.gridjs-container        { padding: 0 !important; }

/* Table */
.gridjs-table            { width: 100%; border-collapse: collapse; }

/* Header */
.gridjs-thead .gridjs-tr { border-bottom: 1px solid #f0f0f5; }
.gridjs-thead .gridjs-th {
  padding: 0.75rem 1rem !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: #9ca3af !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  background: #fafafa !important;
  border: none !important;
  white-space: nowrap;
  user-select: none;
}
.gridjs-th-content { display: flex; align-items: center; gap: 6px; }

/* Sort buttons */
button.gridjs-sort {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #d1d5db;
  font-size: 0.7rem;
  line-height: 1;
}
button.gridjs-sort-neutral::after { content: '⇅'; }
button.gridjs-sort-asc::after     { content: '↑'; color: var(--brand-purple); }
button.gridjs-sort-desc::after    { content: '↓'; color: var(--brand-purple); }

/* Body rows */
.gridjs-tbody .gridjs-tr {
  border-bottom: 1px solid #f5f5f7;
  cursor: pointer;
  transition: background 0.1s;
}
.gridjs-tbody .gridjs-tr:last-child  { border-bottom: none; }
.gridjs-tbody .gridjs-tr:hover       { background: #f9f8ff !important; }
.gridjs-tbody .gridjs-tr:hover .btn-row-action { color: #9ca3af; }

.gridjs-tbody .gridjs-td {
  padding: 0.875rem 1rem !important;
  vertical-align: middle !important;
  font-size: 0.875rem !important;
  color: #374151 !important;
  border: none !important;
}

/* No results */
.gridjs-notfound {
  text-align: center;
  padding: 3.5rem 1rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Responsive: hide Assignee on xs */
@media (max-width: 575.98px) {
  .gridjs-table th:nth-child(3),
  .gridjs-table td:nth-child(3) { display: none; }
}

/* Shared cell components */
.task-name { font-weight: 500; color: #1e1e2e; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.22em 0.65em;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-todo       { background: #f3f4f6; color: #6b7280; }
.status-inprogress { background: #dbeafe; color: #2563eb; }
.status-done       { background: #d1fae5; color: #059669; }

.assignee-cell   { display: flex; align-items: center; gap: 0.45rem; }
.assignee-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.assignee-name { font-size: 0.8375rem; color: #374151; }

.due-upcoming { color: #6b7280; }
.due-today    { color: #d97706; font-weight: 600; }
.due-overdue  { color: #dc2626; font-weight: 600; }

.btn-row-action {
  background: none;
  border: none;
  color: #e5e7eb;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.btn-row-action:hover { color: var(--brand-purple) !important; background: var(--brand-purple-light); }

/* =============================================
   DASHBOARD — SPACES CARDS
   ============================================= */

.space-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  transition: box-shadow 0.2s, transform 0.15s;
}
.space-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }

.space-card-header { display: flex; align-items: center; gap: 0.75rem; }
.space-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem;
  flex-shrink: 0;
}
.space-card-name { font-size: 1rem; font-weight: 700; color: #1e1e2e; margin: 0; }
.space-card-desc { font-size: 0.8125rem; color: #6b7280; margin: 0; flex: 1; }

.space-card-footer { display: flex; align-items: center; justify-content: space-between; }

.member-stack { display: flex; }
.member-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  font-size: 0.62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-left: -8px;
}
.member-avatar:first-child { margin-left: 0; }
.member-count { font-size: 0.78rem; color: #6b7280; margin-left: 6px; align-self: center; }

.btn-open-space {
  font-size: 0.8rem; font-weight: 600;
  border-radius: 8px;
  padding: 0.35rem 0.875rem;
  border: 1.5px solid #e5e7eb;
  color: #374151;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-open-space:hover { border-color: var(--brand-purple); color: var(--brand-purple); background: var(--brand-purple-light); }

/* =============================================
   SPACE CONTEXT MENU
   ============================================= */

.space-ctx-menu {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.08);
  padding: 0.3rem;
  min-width: 188px;
  display: none;
  animation: ctxFadeIn 0.1s ease;
}
.space-ctx-menu.active { display: block; }

@keyframes ctxFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.space-ctx-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 7px;
  font-size: 0.845rem;
  color: #374151;
  text-decoration: none;
  transition: background 0.1s;
}
.space-ctx-item:hover        { background: #f3f4f6; color: #1e1e2e; }
.space-ctx-item i            { width: 15px; text-align: center; font-size: 0.85rem; }
.space-ctx-divider           { height: 1px; background: #f0f0f5; margin: 0.25rem 0; }
.space-ctx-danger            { color: #dc2626; }
.space-ctx-danger:hover      { background: #fef2f2; color: #dc2626; }

/* Members modal row */
.member-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f5f5f7;
}
.member-row:last-child { border-bottom: none; }
.member-row-name { font-size: 0.875rem; color: #1e1e2e; font-weight: 500; }

/* =============================================
   BOTTOM NAV (mobile)
   ============================================= */

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.07);
  z-index: 200;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.64rem;
  font-weight: 500;
  padding: 0.4rem 0.875rem;
  border-radius: 8px;
  transition: color 0.15s;
}
.bottom-nav-item i      { font-size: 1.25rem; }
.bottom-nav-item.active { color: var(--brand-purple); }

.bottom-nav-icon-wrap { position: relative; display: inline-flex; }

.bottom-badge {
  position: absolute;
  top: -5px; right: -9px;
  background: var(--brand-purple);
  color: #fff;
  font-size: 0.58rem; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

.bottom-nav-fab {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(123,104,238,0.45);
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
  margin-bottom: 4px;
}
.bottom-nav-fab:hover { transform: scale(1.08); color: #fff; box-shadow: 0 6px 22px rgba(123,104,238,0.6); }

/* =============================================
   MODAL OVERRIDES
   ============================================= */

.modal-content  { border: none; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,0.18); }
.modal-header   { border-bottom: 1px solid #f0f0f5; padding: 1rem 1.25rem; }
.modal-title    { font-size: 1rem; font-weight: 700; color: #1e1e2e; }
.modal-footer   { border-top: 1px solid #f0f0f5; padding: 0.875rem 1.25rem; }

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 767.98px) {
  .main-content {
    margin-left: 0;
    padding: 1rem;
    padding-bottom: calc(var(--bottom-nav-height) + 1.25rem);
  }
  .page-title { font-size: 1.2rem; }
  .filter-search-input { width: 140px; }
}

/* =============================================
   TASK CARDS (mobile)
   ============================================= */

.task-card {
  background: #fff;
  border-radius: 12px;
  padding: 0.875rem 1rem;
  margin-bottom: 0.625rem;
  border: 1px solid #f0f0f5;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.15s;
}
.task-card:active { opacity: 0.8; }

.task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.task-card .task-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e1e2e;
  line-height: 1.4;
  flex: 1;
}
.task-card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.task-card-footer .due-label {
  margin-left: auto;
  font-size: 0.78rem;
}
.task-cards-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Bell badge on mobile: hide when zero */
#bellBadgeMob { display: none; }
#bellBadgeMob.visible { display: flex; }

/* =============================================
   TASK DETAIL PANEL
   ============================================= */

.task-detail-panel { width: 480px !important; border-left: 1px solid #e5e7eb; }

@media (max-width: 575.98px) { .task-detail-panel { width: 100vw !important; } }

.task-panel-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f5;
}

.task-panel-top { display: flex; align-items: center; gap: 0.5rem; }

.task-panel-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e1e2e;
  margin: 0;
  line-height: 1.4;
}

.task-panel-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
}

@media (max-width: 767.98px) {
  .task-panel-body { padding-bottom: calc(var(--bottom-nav-height) + 1rem); }
}

.task-panel-meta      { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.task-panel-meta-item { display: flex; flex-direction: column; }

.meta-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-panel-section { display: flex; flex-direction: column; gap: 0.4rem; }
.task-panel-tabs-section { border-top: 1px solid #f0f0f5; padding-top: 0.75rem; }

.task-panel-desc {
  font-size: 0.875rem;
  color: #4b5563;
  margin: 0;
  line-height: 1.6;
}

/* Panel tabs */
.task-panel-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0.875rem;
}

.detail-tab-btn {
  background: none;
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: 7px;
  font-size: 0.825rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.12s, color 0.12s;
}
.detail-tab-btn:hover  { background: #f3f4f6; color: #374151; }
.detail-tab-btn.active { background: var(--brand-purple-light); color: var(--brand-purple); font-weight: 600; }

.tab-badge {
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  background: #e5e7eb;
  color: #6b7280;
}
.detail-tab-btn.active .tab-badge { background: var(--brand-purple); color: #fff; }

.detail-tab-pane        { display: none; }
.detail-tab-pane.active { display: block; }

/* Activity */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  gap: 0.65rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f9f9fb;
}
.activity-item:last-child { border-bottom: none; }
.activity-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.activity-body { font-size: 0.825rem; color: #4b5563; flex: 1; line-height: 1.5; }
.activity-who  { font-weight: 600; color: #1e1e2e; }
.activity-when { color: #9ca3af; font-size: 0.75rem; margin-left: 5px; }

/* Comments */
.comments-list { margin-bottom: 0.75rem; }
.comment-item {
  display: flex;
  gap: 0.65rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f5f5f7;
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.comment-body   { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; flex-wrap: wrap; }
.comment-who    { font-size: 0.825rem; font-weight: 600; color: #1e1e2e; }
.comment-when   { font-size: 0.75rem; color: #9ca3af; }
.comment-text   { font-size: 0.845rem; color: #374151; margin: 0; line-height: 1.55; white-space: pre-wrap; }
.comment-add    { border-top: 1px solid #f0f0f5; padding-top: 0.875rem; }
.comment-add textarea { font-size: 0.875rem; resize: none; }

/* Files */
.files-list { margin-bottom: 0.75rem; }
.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f5f5f7;
}
.file-item:last-child { border-bottom: none; }
.file-type-icon { font-size: 1.5rem; flex-shrink: 0; }
.file-body      { flex: 1; min-width: 0; }
.file-name      { display: block; font-size: 0.845rem; font-weight: 500; color: #1e1e2e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta      { font-size: 0.75rem; color: #9ca3af; }

.btn-item-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: #d1d5db;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.12s, background 0.12s;
}
.btn-item-delete:hover { color: #dc2626; background: #fef2f2; }

.btn-upload-file {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 0.825rem;
  font-weight: 500;
  color: #6b7280;
  background: #fafafa;
  border: 1.5px dashed #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-upload-file:hover { border-color: var(--brand-purple); color: var(--brand-purple); background: var(--brand-purple-light); }

.empty-state-sm { text-align: center; padding: 1.5rem 1rem; color: #9ca3af; font-size: 0.845rem; }

/* =============================================
   NOTIFICATIONS
   ============================================= */

/* Bell button in sidebar footer */
.sidebar-bell {
  position: relative;
  background: none;
  border: none;
  color: #8b8fa8;
  font-size: 1.05rem;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.sidebar-bell:hover  { color: #fff; background: rgba(255,255,255,0.08); }
.sidebar-bell.active { color: #fff; background: rgba(255,255,255,0.12); }

.bell-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  background: #ef4444;
  color: #fff;
  border-radius: 99px;
  font-size: 0.6rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}
.bell-badge.visible { display: flex; }

/* Notification panel dropdown */
.notif-panel {
  position: fixed;
  z-index: 1060;
  width: 360px;
  max-height: 540px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.16s, transform 0.16s;
}
.notif-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.125rem 0.75rem;
  border-bottom: 1px solid #f0f0f5;
  flex-shrink: 0;
}
.notif-panel-title { font-size: 0.9375rem; font-weight: 700; color: #1e1e2e; }
.notif-mark-all {
  background: none; border: none;
  color: var(--brand-purple);
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer; padding: 2px 6px;
  border-radius: 5px;
  transition: background 0.12s;
}
.notif-mark-all:hover { background: var(--brand-purple-light); }

.notif-panel-body { overflow-y: auto; flex: 1; }

/* Individual notification items */
.notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1.125rem;
  border-bottom: 1px solid #f8f8fa;
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover  { background: #fafafa; }
.notif-item.unread { background: #f5f3ff; }
.notif-item.unread:hover { background: #ede9ff; }
.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--brand-purple);
  border-radius: 0 2px 2px 0;
}

.notif-icon-wrap {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
}
.notif-body  { flex: 1; min-width: 0; }
.notif-task  { font-size: 0.775rem; font-weight: 600; color: var(--brand-purple); margin-bottom: 0.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-text  { font-size: 0.8rem; color: #374151; line-height: 1.45; }
.notif-time  { font-size: 0.72rem; color: #9ca3af; margin-top: 0.2rem; }

.notif-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #9ca3af;
  font-size: 0.875rem;
}
.notif-empty i { font-size: 2rem; display: block; margin-bottom: 0.5rem; opacity: 0.5; }

/* Mobile: bottom-sheet style */
@media (max-width: 767.98px) {
  .notif-panel {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: var(--bottom-nav-height) !important;
    border-radius: 14px 14px 0 0;
    max-height: 65vh;
    transform: translateY(12px);
  }
  .notif-panel.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

/* =============================================
   USERS PAGE
   ============================================= */

.user-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.125rem;
  border: 1px solid #f0f0f5;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  transition: box-shadow 0.15s;
}
.user-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.1); }

.user-card-top { display: flex; align-items: center; gap: 0.75rem; }
.user-card-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9375rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-card-info { flex: 1; min-width: 0; }
.user-card-name  { font-size: 0.9rem; font-weight: 700; color: #1e1e2e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card-email { font-size: 0.75rem; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.role-badge { display: inline-block; font-size: 0.67rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.4px; flex-shrink: 0; }
.role-badge-admin  { background: var(--brand-purple-light); color: var(--brand-purple); }
.role-badge-member { background: #f0fdf4; color: #16a34a; }

.user-card-spaces-label { font-size: 0.7rem; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: 0.35rem; }
.user-spaces-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.user-space-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 500; color: #374151;
  padding: 2px 8px; border-radius: 99px; background: #f5f5f8;
}
.user-space-chip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.user-card-actions { display: flex; gap: 0.4rem; align-items: center; margin-top: auto; }
.btn-view-dash { flex: 1; font-size: 0.8rem; font-weight: 600; }

/* Manage Spaces modal */
.space-check-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0; border-bottom: 1px solid #f5f5f8;
}
.space-check-item:last-child { border-bottom: none; }

/* =============================================
   USER DETAIL PAGE
   ============================================= */

.back-link {
  font-size: 0.875rem; font-weight: 500; color: var(--brand-purple);
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.back-link:hover { text-decoration: underline; color: var(--brand-purple-dark); }

.user-detail-hero {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0 1.125rem;
  border-bottom: 1px solid #f0f0f5;
  margin-bottom: 1.125rem;
  flex-wrap: wrap;
}
.user-detail-avatar {
  width: 62px; height: 62px; border-radius: 50%;
  font-size: 1.375rem; font-weight: 800; color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-detail-name  { font-size: 1.2rem; font-weight: 700; color: #1e1e2e; line-height: 1.3; }
.user-detail-email { font-size: 0.845rem; color: #9ca3af; }

.user-stats-row {
  display: flex; gap: 0.75rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.user-stat {
  flex: 1; min-width: 70px;
  background: #fff; border-radius: 12px; border: 1px solid #f0f0f5;
  padding: 0.75rem 0.875rem; text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.user-stat-num   { font-size: 1.375rem; font-weight: 800; color: #1e1e2e; line-height: 1; }
.user-stat-label { font-size: 0.7rem; color: #9ca3af; font-weight: 500; margin-top: 3px; }

.ud-section {
  background: #fff; border-radius: 14px; border: 1px solid #f0f0f5;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04); overflow: hidden;
}
.ud-section + .ud-section { margin-top: 1rem; }
.ud-section-title {
  font-size: 0.8125rem; font-weight: 700; color: #374151;
  padding: 0.75rem 1.125rem; border-bottom: 1px solid #f5f5f8;
  display: flex; align-items: center; gap: 0.5rem;
}
.ud-section-count { margin-left: auto; font-weight: 500; color: #9ca3af; font-size: 0.75rem; }

.ud-task-row {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.625rem 1.125rem; border-bottom: 1px solid #f8f8fa;
  cursor: pointer; transition: background 0.12s;
}
.ud-task-row:last-child { border-bottom: none; }
.ud-task-row:hover { background: #fafafa; }
.ud-task-name { flex: 1; font-size: 0.845rem; font-weight: 500; color: #1e1e2e; }
.ud-task-due  { font-size: 0.75rem; flex-shrink: 0; }

.ud-activity-row {
  display: flex; gap: 0.75rem; padding: 0.75rem 1.125rem;
  border-bottom: 1px solid #f8f8fa;
}
.ud-activity-row:last-child { border-bottom: none; }
.ud-activity-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; flex-shrink: 0;
}
.ud-activity-text { font-size: 0.8rem; color: #374151; line-height: 1.45; flex: 1; min-width: 0; }
.ud-activity-task { font-weight: 600; color: #1e1e2e; }
.ud-activity-time { font-size: 0.72rem; color: #9ca3af; margin-top: 2px; }

.ud-spaces-wrap { padding: 0.75rem 1.125rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ud-space-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.3rem 0.75rem; border-radius: 99px;
  font-size: 0.8rem; font-weight: 600; color: #fff;
}
.ud-empty { padding: 1.5rem; text-align: center; color: #9ca3af; font-size: 0.845rem; }

/* =============================================
   NV TABLE  (plain-HTML tables for static pages)
   ============================================= */

.nv-table { width: 100%; border-collapse: collapse; }
.nv-table thead tr { border-bottom: 1px solid #f0f0f5; }
.nv-table th {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: #6b7280; font-weight: 600;
  padding: 0.75rem 1.25rem; background: transparent; white-space: nowrap;
}
.nv-table td {
  padding: 0.875rem 1.25rem; border-bottom: 1px solid #f5f5f7; vertical-align: middle;font-size: 0.8rem;
}
.nv-table tbody tr:last-child td { border-bottom: none; }
.nv-table tbody tr:hover td { background: #fafafa; cursor: pointer; }
.nv-table .col-action { width: 80px; text-align: center; }

/* =============================================
   SPACE DETAIL HEADER
   ============================================= */

.space-detail-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.space-detail-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; flex-shrink: 0;
}
.space-detail-name  { font-size: 1.25rem; font-weight: 700; color: #1e1e2e; }
.space-detail-desc  { font-size: 0.875rem; color: #9ca3af; margin-top: 2px; }

.space-stat-row { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.space-stat {
  background: #fff; border-radius: 12px; border: 1px solid #f0f0f5;
  padding: 0.75rem 1.125rem; text-align: center; flex: 1; min-width: 80px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.space-stat-num   { font-size: 1.375rem; font-weight: 800; color: #1e1e2e; line-height: 1; }
.space-stat-label { font-size: 0.7rem; color: #9ca3af; font-weight: 500; margin-top: 3px; }

/* Tabs used on space-dashboard */
.nv-tabs { border-bottom: 1px solid #f0f0f5; margin-bottom: 1.25rem; }
.nv-tabs .nav-link { font-size: 0.845rem; font-weight: 600; color: #6b7280; padding: 0.625rem 1rem; border: none; border-bottom: 2px solid transparent; }
.nv-tabs .nav-link.active { color: var(--brand-purple); border-bottom-color: var(--brand-purple); background: none; }
.nv-tabs .nav-link:hover:not(.active) { color: #374151; background: none; }

/* Member row on spaces-dashboard */
.member-list-row {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 0.75rem 0; border-bottom: 1px solid #f5f5f7;
}
.member-list-row:last-child { border-bottom: none; }
.member-list-info { flex: 1; min-width: 0; }
.member-list-name  { font-size: 0.875rem; font-weight: 600; color: #1e1e2e; }
.member-list-email { font-size: 0.75rem; color: #9ca3af; }

/* File row icon */
.file-table-icon { font-size: 1.25rem; }

/* Page section card (used across static pages) */
.section-card {
  background: #fff; border-radius: 14px; border: 1px solid #f0f0f5;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04); overflow: hidden; margin-bottom: 1.25rem;
}
.section-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 1.25rem; border-bottom: 1px solid #f5f5f8;
  font-size: 0.875rem; font-weight: 700; color: #1e1e2e;
}

/* =============================================
   SPACES PAGE — CARD ENHANCEMENTS
   ============================================= */

/* Card icon (larger, used in spaces.html) */
.space-card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff; flex-shrink: 0;
}
/* Meta block next to icon */
.space-card-meta { flex: 1; min-width: 0; }

/* Stats row inside card */
.space-card-stats {
  display: flex; gap: 0.5rem;
  background: #fafafa; border-radius: 10px; padding: 0.625rem 0.875rem;
}
.space-stat-item { flex: 1; text-align: center; }
.space-stat-val  { display: block; font-size: 1.1rem; font-weight: 800; color: #1e1e2e; line-height: 1.2; }
.space-stat-item .space-stat-label { display: block; font-size: 0.68rem; color: #9ca3af; font-weight: 500; margin-top: 1px; }

/* Member avatar stack (spaces page) */
.space-member-stack { display: flex; }
.space-member-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid #fff; color: #fff;
  font-size: 0.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-left: -7px; flex-shrink: 0;
}
.space-member-avatar:first-child { margin-left: 0; }
.space-member-more { background: #e5e7eb; color: #6b7280; font-size: 0.62rem; }

/* Outline brand button */
.btn-outline-brand {
  font-size: 0.8rem; font-weight: 600;
  border: 1.5px solid var(--brand-purple);
  color: var(--brand-purple);
  border-radius: 8px;
  padding: 0.3rem 0.875rem;
  text-decoration: none;
  background: transparent;
  transition: background 0.15s, color 0.15s;
}
.btn-outline-brand:hover { background: var(--brand-purple); color: #fff; }

/* "Add new space" card */
.space-card-add {
  border: 2px dashed #e5e7eb;
  background: #fafafa;
  cursor: pointer;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.space-card-add:hover { border-color: var(--brand-purple); background: #f5f3ff; transform: none; box-shadow: none; }
.space-card-add-inner { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.space-card-add-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: #ede9fe; color: var(--brand-purple);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.space-card-add-label { font-size: 0.875rem; font-weight: 600; color: #6b7280; }

/* =============================================
   USERS PAGE — CARDS
   ============================================= */

.user-card {
  background: #fff; border-radius: 14px; border: 1px solid #f0f0f5;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  padding: 1.375rem 1.25rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  height: 100%; transition: box-shadow 0.2s, transform 0.15s; cursor: pointer;
}
.user-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }
.user-card-avatar {
  width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800; color: #fff;
  margin-bottom: 0.25rem;
}
.user-card-name  { font-size: 0.9375rem; font-weight: 700; color: #1e1e2e; }
.user-card-role  { font-size: 0.78rem; color: #9ca3af; }
.user-card-email { font-size: 0.75rem; color: #9ca3af; word-break: break-all; }
.user-card-stats {
  display: flex; gap: 1rem; margin-top: 0.375rem;
  padding-top: 0.625rem; border-top: 1px solid #f0f0f5; width: 100%;
  justify-content: center;
}
.user-card-stat-item { text-align: center; }
.user-card-stat-val   { font-size: 1rem; font-weight: 800; color: #1e1e2e; display: block; }
.user-card-stat-label { font-size: 0.68rem; color: #9ca3af; font-weight: 500; }
.user-card-badge {
  font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem;
  border-radius: 20px; margin-top: 0.125rem;
}

/* =============================================
   USER DETAIL PAGE
   ============================================= */

.user-detail-hero {
  display: flex; align-items: center; gap: 1.25rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.user-detail-avatar {
  width: 70px; height: 70px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.user-detail-name  { font-size: 1.25rem; font-weight: 700; color: #1e1e2e; }
.user-detail-role  { font-size: 0.875rem; color: #9ca3af; margin-top: 2px; }
.user-detail-email { font-size: 0.82rem; color: #9ca3af; }
.user-detail-stats {
  display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.user-stat-box {
  flex: 1; min-width: 90px; background: #fff;
  border: 1px solid #f0f0f5; border-radius: 12px;
  padding: 0.75rem 1rem; text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.user-stat-val   { font-size: 1.375rem; font-weight: 800; color: #1e1e2e; line-height: 1; display: block; }
.user-stat-label { font-size: 0.7rem; color: #9ca3af; font-weight: 500; margin-top: 3px; display: block; }

/* Activity feed items */
.activity-item {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding: 0.75rem 0; border-bottom: 1px solid #f5f5f7;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  margin-top: 5px;
}
.activity-text  { font-size: 0.82rem; color: #374151; flex: 1; }
.activity-time  { font-size: 0.72rem; color: #9ca3af; white-space: nowrap; }

/* Space tag pills on user-dashboard */
.space-tag {
  display: inline-flex; align-items: center; gap: 0.375rem;
  background: #f3f0ff; color: var(--brand-purple);
  border-radius: 20px; font-size: 0.78rem; font-weight: 600;
  padding: 0.3rem 0.75rem; margin: 0.2rem;
}

/* =============================================
   SHARED UTILITIES — STATIC PAGES
   ============================================= */

/* Ghost button (secondary outline-less style) */
.btn-ghost {
  background: transparent;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  color: #374151;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.15s, border-color 0.15s;
}
.btn-ghost:hover { background: #f9fafb; border-color: #d1d5db; color: #1e1e2e; }

/* Form input variant (alias — base already styled via .form-control / .form-select) */
.nv-input { /* inherits from .form-control / .form-select — no extra rules needed */ }

/* Font-weight helpers (Bootstrap 5.3 uses fw-semibold/fw-bold but forms use these) */
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }

/* Due date — on-time */
.due-normal { font-size: 0.82rem; color: #6b7280; font-weight: 500; }

/* Mobile task card layout used in spaces-dashboard & user-dashboard */
.task-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.5rem; margin-bottom: 0.375rem;
}
.task-card-name {
  font-size: 0.875rem; font-weight: 600; color: #1e1e2e;
  line-height: 1.4; flex: 1;
}
.task-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; flex-wrap: wrap;
}
