/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:       #0d1117;
  --card:    #161b22;
  --border:  #30363d;
  --text:    #e6edf3;
  --muted:   #8b949e;
  --accent:  #58a6ff;
  --green:   #3fb950;
  --yellow:  #d29922;
  --red:     #f85149;
  --radius:  8px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* === Header === */
header {
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

header h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

nav {
  display: flex;
  gap: 4px;
}

.tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.15s;
}

.tab:hover {
  color: var(--text);
  background: var(--card);
}

.tab.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
}

/* === Main === */
main {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* === Grid === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* === Card === */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s;
}

.card:hover {
  border-color: var(--accent);
}

/* === Card Header === */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* === Tags === */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  background: rgba(88, 166, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(88, 166, 255, 0.2);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
}

/* === Progress === */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.progress-fill.green  { background: var(--green); }
.progress-fill.yellow { background: var(--yellow); }
.progress-fill.red    { background: var(--red); }

.progress-pct {
  font-size: 12px;
  color: var(--muted);
  min-width: 32px;
  text-align: right;
}

/* === Status Badge === */
.status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}

.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status.active  { color: var(--green);  background: rgba(63, 185, 80, 0.1); }
.status.active::before  { background: var(--green); }
.status.planning{ color: var(--yellow); background: rgba(210, 153, 34, 0.1); }
.status.planning::before{ background: var(--yellow); }
.status.completed { color: var(--muted); background: rgba(139, 148, 158, 0.1); }
.status.completed::before { background: var(--muted); }

/* === List Items === */
.list-item {
  font-size: 13px;
  color: var(--text);
  padding: 3px 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.list-item:last-child { border-bottom: none; }
.list-item::before { content: '·'; color: var(--accent); flex-shrink: 0; }

.list-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* === Description === */
.desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* === Footer === */
footer {
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* === Empty State === */
.empty {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 48px 0;
  grid-column: 1 / -1;
}

/* === Responsive === */
@media (max-width: 600px) {
  header { padding: 12px 16px; }
  nav { width: 100%; overflow-x: auto; }
  main { padding: 16px; }
  .grid { grid-template-columns: 1fr; }
}
