/* ==========================================================================
   Task Tracker — design system
   Indigo / violet brand with cyan accent, slate neutrals.
   ========================================================================== */
:root {
  --tt-primary: #4f46e5;
  --tt-primary-600: #4338ca;
  --tt-primary-50: #eef2ff;
  --tt-primary-100: #e0e7ff;
  --tt-violet: #7c3aed;
  --tt-accent: #06b6d4;
  --tt-gradient: linear-gradient(135deg, #6366f1 0%, #7c3aed 55%, #06b6d4 130%);

  --tt-bg: #f4f6fb;
  --tt-surface: #ffffff;
  --tt-border: #e6e9f2;
  --tt-border-strong: #d6dbe7;
  --tt-text: #0f172a;
  --tt-text-2: #475569;
  --tt-muted: #94a3b8;

  --tt-sidebar: #0f1324;
  --tt-sidebar-2: #171c33;
  --tt-sidebar-text: #a5adc8;

  --h-overdue: #ef4444;
  --h-today: #f59e0b;
  --h-open: #3b82f6;
  --h-closed: #10b981;
  --h-closed_late: #a855f7;
  --h-pending: #0ea5e9;

  --tt-radius: 14px;
  --tt-radius-sm: 10px;
  --tt-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --tt-shadow: 0 4px 6px -2px rgba(15, 23, 42, .05), 0 12px 24px -8px rgba(15, 23, 42, .10);
  --tt-shadow-lg: 0 24px 48px -12px rgba(30, 27, 75, .25);
  --tt-ease: cubic-bezier(.4, 0, .2, 1);
  --sidebar-w: 264px;
  --topbar-h: 68px;

  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-color: #0f172a;
  --bs-border-color: #e6e9f2;
  --bs-link-color: #4f46e5;
  --bs-link-hover-color: #4338ca;
}

* { -webkit-font-smoothing: antialiased; }
body { background: var(--tt-bg); color: var(--tt-text); font-size: .9rem; }
a { text-decoration: none; }
::selection { background: var(--tt-primary-100); }
.text-2 { color: var(--tt-text-2) !important; }
.text-muted { color: var(--tt-muted) !important; }
.fw-semibold { font-weight: 600 !important; }
.fs-7 { font-size: .8rem !important; }
.fs-8 { font-size: .72rem !important; }
.min-w-0 { min-width: 0; }

/* ---------------------------------------------------------------- Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd2e1; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- Sidebar */
.tt-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1040;
  background: radial-gradient(120% 60% at 0% 0%, #1e1b4b 0%, var(--tt-sidebar) 55%);
  color: var(--tt-sidebar-text); display: flex; flex-direction: column;
  transition: transform .3s var(--tt-ease);
}
.tt-brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.35rem; height: var(--topbar-h); color: #fff; }
.tt-brand img { width: 36px; height: 36px; filter: drop-shadow(0 6px 14px rgba(124, 58, 237, .45)); }
.tt-brand-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; line-height: 1.05; }
.tt-brand-sub { font-size: .66rem; color: #8b93b5; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.tt-nav { flex: 1; overflow-y: auto; padding: .5rem .85rem 1.5rem; }
.tt-nav::-webkit-scrollbar-thumb { background: #2a3150; }
.tt-nav-label { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #5d6587; padding: 1.1rem .75rem .45rem; }
.tt-nav a, .tt-nav button.tt-nav-toggle {
  display: flex; align-items: center; gap: .75rem; width: 100%; border: 0; background: none; text-align: left;
  padding: .58rem .75rem; margin-bottom: 2px; border-radius: 10px; color: var(--tt-sidebar-text);
  font-weight: 500; font-size: .86rem; transition: all .2s var(--tt-ease); position: relative;
}
.tt-nav a i, .tt-nav button i:first-child { font-size: 1.05rem; width: 20px; text-align: center; opacity: .9; }
.tt-nav a:hover, .tt-nav button.tt-nav-toggle:hover { color: #fff; background: rgba(255, 255, 255, .06); transform: translateX(2px); }
.tt-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(99, 102, 241, .32), rgba(124, 58, 237, .12)); box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .22); }
.tt-nav a.active::before { content: ''; position: absolute; left: -.85rem; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: #818cf8; }
.tt-nav .tt-sub { padding-left: 2.15rem; }
.tt-nav .tt-sub a { font-size: .82rem; padding: .45rem .75rem; }
.tt-nav .tt-chevron { margin-left: auto; font-size: .7rem !important; transition: transform .25s var(--tt-ease); }
.tt-nav button[aria-expanded="true"] .tt-chevron { transform: rotate(90deg); }
.tt-nav .badge { margin-left: auto; font-size: .66rem; }
.tt-sidebar-foot { padding: 1rem; border-top: 1px solid rgba(255, 255, 255, .06); }
.tt-upsell { background: linear-gradient(135deg, rgba(99, 102, 241, .25), rgba(6, 182, 212, .15)); border: 1px solid rgba(129, 140, 248, .25); border-radius: 12px; padding: .85rem; color: #dfe3ff; font-size: .78rem; }

/* ---------------------------------------------------------------- Main / Topbar */
.tt-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.tt-topbar {
  position: sticky; top: 0; z-index: 1030; height: var(--topbar-h);
  display: flex; align-items: center; gap: .75rem; padding: 0 1.75rem;
  background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--tt-border);
}
.tt-search { position: relative; flex: 1; max-width: 440px; }
.tt-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--tt-muted); }
.tt-search input { padding-left: 40px; height: 42px; border-radius: 12px; background: #f1f4f9; border: 1px solid transparent; }
.tt-search input:focus { background: #fff; border-color: var(--tt-primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); }
.tt-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: #fff; color: var(--tt-muted); border: 1px solid var(--tt-border); font-size: .68rem; box-shadow: none; }
.tt-icon-btn {
  width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--tt-border); background: #fff; color: var(--tt-text-2); position: relative;
  transition: all .2s var(--tt-ease); font-size: 1.1rem;
}
.tt-icon-btn:hover { color: var(--tt-primary); border-color: var(--tt-primary-100); background: var(--tt-primary-50); transform: translateY(-1px); }
.tt-dot { position: absolute; top: 7px; right: 7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--h-overdue); color: #fff; font-size: .62rem; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.tt-user-btn { display: flex; align-items: center; gap: .6rem; padding: 4px 10px 4px 4px; border-radius: 14px; border: 1px solid var(--tt-border); background: #fff; transition: all .2s var(--tt-ease); }
.tt-user-btn:hover { box-shadow: var(--tt-shadow-sm); border-color: var(--tt-border-strong); }
.tt-punch { border-radius: 12px; height: 42px; font-weight: 600; padding: 0 .95rem; display: inline-flex; align-items: center; gap: .45rem; }
.tt-punch.in { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.tt-punch.out { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.tt-punch.in:hover { background: #d1fae5; } .tt-punch.out:hover { background: #ffedd5; }
.tt-punch .pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, .5); } 70% { box-shadow: 0 0 0 8px rgba(234, 88, 12, 0); } 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); } }

.tt-content { padding: 1.75rem; flex: 1; animation: fadeUp .45s var(--tt-ease) both; }
.tt-footer { padding: 1rem 1.75rem; color: var(--tt-muted); font-size: .78rem; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Page header */
.tt-page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between; margin-bottom: 1.5rem; }
.tt-page-title { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.tt-page-sub { color: var(--tt-text-2); margin: .2rem 0 0; font-size: .87rem; }
.tt-crumb { font-size: .76rem; color: var(--tt-muted); margin-bottom: .25rem; }
.tt-crumb a { color: var(--tt-muted); } .tt-crumb a:hover { color: var(--tt-primary); }

/* ---------------------------------------------------------------- Cards */
.tt-card { background: var(--tt-surface); border: 1px solid var(--tt-border); border-radius: var(--tt-radius); box-shadow: var(--tt-shadow-sm); transition: box-shadow .25s var(--tt-ease), transform .25s var(--tt-ease), border-color .25s; }
.tt-card.hoverable:hover { box-shadow: var(--tt-shadow); transform: translateY(-2px); border-color: var(--tt-border-strong); }
.tt-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--tt-border); }
.tt-card-title { font-weight: 700; font-size: .98rem; margin: 0; display: flex; align-items: center; gap: .5rem; }
.tt-card-title i { color: var(--tt-primary); }
.tt-card-body { padding: 1.25rem; }

/* Stat cards */
.tt-stat { position: relative; overflow: hidden; padding: 1.1rem 1.15rem; display: block; color: inherit; height: 100%; }
.tt-stat:hover { color: inherit; }
.tt-stat .ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: .8rem; transition: transform .3s var(--tt-ease); }
.tt-stat:hover .ic { transform: scale(1.08) rotate(-4deg); }
.tt-stat .val { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.tt-stat .lbl { font-size: .78rem; color: var(--tt-text-2); font-weight: 600; margin-top: .35rem; }
.tt-stat .bar { height: 4px; border-radius: 4px; background: #eef1f7; margin-top: .85rem; overflow: hidden; }
.tt-stat .bar span { display: block; height: 100%; border-radius: 4px; transition: width 1s var(--tt-ease); }
.tt-stat::after { content: ''; position: absolute; right: -28px; top: -28px; width: 96px; height: 96px; border-radius: 50%; background: currentColor; opacity: .04; }
.tt-stat.active { box-shadow: 0 0 0 2px var(--tt-primary), var(--tt-shadow); }

.tone-primary { --tone: var(--tt-primary); } .tone-overdue { --tone: var(--h-overdue); } .tone-today { --tone: var(--h-today); }
.tone-open { --tone: var(--h-open); } .tone-closed { --tone: var(--h-closed); } .tone-closed_late { --tone: var(--h-closed_late); } .tone-pending { --tone: var(--h-pending); }
.tt-stat .ic { color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, white); }
.tt-stat .bar span { background: var(--tone); }

/* Hero / welcome */
.tt-hero { background: var(--tt-gradient); color: #fff; border: 0; position: relative; overflow: hidden; }
.tt-hero::before { content: ''; position: absolute; width: 340px; height: 340px; right: -90px; top: -150px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.tt-hero::after { content: ''; position: absolute; width: 220px; height: 220px; right: 140px; bottom: -150px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.tt-hero > * { position: relative; z-index: 1; }
.tt-hero .btn-light { color: var(--tt-primary-600); font-weight: 700; }
.tt-ring { width: 108px; height: 108px; position: relative; flex-shrink: 0; }
.tt-ring svg { transform: rotate(-90deg); }
.tt-ring .ring-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tt-ring circle { transition: stroke-dashoffset 1.2s var(--tt-ease); }

/* ---------------------------------------------------------------- Buttons */
.btn { border-radius: 10px; font-weight: 600; font-size: .86rem; padding: .5rem 1rem; transition: all .2s var(--tt-ease); }
.btn-sm { border-radius: 8px; font-size: .78rem; padding: .32rem .7rem; }
.btn-primary { background: var(--tt-primary); border-color: var(--tt-primary); box-shadow: 0 4px 12px -4px rgba(79, 70, 229, .55); }
.btn-primary:hover, .btn-primary:focus { background: var(--tt-primary-600); border-color: var(--tt-primary-600); transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(79, 70, 229, .6); }
.btn-gradient { background: var(--tt-gradient); color: #fff; border: 0; box-shadow: 0 6px 16px -6px rgba(124, 58, 237, .6); }
.btn-gradient:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 22px -8px rgba(124, 58, 237, .7); }
.btn-soft { background: var(--tt-primary-50); color: var(--tt-primary); border: 1px solid transparent; }
.btn-soft:hover { background: var(--tt-primary-100); color: var(--tt-primary-600); }
.btn-light { background: #fff; border: 1px solid var(--tt-border); color: var(--tt-text-2); }
.btn-light:hover { background: #f8fafc; border-color: var(--tt-border-strong); color: var(--tt-text); }
.btn-outline-primary { color: var(--tt-primary); border-color: var(--tt-primary-100); }
.btn-outline-primary:hover { background: var(--tt-primary); border-color: var(--tt-primary); }
.btn-success { background: #10b981; border-color: #10b981; } .btn-success:hover { background: #059669; border-color: #059669; transform: translateY(-1px); }
.btn-danger { background: #ef4444; border-color: #ef4444; } .btn-danger:hover { background: #dc2626; border-color: #dc2626; transform: translateY(-1px); }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid var(--tt-border); background: #fff; color: var(--tt-text-2); }
.btn-icon:hover { background: var(--tt-primary-50); color: var(--tt-primary); border-color: var(--tt-primary-100); transform: translateY(-1px); }
.btn-icon.success:hover { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.btn-icon.danger:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.btn:focus-visible, .btn-icon:focus-visible { box-shadow: 0 0 0 4px rgba(79, 70, 229, .18); }

/* ---------------------------------------------------------------- Forms */
.form-control, .form-select { border-radius: 10px; border-color: var(--tt-border-strong); font-size: .88rem; padding: .55rem .85rem; transition: border-color .2s, box-shadow .2s; }
.form-control:focus, .form-select:focus { border-color: var(--tt-primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); }
.form-label { font-weight: 600; font-size: .8rem; color: var(--tt-text-2); margin-bottom: .35rem; }
.form-label .req { color: var(--h-overdue); }
.form-check-input:checked { background-color: var(--tt-primary); border-color: var(--tt-primary); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); border-color: var(--tt-primary); }
.invalid-feedback { font-size: .76rem; }
.tt-seg { display: inline-flex; background: #f1f4f9; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tt-seg input { display: none; }
.tt-seg label { padding: .35rem .85rem; border-radius: 8px; font-size: .8rem; font-weight: 600; color: var(--tt-text-2); cursor: pointer; transition: all .2s var(--tt-ease); margin: 0; }
.tt-seg input:checked + label { background: #fff; color: var(--tt-primary); box-shadow: var(--tt-shadow-sm); }
.tt-seg label:hover { color: var(--tt-text); }
.tt-seg.priority input[value="high"]:checked + label { color: #dc2626; }
.tt-seg.priority input[value="medium"]:checked + label { color: #d97706; }
.tt-seg.priority input[value="low"]:checked + label { color: #059669; }
.tt-option-card { border: 1px solid var(--tt-border); border-radius: 12px; padding: .8rem .95rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; background: #fbfcfe; }
.tt-drop { border: 2px dashed var(--tt-border-strong); border-radius: 12px; padding: 1rem; text-align: center; color: var(--tt-text-2); cursor: pointer; transition: all .2s; position: relative; }
.tt-drop:hover, .tt-drop.drag { border-color: var(--tt-primary); background: var(--tt-primary-50); color: var(--tt-primary); }
.tt-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Tom Select */
.ts-wrapper .ts-control { border-radius: 10px !important; border-color: var(--tt-border-strong) !important; min-height: 41px; padding: .38rem .6rem !important; font-size: .88rem; box-shadow: none !important; }
.ts-wrapper.focus .ts-control { border-color: var(--tt-primary) !important; box-shadow: 0 0 0 4px rgba(79, 70, 229, .12) !important; }
.ts-wrapper.multi .ts-control > div { background: var(--tt-primary-50) !important; color: var(--tt-primary-600) !important; border-radius: 6px !important; border: 0 !important; font-weight: 600; font-size: .78rem; padding: 2px 8px !important; }
.ts-dropdown { border-radius: 10px !important; border-color: var(--tt-border) !important; box-shadow: var(--tt-shadow) !important; font-size: .86rem; overflow: hidden; z-index: 1065 !important; }
.ts-dropdown .active { background: var(--tt-primary-50) !important; color: var(--tt-primary-600) !important; }
.ts-wrapper.is-invalid .ts-control { border-color: var(--h-overdue) !important; }

/* ---------------------------------------------------------------- Badges, chips, avatars */
.tt-health { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; color: var(--hc); background: color-mix(in srgb, var(--hc) 11%, white); }
.tt-health::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.h-overdue { --hc: var(--h-overdue); } .h-today { --hc: #d97706; } .h-open { --hc: var(--h-open); } .h-closed { --hc: #059669; } .h-closed_late { --hc: var(--h-closed_late); } .h-pending { --hc: var(--h-pending); }
.tt-prio { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.tt-prio.high { color: #dc2626; } .tt-prio.medium { color: #d97706; } .tt-prio.low { color: #059669; }
.tt-bucket { display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 600; color: var(--tt-text-2); max-width: 100%; }
.tt-bucket .sw { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.tt-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem; border-radius: 6px; background: #f1f4f9; color: var(--tt-text-2); font-size: .72rem; font-weight: 600; }
.tt-avatar { width: 34px; height: 34px; border-radius: 10px; color: #fff; font-weight: 700; font-size: .78rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; letter-spacing: .02em; }
.tt-avatar.sm { width: 26px; height: 26px; font-size: .64rem; border-radius: 8px; }
.tt-avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; border-radius: 16px; }
.tt-avatar.xl { width: 84px; height: 84px; font-size: 1.6rem; border-radius: 22px; }
.tt-avatars { display: inline-flex; } .tt-avatars .tt-avatar { border: 2px solid #fff; margin-left: -8px; } .tt-avatars .tt-avatar:first-child { margin-left: 0; }
.badge-soft { background: var(--tt-primary-50); color: var(--tt-primary); font-weight: 700; }
.badge { font-weight: 700; border-radius: 6px; }

/* ---------------------------------------------------------------- Tables */
.tt-table { margin: 0; font-size: .86rem; }
.tt-table thead th { background: #f8fafd; color: var(--tt-text-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; border-bottom: 1px solid var(--tt-border); padding: .75rem 1rem; white-space: nowrap; }
.tt-table td { padding: .8rem 1rem; vertical-align: middle; border-color: #eef1f7; }
.tt-table tbody tr { transition: background .15s; }
.tt-table tbody tr:hover { background: #fafbff; }
.tt-table tbody tr:last-child td { border-bottom: 0; }
.tt-task-title { font-weight: 600; color: var(--tt-text); display: block; line-height: 1.35; }
.tt-task-title:hover { color: var(--tt-primary); }
.tt-row-closed .tt-task-title { color: var(--tt-muted); text-decoration: line-through; text-decoration-color: #cbd5e1; }
.tt-row-actions { display: flex; gap: .35rem; justify-content: flex-end; opacity: .75; transition: opacity .2s; }
tr:hover .tt-row-actions { opacity: 1; }

/* Member groups on dashboard */
.tt-group { overflow: hidden; }
.tt-group + .tt-group { margin-top: 1rem; }
.tt-group-head { display: flex; align-items: center; gap: .85rem; padding: .9rem 1.15rem; cursor: pointer; user-select: none; flex-wrap: wrap; }
.tt-group-head:hover { background: #fafbff; }
.tt-group-head .chev { transition: transform .25s var(--tt-ease); color: var(--tt-muted); }
.tt-group-head.collapsed .chev { transform: rotate(-90deg); }
.tt-mini-stats { display: flex; gap: .35rem; flex-wrap: wrap; }
.tt-mini-stats span { font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 6px; color: var(--hc); background: color-mix(in srgb, var(--hc) 10%, white); }
.tt-progress { height: 6px; border-radius: 6px; background: #eef1f7; overflow: hidden; }
.tt-progress > div { height: 100%; border-radius: 6px; background: var(--tt-gradient); transition: width 1s var(--tt-ease); }

/* Filters panel */
.tt-filter-group + .tt-filter-group { border-top: 1px solid var(--tt-border); margin-top: 1rem; padding-top: 1rem; }
.tt-filter-title { font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--tt-text-2); margin-bottom: .6rem; }
.tt-check { display: flex; align-items: center; gap: .55rem; padding: .32rem .45rem; border-radius: 8px; cursor: pointer; font-size: .84rem; margin: 0; transition: background .15s; }
.tt-check:hover { background: #f4f6fb; }
.tt-check .form-check-input { margin: 0; flex-shrink: 0; }
.tt-check .count { margin-left: auto; font-size: .72rem; color: var(--tt-muted); font-weight: 600; }
.tt-filter-scroll { max-height: 190px; overflow-y: auto; margin-right: -.4rem; padding-right: .4rem; }

/* ---------------------------------------------------------------- Dropdowns & modals */
.dropdown-menu { border: 1px solid var(--tt-border); border-radius: 12px; box-shadow: var(--tt-shadow-lg); padding: .4rem; font-size: .86rem; }
.dropdown-menu.show { animation: dropIn .18s var(--tt-ease); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; display: flex; align-items: center; gap: .6rem; color: var(--tt-text); font-weight: 500; transition: background .15s; }
.dropdown-item i { color: var(--tt-text-2); font-size: 1rem; width: 18px; text-align: center; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--tt-primary-50); color: var(--tt-primary-600); }
.dropdown-item:hover i { color: var(--tt-primary); }
.dropdown-item.text-danger:hover { background: #fef2f2; color: #dc2626 !important; }
.dropdown-header { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--tt-muted); }
.tt-notif-menu { width: 380px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.tt-notif-menu .head { padding: .9rem 1rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--tt-border); }
.tt-notif-list { max-height: 380px; overflow-y: auto; }
.tt-notif { display: flex; gap: .75rem; padding: .8rem 1rem; color: var(--tt-text); border-bottom: 1px solid #f1f4f9; transition: background .15s; }
.tt-notif:hover { background: #fafbff; color: var(--tt-text); }
.tt-notif.unread { background: linear-gradient(90deg, var(--tt-primary-50), #fff 70%); }
.tt-notif .ni { width: 36px; height: 36px; border-radius: 10px; background: var(--tt-primary-50); color: var(--tt-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tt-notif .nt { font-weight: 700; font-size: .82rem; } .tt-notif .nm { font-size: .8rem; color: var(--tt-text-2); line-height: 1.35; } .tt-notif .nd { font-size: .7rem; color: var(--tt-muted); margin-top: .15rem; }

.modal-content { border: 0; border-radius: 18px; box-shadow: var(--tt-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--tt-border); padding: 1.1rem 1.4rem; }
.modal-title { font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; gap: .6rem; }
.modal-title .mi { width: 34px; height: 34px; border-radius: 10px; background: var(--tt-primary-50); color: var(--tt-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.modal-body { padding: 1.3rem 1.4rem; }
.modal-footer { border-top: 1px solid var(--tt-border); padding: .9rem 1.4rem; }
.modal.fade .modal-dialog { transform: translateY(14px) scale(.98); transition: transform .28s var(--tt-ease); }
.modal.show .modal-dialog { transform: none; }
.modal-backdrop.show { opacity: .45; backdrop-filter: blur(2px); }
.offcanvas { border: 0 !important; box-shadow: var(--tt-shadow-lg); }

/* ---------------------------------------------------------------- Toasts */
.tt-toasts { position: fixed; top: 84px; right: 20px; z-index: 1090; display: flex; flex-direction: column; gap: .6rem; max-width: calc(100vw - 40px); }
.tt-toast { display: flex; align-items: flex-start; gap: .7rem; min-width: 300px; max-width: 420px; background: #fff; border-radius: 12px; padding: .85rem 1rem; box-shadow: var(--tt-shadow-lg); border: 1px solid var(--tt-border); border-left: 4px solid var(--tc); animation: toastIn .4s var(--tt-ease) both; font-size: .85rem; }
.tt-toast i.ti { color: var(--tc); font-size: 1.15rem; }
.tt-toast.hide { animation: toastOut .3s var(--tt-ease) forwards; }
.tt-toast.success { --tc: #10b981; } .tt-toast.error { --tc: #ef4444; } .tt-toast.info { --tc: var(--tt-primary); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------------------------------------------------------------- Timeline */
.tt-timeline { position: relative; padding-left: 1.6rem; }
.tt-timeline::before { content: ''; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: #eef1f7; }
.tt-tl-item { position: relative; padding-bottom: 1.15rem; }
.tt-tl-item:last-child { padding-bottom: 0; }
.tt-tl-dot { position: absolute; left: -1.6rem; top: 0; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid #eef1f7; font-size: .75rem; color: var(--tt-muted); }
.tt-tl-item.remark .tt-tl-dot { border-color: var(--tt-primary-100); color: var(--tt-primary); background: var(--tt-primary-50); }
.tt-bubble { background: #f6f8fc; border: 1px solid var(--tt-border); border-radius: 4px 12px 12px 12px; padding: .65rem .85rem; margin-top: .35rem; white-space: pre-wrap; word-break: break-word; }

/* Workflow steps */
.tt-steps { counter-reset: step; }
.tt-step { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px dashed var(--tt-border); align-items: flex-start; }
.tt-step:last-child { border-bottom: 0; }
.tt-step .num { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; flex-shrink: 0; background: #f1f4f9; color: var(--tt-text-2); border: 2px solid #e2e8f0; }
.tt-step.done .num { background: #10b981; color: #fff; border-color: #10b981; }
.tt-step.current .num { background: var(--tt-primary); color: #fff; border-color: var(--tt-primary); box-shadow: 0 0 0 5px rgba(79, 70, 229, .15); }
.tt-step.locked { opacity: .65; }

/* ---------------------------------------------------------------- Calendar */
.tt-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tt-cal .dow { padding: .6rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--tt-text-2); text-align: center; background: #f8fafd; border-bottom: 1px solid var(--tt-border); }
.tt-cal .day { min-height: 124px; padding: .45rem; border-right: 1px solid #eef1f7; border-bottom: 1px solid #eef1f7; position: relative; transition: background .15s; min-width: 0; }
.tt-cal .day:nth-child(7n) { border-right: 0; }
.tt-cal .day:hover { background: #fafbff; }
.tt-cal .day.muted { background: #fbfcfd; } .tt-cal .day.muted .dn { color: #c4cad8; }
.tt-cal .day.holiday { background: #fff8f1; }
.tt-cal .dn { font-weight: 700; font-size: .8rem; color: var(--tt-text-2); width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.tt-cal .day.today .dn { background: var(--tt-primary); color: #fff; }
.tt-ev { display: block; font-size: .7rem; font-weight: 600; padding: .18rem .4rem; border-radius: 6px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--hc); background: color-mix(in srgb, var(--hc) 11%, white); border-left: 3px solid var(--hc); transition: transform .15s; }
.tt-ev:hover { transform: translateX(2px); color: var(--hc); }
.tt-ev.meeting { --hc: #0891b2; } .tt-ev.leave { --hc: #64748b; } .tt-ev.hol { --hc: #ea580c; }

/* ---------------------------------------------------------------- Empty states, misc */
.tt-empty { text-align: center; padding: 2.75rem 1rem; color: var(--tt-text-2); }
.tt-empty .ei { width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--tt-primary); background: var(--tt-primary-50); }
.tt-empty h6 { font-weight: 700; color: var(--tt-text); }
.nav-tabs.tt-tabs { border: 0; gap: .25rem; }
.tt-tabs .nav-link { border: 0; border-radius: 10px; color: var(--tt-text-2); font-weight: 600; font-size: .85rem; padding: .5rem .95rem; transition: all .2s; }
.tt-tabs .nav-link:hover { background: #eef1f7; color: var(--tt-text); }
.tt-tabs .nav-link.active { background: var(--tt-primary); color: #fff; box-shadow: 0 4px 12px -4px rgba(79, 70, 229, .55); }
.tt-tabs .nav-link .badge { background: rgba(0, 0, 0, .08); color: inherit; }
.tt-kv dt { font-size: .72rem; color: var(--tt-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.tt-kv dd { font-weight: 600; margin-bottom: .9rem; }
.tt-item-row { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: 10px; transition: background .15s; }
.tt-item-row:hover { background: #f6f8fc; }
.tt-item-row.done span { text-decoration: line-through; color: var(--tt-muted); }
.tt-item-row .del { opacity: 0; transition: opacity .15s; } .tt-item-row:hover .del { opacity: 1; }
.pagination { gap: .3rem; margin: 0; }
.page-link { border-radius: 9px !important; border: 1px solid var(--tt-border); color: var(--tt-text-2); font-weight: 600; font-size: .8rem; min-width: 34px; text-align: center; }
.page-link:hover { background: var(--tt-primary-50); color: var(--tt-primary); }
.page-item.active .page-link { background: var(--tt-primary); border-color: var(--tt-primary); }
.chart-box { position: relative; height: 260px; }
.tt-legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.score-pill { font-weight: 800; padding: .25rem .6rem; border-radius: 8px; font-size: .8rem; }
.score-hi { background: #ecfdf5; color: #047857; } .score-mid { background: #fffbeb; color: #b45309; } .score-lo { background: #fef2f2; color: #b91c1c; } .score-na { background: #f1f5f9; color: #64748b; }
.rank-medal { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .78rem; background: #f1f4f9; color: var(--tt-text-2); }
.rank-1 { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #78350f; } .rank-2 { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #1f2937; } .rank-3 { background: linear-gradient(135deg, #fed7aa, #ea580c); color: #7c2d12; }
.fab { position: fixed; right: 24px; bottom: 24px; width: 58px; height: 58px; border-radius: 18px; z-index: 1020; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; }
.fab:hover { transform: translateY(-3px) rotate(90deg); }
.color-swatches { display: flex; gap: .45rem; flex-wrap: wrap; }
.color-swatches input { display: none; }
.color-swatches label { width: 30px; height: 30px; border-radius: 9px; cursor: pointer; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--tt-border); transition: transform .15s, box-shadow .15s; }
.color-swatches label:hover { transform: scale(1.1); }
.color-swatches input:checked + label { box-shadow: 0 0 0 2px var(--tt-text); }
.collapse-smooth { transition: height .3s var(--tt-ease); }

/* ---------------------------------------------------------------- Auth */
.tt-auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.tt-auth-art { background: radial-gradient(90% 70% at 10% 0%, #312e81 0%, #1e1b4b 45%, #0b1020 100%); color: #fff; padding: 3rem; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.tt-auth-art::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -200px; bottom: -200px; background: radial-gradient(circle, rgba(6, 182, 212, .35), transparent 65%); }
.tt-auth-art::after { content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%; left: -120px; top: 30%; background: radial-gradient(circle, rgba(124, 58, 237, .35), transparent 65%); }
.tt-auth-art > * { position: relative; z-index: 1; }
.tt-auth-form { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.tt-auth-card { width: 100%; max-width: 420px; }
.tt-glass { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 1rem 1.1rem; backdrop-filter: blur(10px); }
.tt-feature { display: flex; gap: .85rem; align-items: flex-start; }
.tt-feature .fi { width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #a5b4fc; }
.tt-float { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.input-icon { position: relative; } .input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--tt-muted); } .input-icon .form-control { padding-left: 2.6rem; height: 46px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--tt-muted); padding: .3rem .5rem; }

/* ---------------------------------------------------------------- Responsive */
.tt-overlay { display: none; }
@media (max-width: 1199.98px) {
  .tt-sidebar { transform: translateX(-100%); }
  body.sidebar-open .tt-sidebar { transform: none; box-shadow: var(--tt-shadow-lg); }
  body.sidebar-open .tt-overlay { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1035; animation: fadeIn .2s; }
  .tt-main { margin-left: 0; }
}
@keyframes fadeIn { from { opacity: 0; } }
@media (max-width: 991.98px) {
  .tt-auth { grid-template-columns: 1fr; } .tt-auth-art { display: none; }
}
@media (max-width: 767.98px) {
  .tt-topbar { padding: 0 .9rem; gap: .5rem; }
  .tt-content { padding: 1.1rem .9rem; }
  .tt-search { display: none; }
  .tt-page-title { font-size: 1.2rem; }
  .tt-cal .day { min-height: 84px; padding: .25rem; }
  .tt-ev { font-size: .6rem; padding: .1rem .25rem; }
  .tt-table td, .tt-table th { padding: .65rem .7rem; }
  .tt-toasts { left: 12px; right: 12px; top: 76px; } .tt-toast { min-width: 0; max-width: none; }
  .fab { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print { .tt-sidebar, .tt-topbar, .fab, .tt-toasts, .btn { display: none !important; } .tt-main { margin: 0; } }

/* List groups (sectors, settings shortcuts) */
.tt-card .list-group-item { border-color: var(--tt-border); transition: background .15s, color .15s, padding-left .2s var(--tt-ease); }
.tt-card .list-group-item-action:hover { background: #f6f8fc; padding-left: 1.15rem; }
.tt-card .list-group-item.active { background: var(--tt-primary); border-color: var(--tt-primary); color: #fff; }
.tt-card .list-group-item.active:hover { padding-left: 1rem; }

/* Keep footer text clear of the floating add-task button */
.tt-footer { padding-right: 5.5rem !important; }

/* Auth hero heading: exactly two lines, scaled to fit the panel */
.tt-auth-title { font-weight: 800; letter-spacing: -.035em; line-height: 1.12; margin-bottom: 1rem; font-size: clamp(1.6rem, 2.35vw, 2.35rem); }
.tt-auth-title span { display: block; white-space: nowrap; }
.tt-auth-accent { background: linear-gradient(90deg, #a5b4fc 0%, #c4b5fd 50%, #f0abfc 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
