.metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric .value {
  font-size: 1.8rem;
  font-weight: 600;
}

.metric .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.chart-card canvas {
  width: 100%;
  height: 260px;
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mt-xs {
  margin-top: 0.35rem;
}

.hidden {
  display: none !important;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
}

.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.input-affix {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: none;
}

.input-affix .icon {
  font-size: 1rem;
  color: var(--text-muted);
}

.input-affix .input {
  flex: 1 1 auto;
  border: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.input-affix .input:focus {
  outline: none;
  box-shadow: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--text);
}

.chip-type {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
  color: #1d4ed8;
}

.chip-status {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: #4338ca;
}

.chip-priority-low {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.2);
  color: #15803d;
}

.chip-priority-medium {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.25);
  color: #b45309;
}

.chip-priority-high,
.chip-priority-critical {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.25);
  color: #b91c1c;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.badge-pulse {
  animation: pulseGlow 1.8s ease-in-out infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.24);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.floating-card {
  position: relative;
  overflow: hidden;
}

.floating-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(59, 130, 246, 0.04), rgba(59, 130, 246, 0));
  opacity: 0;
  transform: translate3d(-20%, 0, 0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-card:hover::after {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.tabs .icon {
  font-size: 0.95rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.input-with-button .input {
  flex: 1 1 auto;
}

.input-with-button .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.75rem;
}

.calendar-toolbar {
  margin: 1rem 0;
  display: flex;
  justify-content: flex-end;
}

.calendar-toolbar .btn-group {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}

.calendar-toolbar .btn-group .btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.calendar-board {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  background: var(--surface);
  min-height: 480px;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 0.75rem;
}

.calendar-day {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calendar-day > header,
.calendar-cell > header {
  font-weight: 600;
  font-size: 0.95rem;
}

.calendar-empty {
  margin: 0;
  font-size: 0.85rem;
}

.calendar-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 0.5rem;
}

.calendar-cell {
  position: relative;
  min-height: 110px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.calendar-cell--muted {
  background: var(--surface);
  color: var(--muted);
}

.calendar-event {
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  background: rgba(37, 99, 235, 0.12);
  border-left: 3px solid #2563eb;
  font-size: 0.85rem;
  line-height: 1.3;
}

.calendar-event.priority-high {
  border-left-color: #f97316;
  background: rgba(249, 115, 22, 0.15);
}

.calendar-event.priority-critical {
  border-left-color: #dc2626;
  background: rgba(220, 38, 38, 0.15);
}

.calendar-event-title {
  font-weight: 600;
}

.calendar-event-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.calendar-more {
  font-size: 0.75rem;
  margin-top: auto;
  color: var(--muted);
}

.table-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.modal-dialog {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  max-width: min(640px, 92vw);
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 5;
}

.modal-header,
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.modal-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal .btn.icon {
  font-size: 1.4rem;
  line-height: 1;
  background: transparent;
  border: none;
  padding: 0;
}

.schedule-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.schedule-task-title {
  font-weight: 600;
  display: inline-block;
  color: var(--primary);
}

.schedule-task-title:hover,
.schedule-task-title:focus {
  text-decoration: underline;
}

.schedule-task-list .muted.small {
  display: block;
}

.schedule-badge {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Progress bar */
.progress-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.progress-bar {
  width: 220px;
  height: 10px;
  background: var(--bg-muted);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
}
.progress-meta {
  min-width: 70px;
}
.calendar-cell {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
}

.calendar-cell.empty {
  opacity: 0.6;
}

.calendar-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.calendar-value {
  font-size: 1.4rem;
  font-weight: 600;
}

.auth-wrapper {
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.auth-layout {
  display: grid;
  width: min(960px, 100%);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.auth-panel {
  padding: 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.auth-brand h1 {
  margin: 0.75rem 0 0.5rem;
  font-size: clamp(2rem, 3vw, 2.4rem);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.auth-form .form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.auth-form .large-input {
  padding: 0.85rem 1rem;
  font-size: 1rem;
}

.remember-row {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
}

.auth-footer {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.9rem;
}

.auth-showcase {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(79, 70, 229, 0.85));
  color: #f9fafb;
  padding: 2.75rem;
  display: flex;
  align-items: center;
}

.auth-showcase-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-showcase h2 {
  font-size: clamp(1.8rem, 2.6vw, 2.2rem);
  margin: 0;
}

.auth-showcase ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.auth-showcase li::before {
  content: "•";
  color: rgba(255, 255, 255, 0.8);
  margin-right: 0.5rem;
}

/* Users page */
.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.metric-row .metric-card {
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

/* Compact Filter Toolbar */
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0;
}

.filter-toolbar .filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
}

.filter-toolbar .btn {
  align-self: flex-end;
  height: 34px;
  padding: 0 12px;
  font-size: 0.85rem;
  border-radius: 4px;
}

/* Compact form elements in filter toolbar */
.filter-toolbar .input,
.filter-toolbar select.input {
  height: 34px;
  padding: 0 10px;
  font-size: 0.85rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--input-bg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .filter-toolbar {
    gap: 0.5rem;
  }
  
  .filter-toolbar .filter-group {
    flex: 1 1 45%;
    min-width: 0;
  }
  
  .filter-toolbar .btn {
    flex: 1 1 auto;
  }
}

.directory-card .table-actions {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.directory-card .table-wrapper {
  max-height: 60vh;
  overflow: auto;
}

.invite-card textarea.input {
  resize: vertical;
}

@media (max-width: 768px) {
  .filter-toolbar {
    align-items: stretch;
  }

  .directory-card .table-wrapper {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-panel,
  .auth-showcase {
    padding: 2rem;
  }

  .auth-showcase {
    order: -1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
}

.text-danger {
  color: var(--danger);
}

.text-warning {
  color: var(--warning);
}
/* Inventrax PM • Clean White Theme */

:root {
  /* Base Colors */
  --white: #ffffff;
  --black: #111827;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Theme Colors */
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --success: #047857;
  --warning: #b45309;
  --danger: #b91c1c;
  --info: #0369a1;
  
  /* UI Elements */
  --bg: var(--white);
  --panel: var(--white);
  --panel-solid: var(--white);
  --card: var(--white);
  --text: var(--gray-900);
  --text-muted: var(--gray-600);
  --muted: var(--gray-400);
  --border: var(--gray-200);
  --border-strong: var(--gray-300);
  --hover-bg: var(--gray-50);
  --active-bg: var(--gray-100);

  --font-sans: "Inter", "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", Menlo, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;

  --spacing-xs: 0.35rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1.25rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  
  /* Components */
  --shadow-soft: var(--shadow-sm);
  --shadow-strong: var(--shadow);
  --focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.25);

  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

body {
  font-family: var(--font-sans);
  min-height: 100vh;
  margin: 0;
  line-height: 1.6;
  color: #1f2937;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before,
body::after {
  content: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover:not(.disabled),
.btn:focus-visible:not(.disabled) {
  background: var(--active-bg);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn.primary:hover:not(.disabled),
.btn.primary:focus-visible:not(.disabled) {
  background: var(--primary-light);
  border-color: var(--primary-light);
}

.btn.secondary {
  background: var(--gray-100);
  border-color: var(--border);
  color: var(--text);
}

.btn.secondary:hover:not(.disabled),
.btn.secondary:focus-visible:not(.disabled) {
  background: var(--gray-200);
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.btn.danger:hover:not(.disabled),
.btn.danger:focus-visible:not(.disabled) {
  background: #dc2626;
  border-color: #dc2626;
}

.btn.btn-sm {
  padding: 0.35rem 0.9rem;
  font-size: var(--text-xs);
}

.btn.disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.btn i {
  font-size: 0.85em;
}

/* Neutral pill (legacy support) */
.neutral-btn {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  background: var(--gray-100);
  color: var(--text);
}

.neutral-btn:hover {
  background: var(--gray-200);
}

.btn-link {
  border: none;
  background: transparent;
  color: var(--primary);
  padding: 0;
}

.btn-link:hover {
  color: var(--primary-light);
  box-shadow: none;
  transform: none;
}

.inline-form {
  display: inline;
}

.cursor-pointer {
  cursor: pointer;
}

.muted {
  color: var(--muted);
}

.text-center {
  text-align: center;
}

.mt-sm {
  margin-top: var(--spacing-sm);
}

.mt-md {
  margin-top: var(--spacing-md);
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

.mt-xl {
  margin-top: var(--spacing-xl);
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-xs {
  margin-bottom: 0.5rem;
}

.ml-xs {
  margin-left: 0.5rem;
}

.font-xs {
  font-size: var(--text-xs);
}

.font-sm {
  font-size: var(--text-sm);
}

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.spacer {
  flex: 1 1 auto;
}

.max-w-240 {
  max-width: 15rem;
}

.max-w-200 {
  max-width: 12.5rem;
}

.w-80 { width: 80px; }
.w-120 { width: 120px; }
.w-160 { width: 160px; }
.w-200 { width: 200px; }

.text-right {
  text-align: right;
}

.text-end {
  text-align: right;
}

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.text-info {
  color: var(--info);
}

.w-100 {
  width: 100%;
}

.table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
}

/* Modern Compact Filter Panel */
.filter-panel {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 1rem;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.filter-panel form {
  flex: 1;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.filter-panel .filter-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  width: 100%;
  justify-content: flex-start;
}

/* Modern Compact Inputs in Filters */
.filter-panel .input,
.filter-panel select.input {
  height: 32px;
  padding: 0 10px;
  font-size: 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  transition: all 0.2s;
  min-width: 120px;
  max-width: 100%;
  flex: 1 1 auto;
}

.filter-panel .input:focus,
.filter-panel select.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
  outline: none;
}

/* Make search inputs slightly wider */
.filter-panel input[type="text"],
.filter-panel input[type="search"] {
  min-width: 160px;
  flex-grow: 2;
}

/* Make selects take less space */
.filter-panel select {
  max-width: 160px;
  text-overflow: ellipsis;
}

/* Modern Compact Buttons in Filters */
.filter-panel .btn {
  height: 32px;
  padding: 0 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Make secondary buttons more subtle */
.filter-panel .btn.secondary {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text);
}

.filter-panel .btn.secondary:hover {
  background: var(--bg-hover);
}

/* Responsive adjustments for modern filters */
@media (max-width: 1200px) {
  .filter-panel {
    padding: 0.5rem;
  }
  
  .filter-panel .input,
  .filter-panel select.input,
  .filter-panel .btn {
    height: 32px;
    font-size: 0.8rem;
    min-width: 100px;
  }
  
  .filter-row > * {
    flex: 1 1 120px;
    min-width: 0;
  }
  
  .filter-row .btn {
    flex: 0 0 auto;
  }
}

@media (max-width: 768px) {
  .filter-panel {
    gap: 0.5rem;
    padding: 0.5rem;
  }
  
  .filter-panel .input,
  .filter-panel select.input {
    min-width: 100px;
    flex: 1 1 100%;
  }
  
  .filter-row {
    gap: 0.5rem;
  }
  
  .filter-row > * {
    flex: 1 1 calc(50% - 0.5rem) !important;
    max-width: 100%;
  }
  
  .filter-row .btn {
    flex: 1 1 100% !important;
    margin-top: 0.25rem;
  }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--spacing-md);
  flex-wrap: wrap;
}

.pagination .btn {
  min-width: 40px;
}

.table-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.table-heading {
  font-weight: 600;
  font-size: var(--text-base);
}

.kanban-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 1rem;
  align-items: start;
}

.card-border-accent {
  border-left: 4px solid var(--primary-light);
}

.cursor-grab {
  cursor: grab;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--gray-200);
  color: var(--gray-700);
}

.badge.neutral {
  background: var(--gray-100);
  color: var(--gray-600);
}

.badge.info {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.badge.success {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.badge.warning {
  background: rgba(250, 204, 21, 0.15);
  color: #b45309;
}

.badge.danger {
  background: rgba(248, 113, 113, 0.15);
  color: #b91c1c;
}

/* Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.status-badge i {
  font-size: 0.7rem;
}

.status-badge.status-todo,
.status-badge.status-open {
  background: #eef2ff;
  color: #3730a3;
  border-color: rgba(79, 70, 229, 0.15);
}

.status-badge.status-in_progress,
.status-badge.status-in-progress {
  background: #fef3c7;
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.2);
}

.status-badge.status-ready_for_approval,
.status-badge.status-pending_approval {
  background: #ede9fe;
  color: #6d28d9;
  border-color: rgba(124, 58, 237, 0.2);
}

.status-badge.neutral {
  background: var(--gray-100);
  color: var(--gray-600);
  border-color: rgba(148, 163, 184, 0.35);
}

.status-badge.status-done,
.status-badge.status-completed {
  background: #dcfce7;
  color: #166534;
  border-color: rgba(22, 101, 52, 0.2);
}

.status-badge.status-blocked,
.status-badge.status-rejected,
.status-badge.status-cancelled {
  background: #fee2e2;
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.2);
}

.priority-high {
  background: #fee2e2;
  color: #b91c1c;
}

.priority-medium {
  background: #fef3c7;
  color: #92400e;
}

.priority-low {
  background: #dcfce7;
  color: #166534;
}

.progress-pill.low {
  background: rgba(248, 113, 113, 0.18);
  color: #b91c1c;
}

.progress-pill.medium {
  background: rgba(251, 191, 36, 0.2);
  color: #b45309;
}

.progress-pill.high {
  background: rgba(74, 222, 128, 0.2);
  color: #166534;
}

.completed-task .task-title {
  text-decoration: line-through;
  color: var(--muted);
}

/* Cards & utility surfaces */
.table-card,
.panel-elevated {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-spaced {
  margin-bottom: var(--spacing-sm);
}

.card-margined {
  margin-bottom: 0.75rem;
}

.card-surface {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.surface-elevated {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  background: var(--card);
}

.table-surface {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.progress-shell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.progress-shell.compact {
  gap: 0.5rem;
}

.row-alert {
  background: rgba(255, 181, 102, 0.12);
}

.row-alert:hover {
  background: rgba(255, 181, 102, 0.2);
}

.progress-track {
  position: relative;
  flex: 1;
  height: 10px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.05));
  border-radius: 999px;
  overflow: hidden;
}

.progress-indicator {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--primary-light);
  transition: width 0.3s ease;
  width: var(--progress, 0%);
}

.fade-in {
  animation: fadeIn 0.45s ease forwards;
}

.slide-up {
  animation: slideUp 0.6s ease forwards;
}

.row-animated {
  opacity: 0;
  animation: fadeInRow 0.5s ease forwards;
  animation-delay: var(--delay, 0s);
}

.delay-0 { --delay: 0s; }
.delay-1 { --delay: 0.05s; }
.delay-2 { --delay: 0.1s; }
.delay-3 { --delay: 0.15s; }
.delay-4 { --delay: 0.2s; }
.delay-5 { --delay: 0.25s; }
.delay-6 { --delay: 0.3s; }
.delay-7 { --delay: 0.35s; }
.delay-8 { --delay: 0.4s; }
.delay-9 { --delay: 0.45s; }
.delay-10 { --delay: 0.5s; }

.table-actions {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.hover-raise {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-raise:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.hover-underline {
  position: relative;
  display: inline-flex;
}

.hover-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.hover-underline:hover::after {
  transform: scaleX(1);
}

.progress-pill {
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid transparent;
}

.grid-balanced {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
}

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

.grid-two-column {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.card-stack {
  display: grid;
  gap: var(--spacing-sm);
}

.card-stack .card {
  margin: 0;
}

.flex-gap-sm {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.flex-fill {
  flex: 1;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Compact form layout: opt-in to limit field widths */
.compact-form .form-group {
  max-width: 520px;
}

.compact-form .input,
.compact-form select.input,
.compact-form textarea.input {
  max-width: 520px;
  width: 100%;
}

.compact-form .input[type="range"] {
  max-width: 240px;
}

.compact-form .form-inline .input {
  max-width: 320px;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRow {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

a {
  color: #1d4ed8;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #3b82f6;
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1180px, 92vw);
  margin: 0 auto;
  padding-inline: clamp(0.75rem, 2vw, 1.25rem);
}

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  padding-top: calc(var(--spacing-lg) + 24px);
}

.sidebar {
  position: sticky;
  top: 40px;
  height: calc(100vh - 64px);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  box-shadow: var(--shadow-soft);
}

.sidebar::before {
  content: none;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-brand {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--text-muted);
}

.sidebar-section {
  padding: 0.75rem 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  position: relative;
}

.sidebar-section::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgba(148, 163, 184, 0.25);
}

.sidebar-section:last-of-type::after {
  display: none;
}

.sidebar-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.content {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--panel);
  padding: var(--spacing-lg);
  min-height: 600px;
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-width: thin;
}

.content::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.content::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.6);
  border-radius: 999px;
}

.content::before {
  content: none;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  padding: 0.25rem 0;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.3s ease;
  font-size: 1rem;
}

.brand::before {
  content: none;
  display: none;
}

.brand:hover {
  transform: translateY(-2px);
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: #ffffff;
}

.nav-link {
  position: relative;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(17, 24, 39, 0.06);
}

.nav-link.active {
  color: #ffffff;
  background: #111827;
}

.nav-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.nav-user {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.nav-logout {
  display: inline-flex;
  align-items: center;
}

.notification-badge {
  background: #111827;
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 0 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.6;
  min-width: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  animation: none;
}


.sidelink {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

.sidelink::after {
  content: none;
}

.sidelink > * {
  position: relative;
  z-index: 1;
}

.sidelink:hover {
  color: var(--text);
  background: rgba(17, 24, 39, 0.06);
  transform: none;
}

.sidelink.active {
  color: #ffffff;
  font-weight: 600;
  border: 1px solid var(--border-strong);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0.01em;
  border: 1px solid var(--border);
  color: var(--gray-700);
  background: var(--white);
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Primary Button */
.btn.primary {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
}

.btn.primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn.primary:active {
  background: var(--primary);
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

/* Danger Button */
.btn.danger {
  color: white;
  background: var(--danger);
  border-color: var(--danger);
}

.btn.danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Sizes */
.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: var(--text-xs);
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: var(--text-base);
}

.btn.primary:hover {
  box-shadow: none;
}

.btn.danger {
  color: #b91c1c;
  border: 1px solid #ef4444;
  background: #ffffff;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: var(--text-xs);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.tag-soft {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
}

.flash {
  display: grid;
  gap: 0.9rem;
  margin: var(--spacing-md) 0;
}

.flash-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
}

.flash-item::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 9px;
  background: rgba(148, 163, 184, 0.45);
  border-radius: 0 999px 999px 0;
  /* No glow effect */
}

.flash-item strong {
  font-weight: 600;
  letter-spacing: 0.05em;
}

.flash-item.success::before { background: #10b981; }

.flash-item.info::before { background: #3b82f6; }

.flash-item.warning::before { background: #f59e0b; }

.flash-item.danger::before { background: #ef4444; }

.card {
  position: relative;
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow);
  border-color: var(--gray-300);
}

.card-header {
  padding: 1.25rem 1.5rem;
  margin: -1.25rem -1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--gray-50);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

.card-body {
  padding: 0.25rem 0;
}

.card-footer {
  padding: 1.25rem 0 0;
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.card::before {
  content: none;
}

.card::after {
  content: none;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--border-strong);
  box-shadow: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-grid {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
}

.card.link {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.metric-figure {
  font-size: clamp(1.9rem, 2.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.metric-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #333;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.dashboard-layout {
  display: grid;
  gap: var(--spacing-lg);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.dashboard-layout .card {
  height: 100%;
}

.directory-card {
  display: flex;
  flex-direction: column;
}

.invite-card {
  width: 100%;
  max-width: 420px;
  justify-self: center;
}

.deadline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.deadline-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.deadline-date {
  font-weight: 600;
  color: #333;
  min-width: 4.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deadline-title {
  color: #333;
  font-weight: 500;
  transition: color 0.25s ease;
}

.deadline-title:hover {
  color: #333;
}

.form-group {
  display: grid;
  gap: 0.45rem;
  margin-bottom: var(--spacing-md);
}

label,
.label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #333;
}

.input,
.form-control,
select,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #f0f0f0;
  color: #333;
  font-size: var(--text-sm);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
  /* No inner shadow */
}

.input:hover,
.form-control:hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}

.input:focus,
.form-control:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(236, 72, 153, 0.85);
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.1);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.flash-item svg {
  flex-shrink: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text);
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  /* No glow effect */
}

.status-open,
.status-todo { background: #ffffff; color: #111827; }

.status-in_progress,
.status-in-progress { background: #ffffff; color: #111827; }

.status-ready_for_approval,
.status-pending_approval { background: #ffffff; color: #111827; }

.status-done,
.status-completed { background: #ffffff; color: #111827; }

.status-blocked,
.status-cancelled,
.status-rejected { background: #ffffff; color: #111827; }

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
  position: relative;
}

.table thead {
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
  box-shadow: 0 1px 0 0 var(--border);
}

.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  color: var(--gray-700);
}

.table tbody tr {
  transition: background-color 0.15s ease;
}

.table tbody tr:hover {
  background-color: var(--gray-50);
}

/* Compact table */
.table-compact th,
.table-compact td {
  padding: 0.5rem 0.75rem;
}

/* Bordered table */
.table-bordered {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--border);
}

/* Striped rows */
.table-striped tbody tr:nth-child(odd) {
  background-color: var(--gray-50);
}

/* Hoverable rows */
.table-hover tbody tr:hover {
  background-color: var(--gray-100);
}

.table thead th {
  text-align: left;
  padding: 0 1.25rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.table tbody tr {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.table tbody td {
  padding: 1rem 1.25rem;
  background: #ffffff;
  color: #1f2937;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.table tbody td:first-child {
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.table tbody td:last-child {
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.table tbody tr:hover {
  transform: none;
  box-shadow: none;
  background: rgba(17, 24, 39, 0.03);
}

.project-grid {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.project-card {
  position: relative;
  padding: 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
  color: #1f2937;
  transition: border-color 0.2s ease;
  overflow: hidden;
}

.project-card::before {
  content: none;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.project-card:hover::before {
  opacity: 0.24;
  transform: rotate(0) scale(1.05);
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.project-name {
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.3rem;
}

.project-key {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.head {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}

.head .action-stack {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
}

.head .action-stack .inline-form {
  display: inline-flex;
}

.label {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.value {
  font-size: 1.05rem;
  color: var(--text);
}

.kpi .value {
  font-size: 1.65rem;
  font-weight: 700;
}

.progress {
  width: 100%;
  height: 10px;
  background: #f1f5f9;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  overflow: hidden;
}

.progress .bar {
  height: 100%;
  background: #111827;
  width: var(--progress, 0%);
  box-shadow: none;
}

.tight {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tight li {
  margin: 0.4rem 0;
}

.neutral-flex {
  display: flex;
  gap: var(--spacing-sm);
  margin: 1rem 0;
  flex-wrap: wrap;
}

.card-summary {
  flex: 1;
  min-width: 180px;
  padding: 1.1rem;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: none;
}

.neutral-table {
  margin: 0;
}

.neutral-row {
  background: #ffffff;
}

.neutral-row-flex {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.neutral-btn {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
}

.neutral-empty {
  padding: 2.5rem;
  text-align: center;
  color: var(--text-muted);
}

.neutral-empty i {
  font-size: 3rem;
  opacity: 0.5;
  margin-bottom: 0.75rem;
}

.neutral-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  min-height: 60vh;
}

.neutral-column {
  min-width: 280px;
  max-width: 320px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.neutral-column-header {
  padding: 0.85rem 1.1rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1f2937;
}

.neutral-badge {
  background: rgba(129, 140, 248, 0.25);
  color: #e0e7ff;
  font-size: var(--text-xs);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.neutral-column-items {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.neutral-task-card {
  border-left: 3px solid rgba(17, 24, 39, 0.2);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: none;
  cursor: grab;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.neutral-task-card:hover {
  transform: none;
  box-shadow: none;
  background: #f8fafc;
  border-color: var(--border-strong);
}

.neutral-task-card-body {
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.neutral-task-title {
  font-weight: 600;
  color: #f8fafc;
}

.neutral-task-complete {
  text-decoration: line-through;
  opacity: 0.7;
}

.neutral-task-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.neutral-inline-badge {
  margin-left: 0.35rem;
  background: rgba(236, 72, 153, 0.12);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.45rem;
  color: #fbcfe8;
  font-size: 0.72rem;
}

.tabs {
  display: flex;
  gap: 0.45rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 1.1rem;
}

.tab {
  padding: 0.6rem 0.95rem;
  border: 1px solid transparent;
  border-top-left-radius: 0.85rem;
  border-top-right-radius: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.tab:hover {
  background: rgba(148, 163, 184, 0.15);
}

.tab.active {
  background: #ffffff;
  border-color: var(--border);
  border-bottom-color: transparent;
  color: #111827;
}

.tabpanes {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0 1rem 1rem 1rem;
  padding: 1.25rem;
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 1fr;
    padding-top: 5.5rem;
  }

  .sidebar {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    height: auto;
    max-height: calc(100vh - 140px);
    transform: translateY(-150%);
    transition: transform 0.4s ease;
    z-index: 110;
  }

  .sidebar.active {
    transform: translateY(0);
  }

  .content {
    padding: 1.25rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
  }
  
  .card {
    border-radius: 0.5rem;
  }
}

/* Kanban Board Styles */
.kanban-container {
  width: 100%;
  overflow-x: auto;
  padding: 1rem 0;
}

.kanban-board {
  display: flex;
  gap: 1rem;
  min-width: max-content;
  padding: 0 1rem;
}

.kanban-column {
  min-width: 280px;
  width: 280px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 0.75rem;
  height: 100%;
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.5rem;
  border-bottom: 1px solid #e9ecef;
}

.kanban-column-header h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #343a40;
}

.kanban-count {
  background: #e9ecef;
  border-radius: 10px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #495057;
}

.kanban-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 100px;
  padding-bottom: 1rem;
}

.kanban-card {
  background: white;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 0.75rem;
  transition: all 0.2s ease;
  border-left: 3px solid #4dabf7;
  cursor: pointer;
}

.kanban-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.kanban-card.completed {
  opacity: 0.7;
  border-left-color: #40c057;
}

.kanban-card.completed .kanban-card-title {
  text-decoration: line-through;
  color: #868e96;
}

.kanban-card-title {
  font-weight: 500;
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.kanban-card-project {
  font-size: 0.8rem;
  color: #495057;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.kanban-card-project i {
  color: #adb5bd;
  font-size: 0.7rem;
}

.kanban-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #6c757d;
}

.kanban-priority {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.priority-high { background: #fff5f5; color: #e03131; }
.priority-medium { background: #fff9db; color: #e67700; }
.priority-low { background: #ebfbee; color: #2b8a3e; }

.kanban-due-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.kanban-due-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}

.kanban-due-badge.overdue { background: #fff5f5; color: #e03131; }
.kanban-due-badge.today { background: #fff3bf; color: #e67700; }
.kanban-due-badge.soon { background: #e3fafc; color: #0b7285; }

.kanban-empty {
  text-align: center;
  padding: 1.5rem 0.5rem;
  color: #adb5bd;
  font-size: 0.85rem;
  border: 1px dashed #dee2e6;
  border-radius: 6px;
}

.kanban-empty i {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

/* Dragging styles */
.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

.drag-over {
  background: #f1f3f5;
  border: 2px dashed #adb5bd;
}

/* Dashboard Styles */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: capitalize;
}

.status-open,
.status-in_progress,
.status-pending_approval,
.status-done {
  background-color: #f0f0f0;
  color: #222222;
}

.deadline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.deadline-item {
  display: flex;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.deadline-item:last-child {
  border-bottom: none;
}

.deadline-date {
  font-weight: 600;
  min-width: 4rem;
  color: var(--muted);
}

.deadline-details {
  flex: 1;
}

.deadline-title {
  display: block;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.25rem;
}

.deadline-title:hover {
  text-decoration: underline;
}

.deadline-project {
  font-size: 0.85rem;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.project-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  color: var(--text);
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.project-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.project-key {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

/* Form Validation Styles */
.form-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.form-group input:invalid,
.form-group select:invalid {
  border-color: var(--danger);
}

/* Responsive Design Improvements */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .card.link {
    gap: 0.5rem;
  }

  .invite-card {
    max-width: none;
  }

  .kanban-board {
    padding: 0 0.5rem;
  }

  .kanban-column {
    min-width: 280px;
    width: 280px;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .pagination .btn {
    margin: 0.25rem;
  }

  .head {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .head form {
    flex-direction: column;
    align-items: stretch;
  }

  .head input {
    max-width: none !important;
  }

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

  .deadline-date {
    margin-bottom: 0.5rem;
  }

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

  .status-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
  }
}

@media (max-width: 480px) {
  .kanban-column {
    min-width: 250px;
    width: 250px;
  }

  .kanban-card {
    padding: 0.5rem;
  }

  .kanban-card-title {
    font-size: 0.9rem;
  }

  .sidebar {
    display: none;
  }

  .content {
    margin-left: 0;
    padding: 1rem;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .invite-card {
    max-width: none;
  }
}

@media print {
  .table {
    border: 1px solid #ddd;
  }

  .table th {
    background: #f5f5f5 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
