/* public/css/style.css */
* {
  font-family: "Inter", sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.6;
}

/* Modern Navbar */
.navbar-modern {
  box-shadow: var(--shadow-lg);
  padding: 1rem 0;
  border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand img {
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.navbar-nav .nav-link {
  font-weight: 500;
  padding: 0.75rem 1rem !important;
  border-radius: 8px;
  margin: 0 0.25rem;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-nav .nav-link:hover {
  transform: translateY(-1px);
}

/* Dropdown Improvements */
.dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: var(--border-radius);
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.dropdown-item {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  transform: translateX(4px);
}

.dropdown-item i {
  width: 20px;
  margin-right: 0.5rem;
}

/* Container Improvements */
.main-container {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* Card Improvements */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card:hover {
}

.card-header {
  font-weight: 600;
  padding: 1.25rem;
}

.card-body {
  padding: 1.5rem;
}

/* Table Standardization */
.app-table-shell {
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color, rgba(15, 23, 42, 0.08));
  border-radius: var(--border-radius);
  background: var(--card-bg, #ffffff);
  box-shadow: var(--shadow-sm);
}

.app-table-shell .table {
  margin-bottom: 0;
  background: transparent;
}

.app-table {
  color: inherit;
}

.app-table > :not(caption) > * > * {
  padding: 1rem 1.25rem;
}

.app-table > thead > tr > th {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.app-table > tbody > tr {
  transition: background-color 0.2s ease;
}

.app-table > tbody > tr:hover {
  background-color: var(--light-bg, rgba(15, 23, 42, 0.04));
}

.app-table-shell .app-table > tbody > tr:hover {
  cursor: default;
}

.app-table > tbody > tr:last-child > * {
  border-bottom: 0;
}

.app-table pre {
  margin-bottom: 0;
  white-space: pre-wrap;
}

/* Dashboard Widgets */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.dashboard-widget.dragging {
  opacity: 0.6;
}

.dashboard-widget.is-hidden {
  display: none;
}

.dashboard-grid .widget-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-grid.editing .widget-actions {
  display: flex;
}

.widget-handle {
  cursor: grab;
  font-size: 1.1rem;
  color: #6c757d;
  padding: 0 0.25rem;
}

/* Button Improvements */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border: none;
}

.btn-info,
.btn-warning {
  color: white !important;
}

.btn-primary {
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  filter: brightness(0.9);
}

/* Form Improvements */
.form-control {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-label {
  margin-bottom: 0.5rem;
}

/* Badge Improvements */
.badge {
  border-radius: 6px;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
}

/* List Group Improvements */
.list-group-item {
  border: none;
  border-radius: 8px !important;
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.list-group-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

/* Alert Improvements */
.alert {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

/* Responsive Improvements */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.25rem;
  }

  .main-container {
    padding: 1rem 0;
  }

  .card-body {
    padding: 1rem;
  }

  .app-table > :not(caption) > * > * {
    padding: 0.875rem 1rem;
  }
}

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Hover Effects for Icons */
.nav-link i,
.dropdown-item i {
  transition: all 0.2s ease;
}

.nav-link:hover i,
.dropdown-item:hover i {
  transform: scale(1.1);
}

body {
  /* padding-top: 56px; /* Adjust for fixed navbar if any */
}

.footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 60px; /* Set the fixed height of the footer here */
  line-height: 60px; /* Vertically center the text there */
  background-color: #f5f5f5;
}

.alert-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1050;
}

/* ToDo */
.todo-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.todo-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  align-items: start;
}

.todo-column {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  padding: 0.75rem;
  min-height: 240px;
  min-width: 280px;
  max-width: 320px;
  flex: 0 0 300px;
}

.todo-column-header {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.todo-column-cards {
  min-height: 140px;
  border-radius: 8px;
  padding: 0.125rem;
}

.todo-column-cards.is-over {
  background: rgba(37, 99, 235, 0.08);
}

.todo-card {
  background: #fff;
  border-radius: 10px;
  padding: 0.75rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid transparent;
  margin-bottom: 0.75rem;
  cursor: grab;
}

.todo-card.is-dragging {
  opacity: 0.55;
  transform: rotate(1deg);
}

.todo-card-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.todo-empty-dropzone {
  border: 1px dashed rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 0.6rem;
  text-align: center;
}

/* ToDo Workspace 2.0 */
.todo-workspace {
  --todo-bg: #f4f6fb;
  --todo-surface: #ffffff;
  --todo-surface-muted: #f8f9fd;
  --todo-border: #dce2ee;
  --todo-border-strong: #c6cfdf;
  --todo-text: #172033;
  --todo-text-muted: #55607a;
  --todo-shadow-soft: 0 6px 14px rgb(16 24 40 / 0.05);
  --todo-shadow-elevated: 0 16px 40px rgb(15 23 42 / 0.18);
  --todo-radius-lg: 14px;
  --todo-radius-md: 10px;
  --todo-radius-sm: 8px;
  --todo-inbox-width: 320px;
  --todo-planner-width: 340px;
  position: relative;
  padding-bottom: 5.5rem;
  min-width: 0;
}

.todo-workspace .btn {
  padding: 0.45rem 0.8rem;
  border-radius: 9px;
  font-size: 0.86rem;
}

.todo-topbar {
  background: var(--todo-surface);
  border: 1px solid var(--todo-border);
  border-radius: var(--todo-radius-lg);
  box-shadow: var(--todo-shadow-soft);
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.todo-topbar-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.todo-title {
  font-size: 1.25rem;
  margin: 0;
  color: var(--todo-text);
}

.todo-subtitle {
  margin: 0.2rem 0 0;
  color: var(--todo-text-muted);
  font-size: 0.9rem;
}

.todo-topbar-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.todo-topbar-toolbar {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
}

.todo-toolbar-form {
  margin: 0;
}

.todo-toolbar-form .form-label {
  font-size: 0.75rem;
  color: var(--todo-text-muted);
}

.todo-toolbar-form .form-select {
  height: 32px;
}

.todo-toolbar-group {
  display: flex;
  gap: 0.3rem;
  align-self: start;
  padding-top: 0;
  flex-wrap: wrap;
  min-width: 0;
}

.todo-toolbar-group .btn {
  white-space: nowrap;
}

.todo-metrics {
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0.45rem;
  padding-top: 0;
  flex-wrap: wrap;
  min-width: 0;
}

.todo-metric {
  background: var(--todo-surface-muted);
  border: 1px solid var(--todo-border);
  border-radius: 8px;
  min-width: 78px;
  text-align: center;
  padding: 0.35rem 0.55rem;
  line-height: 1.15;
}

.todo-metric strong {
  display: block;
  font-size: 0.96rem;
  color: var(--todo-text);
}

.todo-metric small {
  color: var(--todo-text-muted);
  font-size: 0.74rem;
}

.todo-empty-state {
  background: var(--todo-surface);
  border: 1px solid var(--todo-border);
  border-radius: var(--todo-radius-lg);
  box-shadow: var(--todo-shadow-soft);
  text-align: center;
  padding: 2rem 1rem;
}

.todo-empty-state h2 {
  font-size: 1.15rem;
  margin-bottom: 0.45rem;
}

.todo-empty-state p {
  color: var(--todo-text-muted);
  margin-bottom: 1rem;
}

.todo-onboarding-wizard {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.todo-wizard-steps {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.todo-wizard-steps li {
  border: 1px solid var(--todo-border);
  border-radius: 9px;
  background: var(--todo-surface-muted);
  padding: 0.45rem 0.6rem;
  color: var(--todo-text);
  font-size: 0.9rem;
}

.todo-wizard-form {
  border: 1px solid var(--todo-border);
  border-radius: 10px;
  background: #fff;
  padding: 0.9rem;
  display: grid;
  gap: 0.75rem;
}

.todo-wizard-field {
  text-align: left;
}

.todo-wizard-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.todo-list-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
}

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

.todo-shell {
  position: relative;
  display: flex;
  min-height: 72vh;
  border: 1px solid var(--todo-border);
  border-radius: var(--todo-radius-lg);
  background: var(--todo-bg);
  overflow: hidden;
}

.todo-side-panel {
  display: flex;
  flex-direction: column;
  width: 0;
  flex: 0 0 0;
  background: var(--todo-surface);
  border-right: 1px solid transparent;
  overflow: hidden;
  transition:
    width 0.2s ease,
    flex-basis 0.2s ease;
}

.todo-panel-inbox {
  border-right-color: var(--todo-border);
}

.todo-panel-planner {
  border-left: 1px solid var(--todo-border);
}

.todo-shell.is-inbox-open .todo-panel-inbox {
  width: var(--todo-inbox-width);
  flex-basis: var(--todo-inbox-width);
}

.todo-shell.is-planner-open .todo-panel-planner {
  width: var(--todo-planner-width);
  flex-basis: var(--todo-planner-width);
}

.todo-main-panel {
  min-width: 0;
  flex: 1;
  display: flex;
  background: var(--todo-bg);
}

.todo-panel-header {
  padding: 0.8rem 0.9rem 0.6rem;
  border-bottom: 1px solid var(--todo-border);
}

.todo-panel-header h2 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--todo-text);
}

.todo-panel-header p {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--todo-text-muted);
}

.todo-panel-scroll {
  overflow: auto;
  padding: 0.75rem;
}

.todo-panel-empty {
  font-size: 0.88rem;
  color: var(--todo-text-muted);
  border: 1px dashed var(--todo-border-strong);
  border-radius: var(--todo-radius-sm);
  padding: 0.65rem;
  text-align: center;
}

.todo-resize-handle {
  width: 8px;
  flex: 0 0 8px;
  background: transparent;
  position: relative;
  cursor: col-resize;
}

.todo-resize-handle::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 3px;
  width: 2px;
  border-radius: 2px;
  background: var(--todo-border-strong);
}

.todo-shell:not(.is-inbox-open) .todo-resize-handle[data-resize-handle="inbox"],
.todo-shell:not(.is-planner-open)
  .todo-resize-handle[data-resize-handle="planner"] {
  display: none;
}

.todo-resize-handle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.todo-inbox-capture {
  padding: 0.75rem;
  border-bottom: 1px solid var(--todo-border);
}

.todo-inbox-capture textarea {
  width: 100%;
  resize: vertical;
  min-height: 82px;
  border: 1px solid var(--todo-border-strong);
  border-radius: 9px;
  padding: 0.55rem;
  font-size: 0.9rem;
  background: #fff;
}

.todo-inbox-capture textarea:focus {
  border-color: #2563eb;
  outline: 2px solid rgb(37 99 235 / 0.15);
}

.todo-inbox-capture-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.45rem;
  gap: 0.4rem;
}

.todo-inbox-capture-footer small {
  color: var(--todo-text-muted);
}

.todo-inbox-item {
  border: 1px solid var(--todo-border);
  border-radius: var(--todo-radius-sm);
  padding: 0.65rem;
  margin-bottom: 0.55rem;
  background: #fff;
}

.todo-inbox-item p {
  margin: 0;
  color: var(--todo-text);
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.todo-inbox-meta {
  font-size: 0.72rem;
  color: var(--todo-text-muted);
  margin-top: 0.35rem;
}

.todo-inbox-actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.35rem;
}

.todo-board-stage {
  width: 100%;
  padding: 0.7rem;
  overflow: hidden;
  min-width: 0;
}

.todo-board-canvas {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  overflow-x: auto;
  min-height: 100%;
  padding-bottom: 0.6rem;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
}

.todo-list-column {
  display: flex;
  flex-direction: column;
  width: clamp(272px, 30vw, 306px);
  min-width: clamp(272px, 30vw, 306px);
  max-width: clamp(272px, 30vw, 306px);
  max-height: min(72vh, calc(100svh - 220px));
  background: var(--todo-surface-muted);
  border: 1px solid var(--todo-border);
  border-radius: var(--todo-radius-lg);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7);
  scroll-snap-align: start;
}

.todo-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.65rem 0.55rem;
  border-bottom: 1px solid var(--todo-border);
}

.todo-list-header h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--todo-text);
}

.todo-list-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 0.4rem;
  border: 1px solid var(--todo-border);
  border-radius: 999px;
  background: #fff;
  color: var(--todo-text-muted);
  font-size: 0.74rem;
  margin-top: 0.2rem;
}

.todo-list-menu-btn {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  color: var(--todo-text-muted);
}

.todo-list-menu-btn:hover,
.todo-list-menu-btn:focus-visible {
  background: #edf1f8;
  border-color: var(--todo-border-strong);
  outline: none;
}

.todo-list-cards {
  padding: 0.55rem;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  min-height: 124px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.todo-list-cards.is-drag-over {
  background: rgb(37 99 235 / 0.08);
}

.todo-list-empty {
  border: 1px dashed var(--todo-border-strong);
  border-radius: 9px;
  color: var(--todo-text-muted);
  padding: 0.6rem;
  text-align: center;
  font-size: 0.82rem;
}

.todo-workspace .todo-card {
  background: var(--todo-surface);
  border: 1px solid var(--todo-border);
  border-radius: var(--todo-radius-md);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
  padding: 0.55rem;
  cursor: grab;
  user-select: none;
  position: relative;
}

.todo-workspace .todo-card:hover {
  border-color: #b8c3d9;
  box-shadow: 0 6px 14px rgb(15 23 42 / 0.09);
}

.todo-workspace .todo-card.is-completed {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.todo-workspace .todo-card:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.todo-workspace .todo-card.is-dragging {
  opacity: 0.7;
  transform: rotate(1.2deg);
  box-shadow: 0 16px 26px rgb(15 23 42 / 0.18);
}

.todo-workspace .todo-card.is-saving {
  opacity: 0.7;
}

.todo-card-cover {
  height: 6px;
  border-radius: 99px;
  margin-bottom: 0.45rem;
}

.todo-card-labels {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.todo-card-label {
  font-size: 0.65rem;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  color: #0f172a;
  border: 1px solid transparent;
}

.todo-card-label.tone-0 {
  background: #dbeafe;
  border-color: #bfdbfe;
}

.todo-card-label.tone-1 {
  background: #dcfce7;
  border-color: #bbf7d0;
}

.todo-card-label.tone-2 {
  background: #ffedd5;
  border-color: #fed7aa;
}

.todo-card-label.tone-3 {
  background: #fee2e2;
  border-color: #fecaca;
}

.todo-card-label.tone-4 {
  background: #fce7f3;
  border-color: #fbcfe8;
}

.todo-card-label.tone-5 {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.todo-card-title {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  text-align: left;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--todo-text);
  line-height: 1.3;
}

.todo-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
}

.todo-card-heading {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 0.28rem;
}

.todo-card-menu-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--todo-text-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: -2px;
}

.todo-card-menu-btn:hover,
.todo-card-menu-btn:focus-visible,
.todo-card.is-menu-open .todo-card-menu-btn {
  background: #edf1f8;
  border-color: var(--todo-border-strong);
  color: var(--todo-text);
  outline: none;
}

.todo-card-menu {
  position: absolute;
  top: 2.1rem;
  right: 0.45rem;
  z-index: 8;
  min-width: 168px;
  border: 1px solid var(--todo-border);
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 12px 22px rgb(15 23 42 / 0.18);
  padding: 0.25rem;
  display: grid;
  gap: 0.1rem;
}

.todo-card-menu[hidden] {
  display: none;
}

.todo-card-menu button,
.todo-card-menu a {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 7px;
  color: var(--todo-text);
  text-decoration: none;
  padding: 0.35rem 0.45rem;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1.2;
}

.todo-card-menu button:hover,
.todo-card-menu button:focus-visible,
.todo-card-menu a:hover,
.todo-card-menu a:focus-visible {
  border-color: var(--todo-border-strong);
  background: #f8fafc;
  outline: none;
}

.todo-card-menu .is-danger {
  color: #b91c1c;
}

.todo-card-title:hover,
.todo-card-title:focus-visible {
  color: #2563eb;
  outline: none;
}

.todo-workspace .todo-card.is-completed .todo-card-title {
  color: #64748b;
}

.todo-card-desc {
  margin: 0.3rem 0 0.35rem;
  color: var(--todo-text-muted);
  font-size: 0.79rem;
  line-height: 1.35;
  max-height: 2.8em;
  overflow: hidden;
}

.todo-workspace .todo-card.is-completed .todo-card-desc {
  color: #94a3b8;
}

.todo-card-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.todo-meta-badge {
  font-size: 0.68rem;
  border: 1px solid var(--todo-border-strong);
  border-radius: 999px;
  padding: 0.11rem 0.35rem;
  color: var(--todo-text-muted);
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
}

.todo-meta-badge.is-overdue {
  color: #b91c1c;
  border-color: #fca5a5;
  background: #fee2e2;
}

.todo-meta-badge.is-soon {
  color: #92400e;
  border-color: #fcd34d;
  background: #fef3c7;
}

.todo-meta-badge.is-completed {
  color: #166534;
  border-color: #86efac;
  background: #dcfce7;
}

.todo-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.todo-card-actions .btn {
  flex: 1 1 138px;
  justify-content: center;
}

.todo-card-assignees {
  display: flex;
  align-items: center;
}

.todo-card-assignees-inline {
  margin-top: 0;
}

.todo-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dbe5fb;
  color: #1e3a8a;
  font-size: 0.67rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #b6c6e8;
  margin-left: -5px;
}

.todo-avatar:first-child {
  margin-left: 0;
}

.todo-avatar.more {
  background: #e2e8f0;
  color: #334155;
}

.todo-drop-placeholder {
  border: 2px dashed #8bb6ff;
  border-radius: 10px;
  min-height: 62px;
}

.todo-add-card-form {
  border-top: 1px solid var(--todo-border);
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.todo-add-card-form textarea {
  border: 1px solid var(--todo-border-strong);
  border-radius: 8px;
  padding: 0.42rem;
  resize: vertical;
  min-height: 58px;
  font-size: 0.84rem;
}

.todo-add-card-form textarea:focus {
  outline: 2px solid rgb(37 99 235 / 0.18);
  border-color: #2563eb;
}

.todo-add-card-actions {
  display: flex;
  gap: 0.4rem;
}

.todo-card-skeleton {
  cursor: default;
}

.todo-planner-item {
  border: 1px solid var(--todo-border);
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #fff;
  padding: 0.5rem;
  margin-bottom: 0.45rem;
}

.todo-planner-item.is-overdue {
  border-left-color: #dc2626;
}

.todo-planner-item.is-today {
  border-left-color: #16a34a;
}

.todo-planner-date {
  font-size: 0.7rem;
  color: var(--todo-text-muted);
}

.todo-planner-title {
  border: none;
  padding: 0;
  margin: 0.12rem 0;
  background: none;
  color: var(--todo-text);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
}

.todo-planner-title:hover,
.todo-planner-title:focus-visible {
  color: #2563eb;
  outline: none;
}

.todo-planner-meta {
  font-size: 0.74rem;
  color: var(--todo-text-muted);
}

.todo-bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0.95rem;
  z-index: 40;
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.36rem;
  border-radius: 13px;
  background: rgb(15 23 42 / 0.92);
  box-shadow: var(--todo-shadow-elevated);
}

.todo-nav-btn {
  min-width: 90px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #d5ddf5;
  padding: 0.36rem 0.55rem;
  font-size: 0.78rem;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
}

.todo-nav-btn i {
  font-size: 0.76rem;
}

.todo-nav-btn.is-active,
.todo-nav-btn:hover,
.todo-nav-btn:focus-visible {
  background: #2563eb;
  color: #fff;
  border-color: #3b82f6;
  outline: none;
}

.todo-switcher-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(15 23 42 / 0.3);
  z-index: 44;
}

.todo-switcher {
  position: fixed;
  top: 84px;
  right: -430px;
  width: min(410px, calc(100vw - 24px));
  height: calc(100vh - 110px);
  background: var(--todo-surface);
  border: 1px solid var(--todo-border);
  border-radius: 14px;
  box-shadow: var(--todo-shadow-elevated);
  z-index: 45;
  transition: right 0.2s ease;
  display: flex;
  flex-direction: column;
}

.todo-switcher.is-open {
  right: 14px;
}

.todo-switcher-header {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--todo-border);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.todo-switcher-header h2 {
  margin: 0;
  font-size: 0.98rem;
}

.todo-switcher-header p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--todo-text-muted);
}

.todo-switcher-controls {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--todo-border);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.45rem;
}

.todo-switcher-section {
  padding: 0.65rem 0.85rem;
  overflow: visible;
}

.todo-switcher-section:last-child {
  flex: 1;
  overflow: auto;
}

.todo-switcher-section h3 {
  font-size: 0.8rem;
  color: var(--todo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.todo-switcher-list,
.todo-switcher-grid {
  display: grid;
  gap: 0.4rem;
}

.todo-switcher-list {
  grid-template-columns: 1fr;
}

.todo-switcher-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.todo-switcher-row,
.todo-switcher-card {
  border: 1px solid var(--todo-border);
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.todo-switcher-row.is-active,
.todo-switcher-card.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgb(37 99 235 / 0.18);
}

.todo-switcher-link {
  flex: 1;
  text-decoration: none;
  color: inherit;
  padding: 0.45rem 0.55rem;
}

.todo-switcher-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--todo-text);
}

.todo-switcher-subline,
.todo-switcher-count {
  font-size: 0.72rem;
  color: var(--todo-text-muted);
}

.todo-fav-btn {
  border: none;
  border-left: 1px solid var(--todo-border);
  width: 35px;
  background: #f8fafc;
  color: #64748b;
}

.todo-fav-btn.is-active {
  color: #f59e0b;
}

.todo-fav-btn:hover,
.todo-fav-btn:focus-visible {
  background: #eef2ff;
  outline: none;
}

.todo-switcher-empty {
  font-size: 0.8rem;
  color: var(--todo-text-muted);
  padding: 0.45rem;
  border: 1px dashed var(--todo-border-strong);
  border-radius: 8px;
}

.todo-switcher-workspace-block {
  margin-bottom: 0.6rem;
}

.todo-switcher-workspace-block h4 {
  font-size: 0.76rem;
  color: var(--todo-text-muted);
  margin: 0 0 0.3rem;
}

.todo-switcher-pinned {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 220px;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  background: #0f172a;
  color: #d8e1f5;
  z-index: 6;
  border-right: 1px solid #1e293b;
}

.todo-workspace.is-switcher-pinned .todo-switcher-pinned,
.todo-switcher-pinned.is-visible {
  transform: translateX(0);
}

.todo-switcher-pinned-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.65rem;
  border-bottom: 1px solid #27344f;
  font-size: 0.82rem;
}

.todo-switcher-pinned .btn-link {
  color: #94a3b8;
  text-decoration: none;
  padding: 0;
}

.todo-pinned-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.4rem;
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: #d8e1f5;
  background: #1e293b;
  border: 1px solid #334155;
}

.todo-pinned-item.is-active,
.todo-pinned-item:hover {
  background: #2563eb;
  border-color: #3b82f6;
}

.todo-pinned-item small {
  color: #cbd5e1;
}

.todo-workspace.is-switcher-pinned .todo-main-panel {
  margin-left: 220px;
}

.todo-move-overlay {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.8rem;
}

.todo-move-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 0.4);
}

.todo-move-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 94vw);
  border: 1px solid var(--todo-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--todo-shadow-elevated);
  overflow: hidden;
}

.todo-move-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--todo-border);
}

.todo-move-header h2 {
  margin: 0;
  font-size: 1rem;
}

.todo-move-form {
  padding: 0.8rem;
  display: grid;
  gap: 0.6rem;
}

.todo-move-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.todo-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2.5rem 0.8rem 1rem;
}

.todo-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 0.45);
}

.todo-detail-drawer {
  position: relative;
  z-index: 1;
  width: min(980px, 96vw);
  max-height: calc(100vh - 3.6rem);
  background: #fff;
  border: 1px solid var(--todo-border);
  border-radius: 15px;
  box-shadow: var(--todo-shadow-elevated);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.todo-detail-header {
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid var(--todo-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}

.todo-detail-header h2 {
  margin: 0;
  font-size: 1.02rem;
}

.todo-detail-header p {
  margin: 0.24rem 0 0;
  color: var(--todo-text-muted);
  font-size: 0.79rem;
}

.todo-detail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.95rem;
  border-bottom: 1px solid var(--todo-border);
  background: #f9fbff;
}

.todo-detail-add-group,
.todo-detail-actions-group {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.todo-detail-content {
  overflow: auto;
  padding: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.todo-detail-block {
  border: 1px solid var(--todo-border);
  border-radius: 10px;
  background: #fff;
  padding: 0.7rem;
}

.todo-detail-block h3 {
  margin: 0 0 0.45rem;
  font-size: 0.86rem;
}

.todo-detail-block p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--todo-text);
  white-space: pre-wrap;
}

.todo-detail-block-wide {
  grid-column: 1 / -1;
}

.todo-detail-edit-form {
  display: grid;
  gap: 0.8rem;
}

.todo-detail-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.todo-detail-field {
  display: grid;
  gap: 0.32rem;
}

.todo-detail-field-wide {
  grid-column: 1 / -1;
}

.todo-detail-field-spacer {
  min-height: 0;
}

.todo-detail-field-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--todo-text-muted);
}

.todo-detail-edit-form input,
.todo-detail-edit-form textarea,
.todo-detail-edit-form select {
  width: 100%;
  border: 1px solid var(--todo-border-strong);
  border-radius: 8px;
  padding: 0.48rem 0.55rem;
  font-size: 0.84rem;
  color: var(--todo-text);
  background: #fff;
}

.todo-detail-edit-form textarea {
  min-height: 110px;
  resize: vertical;
}

.todo-detail-edit-form input:focus,
.todo-detail-edit-form textarea:focus,
.todo-detail-edit-form select:focus {
  border-color: #2563eb;
  outline: 2px solid rgb(37 99 235 / 0.14);
}

.todo-detail-edit-note {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--todo-text-muted);
}

.todo-detail-edit-users {
  border: 1px solid var(--todo-border);
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.72rem;
}

.todo-detail-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.5rem;
}

.todo-detail-user-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--todo-border);
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem 0.62rem;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.todo-detail-user-option:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.todo-detail-user-option.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgb(37 99 235 / 0.12);
}

.todo-detail-user-option input {
  margin: 0;
  flex: none;
}

.todo-detail-user-copy {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.todo-detail-user-copy strong {
  font-size: 0.82rem;
  color: var(--todo-text);
  font-weight: 600;
}

.todo-detail-user-copy small {
  color: var(--todo-text-muted);
  font-size: 0.72rem;
}

.todo-detail-user-empty {
  border: 1px dashed var(--todo-border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--todo-text-muted);
  font-size: 0.8rem;
  padding: 0.65rem;
}

.todo-detail-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.todo-detail-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}

.todo-detail-pill {
  border: 1px solid var(--todo-border);
  border-radius: 999px;
  background: #f8fafc;
  padding: 0.13rem 0.45rem;
  font-size: 0.72rem;
  color: var(--todo-text-muted);
}

.todo-detail-label {
  font-size: 0.7rem;
  padding: 0.15rem 0.42rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #dbeafe;
  color: #1e3a8a;
}

.todo-detail-empty,
.todo-detail-empty-inline {
  color: var(--todo-text-muted);
  font-size: 0.8rem;
}

.todo-detail-assignees {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  flex-wrap: wrap;
}

.todo-detail-form {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.todo-detail-form input,
.todo-detail-form textarea {
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--todo-border-strong);
  border-radius: 8px;
  padding: 0.4rem;
  font-size: 0.82rem;
}

.todo-detail-form textarea {
  min-height: 82px;
}

.todo-detail-form input:focus,
.todo-detail-form textarea:focus {
  border-color: #2563eb;
  outline: 2px solid rgb(37 99 235 / 0.14);
}

.todo-detail-form-columns input {
  min-width: 140px;
}

.todo-detail-headline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.todo-detail-toggle-wrap.is-hidden {
  display: none;
}

.todo-detail-checklist-list,
.todo-detail-attachment-list,
.todo-detail-comment-list,
.todo-detail-activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.todo-detail-checklist-list li,
.todo-detail-attachment-list li,
.todo-detail-comment-list li,
.todo-detail-activity-list li {
  border: 1px solid var(--todo-border);
  border-radius: 8px;
  padding: 0.45rem;
}

.todo-check-toggle {
  border: none;
  background: none;
  color: #64748b;
  padding: 0;
  margin-right: 0.35rem;
}

.todo-check-toggle.is-done {
  color: #16a34a;
}

.todo-check-text {
  font-size: 0.83rem;
  color: var(--todo-text);
}

.todo-check-text.is-done {
  text-decoration: line-through;
  color: var(--todo-text-muted);
}

.todo-detail-inline-meta {
  font-size: 0.72rem;
  color: var(--todo-text-muted);
  margin-bottom: 0.22rem;
}

.todo-detail-error {
  border: 1px solid #fecaca;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 9px;
  padding: 0.6rem;
}

.todo-detail-skeleton {
  width: 100%;
}

.todo-skeleton {
  height: 12px;
  border-radius: 999px;
  margin-bottom: 0.45rem;
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 37%, #e5e7eb 63%);
  background-size: 400% 100%;
  animation: todoSkeleton 1.2s ease infinite;
}

.todo-skeleton.w-90 {
  width: 90%;
}

.todo-skeleton.w-80 {
  width: 80%;
}

.todo-skeleton.w-70 {
  width: 70%;
}

.todo-skeleton.w-60 {
  width: 60%;
}

.todo-toast-container {
  position: fixed;
  right: 18px;
  bottom: 86px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.todo-toast {
  background: #1e293b;
  color: #f8fafc;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  box-shadow: 0 8px 18px rgb(15 23 42 / 0.24);
  font-size: 0.82rem;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.todo-toast.is-success {
  background: #166534;
}

.todo-toast.is-danger {
  background: #b91c1c;
}

.todo-toast.is-warning {
  background: #a16207;
}

.todo-toast.is-out {
  opacity: 0;
  transform: translateY(5px);
}

body.todo-detail-open {
  overflow: hidden;
}

@keyframes todoSkeleton {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

@media (max-width: 1400px) {
  .todo-topbar-toolbar {
    grid-template-columns: auto auto;
  }

  .todo-metrics {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 1100px) {
  .todo-topbar-main {
    flex-direction: column;
    align-items: stretch;
  }

  .todo-topbar-actions {
    justify-content: flex-start;
  }

  .todo-topbar-toolbar {
    grid-template-columns: 1fr;
  }

  .todo-toolbar-group {
    padding-top: 0;
    width: 100%;
  }

  .todo-toolbar-group .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .todo-metrics {
    justify-content: flex-start;
  }

  .todo-metric {
    flex: 1 1 120px;
    min-width: min(160px, 100%);
  }

  .todo-list-column {
    width: clamp(268px, 42vw, 302px);
    min-width: clamp(268px, 42vw, 302px);
    max-width: clamp(268px, 42vw, 302px);
  }
}

@media (max-width: 992px) {
  .todo-workspace {
    padding-bottom: 6.25rem;
  }

  .todo-shell {
    display: block;
    min-height: 66vh;
    overflow: visible;
  }

  .todo-main-panel {
    min-height: 66vh;
    border-radius: var(--todo-radius-lg);
    overflow: hidden;
  }

  .todo-side-panel {
    position: fixed;
    top: 72px;
    right: 0;
    width: min(420px, 100vw);
    height: calc(100svh - 96px);
    transform: translateX(100%);
    transition: transform 0.2s ease;
    border: 1px solid var(--todo-border);
    border-radius: 12px 0 0 12px;
    box-shadow: var(--todo-shadow-elevated);
    z-index: 44;
  }

  .todo-shell.is-inbox-open .todo-panel-inbox,
  .todo-shell.is-planner-open .todo-panel-planner {
    transform: translateX(0);
    width: min(420px, 100vw);
    flex-basis: auto;
  }

  .todo-resize-handle {
    display: none !important;
  }

  .todo-workspace.is-switcher-pinned .todo-main-panel {
    margin-left: 0;
  }

  .todo-switcher-pinned {
    display: none;
  }

  .todo-switcher {
    top: 72px;
    height: calc(100svh - 95px);
  }

  .todo-bottom-nav {
    left: 0.65rem;
    right: 0.65rem;
    transform: none;
    justify-content: space-between;
    width: auto;
  }

  .todo-nav-btn {
    min-width: 68px;
    flex: 1;
  }

  .todo-detail-content {
    grid-template-columns: 1fr;
  }

  .todo-detail-edit-grid {
    grid-template-columns: 1fr;
  }

  .todo-board-stage {
    padding: 0.6rem;
  }

  .todo-board-canvas {
    gap: 0.6rem;
  }

  .todo-list-column {
    width: min(76vw, 320px);
    min-width: min(76vw, 320px);
    max-width: min(76vw, 320px);
    max-height: min(68vh, calc(100svh - 230px));
  }

  .todo-detail-overlay {
    padding: 1rem 0.75rem max(0.75rem, env(safe-area-inset-bottom));
  }

  .todo-detail-drawer {
    width: min(calc(100vw - 1.5rem), 860px);
    max-height: calc(100svh - 1.5rem);
  }
}

@media (max-width: 768px) {
  .todo-topbar-actions {
    width: 100%;
  }

  .todo-topbar-actions .btn {
    flex: 1 1 180px;
    justify-content: center;
  }

  .todo-toolbar-group-view,
  .todo-toolbar-group-filter {
    display: grid;
    width: 100%;
  }

  .todo-toolbar-group-view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .todo-toolbar-group-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .todo-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .todo-metric {
    min-width: 0;
  }

  .todo-list-table-wrap {
    overflow: visible;
  }

  .todo-list-table {
    min-width: 0;
  }

  .todo-list-table thead {
    display: none;
  }

  .todo-list-table,
  .todo-list-table tbody,
  .todo-list-table tr,
  .todo-list-table td {
    display: block;
    width: 100%;
  }

  .todo-list-table tbody {
    display: grid;
    gap: 0.8rem;
  }

  .todo-list-table tr {
    border: 1px solid var(--todo-border);
    border-radius: var(--todo-radius-md);
    background: var(--todo-surface);
    box-shadow: var(--todo-shadow-soft);
    padding: 0.8rem;
  }

  .todo-list-table td {
    border: none;
    padding: 0.2rem 0;
  }

  .todo-list-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--todo-text-muted);
  }

  .todo-list-table td:last-child {
    padding-bottom: 0;
  }

  .todo-list-table td .d-flex {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .todo-topbar {
    padding: 0.75rem;
  }

  .todo-topbar-actions .btn {
    flex-basis: 100%;
  }

  .todo-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .todo-list-column {
    width: min(88vw, 320px);
    min-width: min(88vw, 320px);
    max-width: min(88vw, 320px);
    max-height: min(66vh, calc(100svh - 240px));
  }

  .todo-switcher-grid {
    grid-template-columns: 1fr;
  }

  .todo-add-card-actions {
    flex-direction: column;
  }

  .todo-add-card-actions .btn {
    width: 100%;
  }

  .todo-card-actions {
    flex-direction: column;
  }

  .todo-card-actions .btn {
    width: 100%;
  }

  .todo-move-overlay {
    align-items: flex-end;
    padding: 0.5rem;
  }

  .todo-move-dialog {
    width: 100%;
    border-radius: 16px;
  }

  .todo-move-actions {
    flex-direction: column-reverse;
  }

  .todo-move-actions .btn {
    width: 100%;
  }

  .todo-detail-overlay {
    padding: 0;
  }

  .todo-detail-drawer {
    width: 100vw;
    height: 100svh;
    max-height: 100svh;
    border-radius: 0;
    border: none;
  }

  .todo-detail-header,
  .todo-detail-toolbar {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .todo-detail-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .todo-detail-content {
    padding: 0.75rem;
  }

  .todo-detail-add-group,
  .todo-detail-actions-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .todo-detail-add-group .btn,
  .todo-detail-actions-group .btn,
  .todo-detail-actions-group a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .todo-detail-form {
    flex-direction: column;
  }

  .todo-detail-form input,
  .todo-detail-form textarea,
  .todo-detail-form-columns input {
    min-width: 0;
    width: 100%;
  }

  .todo-detail-edit-form input,
  .todo-detail-edit-form textarea,
  .todo-detail-edit-form select {
    min-width: 0;
  }

  .todo-detail-headline-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .todo-detail-user-grid {
    grid-template-columns: 1fr;
  }

  .todo-detail-edit-actions {
    flex-direction: column;
  }

  .todo-detail-edit-actions .btn {
    width: 100%;
  }
}

.todo-simple-page {
  display: grid;
  gap: 1rem;
}

.todo-simple-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.todo-simple-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.todo-simple-stat {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: #fff;
  display: grid;
  gap: 0.2rem;
}

.todo-simple-stat strong {
  font-size: 1.45rem;
  line-height: 1;
  color: #0f172a;
}

.todo-simple-stat span {
  color: #64748b;
  font-size: 0.88rem;
}

.todo-simple-quick-form {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
}

.todo-simple-quick-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px auto;
  gap: 0.85rem;
  align-items: end;
}

.todo-simple-quick-submit {
  display: grid;
}

.todo-simple-list {
  display: grid;
  gap: 0.9rem;
}

.todo-simple-item {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgb(15 23 42 / 0.05);
}

.todo-simple-item.is-completed {
  background: #f8fafc;
}

.todo-simple-main {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
}

.todo-simple-leading {
  flex: 0 0 auto;
}

.todo-simple-toggle-form {
  display: grid;
}

.todo-simple-content {
  flex: 1 1 auto;
  min-width: 0;
}

.todo-simple-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.todo-simple-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}

.todo-simple-title:hover {
  color: #0d6efd;
}

.todo-simple-title.is-completed {
  color: #64748b;
  text-decoration: line-through;
}

.todo-simple-description {
  margin: 0.55rem 0 0;
  color: #475569;
  white-space: pre-wrap;
}

.todo-simple-description.is-completed {
  color: #94a3b8;
}

.todo-simple-assignees {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.todo-simple-avatar {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 700;
}

.todo-simple-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.8rem;
  color: #64748b;
  font-size: 0.88rem;
}

.todo-simple-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.todo-simple-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.todo-simple-actions form {
  margin: 0;
}

@media (max-width: 900px) {
  .todo-simple-quick-grid {
    grid-template-columns: 1fr;
  }

  .todo-simple-quick-submit .btn {
    width: 100%;
  }

  .todo-simple-main {
    flex-direction: column;
  }

  .todo-simple-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .todo-simple-stats {
    grid-template-columns: 1fr;
  }

  .todo-simple-item .card-body {
    padding: 0.9rem;
  }

  .todo-simple-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .todo-simple-actions .btn,
  .todo-simple-actions form,
  .todo-simple-actions form .btn {
    width: 100%;
  }

  .todo-simple-toggle-form .btn {
    width: 100%;
  }
}

/* Damage Detail Modal */
.damage-detail-modal .modal-content {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgb(15 23 42 / 0.18);
}

.damage-detail-modal .modal-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 1.25rem;
  background: linear-gradient(
    135deg,
    rgb(248 250 252 / 0.98),
    rgb(241 245 249 / 0.98)
  );
}

.damage-detail-modal .modal-title {
  font-weight: 700;
}

.damage-detail-subtitle {
  display: block;
  color: #64748b;
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.damage-detail-modal .modal-body {
  padding: 1.2rem;
  background: #f8fafc;
}

.damage-detail-overview {
  display: grid;
  gap: 1rem;
}

.damage-detail-summary {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1rem 1.05rem;
  box-shadow: 0 12px 28px rgb(15 23 42 / 0.05);
}

.damage-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.damage-detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

.damage-detail-badge.is-open {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.damage-detail-badge.is-done {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.damage-detail-badge.is-maintenance {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.damage-detail-badge.is-defect {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.damage-detail-description {
  margin: 0;
  color: #0f172a;
  font-size: 0.98rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.damage-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.damage-detail-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 22px rgb(15 23 42 / 0.04);
}

.damage-detail-section.is-full {
  grid-column: 1 / -1;
}

.damage-detail-section h6 {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.damage-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.damage-detail-meta-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: #f8fafc;
}

.damage-detail-meta-item dt {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.damage-detail-meta-item dd {
  margin: 0;
  color: #0f172a;
  font-size: 0.93rem;
}

.damage-detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.damage-detail-gallery-item {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgb(15 23 42 / 0.05);
}

.damage-detail-gallery-item button {
  border: 0;
  padding: 0;
  background: transparent;
  display: block;
  width: 100%;
}

.damage-detail-gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.damage-detail-gallery-caption {
  padding: 0.65rem 0.8rem;
  font-size: 0.8rem;
  color: #475569;
}

.damage-detail-comments {
  display: grid;
  gap: 0.75rem;
}

.damage-detail-comment {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  background: #f8fafc;
}

.damage-detail-comment-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
  font-size: 0.84rem;
}

.damage-detail-comment-head strong {
  color: #0f172a;
}

.damage-detail-comment-head span {
  color: #64748b;
}

.damage-detail-comment-body {
  margin: 0;
  color: #1e293b;
  white-space: pre-wrap;
}

.damage-detail-empty {
  margin: 0;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  color: #64748b;
  background: #f8fafc;
}

.damage-detail-actions {
  display: grid;
  gap: 0.9rem;
}

.damage-detail-actions:empty {
  display: none;
}

.damage-action-form {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.9rem;
  background: #f8fafc;
}

.damage-action-form textarea {
  resize: vertical;
  min-height: 76px;
}

.damage-action-form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.65rem;
}

.damage-detail-modal .modal-footer {
  border-top: 1px solid #e5e7eb;
  background: #fff;
  padding: 0.9rem 1.2rem 1.1rem;
}

@media (max-width: 768px) {
  .damage-detail-grid,
  .damage-detail-meta {
    grid-template-columns: 1fr;
  }

  .damage-detail-modal .modal-body {
    padding: 1rem;
  }
}
