/* basecoatUI — Design System */

:root {
  --bg: #ffffff;
  --bg-muted: #f5f5f5;
  --text: #111111;
  --text-muted: #666666;
  --text-light: #999999;
  --border: #e5e5e5;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-muted: #141414;
  --text: #f5f5f5;
  --text-muted: #a1a1aa;
  --text-light: #71717a;
  --border: #27272a;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --shadow: 0 1px 3px rgba(0,0,0,.3);
}

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

html { font-size: 15px; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-muted);
  transition: background .2s, color .2s;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========== SIDEBAR ========== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 300;
  transition: transform .25s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.sidebar-logo:hover {
  text-decoration: none;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: .75rem;
}

.sidebar-group {
  margin-bottom: 1.25rem;
}

.sidebar-group-title {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  padding: 0 .5rem;
  margin-bottom: .35rem;
}

.sidebar-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-group li {
  margin: 2px 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .65rem;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .12s;
}

.sidebar-link:hover {
  background: var(--bg-muted);
  color: var(--text);
  text-decoration: none;
}

.sidebar-link.active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: .6rem .75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}

.sidebar-user-info {
  min-width: 0;
}

.sidebar-user-name {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: .68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.sidebar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: all .12s;
}

.sidebar-icon-btn:hover {
  background: var(--bg-muted);
  color: var(--text);
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 250;
}

.sidebar-overlay.visible {
  display: block;
}

/* ========== TOP BAR ========== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  margin-left: 240px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.topbar-logo {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* ========== ICON BUTTON ========== */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  position: relative;
}

.icon-btn:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ========== NOTIFICATION BADGE ========== */
.notification-btn {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}

.theme-toggle:hover {
  background: var(--bg-muted);
  color: var(--text);
}

/* ========== AVATAR DROPDOWN ========== */
.avatar-dropdown {
  position: relative;
}

.avatar-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .5rem .3rem .3rem;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all .15s;
  color: var(--text);
}

.avatar-btn:hover {
  background: var(--bg-muted);
}

.avatar-img {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-btn .chevron {
  width: 14px;
  height: 14px;
  color: var(--text-light);
  transition: transform .2s;
}

.avatar-dropdown.open .chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 200px;
  padding: .35rem;
  display: none;
  z-index: 200;
}

.avatar-dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .7rem;
  border-radius: 6px;
  font-size: .85rem;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background .12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--bg-muted);
  text-decoration: none;
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: .25rem .5rem;
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-item.danger svg {
  color: var(--danger);
}

/* ========== NOTIFICATION DROPDOWN ========== */
.notif-dropdown {
  position: relative;
}

.notif-dropdown-menu {
  width: 340px;
  max-height: 420px;
  overflow: hidden;
  flex-direction: column;
}

.notif-dropdown.open .dropdown-menu {
  display: flex;
  display: flex;
}

.notif-header {
  padding: .6rem .75rem .4rem;
  font-weight: 700;
  font-size: .85rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.notif-list {
  flex: 1;
  overflow-y: auto;
  max-height: 300px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .6rem .75rem;
  cursor: pointer;
  transition: background .12s;
  border-left: 3px solid transparent;
}

.notif-item:hover {
  background: var(--bg-muted);
}

.notif-item.nao-lida {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  border-left-color: var(--primary);
}

.notif-icon {
  font-size: 1rem;
  line-height: 1.3;
  flex-shrink: 0;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: .78rem;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-time {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 4px;
}

.notif-loading,
.notif-empty {
  padding: 1.5rem .75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .8rem;
}

.notif-dropdown-menu .dropdown-divider {
  margin: 0;
}

.notif-dropdown-menu .dropdown-item {
  padding: .55rem .75rem;
  font-size: .8rem;
  border-radius: 0;
}

/* ========== CARD ========== */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card-header {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.card-stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .25rem;
}

.card-stat-sub {
  font-size: .78rem;
  color: var(--text-light);
}

/* ========== GRID ========== */
.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.grid-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ========== SPACING UTILITIES ========== */
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.relative { position: relative; }
.absolute { position: absolute; }

.w-full { width: 100%; }

.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }

.p-1 { padding: .25rem; }
.p-2 { padding: .5rem; }
.p-3 { padding: .75rem; }
.p-4 { padding: 1rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }

/* ========== TABLE ========== */
.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

.table thead th {
  text-align: left;
  padding: .6rem .85rem;
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--bg-muted);
  font-weight: 600;
}

.table tbody td {
  padding: .6rem .85rem;
  border-top: 1px solid var(--border);
  color: var(--text);
}

.table tbody tr:hover td {
  background: var(--bg-muted);
}

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

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

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

.text-sm {
  font-size: .8rem;
}

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

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--text-light);
}

/* ========== BADGE ========== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}

.badge-open {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-investigating {
  background: #fef3c7;
  color: #92400e;
}

.badge-resolved {
  background: #d1fae5;
  color: #065f46;
}

.badge-closed {
  background: #e5e7eb;
  color: #374151;
}

.badge-critical {
  background: #fce7f3;
  color: #9d174d;
}

.badge-high {
  background: #fee2e2;
  color: #991b1b;
}

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

.badge-low {
  background: #d1fae5;
  color: #065f46;
}

/* ========== PAGE TITLE ========== */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.page-subtitle {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-muted);
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-sm {
  padding: .35rem .7rem;
  font-size: .8rem;
}

/* ========== FORM ========== */
.form-group {
  margin-bottom: .85rem;
}

.form-label,
.label {
  display: block;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: .3rem;
  font-weight: 500;
}

.form-input,
.form-select,
.form-textarea,
.input {
  width: 100%;
  padding: .5rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color .15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.input:focus {
  outline: none;
  border-color: var(--accent);
}

.input[disabled],
.input[readonly],
.form-input[disabled],
.form-input[readonly] {
  opacity: .6;
  cursor: not-allowed;
  background: var(--bg-muted);
}

.input[aria-invalid="true"],
.form-input[aria-invalid="true"] {
  border-color: var(--danger);
}

.form-textarea {
  resize: vertical;
}

.form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.form-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.form-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: .85rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .85rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}

.form-inline {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  color: var(--text);
}

.form-checkbox {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}

/* ========== FILTER BAR ========== */
.filter-bar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: end;
}

.filter-group label {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: .25rem;
}

.filter-group input,
.filter-group select {
  padding: .4rem .6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  background: var(--bg);
  color: var(--text);
}

/* ========== KANBAN ========== */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .75rem;
  min-height: 60vh;
}

.kanban-col {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem .85rem;
  border-bottom: 1px solid var(--border);
}

.kanban-col-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
}

.kanban-col-count {
  background: var(--border);
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 600;
  padding: .1rem .45rem;
  border-radius: 999px;
}

.kanban-col-body {
  padding: .5rem;
  flex: 1;
  overflow-y: auto;
}

.kanban-empty {
  text-align: center;
  color: var(--text-light);
  font-size: .78rem;
  padding: 1rem 0;
}

.kanban-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .7rem .75rem;
  margin-bottom: .5rem;
  border-left: 3px solid transparent;
  transition: box-shadow .15s;
}

.kanban-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.severity-critical { border-left-color: #dc2626; }
.severity-high    { border-left-color: #d97706; }
.severity-medium  { border-left-color: #2563eb; }
.severity-low     { border-left-color: #16a34a; }

.kanban-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .35rem;
  margin-bottom: .35rem;
}

.kanban-card-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
  word-break: break-word;
}

.kanban-card-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.kanban-badge-recidiva {
  font-size: .8rem;
  flex-shrink: 0;
  color: var(--warning);
}

.kanban-card-meta {
  font-size: .72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.kanban-card-impacts {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin-top: .4rem;
}

.kanban-impact {
  font-size: .68rem;
  padding: .1rem .35rem;
  border-radius: 4px;
  background: var(--bg-muted);
  color: var(--text-muted);
}

.kanban-impact-rework {
  color: var(--warning);
}

.kanban-card-actions {
  display: flex;
  gap: .25rem;
  margin-top: .5rem;
  padding-top: .4rem;
  border-top: 1px solid var(--border);
}

.kanban-move-btn {
  flex: 1;
  padding: .25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: .8rem;
  cursor: pointer;
  transition: all .12s;
}

.kanban-move-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

@media (max-width: 1024px) {
  .kanban-board {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .kanban-col-body {
    max-height: 400px;
  }
}

/* ========== MAIN ========== */
.main-content {
  max-width: 1120px;
  margin-left: 240px;
  padding: 1.5rem 1.5rem;
  min-height: calc(100vh - 56px);
}

.main-content:only-child {
  /* when topbar is not present (login page, etc) */
  margin-left: 0;
}

/* ========== HAMBURGER ========== */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.hamburger:hover {
  background: var(--bg-muted);
}

.hamburger svg {
  width: 22px;
  height: 22px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .topbar-logo {
    display: flex;
  }

  .topbar {
    margin-left: 0;
  }

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

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

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

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

  .form-grid-4,
  .form-grid-3,
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .filter-group input,
  .filter-group select {
    width: 100%;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .card-stat-value {
    font-size: 1.5rem;
  }
}

/* ============================================
   Projetos e Melhorias
   ============================================ */

/* Project card (list/kanban) */
.projeto-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: box-shadow .15s;
  position: relative;
}
.projeto-card:hover {
  box-shadow: var(--shadow);
}
.projeto-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: .5rem;
}
.projeto-card .card-header h3 {
  font-size: .9rem;
  margin: 0;
  flex: 1;
  line-height: 1.3;
}
.projeto-card .card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .5rem;
  font-size: .75rem;
  color: var(--text-muted);
}
.projeto-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
  font-size: .75rem;
  color: var(--text-muted);
}

/* Kanban board for projects */
.projeto-kanban {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}
.projeto-kanban-col {
  min-width: 280px;
  max-width: 320px;
  flex: 1;
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: .75rem;
}
.projeto-kanban-col h3 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin: 0 0 .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.projeto-kanban-col .count {
  background: var(--border);
  color: var(--text-muted);
  font-size: .7rem;
  padding: 0 .5rem;
  border-radius: 99px;
  line-height: 1.5;
}
.projeto-kanban-col .projeto-card {
  margin-bottom: .5rem;
}

/* Kanban colors */
.projeto-kanban-col[data-status="proposto"] { border-top: 3px solid var(--text-light); }
.projeto-kanban-col[data-status="planejado"] { border-top: 3px solid var(--accent); }
.projeto-kanban-col[data-status="em_andamento"] { border-top: 3px solid var(--success); }
.projeto-kanban-col[data-status="em_pausa"] { border-top: 3px solid var(--warning); }
.projeto-kanban-col[data-status="concluido"] { border-top: 3px solid var(--success); }
.projeto-kanban-col[data-status="cancelado"] { border-top: 3px solid var(--danger); }

/* Progress bar */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin: .3rem 0;
}
.progress-bar .fill {
  height: 100%;
  border-radius: 99px;
  transition: width .3s;
  background: var(--accent);
}

/* Priority badges */
.badge-prioridade {
  display: inline-block;
  font-size: .65rem;
  font-weight: 600;
  padding: .1rem .5rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-prioridade.baixa { background: #e0e7ff; color: #3730a3; }
.badge-prioridade.media { background: #fef3c7; color: #92400e; }
.badge-prioridade.alta { background: #fee2e2; color: #991b1b; }
.badge-prioridade.critica { background: #fce7f3; color: #9d174d; }
[data-theme="dark"] .badge-prioridade.baixa { background: #1e1b4b; color: #a5b4fc; }
[data-theme="dark"] .badge-prioridade.media { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .badge-prioridade.alta { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .badge-prioridade.critica { background: #4a0e2b; color: #f9a8d4; }

/* Project tabs */
.projeto-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  overflow-x: auto;
}
.projeto-tabs a {
  display: block;
  padding: .6rem 1rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.projeto-tabs a:hover {
  color: var(--text);
}
.projeto-tabs a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Sprint card */
.sprint-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: .75rem;
}
.sprint-card .sprint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .3rem;
}
.sprint-card .sprint-header h4 {
  margin: 0;
  font-size: .85rem;
}
.sprint-card .sprint-dates {
  font-size: .75rem;
  color: var(--text-muted);
}

/* Task item */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.task-item:last-child { border-bottom: none; }
.task-item .task-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: .3rem;
}
.task-item .task-status-dot.pendente { background: var(--text-light); }
.task-item .task-status-dot.em_andamento { background: var(--accent); }
.task-item .task-status-dot.concluido { background: var(--success); }
.task-item .task-status-dot.cancelado { background: var(--danger); }
.task-item .task-body { flex: 1; }
.task-item .task-body .task-title { font-weight: 500; }
.task-item .task-body .task-meta { font-size: .75rem; color: var(--text-muted); }

/* Checklist */
.checklist-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 0;
  font-size: .85rem;
}
.checklist-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.checklist-item .done {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Risk item */
.risk-item {
  padding: .6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .4rem;
  font-size: .8rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
}
.risk-item .risk-badge {
  font-size: .65rem;
  font-weight: 600;
  padding: .05rem .4rem;
  border-radius: 4px;
  white-space: nowrap;
}
.risk-item .risk-badge.risco { background: #fef3c7; color: #92400e; }
.risk-item .risk-badge.impedimento { background: #fee2e2; color: #991b1b; }
.risk-item .risk-badge.pendencia { background: #e0e7ff; color: #3730a3; }
[data-theme="dark"] .risk-item .risk-badge.risco { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .risk-item .risk-badge.impedimento { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .risk-item .risk-badge.pendencia { background: #1e1b4b; color: #a5b4fc; }

/* Timeline (history) */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 1rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.35rem;
  top: .35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.timeline-item .time { font-size: .7rem; color: var(--text-light); }
.timeline-item .desc { font-size: .85rem; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state p { margin: .5rem 0 1rem; }
