/* TaskFlow - custom theme layered on top of Bootstrap 5. GitLab x Jira-inspired direction:
   blue-violet accent, neutral cool grays, Jira-style type colors, tighter radius. */

:root {
  --tf-bg: #F7F8FA;
  --tf-surface: #ffffff;
  --tf-border: #DFE1E6;
  --tf-border-soft: #EBECF0;
  --tf-text: #172B4D;
  --tf-text-muted: #8993A4;
  --tf-primary: #5843E4;
  --tf-primary-rgb: 88, 67, 228;
  --tf-primary-dark: #4735C7;
  --tf-primary-soft: #EEECFD;
  --tf-sidebar-bg: #FFFFFF;
  --tf-sidebar-border: #DFE1E6;
  --tf-sidebar-text: #42526E;
  --tf-sidebar-active-bg: #EEECFD;
  --tf-sidebar-active-text: #4735C7;
  --tf-radius: 0.75rem;

  /* Jira-style issue-type colors -- used by the type-icon squares (see Issue type utilities
     below) and reused by chips/labels where a type needs to be recognizable at a glance. */
  --type-bug: #DE350B;      --type-bug-soft: #FFEBE6;
  --type-task: #0C66E4;     --type-task-soft: #E9F2FF;
  --type-story: #36B37E;    --type-story-soft: #E3FCEF;
  --type-epic: #6E49CB;     --type-epic-soft: #F1EBFB;

  /* Dashboard stat-tile semantic colors: bg / icon */
  --tile-blue-bg: #dbeafe;    --tile-blue-icon: #2563eb;
  --tile-green-bg: #dcfce7;   --tile-green-icon: #16a34a;
  --tile-yellow-bg: #fef9c3;  --tile-yellow-icon: #ca8a04;
  --tile-violet-bg: #ede9fe;  --tile-violet-icon: #7c3aed;
  --tile-orange-bg: #ffedd5;  --tile-orange-icon: #ea580c;
  --tile-red-bg: #fee2e2;     --tile-red-icon: #dc2626;
  --tile-amber-bg: #fef3c7;   --tile-amber-icon: #d97706;
  --tile-sky-bg: #e0f2fe;     --tile-sky-icon: #0284c7;
  --tile-emerald-bg: #d1fae5; --tile-emerald-icon: #059669;
}

html, body {
  background: var(--tf-bg);
  color: var(--tf-text);
  font-family: 'Inter', -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.form-label { font-weight: 500; }

/* ---------- App shell ---------- */

.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--tf-sidebar-bg);
  color: var(--tf-sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--tf-sidebar-border);
  transition: width .15s ease;
  overflow: hidden;
}

.sidebar-header { display: flex; flex-direction: column; gap: .5rem; padding: .6rem 1rem 1rem; border-bottom: 1px solid var(--tf-sidebar-border); }
.sidebar-header-top { display: flex; align-items: center; justify-content: space-between; gap: .4rem; min-width: 0; }
.sidebar-logo { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-logo img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-title { font-weight: 700; color: var(--tf-sidebar-active-text); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sidebar-subtitle { font-size: .72rem; color: var(--tf-sidebar-text); }
.sidebar-header-titles { min-width: 0; max-width: 100%; text-align: center; }
.sidebar-header-actions { display: flex; gap: .4rem; flex-shrink: 0; }

/* Collapse / pin controls */
.sidebar-icon-btn { flex-shrink: 0; width: 28px; height: 28px; border-radius: .4rem; border: 1px solid var(--tf-sidebar-border); background: transparent; color: var(--tf-sidebar-text); display: flex; align-items: center; justify-content: center; padding: 0; font-size: .9rem; }
.sidebar-icon-btn:hover { background: rgba(var(--tf-primary-rgb),.08); color: var(--tf-sidebar-active-text); }
.sidebar-icon-btn.pinned { background: var(--tf-sidebar-active-bg); color: var(--tf-primary); border-color: transparent; }
.sidebar-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.sidebar-icon-btn:disabled:hover { background: transparent; color: var(--tf-sidebar-text); }

.sidebar-create-task { margin: 1rem 1rem .25rem; text-decoration: none; }
.sidebar-create-task:hover { text-decoration: none; }
.sidebar-create-task .btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: .4rem; white-space: nowrap; }

.sidebar-workspace-label { padding: .9rem 1.2rem .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tf-text-muted); white-space: nowrap; }

.sidebar-nav { flex: 1; padding: 0 .6rem .75rem; overflow-y: auto; overflow-x: hidden; }
/* Category labels now render as the first child of each group inside .sidebar-nav itself (see
   Site.Master's rptNav ItemTemplate) rather than as a single sibling above it -- .sidebar-nav's
   own .6rem padding already contributes half the original 1.2rem left offset, so the label's own
   horizontal padding is reduced here to land in the same spot as before. The first label also
   loses its top padding so it doesn't leave extra gap under "New Issue". */
.sidebar-nav .sidebar-workspace-label { padding-left: .6rem; padding-right: .6rem; }
.sidebar-nav .sidebar-workspace-label:first-child { padding-top: .2rem; }
.sidebar-nav .nav-link { display: flex; align-items: center; gap: .7rem; color: var(--tf-sidebar-text); padding: .55rem .75rem; border-radius: .5rem; font-size: .9rem; margin-bottom: .15rem; text-decoration: none; white-space: nowrap; }
.sidebar-nav .nav-link:hover { background: rgba(var(--tf-primary-rgb),.08); color: var(--tf-sidebar-active-text); }
.sidebar-nav .nav-link.active { background: var(--tf-sidebar-active-bg); color: var(--tf-sidebar-active-text); font-weight: 600; }
.sidebar-nav .nav-link i { font-size: 1rem; width: 1.1rem; text-align: center; flex-shrink: 0; }

.sidebar-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1.2rem; border-top: 1px solid var(--tf-sidebar-border); }
.sidebar-user-name { font-weight: 600; color: var(--tf-sidebar-active-text); font-size: .88rem; white-space: nowrap; }
.sidebar-user-role { font-size: .76rem; color: var(--tf-sidebar-text); white-space: nowrap; }
.sidebar-logout-btn { flex-shrink: 0; width: 34px; height: 34px; border-radius: .5rem; border: 1px solid var(--tf-sidebar-border); background: transparent; color: var(--tf-sidebar-text); display: flex; align-items: center; justify-content: center; }
.sidebar-logout-btn:hover { background: rgba(var(--tf-primary-rgb),.08); color: var(--tf-sidebar-active-text); }

/* Collapsed rail: icons only, text hidden -- desktop only, see toggleCollapse() in Site.Master
   (mobile's off-canvas open/close below is a separate, existing mechanism). */
.app-sidebar.collapsed { width: 64px; }
.app-sidebar.collapsed .sidebar-header { padding-left: .5rem; padding-right: .5rem; }
.app-sidebar.collapsed .sidebar-header-top { flex-direction: column; justify-content: center; }
.app-sidebar.collapsed .sidebar-header-actions { justify-content: center; }
.app-sidebar.collapsed .sidebar-pin-btn,
.app-sidebar.collapsed .sidebar-header-titles,
.app-sidebar.collapsed .sidebar-workspace-label,
.app-sidebar.collapsed .nav-link span,
.app-sidebar.collapsed .sidebar-create-task .btn span,
.app-sidebar.collapsed .sidebar-user { display: none; }
.app-sidebar.collapsed .sidebar-create-task { margin-left: .5rem; margin-right: .5rem; }
.app-sidebar.collapsed .nav-link { justify-content: center; padding-left: .5rem; padding-right: .5rem; }
.app-sidebar.collapsed .sidebar-footer { justify-content: center; padding-left: .5rem; padding-right: .5rem; }
.app-sidebar.collapsed .sidebar-collapse-btn i { transform: rotate(180deg); }

.app-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-header { display: flex; align-items: center; gap: .9rem; padding: .6rem 1.25rem; background: var(--tf-surface); border-bottom: 1px solid var(--tf-border); position: sticky; top: 0; z-index: 10; }
.app-header-spacer { flex: 1; }
.notif-count { position: absolute; top: -6px; right: -6px; font-size: .65rem; }

/* Topbar crumb/search/actions -- sits inside .app-header alongside the existing mobile
   sidebar-toggle button and spacer, purely additive so nothing about the header's existing
   markup/behavior changes. */
.topbar-crumb { display: flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; color: var(--tf-sidebar-text); white-space: nowrap; }
.topbar-crumb .topbar-crumb-current { color: var(--tf-text); }
.topbar-crumb .topbar-crumb-sep { color: var(--tf-text-muted); font-weight: 400; }
.topbar-search { display: flex; align-items: center; gap: .5rem; background: var(--tf-bg); border: 1px solid var(--tf-border); border-radius: .5rem; padding: .4rem .7rem; color: var(--tf-text-muted); font-size: .82rem; max-width: 320px; flex: 1; }
.topbar-search i { font-size: .85rem; flex-shrink: 0; }
.topbar-search input { border: none; background: none; outline: none; font-size: .82rem; color: var(--tf-text); flex: 1; min-width: 0; }
.topbar-search input::placeholder { color: var(--tf-text-muted); }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.topbar-icon-btn { position: relative; width: 34px; height: 34px; border-radius: .5rem; border: none; background: transparent; color: var(--tf-text-muted); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; }
.topbar-icon-btn:hover { background: var(--tf-bg); color: var(--tf-text); }

.topbar-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #e74c3c; color: #fff; font-size: .62rem; font-weight: 700; line-height: 16px; text-align: center; }
.notification-menu { width: 320px; max-height: 420px; overflow-y: auto; padding: 0; }
.notification-menu-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .9rem; font-size: .78rem; font-weight: 700; color: var(--tf-text-muted); text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--tf-border); }
.notification-menu-actions { display: flex; gap: .7rem; text-transform: none; letter-spacing: normal; font-weight: 600; }
.notification-menu-actions a { color: var(--tf-primary, #6366f1); text-decoration: none; font-size: .72rem; }
.notification-menu-actions a:hover { text-decoration: underline; }
.notification-empty { padding: 1rem .9rem; font-size: .85rem; color: var(--tf-text-muted); }
.notification-item { position: relative; white-space: normal; font-size: .85rem; padding: .55rem .9rem .55rem 1.6rem; border-bottom: 1px solid var(--tf-border); }
.notification-item:last-child { border-bottom: none; }
.notification-item-new::before { content: ''; position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 7px; height: 7px; border-radius: 50%; background: #e74c3c; }

/* Users.aspx's "All users" card search box -- same pill look as .topbar-search above (icon +
   soft background, no visible border until focused), but as a real server postback control
   (asp:TextBox + asp:Button) rather than the topbar's plain client-side <input>, so it also
   carries a small primary Search button on the right. */
.tf-search-box {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: var(--tf-bg);
    border: 1px solid #d0d0d0;
    border-radius: .5rem;
    padding: .15rem .15rem .15rem .75rem;
    max-width: 320px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.tf-search-box:focus-within { border-color: var(--tf-primary); box-shadow: 0 0 0 .2rem rgba(var(--tf-primary-rgb),.15); background: var(--tf-surface); }
.tf-search-box i { color: var(--tf-text-muted); font-size: .85rem; flex-shrink: 0; }
.tf-search-box .form-control { border: none !important; background: transparent !important; box-shadow: none !important; padding: .5rem .25rem; font-size: .85rem; }
.tf-search-box .btn { border-radius: .4rem; padding: .35rem .8rem; font-size: .78rem; flex-shrink: 0; }

/* Users.aspx grid row -- status badge + Edit/Access/Activate-Deactivate actions. Same soft-tint
   chip language as badge-status/.chip elsewhere, rather than Bootstrap's plain link text +
   boxy btn-outline-secondary default. Markup/CommandName/CommandArgument are unchanged -- this
   is styling only, gvUsers_RowCommand still matches the same three CommandNames. */
.badge-user-status { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: 999px; font-size: .68rem; font-weight: 600; }
.badge-user-status .status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-user-status-active { background: #d1fae5; color: #065f46; }
.badge-user-status-active .status-dot { background: #10b981; }
.badge-user-status-inactive { background: #f3f4f6; color: #6b7280; }
.badge-user-status-inactive .status-dot { background: #9ca3af; }

.user-row-actions { display: inline-flex; align-items: center; gap: .35rem; }
.user-row-action { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .65rem; border-radius: .5rem; font-size: .78rem; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.user-row-action i { font-size: .8rem; }
.user-row-action:hover { text-decoration: none; }
.user-row-action-edit { color: var(--tf-primary); }
.user-row-action-edit:hover { background: var(--tf-primary-soft); color: var(--tf-primary-dark); }
.user-row-action-access { color: var(--tf-text-muted); border-color: var(--tf-border); }
.user-row-action-access:hover { background: var(--tf-bg); color: var(--tf-text); border-color: var(--tf-text-muted); }
.user-row-action-danger { color: #b91c1c; }
.user-row-action-danger:hover { background: #fee2e2; color: #991b1b; }
.user-row-action-success { color: #15803d; }
.user-row-action-success:hover { background: #dcfce7; color: #166534; }

/* Jira-style issue-type icon square -- a small colored badge with a white glyph, used
   anywhere an issue's type needs to be recognizable at a glance without reading text.
   Pair with an existing bi-* icon: <span class="type-icon type-icon-bug"><i class="bi
   bi-bug-fill"></i></span>. Sizing is deliberately compact (20px) to sit inline with text. */
.type-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 5px; color: #fff; font-size: .68rem; flex-shrink: 0; vertical-align: -4px; }
.type-icon-bug { background: var(--type-bug); }
.type-icon-task { background: var(--type-task); }
.type-icon-story { background: var(--type-story); }
.type-icon-epic { background: var(--type-epic); }

/* GitLab-style label/status chip -- a small rounded pill for a status or label name, paired
   with a soft-tinted background and a matching darker text color for contrast. Use the
   type/status *-soft variable as background and the solid variable as color. */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 600; white-space: nowrap; }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.app-main { flex: 1; }
.main-container {  padding: 1.5rem 1.25rem 3rem; }

/* Horizontal icon/label tab strip -- reusable wherever a filter reads better as tabs than a
   dropdown (e.g. the Type filter on AllIssues.aspx). */
.top-tabs { display: flex; align-items: center; gap: 1.4rem; border-bottom: 1px solid var(--tf-border); overflow-x: auto; white-space: nowrap; }
.top-tab { display: flex; align-items: center; gap: .4rem; padding: .6rem .05rem; color: var(--tf-text-muted); text-decoration: none; font-size: .85rem; font-weight: 500; border: none; border-bottom: 2px solid transparent; background: transparent; flex-shrink: 0; }
.top-tab i { font-size: .95rem; }
.top-tab:hover { color: var(--tf-sidebar-active-text); text-decoration: none; }
.top-tab.active { color: var(--tf-primary); border-bottom-color: var(--tf-primary); font-weight: 600; }

@media (max-width: 991.98px) {
  .app-sidebar { position: fixed; left: -260px; z-index: 1050; transition: left .2s ease; }
  .app-sidebar.open { left: 0; }
}

/* ---------- Cards / surfaces ---------- */

.tf-card { background: var(--tf-surface); border: 1px solid var(--tf-border); border-radius: var(--tf-radius); padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06); margin-bottom: 1.25rem; }
.tf-card h5, .tf-card h6 { margin-bottom: 1rem; font-weight: 600; }

.form-control, .form-select, textarea.form-control { font-size: .875rem; border-radius: .5rem; }
textarea.form-control { min-height: 60px; }
.form-control:focus, .form-select:focus { border-color: var(--tf-primary); box-shadow: 0 0 0 .2rem rgba(var(--tf-primary-rgb),.15); }
.form-check-input:checked { background-color: var(--tf-primary); border-color: var(--tf-primary); }
.form-check-input:focus { border-color: var(--tf-primary); box-shadow: 0 0 0 .2rem rgba(var(--tf-primary-rgb),.15); }

.stat-tile { display: block; background: var(--tf-surface); border: 1px solid var(--tf-border); border-top: 3px solid var(--tf-border); border-radius: var(--tf-radius); padding: .6rem .65rem; text-decoration: none; color: inherit; cursor: pointer; transition: box-shadow .2s ease, transform .2s ease, border-color .15s ease; }
.stat-tile:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-2px); color: inherit; }
.stat-tile:focus-visible { outline: 2px solid var(--tf-primary); outline-offset: 2px; }
.stat-tile.active { border-color: var(--tf-primary); box-shadow: 0 0 0 2px rgba(var(--tf-primary-rgb),.25); }
.stat-tile .stat-tile-top { display: flex; align-items: flex-start; gap: .5rem; }
.stat-tile .stat-tile-text { flex: 1; min-width: 0; }
.stat-tile .stat-value { font-size: 1.15rem; font-weight: 700; line-height: 1; margin-top: .2rem; }
.stat-tile .stat-label { font-size: .72rem; font-weight: 600; line-height: 1.15; color: var(--tf-text); }
.stat-tile .stat-caption { font-size: .66rem; color: var(--tf-text-muted); margin-top: .2rem; }
.stat-tile .stat-tile-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .82rem; flex-shrink: 0; }

.dashboard-tile-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; max-width: 900px; }
/* Dashboard.aspx's "My team" table -- can run to one row per direct report, which for a
   manager with a lot of reports pushed the whole Dashboard page very long. Capped height +
   vertical scroll keeps it contained; sticky header keeps the column names visible while
   scrolling through it. */
.dashboard-team-table-wrap { max-height: 320px; overflow-y: auto; }
.dashboard-team-table-wrap thead th { position: sticky; top: 0; background: var(--tf-surface); z-index: 1; }
/* AllIssues.aspx's issues grid -- same idea as the team table above (capped height + vertical
   scroll + sticky header), paired with the GridView's own AllowPaging so a large result set is
   both paged (20/page) and, within a page, kept to a manageable height rather than growing the
   whole card. The GridView's built-in numeric pager row renders as an ordinary <tr> with plain
   <a> links (no CSS hooks of its own beyond the PagerStyle-CssClass on its wrapping cell), so
   it's styled here to look like a normal pagination control instead of a row of bare blue links.
   Sticky header uses HeaderStyle-CssClass rather than a "thead th" selector -- GridView doesn't
   reliably wrap its header row in an actual <thead> the way the Dashboard's hand-written table
   above does, so a thead-based selector silently matched nothing; HeaderStyle-CssClass instead
   puts this class directly on each header <th>/<td>, which always works regardless of table
   structure. */
.issues-table-wrap { max-height: 640px; overflow-y: auto; }
.issues-table-sticky-head { position: sticky; top: 0; z-index: 2; background: var(--tf-surface); }
.issues-pager { padding: 0; text-align: center; }
.issues-pager table {
  margin: .7rem auto 0; padding-top: .7rem; border-top: 1px solid var(--tf-border);
  border-collapse: separate; border-spacing: .3rem 0;
}
.issues-pager table td { padding: 0; color: var(--tf-text-muted); font-size: .82rem; }
.issues-pager a, .issues-pager span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.15rem; height: 2.15rem;
  padding: 0 .55rem; border-radius: .5rem; font-size: .82rem; font-weight: 500; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.issues-pager a { color: var(--tf-text-muted); border: 1px solid transparent; }
.issues-pager a:hover { background: var(--tf-bg); color: var(--tf-text); border-color: var(--tf-border); text-decoration: none; }
.issues-pager span { background: var(--tf-primary); color: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(var(--tf-primary-rgb),.35); }
/* The pager is just another <tr> in the same table as the data rows, so Bootstrap's
   .table-hover would otherwise highlight it like a data row on hover -- switch that off. */
.issues-table-wrap .table-hover > tbody > tr.issues-pager:hover > *,
.issues-table-wrap .table-hover tr.issues-pager:hover > * { background-color: transparent; }

/* Backlog.aspx's backlog list -- same capped-height/scroll idea as the two table wraps above
   (no sticky header here since the row list has no header row to pin), plus manual paging
   (Backlog.aspx.cs's PagerItem/BuildPagerItems) since asp:Repeater has no built-in pager like
   GridView does. Reuses .issues-pager's a/span sizing above -- .pager-row is just the
   non-<table> equivalent of that rule's <table> layout, and .pager-disabled/.pager-ellipsis
   override the plain-span ("current page") look for the two states that aren't the current
   page: a grayed-out Prev/Next at either end of the list, and the "..." gap-filler. */
.backlog-list-wrap { max-height: 600px; overflow-y: auto; padding-right: .25rem; }
.issues-pager .pager-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .3rem; padding-top: .7rem; border-top: 1px solid var(--tf-border); }
.issues-pager span.pager-disabled { background: transparent; color: var(--tf-text-muted); opacity: .4; box-shadow: none; cursor: default; }
.issues-pager span.pager-ellipsis { background: transparent; color: var(--tf-text-muted); box-shadow: none; cursor: default; font-weight: 400; }
@media (max-width: 767.98px) { .dashboard-tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) and (max-width: 991.98px) { .dashboard-tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* SprintReport.aspx's Sprint summary card -- reuses the same .stat-tile component as the
   Dashboard tiles above, just auto-fit to whatever width the card has (it sits in a col-lg-7,
   not the full page) instead of Dashboard's fixed breakpoints, and non-clickable since these are
   pure read-outs, not links. */
.sprint-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; }
.stat-tile.stat-tile-static { cursor: default; }
.stat-tile.stat-tile-static:hover { transform: none; box-shadow: none; }

.stat-tile.tile-blue { border-top-color: var(--tile-blue-icon); }
.stat-tile.tile-blue .stat-tile-icon { background: var(--tile-blue-bg); color: var(--tile-blue-icon); }
.stat-tile.tile-green { border-top-color: var(--tile-green-icon); }
.stat-tile.tile-green .stat-tile-icon { background: var(--tile-green-bg); color: var(--tile-green-icon); }
.stat-tile.tile-yellow { border-top-color: var(--tile-yellow-icon); }
.stat-tile.tile-yellow .stat-tile-icon { background: var(--tile-yellow-bg); color: var(--tile-yellow-icon); }
.stat-tile.tile-violet { border-top-color: var(--tile-violet-icon); }
.stat-tile.tile-violet .stat-tile-icon { background: var(--tile-violet-bg); color: var(--tile-violet-icon); }
.stat-tile.tile-orange { border-top-color: var(--tile-orange-icon); }
.stat-tile.tile-orange .stat-tile-icon { background: var(--tile-orange-bg); color: var(--tile-orange-icon); }
.stat-tile.tile-red { border-top-color: var(--tile-red-icon); }
.stat-tile.tile-red .stat-tile-icon { background: var(--tile-red-bg); color: var(--tile-red-icon); }
.stat-tile.tile-amber { border-top-color: var(--tile-amber-icon); }
.stat-tile.tile-amber .stat-tile-icon { background: var(--tile-amber-bg); color: var(--tile-amber-icon); }
.stat-tile.tile-sky { border-top-color: var(--tile-sky-icon); }
.stat-tile.tile-sky .stat-tile-icon { background: var(--tile-sky-bg); color: var(--tile-sky-icon); }
.stat-tile.tile-emerald { border-top-color: var(--tile-emerald-icon); }
.stat-tile.tile-emerald .stat-tile-icon { background: var(--tile-emerald-bg); color: var(--tile-emerald-icon); }

/* Allocations.aspx's 5 summary tiles -- deliberately its own component rather than reusing
   .dashboard-tile-grid/.stat-tile above: that grid caps at max-width:900px and uses compact
   padding/icon sizing built for Dashboard.aspx's narrower tile count, which read as small and
   cramped stretched full-width across this page's wider filter card. This one has no width cap
   (fills whatever container it's in) and bigger icon/number/padding to match. */
.resource-tile-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.resource-tile { display: flex; align-items: center; gap: .9rem; background: var(--tf-surface); border: 1px solid var(--tf-border); border-radius: var(--tf-radius); padding: 1.1rem 1.25rem; }
.resource-tile-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.resource-tile-label { font-size: .82rem; font-weight: 600; color: var(--tf-text); }
.resource-tile-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.resource-tile-caption { font-size: .75rem; color: var(--tf-text-muted); }
@media (max-width: 1199.98px) { .resource-tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .resource-tile-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); } }

/* Allocations.aspx's Employee Availability Summary pager -- a custom PagerTemplate (not the
   default NumericFirstLast pager) so the "Showing X to Y of Z entries" text and the compact
   page-number links can sit in one row, entries text on the left, buttons on the right. Built
   with explicit classes/padding throughout (not reusing .issues-pager's <table>-based layout)
   because Bootstrap 5's own `.table > :not(caption) > * > *` cell-padding rule has higher CSS
   specificity than a single custom class and was silently winning over an earlier attempt at
   trimming this pager's padding down -- this version avoids table cells entirely for the pager
   row so there's nothing for that rule to apply to. */
.allocation-pager-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: .5rem; margin-top: .25rem; border-top: 1px solid var(--tf-border); }
.allocation-pager-btn, .allocation-pager-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .3rem; border-radius: .35rem; font-size: .72rem; font-weight: 500; text-decoration: none; }
.allocation-pager-btn { color: var(--tf-text-muted); border: 1px solid transparent; }
.allocation-pager-btn:hover { background: var(--tf-bg); color: var(--tf-text); border-color: var(--tf-border); text-decoration: none; }
.allocation-pager-btn.active { background: var(--tf-primary); color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(var(--tf-primary-rgb),.3); }
.allocation-pager-btn.disabled { opacity: .35; }
.allocation-pager-ellipsis { color: var(--tf-text-muted); }

.admin-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 767.98px) { .admin-overview-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); } }

.admin-stat-tile { background: var(--tf-surface); border: 1px solid var(--tf-border); border-radius: var(--tf-radius); padding: 1.25rem; display: flex; align-items: center; gap: .85rem; }
.admin-stat-tile .stat-tile-icon { width: 40px; height: 40px; border-radius: .5rem; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; background: var(--tf-primary-soft); color: var(--tf-primary); flex-shrink: 0; }
.admin-stat-tile .stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.admin-stat-tile .stat-label { font-size: .85rem; color: var(--tf-text-muted); }

.nav-tile { display: flex; align-items: center; gap: .85rem; background: var(--tf-surface); border: 1px solid var(--tf-border); border-radius: var(--tf-radius); padding: 1.25rem; text-decoration: none; color: var(--tf-text); transition: box-shadow .15s ease, border-color .15s ease; }
.nav-tile:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); border-color: rgba(var(--tf-primary-rgb),.5); color: var(--tf-text); }
.nav-tile .nav-tile-icon { width: 40px; height: 40px; border-radius: .5rem; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; background: var(--tf-primary-soft); color: var(--tf-primary); flex-shrink: 0; }
.nav-tile .nav-tile-body { min-width: 0; }
.nav-tile .nav-tile-title { font-weight: 600; margin-bottom: .1rem; }
.nav-tile:hover .nav-tile-title { color: var(--tf-primary); }
.nav-tile .nav-tile-desc { font-size: .82rem; color: var(--tf-text-muted); }

.link-card { display: block; background: var(--tf-surface); border: 1px solid var(--tf-border); border-radius: var(--tf-radius); padding: 1rem 1.15rem; text-decoration: none; color: var(--tf-text); margin-bottom: .75rem; }
.link-card:hover { border-color: var(--tf-primary); color: var(--tf-text); }
.link-card .lc-title { font-weight: 600; }
.link-card .lc-meta { font-size: .8rem; color: var(--tf-text-muted); }
.link-card.link-card-overdue { border-color: rgba(220,38,38,.35); background: rgba(220,38,38,.05); }
.link-card.link-card-overdue-outline { border-color: rgba(220,38,38,.4); }

.dashboard-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: .15rem; }

.btn-ghost-back { display: inline-flex; align-items: center; gap: .25rem; background: none; border: none; padding: .25rem .5rem; margin-left: -.5rem; font-size: .75rem; font-weight: 500; color: var(--tf-text); text-decoration: none; border-radius: .375rem; }
.btn-ghost-back:hover { background: rgba(0,0,0,.05); color: var(--tf-text); text-decoration: none; }
.dashboard-subtitle { color: var(--tf-text-muted); }
.dashboard-subtitle-caps { text-transform: capitalize; }

.badge-outline { display: inline-flex; align-items: center; padding: .2rem .55rem; border: 1px solid var(--tf-border); border-radius: 999px; font-size: .72rem; color: var(--tf-text); }
.badge-neutral { padding: .25rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 600; background: #e5e7eb; color: #374151; }

.priority-pill-list { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.priority-pill-list input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.priority-pill-list label { display: inline-block; padding: .3rem .75rem; border: 1px solid var(--tf-border); border-radius: 999px; font-size: .78rem; cursor: pointer; }
.priority-pill-list input[type="checkbox"]:checked + label { background: var(--tf-primary); color: #fff; border-color: var(--tf-primary); }

.clear-filter-link { font-size: .72rem; color: var(--tf-text-muted); background: none; border: none; padding: 0; text-decoration: none; }
.clear-filter-link:hover { color: var(--tf-text); text-decoration: none; }

/* ---------- Badges ---------- */

.badge-status { display: inline-block; padding: .3rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.badge-status-yettostart { background: #e5e7eb; color: #374151; }
.badge-status-inprogress { background: #dbeafe; color: #1d4ed8; }
.badge-status-onhold { background: #fef3c7; color: #92400e; }
.badge-status-submittedforreview { background: #ede9fe; color: #6d28d9; }
.badge-status-closed { background: #d1fae5; color: #065f46; }
/* GitProject issue statuses (Open/InProgress/InReview/Closed) -- InProgress/Closed reuse the
   TaskMangementModule-style classes above; these two are new. */
.badge-status-open { background: #e5e7eb; color: #374151; }
.status-color-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); vertical-align: middle; }
.badge-status-inreview { background: #ede9fe; color: #6d28d9; }

.badge-priority { padding: .3rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.badge-priority-high { background: #fee2e2; color: #b91c1c; }
.badge-priority-medium { background: #fef3c7; color: #92400e; }
.badge-priority-low { background: #e0e7ff; color: #3730a3; }

.badge-flag { padding: .25rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 600; background: #fef2f2; color: #b91c1c; }
.badge-recurring { padding: .25rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 600; background: #ecfeff; color: #0e7490; }
.badge-self { padding: .25rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 600; background: #f5f3ff; color: #6d28d9; }

/* ---------- Rating stars ---------- */

.rating-stars .star { font-size: 1.3rem; color: #d1d5db; cursor: pointer; }
.rating-stars .star.filled { color: #f59e0b; }
.rating-stars.readonly .star { cursor: default; }

/* ---------- Misc ---------- */

.tf-table { font-size: .85rem; }
.tf-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; color: var(--tf-text-muted); border-bottom-width: 1px; }
.tf-table td { vertical-align: middle; }

.activity-item { border-left: 2px solid var(--tf-border); padding: .1rem 0 .85rem 1rem; margin-left: .25rem; position: relative; }
.activity-item::before { content: ""; position: absolute; left: -5px; top: .35rem; width: 8px; height: 8px; border-radius: 50%; background: var(--tf-primary); }
.activity-item .activity-action { font-weight: 600; font-size: .87rem; }
.activity-item .activity-meta { font-size: .76rem; color: var(--tf-text-muted); }

.hierarchy-tree ul { list-style: none; padding-left: 1.5rem; }
.hierarchy-tree > ul { padding-left: 0; }
.hierarchy-node { padding: .4rem .1rem; }

.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #EEECFD, #F7F8FA); padding: 1.5rem; }
.auth-card { background: var(--tf-surface); border: 1px solid var(--tf-border); border-radius: var(--tf-radius); box-shadow: 0 10px 30px rgba(0,0,0,.06); padding: 2rem; max-width: 440px; width: 100%; }
.auth-logo { width: 52px; height: 52px; margin-bottom: 1rem; }
.auth-logo img { width: 100%; height: 100%; object-fit: contain; }
.demo-account-btn { text-align: left; }

.btn-primary { background: var(--tf-primary); border-color: var(--tf-primary); }
.btn-primary:hover { background: var(--tf-primary-dark); border-color: var(--tf-primary-dark); }

.btn-icon-ghost { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0; border: none; background: transparent; border-radius: .4rem; color: var(--tf-text-muted); }
.btn-icon-ghost:hover { background: var(--tf-bg); color: var(--tf-text); }
.btn-icon-ghost.text-danger:hover { background: #fee2e2; color: #b91c1c; }

.modal-backdrop-custom { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1050; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-dialog-custom { background: var(--tf-surface); border-radius: var(--tf-radius); padding: 1.5rem; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal-dialog-fullpage { max-width: 96vw; width: 96vw; max-height: 94vh; }

.wizard-step-card { display: block; height: 100%; border: 1px solid var(--tf-border); border-radius: var(--tf-radius); padding: 1.5rem; text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.wizard-step-card:hover { border-color: var(--tf-primary); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.wizard-step-card.selected { border-color: var(--tf-primary); background: var(--tf-primary-soft); }
.wizard-step-icon { width: 40px; height: 40px; border-radius: .5rem; background: var(--tf-primary-soft); color: var(--tf-primary); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: .75rem; }

.wizard-bordered-box { border: 1px solid var(--tf-border); border-radius: var(--tf-radius); padding: 1rem; }

.assignee-picker { display: flex; flex-direction: column; gap: .6rem; }
.assignee-search-box { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--tf-border); border-radius: .5rem; padding: .5rem .75rem; color: var(--tf-text-muted); }
.assignee-search-box input { flex: 1; border: none; outline: none; font-size: .875rem; color: var(--tf-text); background: transparent; }
.assignee-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.assignee-chip-tag { display: inline-flex; align-items: center; background: var(--tf-sidebar-active-bg); color: var(--tf-sidebar-active-text); border-radius: 999px; padding: .3rem .5rem .3rem .75rem; font-size: .8rem; font-weight: 500; }
.assignee-chip-remove { border: none; background: none; color: inherit; opacity: .65; font-size: 1rem; line-height: 1; padding: 0 .3rem; cursor: pointer; }
.assignee-chip-remove:hover { opacity: 1; }
.assignee-avail-badge { cursor: default; }
.assignee-member-row { padding: .5rem 0; }
.assignee-member-row .assignee-member-fields { flex-wrap: wrap; }
.assignee-member-row .assignee-member-fields select,
.assignee-member-row .assignee-member-fields input { max-width: 108px; font-size: .78rem; }
.assignee-member-row .assignee-member-fields input[type="number"] { max-width: 64px; }
.assignee-availability-popover { display: none; position: absolute; z-index: 2000; min-width: 220px; max-width: 340px; background: var(--tf-surface); border: 1px solid var(--tf-border); border-radius: .5rem; padding: .6rem .75rem; box-shadow: 0 12px 30px rgba(0,0,0,.18); font-size: .8rem; }
.assignee-availability-popover .avail-pop-title { font-weight: 600; color: var(--tf-text); margin-bottom: .35rem; }
.assignee-availability-popover .avail-pop-table { width: 100%; border-collapse: collapse; }
.assignee-availability-popover .avail-pop-table td { padding: .2rem 0; color: var(--tf-text-muted); vertical-align: top; }
.assignee-availability-popover .avail-pop-table td:last-child { text-align: right; white-space: nowrap; padding-left: .5rem; color: var(--tf-text); font-weight: 500; }
.assignee-availability-popover .avail-pop-empty { color: var(--tf-text-muted); }
.assignee-list { border: 1px solid var(--tf-border); border-radius: .5rem; max-height: 260px; overflow-y: auto; }
.assignee-list.assignee-list-empty { border-style: dashed; }
.assignee-list.assignee-list-empty::before { content: "Start typing to search people..."; display: block; padding: .75rem; color: var(--tf-text-muted); font-size: .8rem; }
.assignee-list.assignee-list-no-results::before { content: "No matching people (or everyone matching is already picked)."; display: block; padding: .75rem; color: var(--tf-text-muted); font-size: .8rem; }
.assignee-row { display: flex; align-items: center; justify-content: space-between; padding: .6rem .9rem; cursor: pointer; border-bottom: 1px solid var(--tf-border); }
.assignee-row:last-child { border-bottom: none; }
.assignee-row:hover { background: var(--tf-bg); }
.assignee-row.selected { background: var(--tf-primary-soft); }
.assignee-row-name { font-weight: 600; font-size: .875rem; }
.assignee-row-subtitle { font-size: .78rem; color: var(--tf-text-muted); text-transform: capitalize; }
.assignee-row .bi-check-lg { color: var(--tf-primary); font-size: 1.1rem; }

.assignment-tabs { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem; background: var(--tf-bg); border-radius: .6rem; padding: .25rem; }
.assignment-tab { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .75rem; border-radius: .45rem; font-size: .85rem; font-weight: 500; color: var(--tf-text-muted); text-decoration: none; white-space: nowrap; }
.assignment-tab:hover { color: var(--tf-text); }
.assignment-tab.active { background: var(--tf-surface); color: var(--tf-text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.combo-box { position: relative; }
.combo-box .form-control { cursor: text; }
/* z-index matches .row-action-menu/.gf-menu below (1100) rather than a lower one-off value --
   this is the shared floating popup for every searchable dropdown site-wide, so it needs to
   reliably paint above ordinary page content on any page, not just the ones that happened not
   to expose a stacking issue (e.g. MonthlyKpi.aspx's header card, which sits directly above
   another card and would otherwise interleave with the open dropdown). */
.combo-menu { display: none; position: absolute; z-index: 1100; top: calc(100% + 4px); left: 0; right: 0; max-height: 220px; overflow-y: auto; background: var(--tf-surface); border: 1px solid var(--tf-border); border-radius: .5rem; box-shadow: 0 4px 12px rgba(0,0,0,.1); padding: .25rem; }
.combo-menu.open { display: block; }
.combo-option { padding: .4rem .6rem; border-radius: .35rem; font-size: .85rem; cursor: pointer; }
.combo-option:hover { background: var(--tf-bg); }
.combo-option.selected { background: var(--tf-primary-soft); color: var(--tf-sidebar-active-text); font-weight: 600; }
.combo-option.active { background: var(--tf-primary); color: #fff; }
.combo-empty { padding: .4rem .6rem; font-size: .8rem; color: var(--tf-text-muted); }

/* Scripts/combo-select.js's enhancement of a plain <select> into the searchable .combo-box
   above -- the native select stays in the DOM (still what actually drives the page) but is
   hidden once the fake text input is inserted in front of it. */
.combo-box .gp-combo-native { display: none; }
.combo-box .gp-combo-input { cursor: pointer; background: var(--tf-surface); }

.reminder-committed-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--tf-border); border-radius: .5rem; padding: .4rem .75rem; font-size: .875rem; margin-bottom: .4rem; }
.reminder-remove-btn { border: none; background: none; color: var(--tf-text-muted); padding: 0; line-height: 1; }
.reminder-remove-btn:hover { color: #b91c1c; }

.attachment-dropzone {
  display: flex; align-items: center; gap: .5rem; border: none; border-radius: .5rem; padding: 1rem .75rem;
  cursor: pointer; color: var(--tf-text-muted); font-size: .875rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3e%3crect width='100%25' height='100%25' fill='none' rx='8' ry='8' stroke='%23e5e7eb' stroke-width='2' stroke-dasharray='6%2c 6'/%3e%3c/svg%3e");
}
.attachment-dropzone:hover { background-color: var(--tf-bg); }
.attachment-file-list { list-style: none; padding: 0; margin: .5rem 0 0; }
.attachment-file-item { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--tf-border); border-radius: .5rem; padding: .4rem .75rem; font-size: .875rem; margin-bottom: .4rem; }
.attachment-file-item button { border: none; background: none; color: var(--tf-text-muted); padding: 0 0 0 .5rem; line-height: 1; }
.attachment-file-item button:hover { color: #b91c1c; }

/* Attachment pin: a small paperclip shown on Board.aspx cards / AllIssues.aspx rows when an
   issue has at least one attachment -- click toggles the popover doc list. See
   Scripts/attach-pin.js for the click-delegation logic. */
.attach-pin-wrap { position: relative; display: inline-flex; }
.attach-pin { cursor: pointer; color: var(--tf-text-muted); }
.attach-pin:hover { color: var(--tf-text); }
.attach-pin-popover {
  display: none; position: absolute; top: 100%; right: 0; z-index: 20; margin-top: .25rem;
  background: var(--tf-surface); border: 1px solid var(--tf-border); border-radius: .5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: .5rem; min-width: 200px; max-width: 280px;
}
.attach-pin-popover.show { display: block; }
.attach-pin-popover a {
  display: block; padding: .25rem 0; font-size: .8rem; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}

/* Backlog.aspx / Planning.aspx row "..." action menu (Jira-style two-level flyout: Assignee /
   Priority / Move work item / Parent, each opening its own list of choices) -- see
   Scripts/row-actions.js. Shared by both pages' rows (.backlog-row, .plan-issue-row). */
.backlog-row, .plan-issue-row { position: relative; }
.row-action-kebab { opacity: 0; border: none; background: transparent; width: 28px; height: 28px; border-radius: .4rem; color: var(--tf-text-muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.backlog-row:hover .row-action-kebab, .plan-issue-row:hover .row-action-kebab, .row-action-kebab:focus { opacity: 1; }
.row-action-kebab:hover { background: var(--tf-bg); color: var(--tf-text); }
.row-action-menu, .row-action-submenu {
  display: none; position: absolute; z-index: 1100; min-width: 190px; max-height: 280px; overflow-y: auto;
  background: var(--tf-surface); border: 1px solid var(--tf-border); border-radius: .5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: .3rem;
}
.row-action-menu.show, .row-action-submenu.show { display: block; }
.row-action-item, .row-action-option {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .6rem;
  border-radius: .35rem; font-size: .83rem; color: var(--tf-text); cursor: pointer; white-space: nowrap;
}
.row-action-item:hover, .row-action-option:hover { background: var(--tf-bg); }
.row-action-item i { color: var(--tf-text-muted); font-size: .8rem; }
.row-action-empty { padding: .45rem .6rem; font-size: .78rem; color: var(--tf-text-muted); white-space: normal; max-width: 220px; }

/* Board.aspx GitLab-style token filter bar (Assignee / Milestone, "is"/"is not one of", None,
   Any, searchable values) -- see Scripts/board-filter.js. */
.gf-wrap { position: relative; }
.gf-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; border: 1px solid var(--tf-border); border-radius: .5rem; padding: .4rem .6rem; background: var(--tf-surface); cursor: text; min-height: 2.375rem; }
.gf-bar-icon { color: var(--tf-text-muted); font-size: .85rem; flex-shrink: 0; }
.gf-chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--tf-primary-soft); color: var(--tf-sidebar-active-text); border-radius: .35rem; padding: .2rem .4rem; font-size: .78rem; font-weight: 500; white-space: nowrap; }
.gf-chip-remove { border: none; background: none; color: inherit; opacity: .6; padding: 0; line-height: 1; display: inline-flex; }
.gf-chip-remove:hover { opacity: 1; }
.gf-pending {
    display: inline-flex;
    align-items: center;
    background: #e7e6eb;
    color: #878b94;
    border: 1px dashed #a4a6a8;
    border-radius: .35rem;
    padding: .2rem .4rem;
    font-size: .78rem;
    font-weight: 500;
    white-space: nowrap;
}
.gf-input { border: none; outline: none; background: transparent; flex: 1; min-width: 140px; font-size: .85rem; color: var(--tf-text); }
.gf-input::placeholder { color: var(--tf-text-muted); }
.gf-menu { display: none; position: absolute; z-index: 1100; top: calc(100% + 4px); left: 0; min-width: 240px; max-width: 320px; max-height: 300px; overflow-y: auto; background: var(--tf-surface); border: 1px solid var(--tf-border); border-radius: .5rem; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: .3rem; }
.gf-menu.show { display: block; }
.gf-option { padding: .45rem .6rem; border-radius: .35rem; font-size: .83rem; color: var(--tf-text); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gf-option:hover, .gf-option.active { background: #5843e4; color:white;}
.gf-op-symbol { display: inline-block; width: 24px; font-weight: 600; color: var(--tf-text-muted); }
    .gf-op-symbol:hover{color:white; }
    .gf-empty {
        padding: .45rem .6rem;
        font-size: .78rem;
        color: var(--tf-text-muted);
        white-space: normal;
    }

.toggle-btn-list { display: flex; gap: .5rem; flex-wrap: wrap; }
.toggle-btn-list input[type="radio"],
.toggle-btn-list input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-btn-list label { display: inline-block; padding: .35rem .9rem; border: 1px solid var(--tf-border); border-radius: .4rem; font-size: .8rem; font-weight: 500; cursor: pointer; background: var(--tf-surface); color: var(--tf-text); transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.toggle-btn-list label:hover { border-color: var(--tf-primary); }
.toggle-btn-list input[type="radio"]:checked + label,
.toggle-btn-list input[type="checkbox"]:checked + label { background: var(--tf-primary); color: #fff; border-color: var(--tf-primary); }

.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.tf-toast { pointer-events: auto; min-width: 240px; max-width: 360px; background: var(--tf-surface); border: 1px solid var(--tf-border); border-left: 4px solid #16a34a; border-radius: .5rem; box-shadow: 0 4px 16px rgba(0,0,0,.12); padding: .75rem 1rem; font-size: .85rem; font-weight: 500; color: var(--tf-text); display: flex; align-items: center; gap: .55rem; animation: tf-toast-in .2s ease; }
.tf-toast.tf-toast-error { border-left-color: #dc2626; }
.tf-toast.tf-toast-warning { border-left-color: #d97706; }
.tf-toast i { font-size: 1rem; flex-shrink: 0; }
.tf-toast.tf-toast-success i { color: #16a34a; }
.tf-toast.tf-toast-error i { color: #dc2626; }
.tf-toast.tf-toast-warning i { color: #d97706; }
.tf-toast.tf-toast-fade-out { animation: tf-toast-out .2s ease forwards; }
@keyframes tf-toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes tf-toast-out { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(24px); } }

.text-overdue { color: #b91c1c; font-weight: 600; }

/* Matches the reference app's outline Button (bg-background/border-input/shadow-sm) exactly --
   same oklch tokens as its src/styles.css -- on TaskDetail's status-action row (e.g. "Put On
   Hold" / "Request Extension") instead of Bootstrap's default transparent .btn-outline-secondary. */
.btn-status-outline {
  background: oklch(0.99 0.005 240);
  border: 1px solid oklch(0.92 0.01 240);
  color: var(--tf-text);
  box-shadow: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-status-outline:hover {
  background: oklch(0.94 0.03 200);
  border-color: oklch(0.92 0.01 240);
  color: oklch(0.25 0.06 220);
}

/* Issue Board (Board.aspx) -- Kanban columns/cards, drag-and-drop driven by Scripts/board-dnd.js.
   .board-column is a flex column so its header (flex-shrink:0) stays pinned while only
   .board-column-cards scrolls once a column has more cards than fit -- previously the whole
   column just grew taller with no cap, pushing the rest of the page down as cards piled up.
   align-items: stretch (the default, stated explicitly here) makes every column match the
   tallest one in the row up to that cap, instead of each column only growing to fit its own
   card count -- a column with one card now fills the same height as a full one. */
.board-columns { display: flex; gap: 1rem; align-items: stretch; overflow-x: auto; padding-bottom: .5rem; }
.board-column { flex: 1 1 240px; min-width: min(240px, 100%); max-width: 280px; background: var(--tf-surface-muted, #f8fafc); border: 1px solid var(--tf-border); border-radius: .5rem; padding: .5rem; display: flex; flex-direction: column; max-height: calc(100vh - 280px); min-height: 200px; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease; }
.board-column.drag-over { border-color: var(--tf-primary); background: rgba(var(--tf-primary-rgb), .08); }
/* Column-header reordering (drag the whole column to reposition it) -- distinct classes from
   .drag-over above so a card-drop highlight and a column-reorder highlight never look identical
   or fight over the same class. See Scripts/board-dnd.js's onColumnDrop. draggable="true" lives
   on .board-column itself (the same spot .board-card carries its own), not just the header. */
.board-column.column-dragging { opacity: .5; }
.board-column.column-drag-over { border-color: var(--tf-primary); box-shadow: 0 0 0 2px rgba(var(--tf-primary-rgb),.25); }
.board-column[draggable="true"] { cursor: grab; }
.board-column[draggable="true"]:active { cursor: grabbing; }
.board-column-header { display: flex; align-items: center; gap: .4rem; padding: .25rem .35rem .6rem; flex-shrink: 0; }
.board-column-cards { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: .15rem; }
.board-column-name { font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--tf-sidebar-text); }
.board-column-header-right { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.board-column-count { font-size: .75rem; color: var(--tf-text-muted); }
.board-column-reorder { display: flex; align-items: center; }
.board-column-reorder a { color: var(--tf-text-muted); padding: 0 .1rem; font-size: .85rem; text-decoration: none; }
.board-column-reorder a:hover { color: var(--tf-primary); }
.board-card { background: var(--tf-surface); border: 1px solid var(--tf-border); border-left: 3px solid transparent; border-radius: .4rem; padding: .6rem .7rem; margin-bottom: .5rem; font-size: .85rem; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.board-card:active { cursor: grabbing; }
.board-card.dragging { opacity: .45; }
.board-card-priority-high { border-left-color: #dc2626; }
.board-card-priority-medium { border-left-color: #d97706; }
.board-card-priority-low { border-left-color: #16a34a; }
.board-card-title { font-weight: 600; color: var(--tf-text); text-decoration: none; display: block; margin-bottom: .45rem; }
.board-card-title:hover { text-decoration: underline; }
.board-card-meta { font-size: .75rem; color: var(--tf-text-muted); margin-top: .35rem; }
.board-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.board-card-info { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; font-size: .72rem; color: var(--tf-text-muted); }
.board-card-info-item { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
/* Milestone/sprint names (unlike the short #id/project/hours items) can be long -- e.g.
   "[DEMO-JUL] ERP Sprint Jul-2026" -- and the shared nowrap above forces that whole string onto
   one unbreakable line, which is wide enough to push the card past the column's width even
   though .board-card-info itself already wraps between items. Let just this one item wrap. */
.board-card-info-item-wrap { white-space: normal; word-break: break-word; }
.board-card-info-item i { font-size: .85rem; }
.assignee-stack { display: inline-flex; align-items: center; }
.assignee-stack .board-card-avatar { border: 2px solid var(--tf-surface, #fff); box-sizing: content-box; }
.assignee-stack .board-card-avatar + .board-card-avatar { margin-left: -8px; }
.assignee-stack-more { margin-left: 4px; font-size: .7rem; letter-spacing: -1px; color: var(--tf-text, #334155); font-weight: 700; cursor: default; }
.board-card-avatar { width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .68rem; font-weight: 600; text-transform: uppercase; }

/* IssueDetail.aspx activity log -- one compact line per entry instead of a tall two-column
   flex row, so a busy issue's history doesn't dominate the page. */
.activity-row { display: flex; gap: .5rem; align-items: baseline; font-size: .8rem; padding: .2rem 0; border-bottom: 1px solid var(--tf-border); }
.activity-row:last-child { border-bottom: none; }
.activity-row .text-muted { flex-shrink: 0; min-width: 120px; font-size: .75rem; }

/* Collapsible section header (Activity log) -- chevron rotates via Bootstrap's
   [aria-expanded] attribute toggling, no extra JS needed. */
.collapse-toggle { cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: space-between; }
.collapse-toggle .bi-chevron-down { transition: transform .15s ease; }
.collapse-toggle[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }

/* GitHub-style comment editor (IssueDetail.aspx) -- Write/Preview tabs + a markdown-insert
   toolbar over a plain textarea. See Scripts/md-editor.js. */
.md-editor { border: 1px solid var(--tf-border); border-radius: .5rem; overflow: hidden; }
.md-editor-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .4rem .5rem; background: var(--tf-surface-muted, #f8fafc); border-bottom: 1px solid var(--tf-border); }
.md-editor-tabs { display: flex; gap: .25rem; }
.md-tab { border: none; background: none; padding: .3rem .7rem; font-size: .8rem; font-weight: 500; color: var(--tf-text-muted); border-radius: .35rem; cursor: pointer; }
.md-tab:hover { background: rgba(0,0,0,.04); }
.md-tab.active { background: var(--tf-surface); color: var(--tf-text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.md-editor-actions { display: flex; align-items: center; gap: .1rem; flex-wrap: wrap; }
.md-btn { border: none; background: none; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: .35rem; color: var(--tf-text-muted); cursor: pointer; font-size: .9rem; }
.md-btn:hover { background: rgba(0,0,0,.06); color: var(--tf-text); }
.md-sep { width: 1px; height: 18px; background: var(--tf-border); margin: 0 .3rem; }
.md-editor-write, .md-editor-preview { background: var(--tf-surface); }
.md-textarea { border: none !important; border-radius: 0 !important; box-shadow: none !important; resize: vertical; font-family: inherit; }
.md-textarea:focus { box-shadow: none !important; }
.md-editor-preview { min-height: 100px; padding: .65rem .75rem; font-size: .9rem; }
