/* team.workconnectai.com — internal team portal.
   Matches the aesthetic of the admin portal (dark topbar, orange accents,
   SF Pro system stack). Keep the visual language consistent so the two
   portals feel like siblings. */

:root {
  --orange: #FF4302;
  --orange-soft: rgba(255, 67, 2, 0.12);
  --bg: #ffffff;
  --ink: #0e0e0e;
  --muted: #6b6b6b;
  --faint: rgba(0, 0, 0, 0.08);
  --card: #fafafa;
  --danger: #d04a38;
  --success: #2db35a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --ink: #e8e8e8;
    --muted: #8a8a8a;
    --faint: rgba(255, 255, 255, 0.10);
    --card: #171717;
  }
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro",
               "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Topbar ─────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--faint);
  gap: 16px;
}
.brand-link { text-decoration: none; }
.brand {
  display: flex;
  align-items: center;
}
.topbar-logo {
  height: 22px;
  width: auto;
  display: block;
}
.nav {
  display: flex;
  gap: 18px;
  margin-left: 8px;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.nav a:hover, .nav a.active {
  opacity: 1;
  color: var(--orange);
}
.spacer { flex: 1; }
.logout-form { margin: 0; }
.logout {
  background: none;
  border: 1px solid var(--faint);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.logout:hover { color: var(--ink); border-color: var(--ink); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--ink);
  cursor: pointer;
}
@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 12px 24px;
    border-bottom: 1px solid var(--faint);
    z-index: 10;
  }
  .nav.open { display: flex; }
}

/* ── Main container ─────────────────────────────────── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 24px 60px;
}
.page-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.page-sub {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 13px;
}

/* ── Filter bar ─────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--faint);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
}
.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--faint);
  margin: 0 4px;
}

/* ── Add task card ──────────────────────────────────── */
.new-task {
  background: var(--card);
  border: 1px solid var(--faint);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}
.new-task h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 10px;
}
.new-task-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.new-task input[type="text"], .new-task select {
  background: var(--bg);
  border: 1px solid var(--faint);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.new-task input[type="text"] { flex: 1; min-width: 200px; }
.new-task select { min-width: 100px; }
.new-task input[type="text"]:focus, .new-task select:focus {
  outline: none;
  border-color: var(--orange);
}
.new-task-submit {
  background: var(--orange);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.new-task-submit:hover { opacity: 0.9; }

/* ── Task list ──────────────────────────────────────── */
.task-list { list-style: none; padding: 0; margin: 0; }
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--faint);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--card);
  transition: background 0.12s;
}
.task-item:hover { background: rgba(127,127,127,0.06); }
.task-item.done { opacity: 0.55; }
.task-item.done .task-title { text-decoration: line-through; }

.task-check {
  background: none;
  border: 1.5px solid var(--muted);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.12s;
}
.task-check:hover { border-color: var(--orange); }
.task-item.done .task-check {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
  font-size: 12px;
}

.task-body { flex: 1; min-width: 0; }
.task-title {
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}
.task-notes {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  white-space: pre-wrap;
}
.task-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.assignee-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange);
  font-weight: 600;
  font-size: 11px;
}
.priority-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
}
.priority-low  { background: rgba(127,127,127,0.15); color: var(--muted); }
.priority-med  { background: rgba(255,67,2,0.10);    color: #b83302; }
.priority-high { background: rgba(208,74,56,0.15);   color: var(--danger); }

.task-actions { display: flex; gap: 6px; flex-shrink: 0; }
.task-action-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  font-family: inherit;
}
.task-action-btn:hover { color: var(--danger); background: rgba(208,74,56,0.08); }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  font-size: 13px;
}

/* ── Login page ─────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--faint);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
}
.login-logo { height: 32px; margin-bottom: 24px; }
.login-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
}
.login-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 24px;
}
.login-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--faint);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 10px;
}
.login-input:focus { outline: none; border-color: var(--orange); }
.login-submit {
  width: 100%;
  background: var(--orange);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
  font-family: inherit;
}
.login-submit:hover { opacity: 0.9; }
.login-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 12px;
  background: rgba(208,74,56,0.08);
  padding: 8px 12px;
  border-radius: 8px;
}
