/* ===== Design tokens ===== */
:root {
  --canvas: #F5F6FA;
  --surface: #FFFFFF;
  --ink: #171923;
  --ink-soft: #3F4254;
  --accent: #5850EC;
  --accent-deep: #4338CA;
  --accent-tint: #EEECFD;
  --line: #E3E5EF;
  --muted: #6B7280;
  --green: #12946F;
  --green-tint: #E6F6F1;
  --red: #D64545;
  --red-tint: #FBEAEA;
  --amber: #C77D14;
  --amber-tint: #FBF1E1;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(23, 25, 35, 0.05);
  --shadow-md: 0 4px 16px rgba(23, 25, 35, 0.06);
  --shadow-lg: 0 12px 32px rgba(23, 25, 35, 0.12);
}

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Hind+Siliguri:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: 'Hind Siliguri', 'Manrope', -apple-system, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.55;
}
a { text-decoration: none; color: inherit; }
h1, h2, h3, .btn, .stat-value, .brand, select, button {
  font-family: 'Manrope', 'Hind Siliguri', sans-serif;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== Layout ===== */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 252px;
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar-header {
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.sidebar-header .brand { font-weight: 800; font-size: 15.5px; letter-spacing: -0.01em; }
.sidebar-header .meta {
  font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 6px;
  display: flex; align-items: center; gap: 6px;
}
.user-chip {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}

.sidebar nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s, color 0.15s;
}
.sidebar nav a svg { width: 16px; height: 16px; opacity: 0.85; flex-shrink: 0; }
.sidebar nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar nav a.active { background: var(--accent); color: #fff; }

.sidebar-footer { padding: 14px 20px 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-footer button {
  background: none; border: none; color: rgba(255,255,255,0.6);
  font-size: 13px; cursor: pointer; padding: 0; display: flex; align-items: center; gap: 8px;
  transition: color 0.15s;
}
.sidebar-footer button:hover { color: #fff; }

.main { flex: 1; padding: 36px 40px; max-width: 1200px; }

/* ===== Typography ===== */
h1 { font-size: 23px; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 4px; color: var(--ink); }
h2 { font-weight: 700; letter-spacing: -0.01em; }
.subtitle { color: var(--muted); margin: 0 0 24px; font-size: 14px; }

/* ===== Status dots (signature element) ===== */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-red { background: var(--red); }
.dot-amber { background: var(--amber); }
.dot-muted { background: #C4C7D4; }

/* ===== Cards & stats ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.card-grid .card { transition: box-shadow 0.15s, transform 0.15s; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; align-items: center; }
.stat-value { font-size: 30px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; color: var(--ink); }
.stat-value.warn { color: var(--red); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: var(--accent-deep); }
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); }
.btn-dark:hover { background: #2B2E3D; }
.btn-outline { background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: none; }
.btn-outline:hover { background: var(--canvas); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 7px; }

/* ===== Forms ===== */
.form-input, select.form-input, textarea.form-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }

/* ===== Lists ===== */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.list-item {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  transition: background 0.12s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: #FAFAFD; }
.text-muted { color: var(--muted); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-accent { color: var(--accent); font-weight: 600; }

/* ===== Board / kanban ===== */
.board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 16px; }
@media (max-width: 1000px) { .board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .board { grid-template-columns: 1fr; } }
.board-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 13px;
  box-shadow: var(--shadow-sm);
}
.board-col-title { font-weight: 700; font-size: 13px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.task-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px;
  font-size: 12.5px;
  margin-bottom: 8px;
  background: var(--canvas);
  transition: border-color 0.15s;
}
.task-card:hover { border-color: var(--accent); }
.task-card select { width: 100%; margin-top: 6px; font-size: 12px; padding: 4px 6px; border-radius: 6px; }
.task-actions { display: flex; gap: 10px; margin-top: 6px; }
.task-actions button, .task-actions a { font-size: 11.5px; font-weight: 600; background: none; border: none; cursor: pointer; padding: 0; }

/* ===== Login pages ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #2B2A6B 0%, var(--ink) 55%);
}
.login-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px;
  width: 100%;
  max-width: 400px;
}
.login-box h1 { font-size: 21px; }

/* ===== Misc ===== */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-deep);
}
.error-text { color: var(--red); font-size: 13px; }
.success-text { color: var(--green); font-size: 13px; }

.role-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s;
}
.role-pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.role-pill:hover:not(.active) { border-color: var(--accent); }

.bell-wrap { position: relative; }
.bell-btn { background: none; border: none; color: rgba(255,255,255,0.75); cursor: pointer; font-size: 17px; position: relative; }
.bell-badge {
  position: absolute; top: -5px; right: -7px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 999px; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
}
.notif-dropdown {
  position: absolute; left: 0; top: 30px; width: 290px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 360px; overflow-y: auto; z-index: 50; display: none;
}
.notif-dropdown.open { display: block; }
.notif-item { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; display: block; }
.notif-item:hover { background: var(--canvas); }
.notif-item:last-child { border-bottom: none; }

.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.avatar-placeholder {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent-tint);
  display: flex; align-items: center; justify-content: center; color: var(--accent-deep); font-size: 20px; font-weight: 700;
}
.star-rating { font-size: 28px; cursor: pointer; }
.star-rating .star { color: #D1D5DB; transition: color 0.1s; }
.star-rating .star.active { color: var(--amber); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #D5D7E3; border-radius: 999px; }
