:root {
  --background: #060c13;
  --dark-bg: #06090f;
  --surface: #0b121c;
  --surface-soft: #0f1723;
  --border: #141926;
  --outline: #0e1116;
  --shadow: #04090e;
  --menu-bg: #030407;
  --sb-logo-color: #2e72b3;
  --sb-active-i-color: #3fa0fa;
  --sb-active-bg: #0b1826;
  --sb-scroll-bg: #15314e;
  --sb-title-text: #9a9fa5;
  --blue-active-text-i: #0b1826;
  --white-text: #ffffff;
  --muted-text: #9fb0c3;
  --muted-strong: #c7d2de;
  --chart-red: #f43f5e;
  --chart-green: #4ade80;
  --chart-blue: #60a5fa;
  --chart-yellow: #f59e0b;
  --chart-purple: #8884d8;
  --chart-white: #d1d5db;
  --task-pink: #df2f8c;
  --task-purple: #9d40ed;
  --task-light-purple: #706dff;
  --task-blue: #2873ec;
  --calendar-yellow-bg: #352206;
  --calendar-yellow: #ffd230;
  --calendar-red-bg: #340c11;
  --calendar-red: #ffa2a2;
  --calendar-green-bg: #022b16;
  --calendar-green: #7bf1a8;
  --team-performance-blue: #3fa0fa;
  --project-green-bg: #052f1c;
  --project-green: #05df72;
  --project-yellow-bg: #37260c;
  --project-yellow: #e17100;
  --project-blue-bg: #0e2040;
  --project-blue: #155dfc;
  --project-red-bg: #ffe2e2;
  --project-red: #e7000b;
  --success-bg: rgba(34, 197, 94, 0.16);
  --warning-bg: rgba(245, 158, 11, 0.16);
  --danger-bg: rgba(244, 63, 94, 0.16);
  --info-bg: rgba(63, 160, 250, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --bg: var(--background);
  --surface: var(--dark-bg);
  --surface2: var(--border);
  --surface3: var(--dark-bg);
  --border2: var(--outline);
  --text: var(--white-text);
  --muted: var(--sb-title-text);
  --muted2: var(--sb-title-text);
  --green: var(--chart-green);
  --green-dim: rgba(34, 197, 94, 0.2);
  --amber: var(--chart-yellow);
  --amber-dim: rgba(245, 158, 11, 0.2);
  --red: var(--chart-red);
  --red-dim: rgba(239, 68, 68, 0.2);
  --blue: var(--chart-blue);
  --blue-dim: rgba(79, 142, 247, 0.15);
  --purple: var(--chart-purple);
  --radius: 14px;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter";
  min-height: 100vh;
  font-size: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* ── MAIN ── */
main {
  padding: 28px 32px;
  max-width: 1700px;
  margin: 0 auto;
}

main h1{
  margin-bottom: 20px;
  font-size: 35px;
}
/* ── STAT CARDS ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.stat-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
}
.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(
    circle at 100% 0%,
    rgba(79, 142, 247, 0.08),
    transparent 70%
  );
}
.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stat-icon {
  color: var(--muted);
  opacity: 0.5;
}
.stat-value {
  font-family: "Inter";
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 5px;
  line-height: 1;
}
.stat-sub {
  font-size: 0.76rem;
  color: var(--muted);
}
.stat-sub.pos {
  color: var(--green);
}
.stat-sub.neg {
  color: var(--red);
}

/* ── CHART + TEAM ROW ── */
.bottom-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-title {
  font-family: "Inter";
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

/* Chart card */
.chart-wrap {
  position: relative;
  height: 240px;
}

/* Team list */
.team-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.team-member {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter";
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.member-info {
  flex: 1;
}
.member-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.member-name {
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 99px;
  border: 1px solid;
  letter-spacing: 0.02em;
}
.pill-present {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-dim);
}
.pill-late {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-dim);
}
.pill-absent {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-dim);
}
.streak-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: #f97316;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 2px 8px;
  border-radius: 99px;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}
.bar-label {
  font-size: 0.72rem;
  color: var(--muted2);
  width: 66px;
  flex-shrink: 0;
}
.bar-track {
  flex: 1;
  height: 5px;
  background: var(--surface3);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-pct {
  font-size: 0.72rem;
  color: var(--muted2);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 99px;
}

/* ── FADE IN ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.stat-card,
.card {
  animation: fadeUp 0.4s ease both;
}
.stat-card:nth-child(1) {
  animation-delay: 0.05s;
}
.stat-card:nth-child(2) {
  animation-delay: 0.1s;
}
.stat-card:nth-child(3) {
  animation-delay: 0.15s;
}
.stat-card:nth-child(4) {
  animation-delay: 0.2s;
}
.bottom-row .card:nth-child(1) {
  animation-delay: 0.25s;
}
.bottom-row .card:nth-child(2) {
  animation-delay: 0.3s;
}
.s-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid;
}
.s-pill.present {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.3);
  background: var(--green-dim);
}
.s-pill.late {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.3);
  background: var(--amber-dim);
}
.s-pill.absent {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3);
  background: var(--red-dim);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* TOOLBAR */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.filter-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 36px 8px 14px;
  border-radius: 9px;
  font-size: 0.83rem;
  font-family: "Inter";
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235d6785' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.filter-select:hover {
  border-color: var(--border2);
}
.search-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  flex: 1;
  max-width: 280px;
  transition: border-color 0.2s;
}
.search-box:focus-within {
  border-color: var(--blue);
}
.search-box svg {
  color: var(--muted);
  flex-shrink: 0;
}
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.83rem;
  font-family: "Inter";
  padding: 8px 0;
  width: 100%;
}
.search-box input::placeholder {
  color: var(--muted);
}
.btn-add {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 0.83rem;
  font-weight: 600;
  font-family: "Inter";
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-add:hover {
  opacity: 0.85;
}

/* TABLE */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  padding: 13px 20px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
tbody tr:last-child {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--surface2);
}
td {
  padding: 14px 20px;
  font-size: 0.85rem;
}
td.name {
  font-weight: 600;
  color: var(--text);
}
td.mono {
  font-variant-numeric: tabular-nums;
  color: var(--muted2);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
}
.badge-present {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.35);
  background: var(--green-dim);
}
.badge-late {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.35);
  background: var(--amber-dim);
}
.badge-absent {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.35);
  background: var(--red-dim);
}
.badge-halfday {
  color: var(--blue);
  border-color: rgba(79, 142, 247, 0.35);
  background: var(--blue-dim);
}

.btn-edit {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted2);
  padding: 4px 13px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: "Inter";
  cursor: pointer;
  transition: all 0.18s;
}
.btn-edit:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 28px;
  width: 440px;
  max-width: 90vw;
  animation: fadeUp 0.25s ease;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal-title {
  font-family: "Inter";
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 20px;
}
.form-row {
  margin-bottom: 15px;
}
.form-label {
  display: block;
  font-size: 0.76rem;
  color: var(--muted2);
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.form-input,
.form-select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  padding: 9px 13px;
  font-size: 0.85rem;
  font-family: "Inter";
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus,
.form-select:focus {
  border-color: var(--blue);
}
.form-select {
  appearance: none;
  cursor: pointer;
}
.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  justify-content: flex-end;
}
.btn-cancel {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted2);
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 0.83rem;
  font-family: "Inter";
  cursor: pointer;
}
.btn-save {
  background: var(--blue);
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 0.83rem;
  font-weight: 600;
  font-family: "Inter";
  cursor: pointer;
}
.btn-save:hover {
  opacity: 0.85;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 99px;
}
