/* =====================================================================
   TimeTrack interface styles, layered on Bootstrap 5.3.
   Palette: spruce ink (navigation), tide teal (actions), timer amber
   (the one warm accent: a running clock and the active nav marker).
   ===================================================================== */

:root {
    --tt-ink:        #0f2a2b;
    --tt-ink-2:      #163a3b;
    --tt-ink-line:   rgba(255, 255, 255, .09);
    --tt-paper:      #f3f5f2;
    --tt-surface:    #ffffff;
    --tt-line:       #dde3df;
    --tt-text:       #17282a;
    --tt-muted:      #5b6d6c;
    --tt-tide:       #0b7a75;
    --tt-tide-dark:  #086660;
    --tt-amber:      #e8a317;
    --tt-sidebar-w:  264px;

    --bs-font-sans-serif: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-color: var(--tt-text);
    --bs-body-bg: var(--tt-paper);
    --bs-primary: var(--tt-tide);
    --bs-primary-rgb: 11, 122, 117;
    --bs-link-color: var(--tt-tide);
    --bs-link-color-rgb: 11, 122, 117;
    --bs-link-hover-color: var(--tt-tide-dark);
    --bs-link-hover-color-rgb: 8, 102, 96;
    --bs-border-color: var(--tt-line);
    --bs-secondary-color: var(--tt-muted);
    --bs-border-radius: .5rem;
    --bs-focus-ring-color: rgba(11, 122, 117, .28);
}

html { scroll-padding-top: 5rem; }

body {
    font-size: .95rem;
    line-height: 1.55;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { letter-spacing: -.01em; font-weight: 600; }

/* ---- buttons and form controls ------------------------------------ */
.btn-primary {
    --bs-btn-bg: var(--tt-tide);
    --bs-btn-border-color: var(--tt-tide);
    --bs-btn-hover-bg: var(--tt-tide-dark);
    --bs-btn-hover-border-color: var(--tt-tide-dark);
    --bs-btn-active-bg: #06524d;
    --bs-btn-active-border-color: #06524d;
    --bs-btn-disabled-bg: var(--tt-tide);
    --bs-btn-disabled-border-color: var(--tt-tide);
    --bs-btn-focus-shadow-rgb: 11, 122, 117;
    font-weight: 500;
}
.btn-outline-primary {
    --bs-btn-color: var(--tt-tide);
    --bs-btn-border-color: var(--tt-tide);
    --bs-btn-hover-bg: var(--tt-tide);
    --bs-btn-hover-border-color: var(--tt-tide);
    --bs-btn-active-bg: var(--tt-tide-dark);
    --bs-btn-active-border-color: var(--tt-tide-dark);
    --bs-btn-focus-shadow-rgb: 11, 122, 117;
}
.btn-outline-secondary {
    --bs-btn-color: var(--tt-muted);
    --bs-btn-border-color: var(--tt-line);
    --bs-btn-hover-bg: #eef2ef;
    --bs-btn-hover-color: var(--tt-text);
    --bs-btn-hover-border-color: #c9d2cd;
    --bs-btn-active-bg: #e4eae6;
    --bs-btn-active-color: var(--tt-text);
    --bs-btn-active-border-color: #c9d2cd;
}
.form-control, .form-select { border-color: #cdd6d1; }
.form-control:focus, .form-select:focus {
    border-color: var(--tt-tide);
    box-shadow: 0 0 0 .22rem rgba(11, 122, 117, .2);
}
.form-label { font-weight: 500; margin-bottom: .35rem; }
.form-text { color: var(--tt-muted); }
.form-control:disabled { background: #eef1ee; }

:focus-visible { outline: 2px solid var(--tt-tide); outline-offset: 2px; }

.skip-link {
    position: absolute; left: -9999px; top: .5rem; z-index: 2000;
    background: var(--tt-ink); color: #fff; padding: .5rem .9rem; border-radius: .4rem;
}
.skip-link:focus { left: .5rem; }

/* ---- app shell ----------------------------------------------------- */
.app-shell { min-height: 100vh; display: flex; }

.app-sidebar {
    width: var(--tt-sidebar-w);
    flex: 0 0 var(--tt-sidebar-w);
    background: var(--tt-ink);
    color: #fff;
    display: flex;
    flex-direction: column;
    --bs-offcanvas-width: var(--tt-sidebar-w);
    --bs-offcanvas-bg: var(--tt-ink);
    --bs-offcanvas-color: #fff;
}
/* Bootstrap's .offcanvas-lg makes the panel transparent, static and auto-sized from 992px up,
   so the desktop look is restated here with !important to win over it. */
@media (min-width: 992px) {
    .app-sidebar {
        position: sticky !important;
        top: 0;
        align-self: flex-start;
        flex: 0 0 var(--tt-sidebar-w) !important;
        width: var(--tt-sidebar-w) !important;
        height: 100vh !important;
        overflow-y: auto;
        background-color: var(--tt-ink) !important;
        color: #fff;
        visibility: visible !important;
        transform: none !important;
    }
}

.sidebar-brand {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.15rem 1.15rem 1rem;
}
.brand-link { display: inline-flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; }
.brand-link:hover { color: #fff; }
.brand-mark {
    width: 2.25rem; height: 2.25rem; border-radius: .6rem;
    display: inline-grid; place-items: center;
    background: var(--tt-tide); color: #fff; font-size: 1rem;
}
.brand-name { font-weight: 600; font-size: 1.1rem; letter-spacing: -.01em; }

.sidebar-nav { padding: .5rem .75rem; flex: 1 1 auto; }
.sidebar-link {
    position: relative;
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem .8rem; margin-bottom: .15rem;
    color: rgba(255, 255, 255, .72);
    background: transparent; border: 0; border-radius: .5rem;
    font: inherit; text-decoration: none; cursor: pointer;
}
.sidebar-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.sidebar-link.active { color: #fff; background: rgba(255, 255, 255, .1); }
.sidebar-link.active::before {
    content: ""; position: absolute; left: -.75rem; top: .35rem; bottom: .35rem;
    width: 3px; border-radius: 0 3px 3px 0; background: var(--tt-amber);
}
.sidebar-link i { color: rgba(255, 255, 255, .55); }
.sidebar-link.active i, .sidebar-link:hover i { color: #fff; }

.sidebar-foot { padding: .75rem; border-top: 1px solid var(--tt-ink-line); }
.sidebar-user { display: flex; align-items: center; gap: .7rem; padding: .85rem .8rem .35rem; }
.sidebar-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sidebar-user-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-role { font-size: .8rem; color: rgba(255, 255, 255, .6); }

.avatar {
    width: 2.25rem; height: 2.25rem; flex: 0 0 auto; border-radius: 50%;
    display: inline-grid; place-items: center;
    background: #cfe6e3; color: var(--tt-ink); font-weight: 600; font-size: .8rem;
}
.avatar-sm { width: 1.85rem; height: 1.85rem; font-size: .7rem; }

.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.app-topbar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; gap: .75rem;
    min-height: 3.75rem; padding: .5rem 1.25rem;
    background: rgba(243, 245, 242, .92);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--tt-line);
}
.topbar-title { margin: 0; font-size: 1.2rem; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: .35rem; }

.btn-icon {
    width: 2.4rem; height: 2.4rem; padding: 0;
    display: inline-grid; place-items: center;
    color: var(--tt-text); background: transparent; border: 0; border-radius: .5rem;
}
.btn-icon:hover { background: #e6ebe7; color: var(--tt-text); }
.btn-user {
    display: inline-flex; align-items: center; gap: .55rem;
    color: var(--tt-text); background: transparent; border: 0; padding: .3rem .55rem; border-radius: .5rem;
}
.btn-user:hover, .btn-user:focus, .btn-user.show { background: #e6ebe7; color: var(--tt-text); }
.badge-dot {
    position: absolute; top: .15rem; right: .1rem;
    min-width: 1.05rem; height: 1.05rem; padding: 0 .25rem;
    display: inline-grid; place-items: center;
    background: var(--tt-amber); color: #1d1500; border-radius: 999px;
    font-size: .65rem; font-weight: 600; line-height: 1;
}

.app-content { flex: 1 1 auto; padding: 1.5rem 1.25rem 2rem; width: 100%; max-width: 1280px; margin: 0 auto; }
.app-footer {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
    padding: 1rem 1.25rem; font-size: .85rem; color: var(--tt-muted);
    border-top: 1px solid var(--tt-line);
}
@media (min-width: 992px) {
    .app-content { padding: 1.75rem 2rem 2.5rem; }
    .app-topbar  { padding-left: 2rem; padding-right: 2rem; }
}

/* ---- live timers --------------------------------------------------- */
.live-now-dot { display:inline-block; width:.55rem; height:.55rem; border-radius:50%; background:#f59b18; margin-right:.45rem; vertical-align:.08em; animation:tt-live-pulse 1.6s ease-in-out infinite; }
@keyframes tt-live-pulse { 0%,100% { opacity:.45; transform:scale(.9); } 50% { opacity:1; transform:scale(1); } }
.live-timer-row .live-duration { font-variant-numeric:tabular-nums; font-weight:600; white-space:nowrap; }
.live-timer-row .live-state { font-size:.72rem; }
@media (prefers-reduced-motion: reduce) { .live-now-dot { animation:none; } }

/* ---- running timer strip ------------------------------------------- */
.timer-bar {
    position: sticky; top: 3.75rem; z-index: 1010;
    display: flex; align-items: center; gap: .75rem;
    margin: -1.5rem -1.25rem 1.25rem; padding: .6rem 1.25rem;
    background: var(--tt-amber); color: #1d1500;
}
.timer-bar.is-idle,
.timer-bar[hidden] { display: none !important; }
.timer-pulse { width: .6rem; height: .6rem; border-radius: 50%; background: #1d1500; animation: tt-pulse 1.6s ease-in-out infinite; flex: 0 0 auto; }
.timer-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-task { opacity: .75; margin-left: .5rem; }
.timer-clock { font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.timer-stop { flex: 0 0 auto; }
.timer-pip-open { flex: 0 0 auto; white-space: nowrap; }
@keyframes tt-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (min-width: 992px) { .timer-bar { margin: -1.75rem -2rem 1.5rem; padding-left: 2rem; padding-right: 2rem; } }

.timer-pip {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1080;
    width: 280px; max-width: calc(100vw - 2rem);
    background: var(--tt-surface); color: var(--tt-text);
    border: 1px solid var(--tt-line); border-radius: .85rem;
    box-shadow: 0 16px 40px rgba(23, 40, 42, .18);
    padding: .85rem 1rem 1rem;
}
.timer-pip[hidden] { display: none !important; }
.timer-pip-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.timer-pip-kicker { flex: 1 1 auto; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--tt-muted); }
.timer-pip-close {
    flex: 0 0 auto; border: 0; background: transparent; color: var(--tt-muted);
    width: 1.75rem; height: 1.75rem; border-radius: .4rem; line-height: 1;
}
.timer-pip-close:hover { background: var(--tt-paper); color: var(--tt-text); }
.timer-pip-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: .35rem; }
.timer-pip-label .timer-task { display: block; margin-left: 0; font-size: .85rem; }
.timer-pip-clock { font-weight: 650; font-size: 1.65rem; font-variant-numeric: tabular-nums; line-height: 1.2; margin-bottom: .75rem; }
.timer-pip-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.timer-pip-actions .btn { flex: 1 1 auto; }
.timer-pip.is-paused .timer-pulse { animation: none; opacity: .4; }
@media (prefers-reduced-motion: reduce) { .timer-pip .timer-pulse { animation: none; } }
html.timer-pip-window,
html.timer-pip-window body {
    margin: 0; padding: 0; overflow: hidden;
    background: var(--tt-surface); color: var(--tt-text);
    width: 100%; height: 100%;
}
html.timer-pip-window .timer-pip {
    position: static; width: auto; max-width: none; height: 100%;
    box-shadow: none; border: 0; border-radius: 0;
}
html.timer-pip-window .timer-pip-close { display: none; }

/* ---- panels, facts, lists ------------------------------------------ */
.panel { background: var(--tt-surface); border: 1px solid var(--tt-line); border-radius: .75rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--tt-line); }
.panel-title { margin: 0; font-size: 1.02rem; display: flex; align-items: center; gap: .6rem; }
.panel-body { padding: 1.25rem; }
.count-pill { font-size: .75rem; font-weight: 500; color: #7a5200; background: #fbecc4; border-radius: 999px; padding: .12rem .55rem; }

.facts { margin: 0; display: grid; gap: 1rem; }
.facts dt { font-size: .82rem; font-weight: 400; color: var(--tt-muted); }
.facts dd { margin: 0; font-weight: 500; }

.role-pill { display: inline-block; font-size: .8rem; font-weight: 500; padding: .18rem .65rem; border-radius: 999px; background: #e6ebe7; color: var(--tt-text); }
.role-admin    { background: #dbe9f7; color: #12426f; }
.role-manager  { background: #d8efe9; color: #0b5c55; }
.role-employee { background: #ece8f7; color: #3d2f80; }
.role-client   { background: #fbecc4; color: #6b4a00; }

.dash-hello { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.dash-greeting { font-size: 1.65rem; margin: 0; }
.dash-date { margin: .15rem 0 0; color: var(--tt-muted); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { display: flex; align-items: flex-start; gap: .85rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--tt-line); }
.feed-item:last-child { border-bottom: 0; }
.feed-item.is-unread { background: #f6fbfa; box-shadow: inset 3px 0 0 var(--tt-tide); }
.feed-icon { width: 2rem; height: 2rem; flex: 0 0 auto; border-radius: 50%; display: inline-grid; place-items: center; background: #e6ebe7; color: var(--tt-muted); font-size: .85rem; }
.feed-info    { background: #d8efe9; color: #0b5c55; }
.feed-success { background: #dcf1df; color: #1c6a2c; }
.feed-warning { background: #fbecc4; color: #7a5200; }
.feed-danger  { background: #f8dcdc; color: #962222; }
.feed-body { flex: 1 1 auto; min-width: 0; }
.feed-title { font-weight: 500; }
.feed-title a { color: inherit; text-decoration: none; }
.feed-title a:hover { color: var(--tt-tide); text-decoration: underline; }
.feed-text { color: var(--tt-muted); }
.feed-text strong { color: var(--tt-text); font-weight: 500; }
.feed-time { flex: 0 0 auto; font-size: .82rem; color: var(--tt-muted); white-space: nowrap; }
.feed-compact .feed-item { padding-top: .7rem; padding-bottom: .7rem; }

.tally { list-style: none; margin: 0; padding: .35rem 1.25rem; }
.tally li { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px dashed var(--tt-line); }
.tally li:last-child { border-bottom: 0; }

.empty-state { padding: 2.5rem 1.5rem; text-align: center; color: var(--tt-muted); }
.empty-state i { font-size: 1.6rem; margin-bottom: .75rem; color: #a9b6b1; }
.empty-state p { margin: 0 auto; max-width: 34ch; }

/* ---- password strength -------------------------------------------- */
.strength { display: none; align-items: center; gap: .6rem; margin-top: .45rem; font-size: .82rem; color: var(--tt-muted); }
.strength.is-active { display: flex; }
.strength-bar { flex: 0 0 6rem; height: .3rem; border-radius: 3px; background: #e1e7e3; position: relative; overflow: hidden; }
.strength-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--score, 0%); background: var(--clr, #c0392b); transition: width .15s; }

/* ---- alerts -------------------------------------------------------- */
.alert { border-radius: .6rem; }

/* ---- sign-in page -------------------------------------------------- */
.auth-body { background: var(--tt-surface); }
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 992px) { .login-page { grid-template-columns: minmax(380px, 5fr) 6fr; } }

.login-aside { display: none; background: var(--tt-ink); color: #fff; padding: 3rem; }
@media (min-width: 992px) { .login-aside { display: flex; } }
.login-aside-inner { display: flex; flex-direction: column; width: 100%; max-width: 30rem; margin: 0 auto; }
.login-claim { margin: 5rem 0 .75rem; font-size: 2.6rem; line-height: 1.08; font-weight: 600; letter-spacing: -.025em; max-width: 12ch; }
.login-sub { color: rgba(255, 255, 255, .72); max-width: 38ch; font-size: 1.02rem; }

.week-ruler {
    margin-top: auto; padding-top: 3rem;
    height: 17rem; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; align-items: end;
    background-image: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--tt-ink-line) calc(25% - 1px), var(--tt-ink-line) 25%);
    background-size: 100% calc(100% - 3rem); background-repeat: no-repeat; background-position: top;
}
.ruler-day { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: .6rem; }
.ruler-bar { display: block; height: var(--h); background: #2c5b5a; border-radius: .35rem .35rem 0 0; }
.ruler-day.is-live .ruler-bar { background: var(--tt-amber); }
.ruler-label { text-align: center; font-size: .8rem; color: rgba(255, 255, 255, .6); }

.login-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.login-card { width: 100%; max-width: 24rem; }
.login-mobile-brand { display: flex; align-items: center; gap: .65rem; margin-bottom: 2rem; }
.login-mobile-brand .brand-name { color: var(--tt-ink); }
.login-title { font-size: 1.8rem; margin: 0 0 .35rem; }
.login-lead { color: var(--tt-muted); margin-bottom: 1.5rem; }
.login-foot { margin: 1.5rem 0 0; font-size: .88rem; color: var(--tt-muted); }

@media (prefers-reduced-motion: reduce) {
    .timer-pulse { animation: none; }
    .strength-bar::after { transition: none; }
    * { scroll-behavior: auto !important; }
}

/* ---- Phase 2: clients and projects -------------------------------- */
.page-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.35rem; flex-wrap: wrap; }
.page-heading { margin: 0; font-size: 1.55rem; }
.page-lead { margin: .2rem 0 0; color: var(--tt-muted); }

.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.25rem; }
.filter-bar .filter-search { flex: 1 1 16rem; min-width: 12rem; }
.filter-bar .form-select { min-width: 10rem; }

.filter-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.filter-tab {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .4rem .85rem; border-radius: 999px;
    color: var(--tt-muted); text-decoration: none; background: #e8eeea; font-weight: 500;
}
.filter-tab:hover { color: var(--tt-text); background: #dce4e0; }
.filter-tab.is-active { color: #fff; background: var(--tt-tide); }
.filter-tab.is-active .count-pill { background: rgba(255,255,255,.2); color: #fff; }

.data-table { --bs-table-bg: transparent; }
.data-table thead th { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--tt-muted); border-bottom-color: var(--tt-line); }
.data-table td { vertical-align: middle; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pager { display: flex; gap: .35rem; flex-wrap: wrap; padding: 1rem 1.25rem; }

.status-badge, .priority-badge {
    display: inline-block; font-size: .75rem; font-weight: 500;
    padding: .15rem .55rem; border-radius: 999px; white-space: nowrap;
}
.status-planning  { background: #e6ebe7; color: #3a4a48; }
.status-active    { background: #d8efe9; color: #0b5c55; }
.status-hold      { background: #fbecc4; color: #7a5200; }
.status-completed { background: #dcf1df; color: #1c6a2c; }
.status-cancelled { background: #f8dcdc; color: #962222; }
.status-archived  { background: #ece8f7; color: #3d2f80; }
.status-inactive  { background: #f8dcdc; color: #962222; }

.priority-low    { background: #e6ebe7; color: #3a4a48; }
.priority-medium { background: #dbe9f7; color: #12426f; }
.priority-high   { background: #fbecc4; color: #7a5200; }
.priority-urgent { background: #f8dcdc; color: #962222; }

.progress { height: .45rem; background: #e6ebe7; border-radius: 999px; }
.progress-bar { background: var(--tt-tide); border-radius: 999px; }
.progress-block { margin: .85rem 0 .35rem; }
.progress-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--tt-muted); margin-bottom: .3rem; }

.project-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: 1rem; }
.project-card { background: var(--tt-surface); border: 1px solid var(--tt-line); border-radius: .75rem; padding: 1.1rem 1.15rem 1rem; display: flex; flex-direction: column; }
.project-card-top { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; }
.project-card-title { font-size: 1.05rem; margin: 0 0 .25rem; }
.project-card-title a { color: inherit; text-decoration: none; }
.project-card-title a:hover { color: var(--tt-tide); }
.project-card-meta { margin: 0; color: var(--tt-muted); font-size: .88rem; }
.project-card-foot { display: flex; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .75rem; font-size: .82rem; color: var(--tt-muted); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi-card { background: var(--tt-surface); border: 1px solid var(--tt-line); border-radius: .75rem; padding: 1.1rem 1.2rem; }
.kpi-label { margin: 0; font-size: .82rem; color: var(--tt-muted); }
.kpi-value { margin: .2rem 0 0; font-size: 1.55rem; font-weight: 600; letter-spacing: -.02em; }
.kpi-sub { margin: .35rem 0 0; font-size: .82rem; color: var(--tt-muted); }

.facts-inline { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 1rem; }
.member-list { list-style: none; margin: 0; padding: 0; }
.member-list li { display: flex; align-items: center; gap: .75rem; padding: .8rem 1.25rem; border-bottom: 1px solid var(--tt-line); }
.member-list li:last-child { border-bottom: 0; }
.member-copy { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.25; }

.member-picker { display: grid; gap: .5rem; }
.member-pick { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; padding: .55rem .7rem; border: 1px solid var(--tt-line); border-radius: .55rem; background: #f8faf8; }
.member-pick-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.member-pick .form-select { width: auto; min-width: 7.5rem; }

/* ---- Phase 4: planned schedule ------------------------------------ */
.cal-title { margin: 0; font-size: 1.05rem; flex: 1 1 auto; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .85rem; margin: 0 0 1rem; font-size: .82rem; color: var(--tt-muted); }
.cal-dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; margin-right: .3rem; vertical-align: middle; }
.cal-root { background: var(--tt-surface); border: 1px solid var(--tt-line); border-radius: .75rem; overflow: hidden; }

.cal-month { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { padding: .55rem .4rem; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--tt-muted); text-align: center; border-bottom: 1px solid var(--tt-line); }
.cal-cell {
    min-height: 6.4rem; padding: .35rem; text-align: left;
    background: transparent; border: 0; border-right: 1px solid var(--tt-line); border-bottom: 1px solid var(--tt-line);
    display: flex; flex-direction: column; gap: .2rem; cursor: pointer;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.is-muted { background: #f6f8f6; color: var(--tt-muted); }
.cal-cell.is-today { box-shadow: inset 0 3px 0 var(--tt-tide); }
.cal-cell-num { font-size: .82rem; font-weight: 500; }
.cal-chip { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: .72rem; border-radius: .3rem; padding: .08rem .35rem; }
.cal-more { font-size: .72rem; color: var(--tt-muted); }

.cal-week { display: grid; grid-template-columns: 3.5rem repeat(auto-fit, minmax(0, 1fr)); min-height: 36rem; }
.cal-gutter { border-right: 1px solid var(--tt-line); }
.cal-gutter > div:first-child { height: 2.4rem; border-bottom: 1px solid var(--tt-line); }
.cal-hour-label { height: 3rem; font-size: .7rem; color: var(--tt-muted); padding: 0 .3rem; }
.cal-day { border-right: 1px solid var(--tt-line); min-width: 0; display: flex; flex-direction: column; }
.cal-day:last-child { border-right: 0; }
.cal-day.is-today .cal-day-head { color: var(--tt-tide); }
.cal-day-head { height: 2.4rem; display: grid; place-items: center; font-weight: 500; border-bottom: 1px solid var(--tt-line); font-size: .88rem; }
.cal-day-body { position: relative; flex: 1 1 auto; height: 72rem; }
.cal-slot { height: 3rem; border-bottom: 1px dashed #e6ebe7; }
.cal-event {
    position: absolute; left: .2rem; right: .2rem; z-index: 2;
    border: 0; border-radius: .4rem; color: #fff; text-align: left;
    padding: .2rem .4rem; overflow: hidden; cursor: grab;
    display: flex; flex-direction: column; gap: .05rem;
}
.cal-event-time { font-size: .7rem; opacity: .9; }
.cal-event-title { font-size: .78rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-resize { position: absolute; left: 0; right: 0; bottom: 0; height: .45rem; cursor: ns-resize; }

.schedule-timeline { list-style: none; margin: 0; padding: 0; }
.schedule-timeline li { display: flex; align-items: center; gap: .85rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--tt-line); flex-wrap: wrap; }
.schedule-timeline li:last-child { border-bottom: 0; }
.timeline-time { flex: 0 0 7.5rem; color: var(--tt-muted); }
.timeline-body { flex: 1 1 12rem; min-width: 0; }
.timeline-hours { color: var(--tt-muted); }

.team-matrix th.is-today, .team-cell.is-today { background: #f6fbfa; }
.team-cell { vertical-align: top; min-width: 7.5rem; }
.team-chip { display: block; color: #fff; text-decoration: none; font-size: .75rem; border-radius: .35rem; padding: .25rem .4rem; margin: 0 0 .3rem; }
.team-chip:hover { color: #fff; opacity: .92; }
.conflict-list { margin: 0; padding-left: 1.1rem; }
.conflict-list li { margin-bottom: .35rem; }

@media (max-width: 767px) {
    .cal-week { min-height: 24rem; }
    .cal-day-body { height: 48rem; }
    .timeline-time { flex-basis: 100%; }
}

/* ---- Tasks (project page) ---- */
.project-tabs .nav-link { color: var(--tt-muted); font-weight: 500; }
.project-tabs .nav-link.active { color: var(--tt-ink, #1d2b29); font-weight: 600; }
.project-tabs .count-pill { margin-left: .25rem; }
.assignee-chip { display: inline-block; font-size: .78rem; padding: .12rem .55rem; margin: 0 .25rem .25rem 0; border-radius: 999px; background: #e3f1ee; color: #0b5c55; }
.assignee-chip.assignee-any { background: #eef1ef; color: var(--tt-muted); }
.task-done .task-name { text-decoration: line-through; color: var(--tt-muted); }
.task-assignee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .4rem .75rem; max-height: 11rem; overflow-y: auto; padding: .6rem .75rem; border: 1px solid var(--tt-line); border-radius: .5rem; }
.task-assignee-pick { display: flex; align-items: center; gap: .5rem; margin: 0; cursor: pointer; }

/* ---- Tasks tab: Clockify-style toolbar, table band and row actions ---- */
.task-panel { overflow: hidden; }
.task-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .9rem 1.25rem;
    border-bottom: 1px solid var(--tt-line);
}
.task-toolbar-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0; }
.task-filter-select { min-width: 11rem; }
.task-search-field { position: relative; }
.task-search-field .fa-magnifying-glass {
    position: absolute;
    left: .7rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .8rem;
    color: var(--tt-muted);
    pointer-events: none;
}
.task-search-field .form-control { padding-left: 2rem; min-width: 16rem; }
.task-add-form { display: flex; align-items: center; gap: .5rem; margin: 0; }
.task-add-form .form-control { min-width: 15rem; }
.task-add-btn { font-weight: 600; letter-spacing: .04em; padding-left: 1.1rem; padding-right: 1.1rem; }

.task-table-band {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .6rem 1.25rem;
    background: #eef3f1;
    border-bottom: 1px solid var(--tt-line);
}
.task-band-title { font-size: .84rem; font-weight: 400; letter-spacing: 0; color: #87939c; }
.task-band-reset { margin-left: auto; font-size: .8rem; }

.task-table thead th { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--tt-muted); border-bottom-color: var(--tt-line); }
.task-table td { vertical-align: middle; }
.task-table .task-col-name { width: 38%; }
.task-table .task-desc { max-width: 32rem; }
.task-table .task-col-estimate, .task-table .task-col-due, .task-table .task-col-status { white-space: nowrap; }

.task-row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: .4rem; }
.task-start-btn { display: inline-flex; align-items: center; gap: .35rem; }
.task-kebab { color: var(--tt-muted); }
.task-kebab:hover, .task-kebab:focus { color: var(--tt-ink, #1d2b29); background: rgba(0,0,0,.05); }
.task-table .dropdown-menu { font-size: .9rem; }

/* Clockify task-list proportions */
.task-panel { border-radius: 0; box-shadow: none; }
.task-toolbar { min-height: 76px; padding: 1rem 1.2rem; background: #fff; }
.task-toolbar-filters { flex: 0 1 auto; }
.task-filter-select .form-select { min-width: 8.6rem; height: 3rem; border-radius: .18rem; }
.task-search-field .form-control { min-width: 21rem; height: 3rem; border-radius: .18rem; }
.task-add-form { margin-left: auto; }
.task-add-form .form-control { min-width: 14.2rem; width: 14.2rem; height: 3rem; border-radius: .18rem; }
.task-add-btn { height: 3rem; min-width: 7.7rem; border-radius: .18rem; }
.task-table-band { min-height: 51px; padding: .75rem 1.2rem; background: #e7edf0; }
.task-table thead th { height: 48px; padding: .75rem 1.2rem; background: #fff; }
.task-table tbody td { height: 79px; padding: .8rem 1.2rem; border-color: #dfe5e8; }
.task-table .task-col-name { width: 40%; }
.task-table .task-col-assignees { width: 50%; }
.task-table .task-col-actions { width: 58px; }
.task-assignee-btn {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .38rem .7rem; border-radius: .18rem;
    background: #e2f3fb; color: #5f7a88; font-size: .86rem;
    white-space: nowrap;
}
.task-assignee-btn i { font-size: .72rem; color: #7d8a96; }
.task-actions-cell { border-left: 1px dotted #d8e0e4; }
.task-row-actions { min-width: 2rem; }
.task-kebab { width: 2rem; height: 2rem; padding: 0; border: 0; color: #9aa5ad; background: transparent; }
.task-kebab:hover, .task-kebab:focus { color: #52616a; background: #f2f5f6; }
.project-list-row { cursor: pointer; }
.project-list-row:hover td { background: #fafcfd; }

@media (max-width: 767px) {
    .task-toolbar { flex-direction: column; align-items: stretch; }
    .task-toolbar-filters, .task-add-form { width: 100%; }
    .task-search-field { flex: 1 1 auto; }
    .task-search-field .form-control, .task-add-form .form-control { min-width: 0; width: 100%; }
    .task-add-form { flex: 1 1 auto; }
}

/* ---- Phase 7: weekly timesheet matrix and approval ---------------- */
.timesheet-matrix th.is-today,
.timesheet-matrix td.is-today { background: #f6fbfa; }
.timesheet-matrix th.is-weekend,
.timesheet-matrix td.is-weekend { background: #f7f8f7; }
.timesheet-matrix td.has-time { font-weight: 500; }
.timesheet-matrix tfoot th { background: #eef3f1; font-weight: 600; }
.timesheet-matrix th, .timesheet-matrix td { min-width: 4.2rem; }
.timesheet-matrix th:first-child, .timesheet-matrix td:first-child { min-width: 10rem; }
.timesheet-reject-alert { border-left: 4px solid var(--tt-amber); }

/* ---- Phase 7: planned vs actual dashboards ------------------------ */
.variance-over { color: #962222; }
.variance-under { color: #0b5c55; }
.variance-even { color: var(--tt-muted); }

.health-badge {
    display: inline-block; font-size: .75rem; font-weight: 500;
    padding: .15rem .55rem; border-radius: 999px; white-space: nowrap;
}
.health-track { background: #dcf1df; color: #1c6a2c; }
.health-risk  { background: #fbecc4; color: #7a5200; }
.health-over  { background: #f8dcdc; color: #962222; }

.health-bar-track { background: var(--tt-tide); }
.health-bar-risk  { background: var(--tt-amber); }
.health-bar-over  { background: #962222; }

.progress-bar.is-over { background: #962222; }

.workload-list { list-style: none; margin: 0; padding: .35rem 1.25rem 1rem; }
.workload-list li { padding: .75rem 0; border-bottom: 1px dashed var(--tt-line); }
.workload-list li:last-child { border-bottom: 0; }
.workload-meta { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .35rem; }

.budget-gauge {
    width: 10rem; height: 5rem; margin: 0 auto;
    background: conic-gradient(from 180deg, var(--tt-tide) var(--gauge, 0deg), #e6ebe7 0);
    border-radius: 10rem 10rem 0 0;
    position: relative; overflow: hidden;
}
.budget-gauge::after {
    content: ""; position: absolute; left: 1.1rem; right: 1.1rem; bottom: 0; height: 3.9rem;
    background: var(--tt-surface); border-radius: 8rem 8rem 0 0;
}
.budget-gauge-value {
    position: absolute; left: 0; right: 0; bottom: .35rem; z-index: 1;
    font-weight: 600; font-size: 1.25rem;
}

.gantt-list { list-style: none; margin: 0; padding: .5rem 1.25rem 1rem; }
.gantt-list li { display: grid; grid-template-columns: 8.5rem 1fr; gap: .6rem; align-items: center; margin-bottom: .55rem; }
.gantt-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.gantt-track { position: relative; height: .7rem; background: #e6ebe7; border-radius: 999px; }
.gantt-bar { position: absolute; top: 0; bottom: 0; border-radius: 999px; min-width: .4rem; }
.gantt-planning { background: #7a8f8c; }
.gantt-active, .gantt-bar.gantt-active { background: var(--tt-tide); }
.gantt-done { background: #1c6a2c; }
.gantt-hold { background: var(--tt-amber); }

/* ================================================================
   Clockify-inspired workspace/dashboard layer.
   Keeps the existing responsive dimensions and Bootstrap foundation.
   ================================================================ */
:root {
    --tt-sidebar-w: 238px;
    --clock-blue: #03a9df;
    --clock-blue-dark: #078fc4;
    --clock-bg: #f6f8fa;
    --clock-card: #fff;
    --clock-border: #e3e8ed;
    --clock-muted: #7d8a96;
    --clock-text: #29313a;
    --clock-green: #62a338;
    --clock-teal: #069c98;
}
body { background: var(--clock-bg); color: var(--clock-text); }
.app-shell { background: var(--clock-bg); }
.app-sidebar { background: #fff; color: #4f5d69; border-right: 1px solid var(--clock-border); }
@media (min-width: 992px) { .app-sidebar { background: #fff !important; color: #4f5d69; } }
.sidebar-brand { padding: .8rem 1rem .65rem; border-bottom: 1px solid var(--clock-border); }
.brand-link, .brand-link:hover { color: var(--clock-text); }
.brand-mark { width: 2rem; height: 2rem; border-radius: .4rem; background: var(--clock-blue); }
.brand-name { font-size: 1rem; }
.workspace-switcher { margin: .7rem .8rem .45rem; padding: .35rem .4rem .35rem .65rem; border: 1px solid var(--clock-border); border-radius: .35rem; display:flex; align-items:center; gap:.55rem; font-size:.82rem; color:#52606d; }
.workspace-dot { width:.55rem; height:.55rem; border-radius:50%; background:var(--clock-blue); flex:0 0 auto; }
.workspace-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; flex:1 1 auto; }
.workspace-more { border:0; background:transparent; color:#7d8a96; width:30px; height:30px; border-radius:.3rem; display:inline-flex; align-items:center; justify-content:center; padding:0; flex:0 0 auto; }
.workspace-more:hover,.workspace-more:focus-visible { background:rgba(0,0,0,.05); color:#3d4d58; outline:0; }
.workspace-menu { min-width:190px; }
.workspace-menu .dropdown-item { padding:.55rem .75rem; font-size:.84rem; }
.sidebar-nav { padding: .35rem .65rem; }
.sidebar-heading { padding: .8rem .65rem .3rem; font-size:.65rem; letter-spacing:.08em; color:#a0aab3; font-weight:600; }
.sidebar-link { color:#52606d; border-radius:.28rem; padding:.57rem .7rem; margin-bottom:.1rem; gap:.65rem; font-size:.86rem; }
.sidebar-link:hover { color:#25313b; background:#f1f5f7; }
.sidebar-link.active { color:#26333d; background:#eaf1f5; font-weight:600; }
.sidebar-link.active::before { display:none; }
.sidebar-link i, .sidebar-link.active i, .sidebar-link:hover i { color:#7c8994; }
.sidebar-link.active i { color:var(--clock-blue-dark); }
.sidebar-badge { margin-left:auto; width:1rem; height:1rem; border-radius:50%; display:grid; place-items:center; background:#f59b18; color:#fff; font-size:.62rem; }
.sidebar-foot { background:#fff; border-top:1px solid var(--clock-border); }
.sidebar-user-role { color:#9aa5ae; }
.avatar { background:#dff4fb; color:#1386aa; }
.app-topbar { min-height:3.9rem; background:#fff; border-bottom:1px solid var(--clock-border); box-shadow:0 1px 3px rgba(35,50,60,.03); }
.topbar-workspace { display:flex; align-items:center; gap:.7rem; flex:1; min-width:0; font-size:.9rem; }
.topbar-workspace strong { color:#303b45; }
.topbar-workspace span { color:#a0a9b1; font-size:.78rem; }
.btn-icon:hover, .btn-user:hover, .btn-user:focus, .btn-user.show { background:#f2f5f7; }
.app-content { max-width: 1500px; padding-top:1.55rem; }
.clock-dash-head { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:1.15rem; }
.clock-dash-title { margin:0; font-size:1.55rem; font-weight:500; color:#36414b; }
.clock-dash-subtitle { margin:.2rem 0 0; color:#929da6; font-size:.82rem; }
.clock-dash-controls { display:flex; align-items:center; gap:.45rem; flex-wrap:wrap; }
.clock-filter { background:#fff; border:1px solid var(--clock-border); padding:.55rem .75rem; border-radius:.25rem; font-size:.8rem; color:#5f6b75; }
.clock-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; background:var(--clock-border); border:1px solid var(--clock-border); margin-bottom:1.15rem; }
.clock-summary-card { background:#eef3f7; padding:1rem 1.15rem; min-height:5.9rem; }
.clock-summary-label { display:block; color:#8b98a3; font-size:.73rem; margin-bottom:.15rem; }
.clock-summary-card strong { display:block; color:#394650; font-size:1.25rem; font-weight:500; line-height:1.3; }
.clock-summary-card small { display:block; color:#8996a0; font-size:.72rem; margin-top:.15rem; }
.clock-dashboard-card { background:var(--clock-card); border:1px solid var(--clock-border); box-shadow:0 1px 2px rgba(30,50,70,.03); margin-bottom:1.15rem; }
.clock-card-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.8rem 1rem; border-bottom:1px solid var(--clock-border); }
.clock-card-head h3 { margin:0; font-size:.92rem; font-weight:500; color:#56636d; }
.clock-card-head span { color:#a0aab2; font-size:.72rem; }
.clock-card-link { font-size:.76rem; color:#687681; text-decoration:none; white-space:nowrap; }
.clock-card-link:hover { color:var(--clock-blue-dark); }
.clock-chart-wrap { padding:.8rem 1rem .65rem; height:245px; }
.clock-chart-wrap canvas { width:100% !important; height:100% !important; }
.clock-dashboard-split { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:1.15rem; }
.clock-project-list, .clock-team-list, .clock-schedule-list { padding:.25rem 1rem .5rem; }
.clock-project-row { padding:.65rem 0; border-bottom:1px solid #edf0f2; }
.clock-project-row:last-child { border-bottom:0; }
.clock-project-meta { display:flex; justify-content:space-between; gap:1rem; align-items:center; }
.clock-project-meta a { display:block; color:#52616d; font-size:.8rem; text-decoration:none; }
.clock-project-meta a:hover { color:var(--clock-blue-dark); }
.clock-project-meta small { display:block; color:#a0aab2; font-size:.68rem; margin-top:.08rem; }
.clock-project-meta strong { font-size:.76rem; color:#687681; font-weight:500; white-space:nowrap; }
.clock-progress { height:7px; background:#edf2f5; margin-top:.35rem; overflow:hidden; border-radius:2px; }
.clock-progress span { display:block; height:100%; background:var(--clock-blue); }
.clock-team-row { display:flex; align-items:center; gap:.65rem; padding:.62rem 0; border-bottom:1px solid #edf0f2; }
.clock-team-row:last-child { border-bottom:0; }
.clock-avatar { width:2rem; height:2rem; flex:0 0 2rem; display:grid; place-items:center; border-radius:50%; background:#dff5f6; color:#178e8b; font-size:.7rem; font-weight:600; }
.clock-avatar-sm { width:1.55rem; height:1.55rem; display:inline-grid; vertical-align:middle; margin-right:.35rem; font-size:.6rem; }
.clock-team-info { flex:1; min-width:0; }
.clock-team-info strong { display:block; font-size:.79rem; color:#4c5963; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.clock-team-info span { display:block; font-size:.68rem; color:#a0aab2; }
.clock-team-total { font-size:.76rem; color:#66737d; font-weight:500; }
.clock-schedule-row { display:grid; grid-template-columns:105px minmax(0,1fr) auto auto; gap:.75rem; align-items:center; padding:.7rem 0; border-bottom:1px solid #edf0f2; }
.clock-schedule-row:last-child { border-bottom:0; }
.clock-schedule-time { color:#7c8994; font-size:.73rem; }
.clock-schedule-row strong { display:block; font-size:.79rem; font-weight:500; color:#4d5b66; }
.clock-schedule-row small { display:block; color:#9ba5ad; font-size:.68rem; }
.clock-activity-table { font-size:.78rem; }
.clock-activity-table thead th { background:#fbfcfd; color:#98a3ab; font-size:.67rem; font-weight:500; text-transform:uppercase; letter-spacing:.04em; padding:.65rem 1rem; border-bottom:1px solid var(--clock-border); }
.clock-activity-table tbody td { padding:.65rem 1rem; color:#596772; border-bottom:1px solid #edf0f2; vertical-align:middle; }
.clock-activity-table tbody tr:last-child td { border-bottom:0; }
.clock-status { display:inline-block; padding:.18rem .45rem; border-radius:3px; font-size:.66rem; background:#eef2f4; color:#73808a; }
.clock-status-approved { background:#e5f4e4; color:#4f8c42; }
.clock-status-submitted { background:#e9f3fb; color:#397da8; }
.clock-status-rejected { background:#fbe9e9; color:#ad5a5a; }
.clock-empty { padding:2rem 1rem; text-align:center; color:#9aa5ad; font-size:.8rem; }
@media (max-width: 1100px) { .clock-summary-grid { grid-template-columns:repeat(2,1fr); } .clock-dashboard-split { grid-template-columns:1fr; } }
@media (max-width: 700px) { .clock-dash-head { flex-direction:column; } .clock-summary-grid { grid-template-columns:1fr; } .clock-schedule-row { grid-template-columns:1fr; } .clock-chart-wrap { height:210px; } .topbar-workspace span { display:none; } }

/* ---- Weekly team dashboard (Clockify-style) ----------------------- */
.wk-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.75rem; margin-bottom:1.1rem; }
.wk-title { margin:0; font-size:1.6rem; font-weight:400; color:#2b3a42; }
.wk-controls { display:flex; align-items:center; flex-wrap:wrap; gap:.6rem; }
.wk-pill { display:inline-flex; align-items:center; gap:.4rem; padding:.38rem .8rem; border-radius:2rem; background:#fff4de; color:#8a5a00; font-size:.85rem; font-weight:500; text-decoration:none; border:1px solid #f3dca8; }
.wk-pill:hover { background:#ffecc2; color:#6e4700; }
.wk-select { background:#fff; border:1px solid var(--tt-line); border-radius:.35rem; padding:.42rem .8rem; font-size:.9rem; color:#2b3a42; min-width:5.2rem; text-align:left; }
.wk-select:hover, .wk-select.show { border-color:#b9c6c4; background:#fff; }
.wk-range { display:inline-flex; align-items:stretch; background:#fff; border:1px solid var(--tt-line); border-radius:.35rem; overflow:hidden; }
.wk-range-label { display:inline-flex; align-items:center; gap:.55rem; padding:.42rem 1rem; min-width:11rem; font-size:.9rem; color:#2b3a42; }
.wk-range-label i { color:#8c9aa0; }
.wk-range-btn { display:inline-flex; align-items:center; justify-content:center; width:2.4rem; border-left:1px solid var(--tt-line); color:#6b7a80; text-decoration:none; font-size:.75rem; }
.wk-range-btn:hover { background:#f1f5f6; color:var(--tt-tide); }

.wk-card { background:#fff; border:1px solid #e3e8ea; border-radius:.25rem; box-shadow:0 1px 2px rgba(15,42,43,.04); margin-bottom:1.4rem; overflow:hidden; }
.wk-summary { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:1.5rem; padding:1.15rem 1.4rem; background:#e9edef; border-bottom:1px solid #dfe5e7; }
.wk-summary > div { min-width:0; display:flex; flex-direction:column; gap:.1rem; }
.wk-summary-label { font-size:.82rem; color:#7a8a91; }
.wk-summary strong { font-size:1.75rem; font-weight:400; color:#2b3a42; line-height:1.25; }

.wk-chart-wrap { position:relative; height:21rem; min-height:0; overflow:hidden; }
.wk-chart-wrap canvas { position:absolute; top:1.4rem; left:1.4rem; right:1.4rem; bottom:.6rem; width:calc(100% - 2.8rem) !important; height:calc(100% - 2rem) !important; }

.wk-breakdown { display:grid; grid-template-columns:minmax(0, 20rem) minmax(0, 1fr); gap:2rem; align-items:center; padding:1.2rem 1.6rem 1.6rem; border-top:1px solid #edf0f1; }
.wk-donut-wrap { position:relative; width:19rem; max-width:100%; height:19rem; min-height:0; margin:0 auto; overflow:hidden; }
.wk-donut-wrap canvas { position:absolute; inset:0; width:100% !important; height:100% !important; }
.wk-donut-center { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:1.05rem; color:#2b3a42; pointer-events:none; }
.wk-empty { color:var(--tt-muted); padding:1.2rem; text-align:center; }

.wk-rank { list-style:none; margin:0; padding:0; }
.wk-rank li { display:grid; grid-template-columns:minmax(0, 1fr) 5.2rem minmax(6rem, 17rem) 3.6rem; align-items:center; gap:.9rem; padding:.42rem 0; font-size:.88rem; }
.wk-rank-name { text-align:right; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#2b3a42; }
.wk-rank-name a { color:#2b3a42; text-decoration:none; }
.wk-rank-name a:hover { color:var(--tt-tide); text-decoration:underline; }
.wk-rank-client { color:#8c9aa0; }
.wk-rank-time { font-variant-numeric:tabular-nums; color:#2b3a42; }
.wk-rank-bar { display:block; height:1.05rem; background:#eef1f2; border-radius:.15rem; overflow:hidden; }
.wk-rank-bar span { display:block; height:100%; min-width:2px; }
.wk-rank-pct { text-align:right; color:#8c9aa0; font-variant-numeric:tabular-nums; }

.wk-team-head { padding:.8rem 1.4rem; background:#e9edef; color:#7a8a91; font-size:.82rem; border-bottom:1px solid #dfe5e7; }
.wk-table { width:100%; border-collapse:collapse; }
.wk-table thead th { padding:.7rem 1.4rem; font-size:.72rem; font-weight:500; letter-spacing:.06em; text-transform:uppercase; color:#8c9aa0; text-align:left; border-bottom:1px solid #e3e8ea; white-space:nowrap; }
.wk-table tbody td { padding:.55rem 1.4rem; border-bottom:1px solid #eef1f2; vertical-align:middle; font-size:.88rem; }
.wk-table tbody tr:hover { background:#fafbfb; }
.wk-table tbody tr:last-child td { border-bottom:0; }
.wk-member { display:flex; align-items:center; gap:.8rem; min-width:15rem; }
.wk-avatar { flex:0 0 2.5rem; width:2.5rem; height:2.5rem; border-radius:.35rem; display:inline-grid; place-items:center; color:#fff; font-size:.82rem; font-weight:500; }
.wk-member-name { color:#2b3a42; }
.wk-activity { min-width:26rem; }
.wk-activity-grid { display:grid; grid-template-columns:minmax(0, 1fr) auto 6.5rem; align-items:center; gap:1rem; }
.wk-activity-text { min-width:0; }
.wk-activity-desc { color:#2b3a42; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wk-activity-proj { color:#6b7a80; font-size:.82rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wk-dot { display:inline-block; width:.42rem; height:.42rem; border-radius:50%; background:#8c9aa0; margin-right:.2rem; vertical-align:middle; }
.wk-activity-dur { color:#8c9aa0; font-variant-numeric:tabular-nums; white-space:nowrap; }
.wk-activity-ago { color:#8c9aa0; font-size:.82rem; white-space:nowrap; }
.wk-activity-ago.is-live { color:#1e88e5; }
.wk-live { display:inline-block; width:.5rem; height:.5rem; margin-left:.35rem; border-radius:50%; background:#e53935; box-shadow:0 0 0 3px rgba(229,57,53,.18); vertical-align:middle; }
.wk-total { font-variant-numeric:tabular-nums; color:#2b3a42; white-space:nowrap; width:8rem; }
.wk-minibar-cell { width:34%; min-width:12rem; }
.wk-minibar { display:flex; height:1.55rem; background:#eef1f2; border-radius:.15rem; overflow:hidden; }
.wk-minibar span { display:block; height:100%; }

.wk-notes-list { list-style:none; margin:0; padding:0; }
.wk-notes-list li { display:flex; justify-content:space-between; gap:1rem; padding:.6rem 1.4rem; border-bottom:1px solid #eef1f2; font-size:.88rem; }
.wk-notes-list li:last-child { border-bottom:0; }
.wk-notes-list li.is-unread { background:#f4fbfa; font-weight:500; }
.wk-notes-list time { color:#8c9aa0; font-size:.8rem; white-space:nowrap; }

@media (max-width: 991px) {
    .wk-breakdown { grid-template-columns:1fr; }
    .wk-rank li { grid-template-columns:minmax(0, 1fr) 4.6rem 3.4rem; }
    .wk-rank-bar { display:none; }
}
@media (max-width: 700px) {
    .wk-summary { grid-template-columns:1fr; gap:.6rem; }
    .wk-chart-wrap { height:16rem; }
    .wk-chart-wrap canvas { top:1rem; left:.6rem; right:.6rem; bottom:.4rem; width:calc(100% - 1.2rem) !important; height:calc(100% - 1.4rem) !important; }
    .wk-activity-grid { grid-template-columns:minmax(0, 1fr) auto; }
    .wk-activity-ago { display:none; }
}
/* =====================================================================
   Project page, Clockify layout (Tasks / Access / Status / Forecast / Note / Settings)
   Everything is scoped with the .cf- prefix.
   ===================================================================== */
.cf-page, .cf-head, .cf-tabs {
    --cf-blue: #03a9f4;
    --cf-blue-soft: #54c3f9;
    --cf-blue-pale: #def1fb;
    --cf-ink: #2c3e50;
    --cf-text: #3d4d58;
    --cf-muted: #8a96a0;
    --cf-line: #dfe5e9;
    --cf-band: #e4e9ee;
    --cf-tab: #e4e9ed;
    font-family: "Roboto", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    color: var(--cf-text);
}
.cf-page { max-width: 1760px; }

/* header */
.cf-head { margin: 0 0 1.4rem; }
.cf-breadcrumb { display: inline-block; color: var(--cf-blue); font-size: .95rem; text-decoration: none; margin-bottom: .55rem; }
.cf-breadcrumb:hover { text-decoration: underline; }
.cf-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.cf-title { margin: 0; font-size: 1.9rem; font-weight: 400; letter-spacing: 0; color: #4a5964; line-height: 1.2; }
.cf-subtitle { margin: .2rem 0 0; font-size: .95rem; color: #55636d; }
.cf-title-actions { display: flex; gap: .55rem; }
.cf-icon-btn {
    width: 50px; height: 50px; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--cf-line); border-radius: 2px; color: #8a96a0; cursor: pointer; font-size: 1.05rem;
}
.cf-icon-btn:hover { color: #55636d; background: #f8fafb; }
.cf-icon-btn.is-on { color: #f5a623; }

/* three hollow circles, stacked */
.cf-dots { display: inline-flex; flex-direction: column; gap: 3px; }
.cf-dots i { width: 6px; height: 6px; border: 1.3px solid #7d8a96; border-radius: 50%; display: block; }

.cf-menu { font-size: .95rem; border-radius: 3px; border-color: var(--cf-line); box-shadow: 0 6px 18px rgba(30, 50, 70, .12); padding: .35rem 0; }
.cf-menu .dropdown-item { padding: .5rem 1.1rem; color: var(--cf-text); }
.cf-menu .dropdown-item:hover, .cf-menu .dropdown-item:focus { background: #f1f6f9; color: var(--cf-ink); }
.cf-menu .dropdown-item.active { background: var(--cf-blue-pale); color: var(--cf-ink); }
.cf-menu form { margin: 0; }
.cf-menu .dropdown-item.text-danger { color: #e0483a !important; }

/* tabs */
.cf-tabs { display: flex; flex-wrap: nowrap; gap: .4rem; margin: 0; overflow-x: auto; scrollbar-width: thin; }
.cf-tab {
    flex: 0 0 auto; min-width: 125px; height: 53px; padding: 0 1.4rem; display: inline-flex; align-items: center; justify-content: center;
    background: var(--cf-tab); color: #5b6770; text-decoration: none; text-transform: uppercase;
    font-size: 1rem; font-weight: 400; letter-spacing: 0; border: 0; border-radius: 2px 2px 0 0;
}
.cf-tab:hover { background: #dbe2e7; color: #3d4d58; }
.cf-tab.is-active { background: #fff; color: #2c3e50; }

/* card */
.cf-card { background: #fff; border: 1px solid #e8edf0; border-top: 0; min-width: 0; }
.cf-tabs + .cf-card { border-radius: 0 0 2px 2px; }
.cf-pad { padding: 26px; }
.cf-h2 { margin: 0 0 .35rem; font-size: 1.25rem; font-weight: 500; letter-spacing: 0; color: #2c3e50; }
.cf-h2 label { margin: 0; font: inherit; }
.cf-hint { margin: 0 0 1rem; color: var(--cf-muted); font-size: 1.02rem; line-height: 1.45; }
.cf-hint.cf-warn { color: #b26a00; font-size: .9rem; }
.cf-muted { color: var(--cf-muted); }
.cf-label { display: block; margin: 0 0 .35rem; font-size: .9rem; color: #66747e; }
.cf-hr { border: 0; border-top: 1px solid var(--cf-line); margin: 1.5rem 0; opacity: 1; }
.cf-empty { padding: 2rem 1.5rem; text-align: center; color: var(--cf-muted); }

/* controls */
.cf-input, .cf-select {
    height: 50px; padding: 0 .9rem; background: #fff; color: #2c3e50; font: inherit; font-size: 1rem;
    border: 1px solid #d6dde2; border-radius: 2px; outline: 0; max-width: 100%;
}
.cf-input:focus, .cf-select:focus { border-color: var(--cf-blue); box-shadow: 0 0 0 2px rgba(3, 169, 244, .12); }
.cf-select {
    appearance: none; -webkit-appearance: none; padding-right: 2.2rem; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23596873'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .85rem center;
}
.cf-w-wide { width: 648px; } .cf-w-select { width: 318px; }
.cf-btn {
    height: 50px; min-width: 125px; padding: 0 1.3rem; display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 2px; font: inherit; font-size: 1rem; text-transform: uppercase; cursor: pointer; text-decoration: none;
}
.cf-btn-primary { background: var(--cf-blue-soft); color: #fff; }
.cf-btn-primary:hover { background: var(--cf-blue); color: #fff; }
.cf-btn-ghost { background: transparent; color: #5b6770; }
.cf-btn-ghost:hover { background: #f1f5f7; color: #2c3e50; }

.cf-check { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .35rem 0; cursor: pointer; color: var(--cf-text); }
.cf-check input { width: 17px; height: 17px; accent-color: var(--cf-blue); }

/* radios */
.cf-radios { display: flex; gap: 1.9rem; }
.cf-radio { display: inline-flex; align-items: center; gap: .6rem; margin: 0; cursor: pointer; font-size: 1.12rem; color: #2c3e50; }
.cf-radio input { position: absolute; opacity: 0; pointer-events: none; }
.cf-radio-dot { width: 20px; height: 20px; border: 1px solid #c3ccd3; border-radius: 50%; background: #fff; position: relative; flex: 0 0 auto; }
.cf-radio input:checked + .cf-radio-dot { border-color: var(--cf-blue); }
.cf-radio input:checked + .cf-radio-dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--cf-blue); }
.cf-radio input:focus-visible + .cf-radio-dot { box-shadow: 0 0 0 3px rgba(3, 169, 244, .25); }
.cf-radio input:disabled ~ span { opacity: .55; }

.cf-link-btn { display: inline-flex; align-items: center; gap: .6rem; background: none; border: 0; padding: 0; color: var(--cf-blue); font: inherit; font-size: 1.1rem; cursor: pointer; }
.cf-link-btn:hover { text-decoration: underline; }
.cf-plus { width: 28px; height: 28px; border: 1px solid var(--cf-blue); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }

/* tasks toolbar */
.cf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 26px; }
.cf-filters { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; margin: 0; }
.cf-select-filter { width: 140px; }
.cf-search { position: relative; }
.cf-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8a96a0; font-size: 1.05rem; pointer-events: none; }
.cf-search input { height: 50px; width: 348px; max-width: 100%; padding: 0 .9rem 0 3rem; border: 1px solid #d6dde2; border-radius: 2px; font: inherit; outline: 0; }
.cf-search input:focus { border-color: var(--cf-blue); }
.cf-search-block input { width: 100%; }
.cf-add { display: flex; align-items: center; gap: .75rem; margin: 0; }
.cf-add input { width: 232px; height: 50px; padding: 0 .9rem; border: 1px solid #d6dde2; border-radius: 2px; font: inherit; outline: 0; }
.cf-add input:focus { border-color: var(--cf-blue); }

/* grey band + tables */
.cf-band { display: flex; align-items: center; justify-content: space-between; min-height: 51px; padding: 0 26px; margin: 0 26px; background: var(--cf-band); color: #87939c; font-size: .9rem; border: 1px solid #dde3e8; border-bottom: 0; }
.cf-band-spaced { margin: 1.8rem 0 0; }
.cf-band-link { color: var(--cf-blue); text-decoration: none; }
.cf-band-select { background: none; border: 0; color: #5b6770; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.cf-table-wrap { margin: 0 26px 26px; overflow-x: auto; }
.cf-pad .cf-table-wrap { margin: 0; }
.cf-table { width: 100%; border-collapse: collapse; border: 1px solid #dde3e8; background: #fff; }
.cf-table th {
    height: 48px; padding: 0 26px; text-align: left; font-size: .82rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase;
    color: #8a96a0; background: #fff; border-bottom: 1px solid #dde3e8; white-space: nowrap;
}
.cf-table td { height: 79px; padding: 0 26px; border-bottom: 1px solid #dde3e8; vertical-align: middle; color: #2c3e50; font-size: 1.05rem; }
.cf-table tbody tr:last-child td { border-bottom: 0; }
.cf-table tbody tr:hover { box-shadow: 0 6px 16px rgba(40, 60, 80, .08); position: relative; }
.cf-table .is-done .cf-name-input, .cf-table .is-done .cf-name-text { color: #9aa5ad; text-decoration: line-through; }
.cf-sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.cf-sort i { font-size: .8rem; color: #7d8a96; }
.cf-col-name { width: 40%; }
.cf-col-actions { width: 58px; padding: 0 !important; border-left: 1px dotted #d3dbe0; text-align: center; }
.cf-tasks .cf-col-assignees { width: auto; }
.cf-access-table .cf-col-name { width: 52%; }
.cf-access-table .cf-col-role { border-left: 1px dotted #d3dbe0; }
.cf-access-table td.cf-col-role { padding-left: 26px; }
.cf-col-tracked { text-align: right; }
.cf-table td.cf-col-tracked, .cf-table th.cf-col-tracked { text-align: right; }

.cf-name-input {
    width: 100%; height: 50px; padding: 0 .9rem; border: 1px solid transparent; border-radius: 2px; background: transparent;
    font: inherit; color: #2c3e50; outline: 0; margin-left: -14px; max-width: calc(100% + 14px);
}
.cf-name-input:hover { border-color: #e1e7eb; background: #fff; }
.cf-name-input:focus { border-color: var(--cf-blue); background: #fff; }
.cf-name-input.is-saving { opacity: .6; } .cf-name-input.is-error { border-color: #e0483a; }
.cf-pill {
    display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .85rem; background: var(--cf-blue-pale); border: 0; border-radius: 2px;
    color: #5b6770; font: inherit; font-size: .9rem; cursor: pointer; max-width: 100%;
}
.cf-pill.is-static { cursor: default; }
.cf-pill-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.cf-pill i { font-size: .72rem; color: #7d8a96; }
.cf-assignee-menu { min-width: 240px; max-height: 300px; overflow-y: auto; padding: .5rem 1rem; border-radius: 3px; border-color: var(--cf-line); }
.cf-menu-hint { margin: .5rem 0 0; font-size: .8rem; color: var(--cf-muted); }
.cf-kebab { width: 58px; height: 78px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; cursor: pointer; }
.cf-kebab:hover .cf-dots i { border-color: #3d4d58; }

/* status tab */
.cf-status-top { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 20px; padding: 20px; background: #fff; border: 1px solid #e8edf0; border-top: 0; }
.cf-stat-col { display: flex; flex-direction: column; gap: 14px; }
.cf-stat { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 20px; border: 1px solid #e4e9ed; background: #fff; }
.cf-stat-label { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: #8a96a0; }
.cf-stat-value { font-size: 1.15rem; font-weight: 500; color: #2c3e50; }
.cf-donut-card { border: 1px solid #e4e9ed; padding: 40px 20px 22px; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.cf-donut { position: relative; width: 286px; max-width: 100%; }
.cf-donut svg { display: block; width: 100%; height: auto; }
.cf-donut-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; color: #2c3e50; }
.cf-legend { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; font-size: .85rem; color: #66747e; }
.cf-legend li { display: inline-flex; align-items: center; gap: .45rem; }
.cf-legend i { width: 12px; height: 12px; display: inline-block; }
.cf-status-list { margin-top: 0; padding: 26px 20px 20px; border-top: 1px solid #e8edf0; }
.cf-status-list .cf-band { margin: 0; }
.cf-status-list .cf-table-wrap { margin: 0; }
.cf-status-table td { height: 45px; font-size: .95rem; }
.cf-status-table th { height: 42px; }
.cf-status-table .cf-col-name { width: 40%; }

/* forecast tab */
.cf-forecast { padding: 26px; }
.cf-forecast-bar { display: flex; justify-content: flex-end; align-items: center; gap: 14px; flex-wrap: wrap; }
.cf-seg { display: inline-flex; border: 1px solid #d6dde2; border-radius: 2px; overflow: hidden; }
.cf-seg-item { height: 48px; min-width: 100px; padding: 0 1.4rem; display: inline-flex; align-items: center; justify-content: center; color: #2c3e50; text-decoration: none; background: #fff; font-size: 1.05rem; }
.cf-seg-item + .cf-seg-item { border-left: 1px solid #d6dde2; }
.cf-seg-item:hover { background: #f4f7f9; }
.cf-seg-item.is-active { background: #e4e9ee; }
.cf-range { display: inline-flex; border: 1px solid #d6dde2; border-radius: 2px; position: relative; }
.cf-range-main { height: 48px; padding: 0 1rem; display: inline-flex; align-items: center; gap: .75rem; background: #fff; border: 0; font: inherit; font-size: 1.05rem; color: #2c3e50; cursor: pointer; }
.cf-range-main i { color: #8a96a0; font-size: 1.3rem; }
.cf-range-nav { width: 52px; height: 48px; display: inline-flex; align-items: center; justify-content: center; color: #7d8a96; border-left: 1px solid #d6dde2; text-decoration: none; background: #fff; font-size: .8rem; }
.cf-range-nav:hover { background: #f4f7f9; color: #2c3e50; }
.cf-range-menu { padding: 1rem; min-width: 260px; }
.cf-forecast-chart { position: relative; height: 560px; margin-top: 18px; padding: 0 0 0 1.5rem; }
.cf-forecast-chart canvas { width: 100% !important; height: 100% !important; }

/* note tab */
.cf-note { position: relative; max-width: 640px; }
.cf-note-box { width: 100%; height: 250px; padding: .85rem 1rem; border: 1px solid #dfe5e9; border-radius: 3px; resize: vertical; font: inherit; color: #2c3e50; outline: 0; background: #fff; }
.cf-note-box:focus { border-color: var(--cf-blue); }
.cf-note-box::placeholder { color: #66747e; }
.cf-note-status { display: block; min-height: 1.4rem; margin-top: .4rem; font-size: .85rem; color: var(--cf-muted); }
.cf-note-status.is-error { color: #e0483a; }

/* settings tab */
.cf-settings { max-width: 960px; }
.cf-setting { padding: 0 0 30px; margin: 0 0 30px; border-bottom: 1px solid var(--cf-line); max-width: 1000px; }
.cf-setting-last { border-bottom: 0; margin-bottom: 10px; padding-bottom: 0; }
.cf-setting .cf-hint { margin-bottom: .9rem; }
.cf-estimate-input { margin-top: 1rem; }
.cf-extra { margin: 0 0 1.1rem; }
.cf-extra[hidden], .cf-estimate-input[hidden] { display: none; }
.cf-color-btn { width: 70px; height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; background: #fff; border: 1px solid #d6dde2; border-radius: 2px; cursor: pointer; }
.cf-color-btn i { font-size: .7rem; color: #5b6770; }
.cf-swatch { width: 24px; height: 24px; display: inline-block; border-radius: 2px; }
.cf-palette { padding: .75rem; width: 232px; display: none; flex-wrap: wrap; gap: .45rem; }
.cf-palette.show { display: flex; }
.cf-swatch-pick { width: 32px; height: 32px; border: 2px solid transparent; border-radius: 2px; cursor: pointer; }
.cf-swatch-pick.is-on { border-color: #2c3e50; box-shadow: inset 0 0 0 2px #fff; }
.cf-settings-foot { display: flex; gap: .75rem; margin-top: 1.8rem; }

/* modal */
.cf-modal .modal-content { border-radius: 3px; border: 0; font-family: "Roboto", "IBM Plex Sans", system-ui, sans-serif; }
.cf-modal .modal-title { font-size: 1.25rem; font-weight: 500; }
.cf-modal .modal-header, .cf-modal .modal-footer { border-color: var(--cf-line); }
.cf-candidates { max-height: 260px; overflow-y: auto; border: 1px solid var(--cf-line); padding: .35rem .9rem; }

@media (max-width: 991px) {
    .cf-status-top { grid-template-columns: 1fr; }
    .cf-w-wide, .cf-w-select { width: 100%; }
    .cf-toolbar { padding: 16px; }
    .cf-add { width: 100%; } .cf-add input { flex: 1 1 auto; width: auto; }
    .cf-search input { width: 100%; } .cf-search { flex: 1 1 220px; }
    .cf-band { margin: 0 16px; padding: 0 16px; } .cf-table-wrap { margin: 0 16px 16px; }
    .cf-forecast-chart { height: 380px; padding-left: 0; }
    .cf-title { font-size: 1.5rem; }
}
@media (max-width: 767px) {
    .cf-tab { min-width: 104px; padding: 0 1rem; font-size: .9rem; }
    .cf-table th { display: none; }
    .cf-table tr { display: block; border-bottom: 1px solid #dde3e8; }
    .cf-table td { display: block; height: auto; padding: .6rem 16px; border: 0; }
    .cf-table td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #8a96a0; margin-bottom: .2rem; }
    .cf-col-actions { width: auto; border-left: 0; text-align: right; }
    .cf-kebab { height: 40px; }
    .cf-name-input { margin-left: 0; max-width: 100%; }
    .cf-table td.cf-col-tracked { text-align: left; }
}

/* =====================================================================
   Project list, Clockify layout (.cfl-). Reuses the .cf- tokens and table.
   ===================================================================== */
.cfl { max-width: none; }
.cfl-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 2.2rem; flex-wrap: wrap; }
.cfl-title { margin: 0; font-size: 1.9rem; font-weight: 400; color: #4a5964; line-height: 1.2; }
.cfl-create { height: 50px; padding: 0 1rem; display: inline-flex; align-items: center; text-transform: uppercase; background: var(--cf-blue); border-radius: 2px; text-decoration: none; letter-spacing: 0; }
.cfl-create:hover { background: #0397da; }

.cfl-filter { display: flex; align-items: center; gap: 0; padding: 12px; margin: 0 0 3rem; background: #fff; border: 1px solid #e8edf0; flex-wrap: wrap; row-gap: .75rem; }
.cfl-filter-label { padding: 0 1.4rem; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: #8a96a0; }
.cfl-select { position: relative; margin: 0; padding: 0 1.1rem; border-left: 1px dotted #d3dbe0; height: 50px; display: flex; align-items: center; }
.cfl-select select {
    appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; font-size: 1.05rem; color: #3d4d58;
    padding: 0 1.1rem 0 0; height: 100%; cursor: pointer; outline: 0; max-width: 190px; text-overflow: ellipsis;
}
.cfl-select::after { content: ""; position: absolute; right: 1.1rem; top: 50%; margin-top: -2px; border: 4px solid transparent; border-top-color: #5b6770; border-bottom: 0; pointer-events: none; }
.cfl-select:focus-within { background: #f6f9fb; }
.cfl-search { flex: 1 1 260px; margin: 0 1.1rem 0 .4rem; padding-left: 1.1rem; border-left: 1px dotted #d3dbe0; }
.cfl-search i { left: 2rem; }
.cfl-apply {
    height: 50px; padding: 0 1.1rem; background: #fff; border: 1px solid #8fd3f7; border-radius: 2px; color: #4cb9f1;
    font: inherit; font-size: 1.02rem; text-transform: uppercase; cursor: pointer; white-space: nowrap;
}
.cfl-apply:hover { background: var(--cf-blue-pale); color: var(--cf-blue); }

.cfl-card { background: transparent; }
.cfl-band { display: flex; align-items: center; justify-content: space-between; min-height: 51px; padding: 0 26px; background: var(--cf-band); color: #87939c; font-size: .95rem; border: 1px solid #dde3e8; border-bottom: 0; }
.cfl-export { position: relative; padding-left: 1.4rem; border-left: 1px dotted #c7d0d7; align-self: stretch; display: flex; align-items: center; margin-right: -26px; padding-right: 26px; }
.cfl-card .cf-table-wrap { margin: 0; }
.cfl-card .cf-table td, .cfl-card .cf-table th { padding: 0 20px; }
.cfl-table td { height: 77px; }
.cfl-table th { height: 52px; }
.cfl-table .cfl-col-check { width: 54px; padding: 0 0 0 26px !important; }
.cfl-table .cfl-col-name { width: 31%; }
.cfl-table .cfl-col-star { width: 76px; padding: 0 !important; text-align: center; border-left: 1px dotted #d3dbe0; }
.cfl-table .cfl-col-more { width: 76px; padding: 0 !important; text-align: center; border-left: 1px dotted #d3dbe0; }
.cfl-table td:nth-child(3), .cfl-table td:nth-child(4), .cfl-table td:nth-child(5), .cfl-table td:nth-child(6) { border-left: 1px dotted #d3dbe0; }
.cfl-table tbody tr:not(.cfl-empty-row) { cursor: pointer; }
.cfl-table tbody tr:not(.cfl-empty-row):hover { background: #fcfdfe; }
.cfl-checkbox { width: 18px; height: 18px; accent-color: var(--cf-blue); cursor: pointer; vertical-align: middle; }
.cfl-name { display: inline-flex; align-items: center; gap: .7rem; color: #2c3e50; text-decoration: none; }
.cfl-name:hover { color: var(--cf-blue); }
.cfl-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.cfl-progress { display: flex; align-items: center; gap: .7rem; min-width: 120px; }
.cfl-progress-bar { flex: 1; height: 6px; background: #e4e9ed; border-radius: 3px; overflow: hidden; }
.cfl-progress-bar span { display: block; height: 100%; background: var(--cf-blue); }
.cfl-progress-text { font-size: .9rem; color: #66747e; min-width: 2.6rem; text-align: right; }
.cfl-star { width: 76px; height: 76px; background: transparent; border: 0; color: #8a96a0; font-size: 1.15rem; cursor: pointer; }
.cfl-star:hover { color: #5b6770; background: #f8fafb; }
.cfl-star.is-on { color: #f5a623; }
.cfl-card .cf-kebab { width: 76px; height: 76px; }
.cfl-pager { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: #fff; border: 1px solid #dde3e8; border-top: 0; }
.cfl-pages { display: inline-flex; gap: .35rem; }
.cfl-page { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d6dde2; border-radius: 2px; color: #3d4d58; text-decoration: none; background: #fff; }
.cfl-page:hover { background: #f4f7f9; }
.cfl-page.is-active { background: var(--cf-blue); border-color: var(--cf-blue); color: #fff; }
@media (max-width: 991.98px) {
    .cfl-filter { padding: 12px; }
    .cfl-select, .cfl-search { border-left: 0; padding-left: .5rem; }
    .cfl-search { flex-basis: 100%; margin: 0; }
    .cfl-search i { left: 1rem; }
    .cfl-table-wrap, .cfl-card .cf-table-wrap { overflow-x: auto; }
    .cfl-table { min-width: 760px; }
}

/* Access filter: members checklist */
.cfl-access-filter { padding: 0; }
.cfl-access-btn { height: 100%; padding: 0 1.1rem; display: inline-flex; align-items: center; gap: .6rem; background: transparent; border: 0; font: inherit; font-size: 1.05rem; color: #3d4d58; cursor: pointer; }
.cfl-access-btn:hover, .cfl-access-btn.show { background: #f1f6f9; }
.cfl-access-btn.has-value { color: var(--cf-blue); }
.cfl-caret { border: 4px solid transparent; border-top-color: #5b6770; border-bottom: 0; margin-top: 2px; }
.cfl-access-filter::after { display: none; }
.cfl-access-menu { min-width: 260px; max-height: 360px; overflow-y: auto; padding: .5rem 1rem; }
.cfl-access-all { border-bottom: 1px solid var(--cf-line); padding-bottom: .55rem; margin-bottom: .2rem; font-weight: 500; }
.cfl-access-list { max-height: 240px; overflow-y: auto; }

/* Workspace settings */
.workspace-settings-shell { display:grid; grid-template-columns:250px minmax(0,1fr); gap:1.25rem; align-items:start; }
.workspace-settings-sidebar,.settings-card { background:var(--bs-body-bg,#fff); border:1px solid var(--bs-border-color,#dee2e6); border-radius:14px; box-shadow:0 3px 14px rgba(0,0,0,.035); }
.workspace-settings-sidebar { padding:1rem; position:sticky; top:1rem; }
.workspace-brand-card { display:flex; flex-direction:column; align-items:center; text-align:center; gap:.25rem; padding:.75rem .5rem 1rem; border-bottom:1px solid var(--bs-border-color,#dee2e6); margin-bottom:.65rem; }
.workspace-brand-card span { color:var(--bs-secondary-color,#6c757d); font-size:.78rem; }
.workspace-logo { width:72px; height:72px; object-fit:contain; border-radius:12px; margin-bottom:.35rem; border:1px solid var(--bs-border-color,#dee2e6); background:#fff; }
.workspace-logo-placeholder { display:flex; align-items:center; justify-content:center; color:#7a8490; font-size:1.5rem; }
.workspace-settings-nav { display:flex; flex-direction:column; gap:.25rem; }
.workspace-settings-nav a { display:flex; align-items:center; gap:.65rem; padding:.65rem .75rem; border-radius:9px; color:inherit; text-decoration:none; }
.workspace-settings-nav a:hover { background:rgba(0,0,0,.035); }
.workspace-settings-nav a.active { background:rgba(13,110,253,.10); color:var(--bs-primary,#0d6efd); font-weight:600; }
.workspace-settings-coming { margin-top:1rem; padding:.75rem; border-radius:10px; background:rgba(0,0,0,.025); font-size:.78rem; color:var(--bs-secondary-color,#6c757d); }
.workspace-settings-coming small { display:block; font-weight:600; color:inherit; margin-bottom:.25rem; }
.settings-card { overflow:hidden; }
.settings-card-head { padding:1.15rem 1.25rem; border-bottom:1px solid var(--bs-border-color,#dee2e6); }
.settings-card-head h3 { font-size:1.05rem; margin:0 0 .2rem; }
.settings-card-head p { margin:0; color:var(--bs-secondary-color,#6c757d); font-size:.86rem; }
.settings-form { padding:1.25rem; }
.settings-section { padding:0 0 1.25rem; margin-bottom:1.25rem; border-bottom:1px solid var(--bs-border-color,#dee2e6); }
.settings-section:last-of-type { margin-bottom:0; }
.settings-section h4 { font-size:.9rem; margin:0 0 .9rem; font-weight:650; }
.settings-card-foot { padding:1rem 1.25rem; border-top:1px solid var(--bs-border-color,#dee2e6); display:flex; justify-content:flex-end; }
.workspace-permissions-table th { white-space:nowrap; font-size:.8rem; }
.workspace-permissions-table td:first-child { min-width:280px; }
.workspace-permissions-table td:first-child small { display:block; color:var(--bs-secondary-color,#6c757d); font-size:.75rem; margin-top:.15rem; }
.workspace-permissions-table .permission-module td { background:rgba(0,0,0,.025); text-transform:uppercase; letter-spacing:.05em; font-size:.72rem; font-weight:700; color:var(--bs-secondary-color,#6c757d); }
.topbar-workspace-logo { width:30px; height:30px; object-fit:contain; border-radius:6px; margin-right:.45rem; background:#fff; }
@media (max-width: 900px) { .workspace-settings-shell { grid-template-columns:1fr; } .workspace-settings-sidebar { position:static; } .workspace-settings-nav { flex-direction:row; overflow:auto; } .workspace-settings-nav a { white-space:nowrap; } }

/* Task status */
.cf-tasks .cf-col-status { width: 128px; white-space: nowrap; }
.cf-tasks .cf-col-team { width: 140px; white-space: nowrap; }
.cf-status-badge { display:inline-flex; align-items:center; justify-content:center; min-width:64px; padding:.28rem .62rem; border-radius:999px; font-size:.76rem; font-weight:600; line-height:1.2; }
.cf-status-badge.is-active { color:#2f6f45; background:#e8f5ec; }
.cf-status-badge.is-progress { color:#1d6a8a; background:#e4f3f8; }
.cf-status-badge.is-hold { color:#8a6a1d; background:#f8f1e4; }
.cf-status-badge.is-review { color:#5b4aa8; background:#eee9fb; }
.cf-status-badge.is-done { color:#68737c; background:#eef1f3; }
.cf-status-badge.is-cancelled { color:#a14a4a; background:#f8e8e8; }
.cf-team-pill { display:inline-flex; align-items:center; padding:.2rem .55rem; border-radius:999px; font-size:.75rem; font-weight:600; background:#eef3f6; color:#4a5964; }
.cf-team-pill.is-project { background:#f3f1ea; color:#6b6556; }
.cf-name-input:disabled { opacity:.75; cursor:not-allowed; background:var(--bs-secondary-bg,#f1f3f5); }


/* Grouped time-entry chunks */
.time-group-toggle { min-width: 42px; font-weight: 700; }
.time-group-toggle.is-open { transform: none; }
.time-group-count { font-variant-numeric: tabular-nums; }
.time-group-details-row > td { background: var(--bs-tertiary-bg, #f8f9fa); }
.time-group-details { padding: .25rem .75rem .5rem 3.25rem; border-left: 3px solid var(--bs-primary, #0d6efd); }
.time-group-details .table { background: transparent; }
.time-group-details .table th { font-size: .75rem; color: var(--bs-secondary-color, #6c757d); text-transform: uppercase; letter-spacing: .03em; }
.time-entry-groups-table > tbody > .time-group-row { border-top: 1px solid var(--bs-border-color, #dee2e6); }

/* Scrollable modals whose <form> wraps body + footer (Submit for approval): make the
   form the flex column so the body scrolls and the footer button always stays visible. */
.modal-dialog-scrollable .modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.modal-dialog-scrollable .modal-content > form > .modal-body {
    overflow-y: auto;
}

.invite-form select[multiple] { min-height: 10rem; }
