/* UFlow — visual language adapted from Apple's Human Interface Guidelines.
   Built on the Bootstrap 5.3 that ships with the project template: no extra UI
   package (CLAUDE.md rules 21-22). What is borrowed from HIG:
     - the system font stack, so the UI renders in SF Pro on Apple devices
     - Apple's system colour palette and the label/separator opacity scale
     - an 8pt spacing rhythm and generous whitespace
     - large corner radii, hairline separators, restrained depth
     - translucent "materials" for the sidebar and toolbar
     - a full dark appearance, which HIG treats as required rather than optional
     - visible focus rings, 44pt minimum hit targets, reduced-motion support */

/* ---------- Tokens: light appearance ---------- */

:root {
    color-scheme: light dark;

    /* Referanstaki palet: antrasit gövde, limon vurgu, pastel kutucuklar */
    --ink-900: #16161A;
    --ink-800: #1F1F25;
    --ink-700: #2B2B33;

    --lime-600: #B9DF35;
    --lime-500: #CFF250;
    --lime-400: #DDF77C;
    --lime-100: #F1FBD0;

    /* Lila — ikincil vurgu: halkalar, grafik, zemin tonu */
    --lilac-700: #5B44B8;
    --lilac-600: #6E52D8;
    --lilac-500: #8B6BF0;
    --lilac-300: #C3B2FA;
    --lilac-100: #EFEAFE;
    --frame: #B4A2F0;

    /* Pastel tiles */
    --tint-peach: #FDE7D9;
    --tint-lilac: #E9E4FB;
    --tint-mint:  #E4F5D3;
    --tint-sky:   #DDE8FB;
    --tint-rose:  #FBE0E6;
    --rose-400:   #F08AA6;

    --ink-peach: #B4602A;
    --ink-lilac: #5B44B8;
    --ink-mint:  #4A7A22;
    --ink-sky:   #2F5DA8;
    --ink-rose:  #B03C58;

    --sys-green: #3F9E2E;
    --sys-red: #E0484F;
    --sys-orange: #E08A22;
    --sys-blue: var(--ink-sky);
    --sys-indigo: var(--ink-lilac);
    --sys-gray: #7A7A85;

    --gray3: #C9C9D2;
    --gray5: #E7E7EE;
    --gray6: #F3F3F6;

    --label: #16161A;
    --label-secondary: rgba(22, 22, 26, .62);
    --label-tertiary: rgba(22, 22, 26, .38);
    --separator: rgba(22, 22, 26, .10);

    --bg-canvas: #F5F3FB;
    --bg-elevated: #FFFFFF;
    --bg-fill: rgba(22, 22, 26, .045);
    --bg-fill-strong: rgba(22, 22, 26, .10);
    --material: rgba(255, 255, 255, .76);

    --shadow-card: 0 1px 2px rgba(22, 22, 26, .04), 0 8px 24px rgba(22, 22, 26, .06);
    --shadow-raised: 0 14px 38px rgba(22, 22, 26, .18);
    --shadow-lift: 0 2px 8px rgba(22, 22, 26, .06), 0 14px 30px rgba(22, 22, 26, .10);

    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;

    --radius-card: 18px;
    --radius-control: 12px;

    --sidebar-width: 252px;
    --toolbar-height: 58px;

    /* Lime carries dark text, the way the reference does it. */
    --accent: var(--lime-500);
    --accent-deep: var(--lime-600);
    --accent-on: var(--ink-900);
    --link: var(--lilac-700);
    --accent-2: var(--lilac-500);

    --ease: cubic-bezier(.2, .8, .3, 1);
}

/* ---------- Tokens: dark appearance ---------- */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --label: #F2F2F5;
        --label-secondary: rgba(242, 242, 245, .64);
        --label-tertiary: rgba(242, 242, 245, .36);
        --separator: rgba(242, 242, 245, .14);

        --bg-canvas: #0B0A12;
        --bg-elevated: #17171D;
        --bg-fill: rgba(242, 242, 245, .06);
        --bg-fill-strong: rgba(242, 242, 245, .13);
        --material: rgba(23, 23, 29, .8);

        --tint-peach: #3A2A20; --ink-peach: #F0B98C;
        --tint-lilac: #29234A; --ink-lilac: #C0AEFB;
        --tint-mint:  #24331A; --ink-mint:  #B9E38C;
        --tint-sky:   #1E2C46; --ink-sky:   #9CC0F5;
        --tint-rose:  #3A2028; --ink-rose:  #F4A6B8;

        --shadow-card: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 28px rgba(0, 0, 0, .45);
        --shadow-raised: 0 18px 44px rgba(0, 0, 0, .6);
        --shadow-lift: 0 2px 8px rgba(0, 0, 0, .5), 0 16px 34px rgba(0, 0, 0, .5);

        --frame: #241D3E;
        --link: #B9A6FB;
        --accent-2: var(--lilac-300);
    }
}

:root[data-theme="dark"] {
    --label: #F2F2F5;
    --label-secondary: rgba(242, 242, 245, .64);
    --label-tertiary: rgba(242, 242, 245, .36);
    --separator: rgba(242, 242, 245, .14);

    --bg-canvas: #0B0A12;
    --bg-elevated: #17171D;
    --bg-fill: rgba(242, 242, 245, .06);
    --bg-fill-strong: rgba(242, 242, 245, .13);
    --material: rgba(23, 23, 29, .8);

    --tint-peach: #3A2A20; --ink-peach: #F0B98C;
    --tint-lilac: #29234A; --ink-lilac: #C0AEFB;
    --tint-mint:  #24331A; --ink-mint:  #B9E38C;
    --tint-sky:   #1E2C46; --ink-sky:   #9CC0F5;
    --tint-rose:  #3A2028; --ink-rose:  #F4A6B8;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 28px rgba(0, 0, 0, .45);
    --shadow-raised: 0 18px 44px rgba(0, 0, 0, .6);
    --shadow-lift: 0 2px 8px rgba(0, 0, 0, .5), 0 16px 34px rgba(0, 0, 0, .5);

    --frame: #241D3E;
    --link: #B9A6FB;
    --accent-2: var(--lilac-300);
}

/* ---------- Base ---------- */

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--frame);
    color: var(--label);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
        "Helvetica Neue", "Segoe UI", Roboto, system-ui, sans-serif;
    font-size: .9375rem;
    line-height: 1.47;
    letter-spacing: -.01em;
    -webkit-font-smoothing: antialiased;
}

/* Tracking is size-specific (SKILL.md §15): large text reads too loose as it grows, so
   it tightens; body sits near zero; small caps-y labels open up slightly. */
h1, .h1 { letter-spacing: -.028em; line-height: 1.12; }
h2, .h2 { letter-spacing: -.024em; line-height: 1.18; }
h3, .h3 { letter-spacing: -.021em; line-height: 1.25; }
h4, h5, h6, .h4, .h5, .h6 { letter-spacing: -.017em; line-height: 1.3; }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 600; }

small, .small { letter-spacing: 0; }

.text-muted,
.form-text {
    color: var(--label-secondary) !important;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

hr,
.dropdown-divider {
    border-color: var(--separator);
    opacity: 1;
}

/* Feedback lives on the press, not the release (SKILL.md §1). Critically damped feel:
   quick in, no overshoot. */
.btn,
.uf-check,
.uf-row-remove,
.uf-nav-link,
.uf-sec-nav a,
.uf-week-arrow,
.uf-prow,
.uf-task {
    transition: transform 120ms cubic-bezier(.2, .8, .3, 1),
                background-color 140ms cubic-bezier(.2, .8, .3, 1),
                border-color 140ms cubic-bezier(.2, .8, .3, 1),
                filter 140ms cubic-bezier(.2, .8, .3, 1);
}

.btn:active,
.uf-check:active,
.uf-row-remove:active,
.uf-sec-nav a:active,
.uf-week-arrow:active { transform: scale(.96); }

.uf-nav-link:active,
.uf-prow:active { transform: scale(.995); }

/* Our own controls are drawn from scratch, so they start from no chrome at all.
   Bootstrap's .btn keeps its own styling. */
button.uf-row-remove,
button.uf-note-remove {
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    -webkit-appearance: none;
    appearance: none;
}

/* HIG asks for a clearly visible focus indicator, keyboard only. */
:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Reduced motion keeps the colour/opacity cues and drops the movement (SKILL.md §14). */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }

    .btn:active,
    .uf-check:active,
    .uf-nav-link:active,
    .uf-prow:active,
    .uf-week-arrow:active,
    .uf-sec-nav a:active,
    .uf-row-remove:active { transform: none; }
}

/* Translucent surfaces become frosty and solid rather than blurred. */
@media (prefers-reduced-transparency: reduce) {
    .uf-sidebar,
    .uf-topbar {
        background-color: var(--bg-elevated);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        box-shadow: none;
    }
}

/* Higher contrast: near-solid grounds with a defined border. */
@media (prefers-contrast: more) {
    :root {
        --separator: rgba(60, 60, 67, .5);
        --label-secondary: rgba(60, 60, 67, .85);
        --label-tertiary: rgba(60, 60, 67, .65);
    }

    .uf-sidebar,
    .uf-topbar {
        background-color: var(--bg-elevated);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .uf-card,
    .uf-list { border-width: 1.5px; }
}

/* ---------- Sidebar: deep navy, the app's structural anchor ---------- */

/* The shell keeps the sidebar and the content as two floating panels on the page,
   rather than regions welded to the window edges. */
/* The whole app sits inside a lilac mat, the way the reference frames it. */
.uf-shell {
    display: flex;
    gap: var(--sp-3);
    padding: var(--sp-3);
    margin: var(--sp-4);
    min-height: calc(100vh - var(--sp-4) * 2);
    align-items: stretch;
    background: var(--bg-canvas);
    border-radius: 28px;
    box-shadow: 0 18px 50px rgba(22, 22, 26, .16);
}

.uf-sidebar { align-self: stretch; }

.uf-main {
    flex: 1 1 auto;
    min-width: 0;
}

.uf-sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    display: flex;
    flex-direction: column;
    /* Bootstrap forces .offcanvas-* transparent above its breakpoint, so this one
       override has to shout back. */
    background-color: var(--ink-900) !important;
    border-radius: 22px;
    border-right: none;
    box-shadow: 0 10px 34px rgba(22, 22, 26, .18);
    position: sticky;
    top: var(--sp-3);
    height: calc(100vh - var(--sp-4) * 2 - var(--sp-3) * 2);
    overflow: hidden;
}

.uf-brand {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    height: var(--toolbar-height);
    padding: 0 var(--sp-4);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: .975rem;
    letter-spacing: -.02em;
}

.uf-brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--lime-500);
    color: var(--ink-900);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 0;
}

.uf-nav {
    padding: var(--sp-2) var(--sp-2) var(--sp-4);
    overflow-y: auto;
    flex: 1;
}

.uf-nav-heading {
    padding: var(--sp-4) var(--sp-3) var(--sp-1);
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .09em;
    color: rgba(242, 242, 245, .38);
    text-transform: uppercase;
}

.uf-nav-link {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    min-height: 38px;
    padding: var(--sp-1) var(--sp-3);
    margin-bottom: 3px;
    border-radius: 10px;
    color: rgba(242, 242, 245, .72);
    text-decoration: none;
    font-size: .875rem;
    position: relative;
}

.uf-nav-link:hover {
    background-color: rgba(255, 255, 255, .07);
    color: #fff;
}

.uf-nav-link.active {
    background: var(--lime-500);
    color: var(--ink-900);
    font-weight: 700;
}

.uf-nav-link svg { flex: 0 0 17px; width: 17px; height: 17px; opacity: .8; }

.uf-nav-link.active svg,
.uf-nav-link:hover svg { opacity: 1; }

.uf-sidebar-footer {
    padding: var(--sp-3) var(--sp-4);
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: rgba(242, 242, 245, .32);
    font-size: .75rem;
}

/* ---------- Toolbar ---------- */

/* Floating chrome is a material, not a painted strip: content scrolls under it, and a
   bright top edge reads as light catching the surface (SKILL.md §12). */
.uf-topbar {
    height: var(--toolbar-height);
    background: transparent;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.uf-page-title {
    font-size: .9375rem;
    font-weight: 600;
    letter-spacing: -.015em;
    margin: 0;
}

.uf-avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--sys-blue), var(--sys-indigo));
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* ---------- Content and cards ---------- */

.uf-content {
    padding: 0 var(--sp-4) var(--sp-6);
    max-width: 1480px;
}

.uf-card {
    background-color: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.uf-empty-state {
    padding: var(--sp-6) var(--sp-5) calc(var(--sp-6) + var(--sp-2));
    text-align: center;
    color: var(--label-secondary);
}

.uf-empty-state svg {
    width: 40px;
    height: 40px;
    color: var(--label-tertiary);
    margin-bottom: var(--sp-3);
}

.uf-progress {
    height: 6px;
    border-radius: 3px;
    background-color: var(--bg-fill-strong);
    overflow: hidden;
}

.uf-progress > * {
    height: 100%;
    border-radius: 3px;
    background-color: var(--accent);
}

/* ---------- Controls ---------- */

.btn {
    --bs-btn-border-radius: var(--radius-control);
    --bs-btn-font-weight: 500;
    --bs-btn-padding-y: .4rem;
    --bs-btn-padding-x: .9rem;
    letter-spacing: -.01em;
    transition: filter .15s ease, background-color .15s ease;
}

.btn-sm {
    --bs-btn-border-radius: 8px;
    --bs-btn-padding-y: .3rem;
    --bs-btn-padding-x: .7rem;
    --bs-btn-font-size: .8125rem;
}

.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: color-mix(in srgb, var(--accent) 88%, black);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--accent) 88%, black);
    --bs-btn-active-bg: color-mix(in srgb, var(--accent) 78%, black);
    --bs-btn-active-border-color: color-mix(in srgb, var(--accent) 78%, black);
}

/* Outline buttons read as Apple's "tinted" style: filled, not bordered. */
.btn-outline-secondary {
    --bs-btn-color: var(--label);
    --bs-btn-bg: var(--bg-fill);
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: var(--label);
    --bs-btn-hover-bg: var(--bg-fill-strong);
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-bg: var(--bg-fill-strong);
    --bs-btn-active-border-color: transparent;
}

.btn-outline-danger {
    --bs-btn-color: var(--sys-red);
    --bs-btn-bg: color-mix(in srgb, var(--sys-red) 12%, transparent);
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--sys-red);
    --bs-btn-hover-border-color: transparent;
}

.btn-outline-success {
    --bs-btn-color: var(--sys-green);
    --bs-btn-bg: color-mix(in srgb, var(--sys-green) 14%, transparent);
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--sys-green);
    --bs-btn-hover-border-color: transparent;
}

.btn-link {
    --bs-btn-color: var(--accent);
    --bs-btn-hover-color: var(--accent);
    font-weight: 400;
}

.form-control,
.form-select {
    background-color: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: var(--radius-control);
    color: var(--label);
    padding: .45rem .7rem;
    font-size: .9375rem;
    min-height: 38px;
}

.form-control::placeholder {
    color: var(--label-tertiary);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-elevated);
    color: var(--label);
    border-color: var(--accent);
    box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--accent) 22%, transparent);
}

.form-control:disabled {
    background-color: var(--bg-fill);
    color: var(--label-secondary);
}

.form-label {
    color: var(--label);
    margin-bottom: var(--sp-1);
}

.form-check-input {
    border-color: var(--gray3);
    background-color: var(--bg-elevated);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* iOS-style toggle: 51x31pt, green when on, white knob */
.form-switch .form-check-input {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.2' fill='%23fff'/%3e%3c/svg%3e");
    width: 3.1rem;
    height: 1.85rem;
    margin-top: 0;
    background-color: var(--bg-fill-strong);
    border: none;
    border-radius: 1.85rem;
    box-shadow: none;
    transition: background-color .2s ease, background-position .2s ease;
}

.form-switch .form-check-input:checked {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.2' fill='%23fff'/%3e%3c/svg%3e");
    background-color: var(--sys-green);
}

.form-switch {
    padding-left: 3.6rem;
    min-height: 1.85rem;
    display: flex;
    align-items: center;
}

.form-switch .form-check-input {
    margin-left: -3.6rem;
}

.form-switch .form-check-label {
    color: var(--label);
}

/* ---------- Tables ---------- */

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--label);
    --bs-table-border-color: var(--separator);
    margin-bottom: 0;
}

.table > thead {
    --bs-table-bg: transparent;
}

.table > thead th {
    background-color: transparent;
    color: var(--label-secondary);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .01em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--separator);
    padding: var(--sp-3) var(--sp-4);
}

.table > tbody td {
    padding: var(--sp-3) var(--sp-4);
    border-color: var(--separator);
    vertical-align: middle;
}

.table > tbody tr:last-child td {
    border-bottom: none;
}

.table-light,
.table > :not(caption) > * > * {
    background-color: transparent;
}

.table-secondary {
    --bs-table-bg: var(--bg-fill);
    --bs-table-color: var(--label-secondary);
}

/* ---------- Badges, alerts, dropdowns ---------- */

.badge {
    border-radius: 999px;
    padding: .3em .7em;
    font-size: .72rem;
    font-weight: 590;
    letter-spacing: 0;
}

.text-bg-primary { background-color: var(--accent) !important; color: #fff !important; }
.text-bg-success { background-color: var(--sys-green) !important; color: #fff !important; }
.text-bg-danger  { background-color: var(--sys-red) !important;   color: #fff !important; }
.text-bg-warning { background-color: var(--sys-orange) !important; color: #fff !important; }
.text-bg-secondary { background-color: var(--bg-fill-strong) !important; color: var(--label-secondary) !important; }
.text-bg-light   { background-color: var(--bg-fill) !important;   color: var(--label-secondary) !important; }

.alert {
    border: none;
    border-radius: var(--radius-control);
    font-size: .875rem;
}

.alert-success {
    background-color: color-mix(in srgb, var(--sys-green) 14%, transparent);
    color: color-mix(in srgb, var(--sys-green) 72%, var(--label));
}

.alert-danger {
    background-color: color-mix(in srgb, var(--sys-red) 13%, transparent);
    color: color-mix(in srgb, var(--sys-red) 72%, var(--label));
}

.dropdown-menu {
    --bs-dropdown-bg: var(--bg-elevated);
    --bs-dropdown-color: var(--label);
    --bs-dropdown-link-color: var(--label);
    --bs-dropdown-link-hover-bg: var(--bg-fill);
    --bs-dropdown-link-hover-color: var(--label);
    --bs-dropdown-border-color: var(--separator);
    --bs-dropdown-border-radius: var(--radius-control);
    --bs-dropdown-header-color: var(--label-tertiary);
    box-shadow: var(--shadow-raised);
    padding: var(--sp-1);
}

.dropdown-item {
    border-radius: 7px;
    padding: .4rem .6rem;
    font-size: .875rem;
}

.nav-pills {
    --bs-nav-pills-border-radius: 8px;
    --bs-nav-pills-link-active-bg: var(--accent);
}

.nav-pills .nav-link {
    padding: .35rem .8rem;
    font-size: .875rem;
    font-weight: 500;
}

/* ---------- Auth screens ---------- */

.uf-auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background-color: var(--bg-canvas);
    padding: var(--sp-5);
}

.uf-auth-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: 18px;
    box-shadow: var(--shadow-raised);
    padding: var(--sp-6) var(--sp-5);
}

.uf-auth-card h1,
.uf-auth-card h2 {
    font-size: 1.375rem;
    letter-spacing: -.025em;
}

.uf-auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-5);
    color: var(--label);
    font-weight: 600;
    font-size: 1rem;
}

/* ---------- Gantt chart ----------
   Bars are positioned as percentages of a date window computed server-side;
   no charting library is involved. */

.uf-gantt {
    --gantt-label-width: 244px;
    overflow-x: auto;
}

.uf-gantt-inner {
    min-width: 820px;
}

.uf-gantt-head {
    display: flex;
    font-size: .6875rem;
    font-weight: 600;
    color: var(--label-tertiary);
    text-transform: uppercase;
    letter-spacing: .01em;
    border-bottom: 1px solid var(--separator);
}

.uf-gantt-row {
    display: flex;
    align-items: stretch;
    border-top: 1px solid var(--separator);
    min-height: 76px;
}

.uf-gantt-row:hover .uf-gantt-label,
.uf-gantt-row:hover .uf-gantt-track {
    background-color: var(--bg-fill);
}

.uf-gantt-label {
    flex: 0 0 var(--gantt-label-width);
    width: var(--gantt-label-width);
    padding: var(--sp-4) var(--sp-4);
    border-right: 1px solid var(--separator);
    background-color: var(--bg-elevated);
    position: sticky;
    left: 0;
    z-index: 2;
    transition: background-color .15s ease;
}

.uf-gantt-head .uf-gantt-label {
    padding: var(--sp-3) var(--sp-4);
    background-color: var(--bg-elevated);
}

.uf-gantt-label > a {
    font-size: .9375rem;
    letter-spacing: -.015em;
}

.uf-gantt-meta {
    color: var(--label-secondary);
    font-size: .8125rem;
    margin-top: 2px;
}

.uf-gantt-track {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    padding: var(--sp-5) 0;
    display: flex;
    align-items: center;
    transition: background-color .15s ease;
}

.uf-gantt-months {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
}

.uf-gantt-month {
    padding: var(--sp-3) var(--sp-2);
    border-left: 1px solid var(--separator);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uf-gantt-grid {
    position: absolute;
    inset: 0;
    display: flex;
    pointer-events: none;
}

.uf-gantt-grid span {
    border-left: 1px solid var(--separator);
    opacity: .5;
}

.uf-gantt-bar {
    position: relative;
    flex: 0 0 auto;
    height: 28px;
    min-width: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 var(--sp-2);
    color: #fff;
    font-size: .75rem;
    font-weight: 590;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
    transition: transform .15s ease, filter .15s ease;
}

.uf-gantt-bar:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    color: #fff;
}

.uf-gantt-bar-progress {
    position: absolute;
    inset: 0 auto 0 0;
    background-color: rgba(255, 255, 255, .32);
}

.uf-gantt-bar-text {
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.uf-gantt-today {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--sys-red);
    z-index: 1;
    pointer-events: none;
}

.uf-gantt-today::after {
    content: "bugün";
    position: absolute;
    top: 3px;
    left: 5px;
    font-size: .625rem;
    font-weight: 600;
    color: var(--sys-red);
    letter-spacing: 0;
    text-transform: none;
}

.uf-gantt-row.is-deleted .uf-gantt-label,
.uf-gantt-row.is-deleted .uf-gantt-bar {
    opacity: .5;
}

/* ---------- Small screens: HIG asks for at least a 44pt hit target ---------- */

@media (max-width: 991.98px) {
    .uf-content {
        padding: var(--sp-4);
    }

    .btn-sm {
        min-height: 34px;
    }
}

@media (max-width: 575.98px) {
    .uf-gantt {
        --gantt-label-width: 168px;
    }

    .uf-auth-card {
        padding: var(--sp-5) var(--sp-4);
    }
}

/* ---------- Two-pane task board ---------- */

.uf-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
    align-items: start;
}

.uf-board-pane {
    display: flex;
    flex-direction: column;
    min-height: 260px;
    transition: box-shadow .15s ease, border-color .15s ease;
}

.uf-board-pane.is-drop-target {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.uf-board-head {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4);
    border-bottom: 1px solid var(--separator);
}

.uf-board-title {
    font-size: .9375rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -.015em;
}

.uf-board-count {
    font-size: .8125rem;
    color: var(--label-secondary);
}

.uf-board-head > div:first-child {
    min-width: 0;
}

.uf-board-head .btn {
    margin-left: auto;
    white-space: nowrap;
}

.uf-week-picker {
    display: flex;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--separator);
    background-color: var(--bg-fill);
}

.uf-week-picker select:first-of-type {
    flex: 0 0 92px;
}

.uf-week-picker select:last-of-type {
    flex: 1 1 auto;
    min-width: 0;
}

.uf-board-body {
    padding: var(--sp-3);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    flex: 1;
}

.uf-board-empty {
    margin: auto;
    padding: var(--sp-5) var(--sp-3);
    text-align: center;
    color: var(--label-tertiary);
    font-size: .8125rem;
    line-height: 1.6;
}

.uf-task {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-2);
    padding: var(--sp-3);
    border: 1px solid var(--separator);
    border-radius: var(--radius-control);
    background-color: var(--bg-elevated);
    transition: border-color .15s ease, opacity .15s ease, background-color .15s ease;
}

.uf-task[draggable="true"] {
    cursor: grab;
}

.uf-task.is-dragging {
    opacity: .4;
}

.uf-task.is-in-week {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    background-color: color-mix(in srgb, var(--accent) 6%, transparent);
}

.uf-task.is-done .uf-task-title {
    text-decoration: line-through;
    color: var(--label-secondary);
}

.uf-task-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.uf-task-check {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin: 0;
    cursor: pointer;
}

.uf-task-check input {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
}

.uf-task-title {
    font-size: .875rem;
    font-weight: 500;
    word-break: break-word;
}

.uf-task-desc {
    font-size: .8125rem;
    color: var(--label-secondary);
    word-break: break-word;
}

.uf-task-done {
    font-size: .75rem;
    color: var(--sys-green);
    margin-top: 2px;
}

.uf-task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-1);
    margin-top: var(--sp-1);
}

.uf-task-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    flex: 0 0 auto;
}

.uf-task-actions .btn {
    --bs-btn-padding-x: .5rem;
}

@media (max-width: 991.98px) {
    .uf-board {
        grid-template-columns: 1fr;
    }
}

/* ---------- Role permission editor ---------- */

.uf-perm-group {
    padding: var(--sp-4);
    border-bottom: 1px solid var(--separator);
}

.uf-perm-group:last-child {
    border-bottom: none;
}

.uf-perm-group h4 {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .01em;
    color: var(--label-tertiary);
    margin-bottom: var(--sp-3);
}

.uf-perm {
    display: flex;
    gap: var(--sp-3);
    padding: var(--sp-2) 0;
}

.uf-perm input {
    flex: 0 0 auto;
    margin-top: .15rem;
}

.uf-perm-text {
    min-width: 0;
}

.uf-perm-title {
    display: block;
    font-size: .875rem;
    font-weight: 500;
}

.uf-perm-desc {
    display: block;
    font-size: .8125rem;
    color: var(--label-secondary);
}

/* Carried-over task: missed its planned week and rolled forward */
.uf-task.is-carried {
    border-color: color-mix(in srgb, var(--sys-orange) 55%, transparent);
    background-color: color-mix(in srgb, var(--sys-orange) 7%, transparent);
}

.uf-task-carried {
    font-size: .75rem;
    color: var(--sys-orange);
    margin-top: 2px;
}


/* ---------- Project detail: slim header bar ---------- */

.uf-project-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-bottom: var(--sp-2);
}

.uf-project-swatch { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }

.uf-project-name {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -.022em;
}

.uf-project-meta { font-size: .8125rem; color: var(--label-secondary); }

.uf-project-progress {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    min-width: 150px;
}

.uf-project-progress .uf-progress { flex: 1 1 auto; display: block; }

.uf-project-actions { margin-left: auto; display: flex; gap: var(--sp-2); }

.uf-project-desc {
    margin: 0 0 var(--sp-4);
    font-size: .875rem;
    color: var(--label-secondary);
    white-space: pre-wrap;
    max-width: 70ch;
}

/* ---------- Board: header, hint, add form ---------- */

.uf-board-head {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-4) var(--sp-2);
    border-bottom: none;
}

.uf-board-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--bg-fill-strong);
    color: var(--label-secondary);
    font-size: .8125rem;
    font-weight: 590;
}

.uf-board-hint {
    margin: 0;
    padding: 0 var(--sp-4) var(--sp-3);
    font-size: .8125rem;
    color: var(--label-secondary);
    border-bottom: 1px solid var(--separator);
}

.uf-add-form {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    padding: var(--sp-3);
    border: 1px solid var(--accent);
    border-radius: var(--radius-control);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.uf-add-actions { display: flex; gap: var(--sp-2); justify-content: flex-end; }

/* The two task flags sit side by side: they are independent, so neither reads as the
   alternative to the other. */
.uf-add-flags { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.uf-add-flags .form-check { margin-bottom: 0; }

/* ---------- Week pane header ---------- */

.uf-board-pane.is-week { border-color: color-mix(in srgb, var(--accent) 40%, var(--separator)); }

.uf-week-head {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-3) var(--sp-2);
}

.uf-week-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-control);
    background: var(--bg-fill);
    color: var(--label);
    text-decoration: none;
    font-size: 1.05rem;
    flex: 0 0 auto;
}

.uf-week-arrow:hover { background: var(--bg-fill-strong); color: var(--label); }

.uf-week-title { flex: 1 1 auto; text-align: center; min-width: 0; }

.uf-week-title strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -.02em;
}

.uf-week-title span { font-size: .8125rem; color: var(--label-secondary); }

/* ---------- Task card extras ---------- */

.uf-task-grip { color: var(--label-tertiary); flex: 0 0 auto; display: flex; align-self: center; }

.uf-task-check-form { flex: 0 0 auto; display: flex; align-self: center; }

.uf-check {
    /* Fixed and unshrinkable: in a narrow column a long title used to squeeze the
       circle sideways and draw it as an oval. The text gives way, the circle does not. */
    flex: 0 0 auto;
    width: 26px;
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.8px solid var(--label-tertiary);
    background: transparent;
    padding: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.uf-check[aria-pressed="true"] { background: var(--sys-green); border-color: var(--sys-green); }

.uf-check svg { opacity: 0; }

.uf-check[aria-pressed="true"] svg { opacity: 1; }

.uf-check:disabled { cursor: default; opacity: .55; }

/* The controls sit inside their own little forms, and it is the form that shrinks
   with the row, so it is told not to. */
.uf-item > form,
.uf-note-item > form,
.uf-task > form { flex: 0 0 auto; }

.uf-drop-zone {
    padding: var(--sp-5) var(--sp-4);
    border: 2px dashed color-mix(in srgb, var(--accent) 40%, transparent);
    border-radius: var(--radius-control);
    background: color-mix(in srgb, var(--accent) 5%, transparent);
    text-align: center;
}

.uf-drop-zone strong { display: block; font-size: .9375rem; font-weight: 500; color: var(--accent); }

.uf-drop-zone span { font-size: .8125rem; color: var(--label-secondary); }

/* ---------- Notes: work that belongs to no project ---------- */

.uf-notes { margin-top: var(--sp-5); }

.uf-notes-head {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-4) var(--sp-2);
}

.uf-notes-title {
    margin: 0;
    font-size: .9375rem;
    font-weight: 600;
    letter-spacing: -.015em;
}

.uf-notes-hint {
    margin: 0;
    padding: 0 var(--sp-4) var(--sp-3);
    font-size: .8125rem;
    color: var(--label-secondary);
    border-bottom: 1px solid var(--separator);
    max-width: 70ch;
}

.uf-notes-body {
    padding: var(--sp-3);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.uf-note {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-3);
    border: 1px solid var(--separator);
    border-radius: var(--radius-control);
}

.uf-note.is-done { background: var(--bg-fill); }

.uf-note.is-done .uf-note-title {
    text-decoration: line-through;
    color: var(--label-secondary);
}

.uf-note-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.uf-note-title { font-size: .9375rem; font-weight: 500; }

.uf-note-content {
    font-size: .875rem;
    color: var(--label-secondary);
    white-space: pre-wrap;
}

.uf-note-meta { font-size: .75rem; color: var(--label-tertiary); margin-top: var(--sp-1); }

.uf-notes .uf-add-form textarea { resize: vertical; }


/* ================= Colour, depth and motion ================= */

/* Primary action: orange, with a warm shadow so it sits above the page. */
.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-color: var(--accent-on);
    --bs-btn-hover-bg: var(--accent-deep);
    --bs-btn-hover-border-color: var(--accent-deep);
    --bs-btn-hover-color: var(--accent-on);
    --bs-btn-active-bg: var(--accent-deep);
    --bs-btn-active-color: var(--accent-on);
    font-weight: 600;
}

a { color: var(--link); }
a:hover { color: var(--link); }

.text-bg-primary { background: var(--tint-sky) !important; color: var(--ink-sky) !important; }
.text-bg-warning { background: var(--tint-peach) !important; color: var(--ink-peach) !important; }
.text-bg-success { background: var(--tint-mint) !important; color: var(--ink-mint) !important; }

/* Task flags. Outlined and lilac rather than solid red, so "Kritik" is not mistaken
   for the solid red "Zor" difficulty badge next to it. */
.uf-flag-critical { background: var(--tint-rose); color: var(--ink-rose); border: 1px solid currentColor; }
.uf-flag-bug { background: var(--tint-lilac); color: var(--ink-lilac); }

/* Cards gain a real edge and lift instead of sitting flat on the page. */
.uf-card,
.uf-list,
.uf-pool-body,
.uf-stat {
    box-shadow: var(--shadow-card);
}


/* ---------- Motion ---------- */

@keyframes uf-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

@keyframes uf-fill { from { width: 0; } }

@keyframes uf-ring { from { stroke-dashoffset: 113; } }

@keyframes uf-pop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.28); }
    100% { transform: scale(1); }
}

/* Sections arrive in order, so the page assembles rather than appearing all at once. */
.uf-hello,
.uf-stats,
.uf-sec,
.uf-project-bar,
.uf-board,
.uf-gantt {
    animation: uf-rise 420ms var(--ease) both;
}

.uf-stats { animation-delay: 60ms; }
.uf-sec:nth-of-type(1) { animation-delay: 110ms; }
.uf-sec:nth-of-type(2) { animation-delay: 160ms; }
.uf-sec:nth-of-type(3) { animation-delay: 210ms; }
.uf-sec:nth-of-type(4) { animation-delay: 260ms; }

.uf-stat { animation: uf-rise 460ms var(--ease) both; }
.uf-stat:nth-child(1) { animation-delay: 80ms; }
.uf-stat:nth-child(2) { animation-delay: 140ms; }
.uf-stat:nth-child(3) { animation-delay: 200ms; }
.uf-stat:nth-child(4) { animation-delay: 260ms; }
.uf-stat:nth-child(5) { animation-delay: 320ms; }

/* Progress grows into place from zero. */
.uf-progress > * {
    background: var(--lime-600);
    animation: uf-fill 900ms var(--ease) both;
    animation-delay: 220ms;
}

.uf-ring circle:last-child {
    animation: uf-ring 1s var(--ease) both;
    animation-delay: 260ms;
}

/* A tick that lands rather than blinks on. */
.uf-check[aria-pressed="true"] svg,
.uf-check.is-static svg { animation: uf-pop 320ms var(--ease); }

/* ---------- Interaction ---------- */

.uf-row,
.uf-prow,
.uf-pool-row,
.uf-task,
.uf-stat {
    transition: background-color 160ms var(--ease),
                transform 160ms var(--ease),
                box-shadow 160ms var(--ease),
                border-color 160ms var(--ease);
}

.uf-row:hover,
.uf-pool-row:hover { background: var(--bg-fill); }

.uf-prow:hover {
    background: var(--bg-fill);
    transform: translateX(2px);
}

.uf-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
}

.uf-task:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    box-shadow: var(--shadow-lift);
    transform: translateY(-1px);
}

.uf-check:hover { border-color: var(--accent); }

/* Section headings carry a small orange rule, so the page has colour at every level. */


.uf-panel-title-rule::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 15px;
    border-radius: 2px;
    background: var(--lime-500);
}

.uf-hello-title { color: var(--label); }


@media (prefers-reduced-motion: reduce) {
    .uf-hello, .uf-stats, .uf-sec, .uf-stat,
    .uf-project-bar, .uf-board, .uf-gantt,
    .uf-progress > *, .uf-ring circle:last-child,
    .uf-check[aria-pressed="true"] svg { animation: none !important; }

    .uf-prow:hover, .uf-stat:hover, .uf-task:hover { transform: none; }
}

@media (max-width: 991.98px) {
    .uf-shell { padding: 0; gap: 0; margin: 0; border-radius: 0; min-height: 100vh; }

    /* Below this width the sidebar is an offcanvas panel: it must leave the normal flow,
       or its width stays reserved on the left while it is hidden and the page reads as
       pushed to the right — which is what a tablet held upright showed. */
    .uf-sidebar.offcanvas-lg {
        position: fixed;
        border-radius: 0;
        height: 100%;
        top: 0;
    }

    .uf-content { padding: 0 var(--sp-3) var(--sp-5); }
}

/* ================= Planning screen: a board of panels =================
   Modelled on the dashboard reference the user supplied: a floating dark rail, tinted
   icon tiles, soft status chips, donut progress, and cards that lift on hover. */

.uf-dash { max-width: 1320px; }

.uf-hello { margin-bottom: var(--sp-5); }

.uf-hello-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.03em;
}

.uf-hello-sub { margin: 4px 0 0; font-size: .875rem; color: var(--label-secondary); }

/* Title on the left, the one action this screen offers on the right. Wraps rather than
   squeezing the title on a narrow screen. */
.uf-hello-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    flex-wrap: wrap;
}

/* ---------- Stat cards ---------- */

.uf-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
}

.uf-stat {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4);
    background: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
}

.uf-tile {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    flex: 0 0 auto;
}

.uf-tile svg { width: 20px; height: 20px; }

.tone-orange { color: var(--lilac-600); }
.tone-orange .uf-tile { background: var(--tint-lilac); }
.tone-green  { color: var(--ink-mint); }
.tone-green .uf-tile { background: var(--tint-mint); }
.tone-amber  { color: var(--ink-peach); }
.tone-amber .uf-tile { background: var(--tint-peach); }
.tone-navy   { color: var(--ink-sky); }
.tone-navy .uf-tile { background: var(--tint-sky); }
/* An alert rather than a category, so this one uses the system red instead of the
   muted rose the other cards are tinted with, and it colours the number and the label
   too — a faintly pink tile alone does not read as "look at this". */
.tone-red    { color: var(--sys-red); }
.tone-red .uf-tile { background: color-mix(in srgb, var(--sys-red) 13%, transparent); }
.tone-red .uf-stat-value,
.tone-red .uf-stat-label { color: var(--sys-red); }
.uf-stat.tone-red { border-color: color-mix(in srgb, var(--sys-red) 38%, var(--separator)); }

/* One card carries a sentence rather than a word, and clipping it to an ellipsis loses
   the only thing it says. This label wraps instead. */
.uf-stat-label.is-wrap {
    white-space: normal;
    overflow: visible;
    line-height: 1.25;
}

.uf-stat-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }

.uf-stat-value {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--label);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.uf-stat-of { font-size: .875rem; font-weight: 600; color: var(--label-tertiary); }

.uf-stat-label {
    font-size: .75rem;
    color: var(--label-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uf-ring { width: 42px; height: 42px; flex: 0 0 auto; }

/* ---------- Grid of panels ---------- */

.uf-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: var(--sp-3);
    align-items: start;
}

.uf-col { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }

.uf-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.uf-panel-head {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-4) var(--sp-3);
}

.uf-panel-title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.025em;
}

.uf-panel-sub { font-size: .8125rem; color: var(--label-tertiary); }

.uf-panel-nav { margin-left: auto; display: flex; gap: var(--sp-1); align-self: center; }

.uf-panel-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 var(--sp-2);
    border-radius: 9px;
    color: var(--label-secondary);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1;
}

.uf-panel-nav a:hover { background: var(--bg-fill); color: var(--label); }
.uf-panel-nav a.is-off { visibility: hidden; }
.uf-panel-nav a.uf-link { font-size: .8125rem; font-weight: 700; color: var(--lilac-700); }

.uf-panel-body { padding: 0 var(--sp-3) var(--sp-3); }

.uf-empty-line {
    margin: 0;
    padding: var(--sp-4) var(--sp-2);
    font-size: .875rem;
    color: var(--label-tertiary);
}

/* ---------- Rows ---------- */

.uf-group + .uf-group { margin-top: var(--sp-2); }

.uf-group-head {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-2) var(--sp-1);
    text-decoration: none;
}

.uf-dot { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 auto; }

.uf-group-name {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--label-secondary);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uf-group-head:hover .uf-group-name { color: var(--accent-deep); }

.uf-group-count { margin-left: auto; font-size: .75rem; color: var(--label-tertiary); font-variant-numeric: tabular-nums; }

.uf-item {
    display: flex;
    /* Top-aligned because the title may now run to several lines; centring left the
       tick box and the delete control floating in the middle of a tall row. */
    align-items: flex-start;
    gap: var(--sp-3);
    min-height: 48px;
    padding: var(--sp-2) var(--sp-3);
    border-radius: 12px;
}

/* Nudges the text down so its first line sits level with the controls beside it. */
.uf-item > .uf-item-text { padding-block-start: .18rem; }

.uf-item:hover { background: var(--bg-fill); }

.uf-item.is-carried { background: var(--tint-peach); }

.uf-item.is-done .uf-item-text { text-decoration: line-through; color: var(--label-tertiary); }

/* Wraps instead of being cut off with an ellipsis. A task title is the thing the row
   exists to say; truncating it left the second half unreadable with no way to see it.
   overflow-wrap keeps a single very long word from pushing the row sideways. */
.uf-item-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .9375rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.uf-item-meta { flex: 0 0 auto; font-size: .75rem; color: var(--label-tertiary); white-space: nowrap; }

/* Bulletin likes. The count sits on the button rather than behind a hover, because it
   is the board's number: everyone sees the same one, and the names are in the title. */
.uf-like {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    height: 26px;
    padding: 0 9px;
    border: 1px solid var(--separator);
    border-radius: 999px;
    background: transparent;
    color: var(--label-secondary);
    font-size: .75rem;
    font-weight: 600;
    line-height: 1;
}

.uf-like:hover { background: var(--bg-fill); color: var(--label); }

.uf-like.is-on {
    background: var(--tint-sky);
    border-color: transparent;
    color: var(--ink-sky);
}

.uf-like:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Holds an SVG cross rather than the "×" glyph, so the mark is centred and keeps the
   same stroke weight everywhere instead of following whichever font loaded. */
.uf-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--label-tertiary);
    flex: 0 0 auto;
    /* Stays quiet until the row is approached — a delete control should not be the
       loudest thing in a list. */
    opacity: .55;
    transition: opacity .12s ease, background-color .12s ease, color .12s ease;
}

.uf-item:hover .uf-x,
.uf-note-item:hover .uf-x { opacity: 1; }

.uf-x:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--sys-red) 12%, transparent);
    color: var(--sys-red);
}

.uf-x:focus-visible {
    opacity: 1;
    outline: 2px solid var(--sys-red);
    outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
    .uf-x { transition: none; }
}

/* ---------- Pills ---------- */

.uf-pill {
    display: inline-flex;
    align-items: center;
    height: 21px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .01em;
    flex: 0 0 auto;
}

.pill-grey  { background: var(--bg-fill-strong); color: var(--label-secondary); }
.pill-blue  { background: var(--tint-sky); color: var(--ink-sky); }
.pill-amber { background: var(--tint-peach); color: var(--ink-peach); }
.pill-green { background: var(--tint-mint); color: var(--ink-mint); }
.pill-red   { background: var(--tint-rose); color: var(--ink-rose); }

/* The chart label column is narrow, and this pill carries a sentence. Wrapping keeps the
   whole sentence rather than pushing it out of the column. */
.uf-pill.is-wrap {
    height: auto;
    white-space: normal;
    padding: 3px 9px;
    line-height: 1.25;
}

/* ---------- Project rows with a donut ---------- */

.uf-project {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
    border-radius: 14px;
    text-decoration: none;
    color: var(--label);
}

.uf-project:hover { background: var(--bg-fill); }

.uf-project .uf-tile { width: 38px; height: 38px; border-radius: 12px; }
.uf-project .uf-tile svg { width: 18px; height: 18px; }

.uf-project-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }

.uf-project-name {
    font-size: .9375rem;
    font-weight: 600;
    letter-spacing: -.015em;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uf-project-meta { font-size: .75rem; color: var(--label-tertiary); }

.uf-donut { position: relative; width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; }
.uf-donut svg { position: absolute; inset: 0; width: 44px; height: 44px; }
.uf-donut-pct { font-size: .625rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Planning controls ---------- */

.uf-plan-add {
    display: flex;
    gap: var(--sp-2);
    align-items: center;
    margin-top: var(--sp-2);
    padding: var(--sp-2);
    background: var(--bg-fill);
    border-radius: 14px;
}

.uf-plan-add select { flex: 0 0 170px; min-width: 0; }
.uf-plan-add input { flex: 1 1 auto; min-width: 0; }

.uf-pool { margin-top: var(--sp-2); }

.uf-pool > summary {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--label-secondary);
    cursor: pointer;
    list-style: none;
    border-radius: 10px;
}

.uf-pool > summary::-webkit-details-marker { display: none; }

.uf-pool > summary::before {
    content: "▸";
    font-size: .7rem;
    color: var(--label-tertiary);
    transition: transform 160ms var(--ease);
}

.uf-pool[open] > summary::before { transform: rotate(90deg); }
.uf-pool > summary:hover { background: var(--bg-fill); color: var(--label); }

.uf-pool-body { padding-top: var(--sp-1); }

.btn-soft {
    background: var(--bg-fill);
    color: var(--label);
    border: none;
    border-radius: 9px;
    font-weight: 600;
}

.btn-soft:hover { background: var(--bg-fill-strong); color: var(--label); }

.uf-quick-add { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-1); }
.uf-quick-add input { flex: 1 1 auto; min-width: 0; }

.uf-daily { margin-top: var(--sp-2); padding: 0 var(--sp-1); }
.uf-daily textarea { resize: vertical; line-height: 1.55; border-radius: 14px; }
.uf-daily-foot { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-2); }

@media (max-width: 1199.98px) {
    .uf-grid { grid-template-columns: 1fr; }
    .uf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .uf-stats { grid-template-columns: 1fr; }
    .uf-hello-title { font-size: 1.5rem; }
    .uf-plan-add { flex-wrap: wrap; }
    .uf-plan-add select { flex: 1 1 100%; }
}

/* Stat cards are links now: each one leads somewhere that explains its number. */
a.uf-stat { text-decoration: none; color: inherit; cursor: pointer; }
a.uf-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
/* "See more" — lists stay short; the rest is one press away. */
.uf-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: var(--sp-2) 0 0 var(--sp-3);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--link);
    text-decoration: none;
}

.uf-more:hover { text-decoration: underline; }

/* Note list under the day's entry */

.uf-note-list { margin-top: var(--sp-3); border-top: 1px solid var(--separator); padding-top: var(--sp-2); }

.uf-note-row {
    display: flex;
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
    border-radius: 10px;
    text-decoration: none;
    color: var(--label);
}

.uf-note-row:hover { background: var(--bg-fill); }

.uf-note-day {
    flex: 0 0 62px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--label-tertiary);
}

.uf-note-snip {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .8125rem;
    color: var(--label-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uf-note-full { padding: var(--sp-3); border-radius: 12px; }
.uf-note-full + .uf-note-full { border-top: 1px solid var(--separator); }
.uf-note-full-day { font-size: .8125rem; font-weight: 700; color: var(--link); text-decoration: none; }
.uf-note-full-text { margin: var(--sp-1) 0 0; font-size: .9375rem; white-space: pre-wrap; }

/* Date field in the planning row */
.uf-plan-add .uf-date { flex: 0 0 148px; }

@media (max-width: 575.98px) {
    .uf-plan-add .uf-date { flex: 1 1 100%; }
}

/* Work areas */
.uf-tile.is-small { width: 28px; height: 28px; border-radius: 9px; }
.uf-tile.is-small svg { width: 15px; height: 15px; }

.uf-panel-head .uf-tile { width: 34px; height: 34px; border-radius: 11px; }
.uf-panel-head .uf-tile svg { width: 17px; height: 17px; }

.uf-area-form { display: flex; flex-direction: column; gap: var(--sp-1); padding: 0 var(--sp-2); }
.uf-area-form .form-label { margin: var(--sp-2) 0 0; color: var(--label-secondary); }
.uf-area-form button { margin-top: var(--sp-3); }

.uf-area-hint {
    margin: var(--sp-4) var(--sp-2) 0;
    padding-top: var(--sp-3);
    border-top: 1px solid var(--separator);
    font-size: .8125rem;
    color: var(--label-tertiary);
    line-height: 1.6;
}

/* ---------- Notlarım: her satır tek tek işaretlenir ---------- */
.uf-note-item {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .5rem .1rem;
    border-bottom: 1px solid var(--separator);
}

.uf-note-item:last-child { border-bottom: 0; }

.uf-note-item > form { display: flex; flex: 0 0 auto; }

.uf-note-text {
    flex: 1 1 auto;
    font-size: .9rem;
    line-height: 1.45;
    color: var(--label);
    word-break: break-word;
}

/* Halledilen not: üstü çizili ve soluk. */
.uf-note-item.is-done .uf-note-text {
    text-decoration: line-through;
    text-decoration-color: var(--lilac-600);
    text-decoration-thickness: 2px;
    color: var(--label-tertiary);
}

.uf-note-item .uf-x {
    opacity: 0;
    transition: opacity .15s ease;
}

.uf-note-item:hover .uf-x,
.uf-note-item:focus-within .uf-x { opacity: 1; }

.uf-addline {
    display: flex;
    gap: .4rem;
    margin-top: .65rem;
}

.uf-addline .form-control { font-size: .875rem; }

.uf-note-edit {
    margin-top: .6rem;
    font-size: .8rem;
}

.uf-note-edit > summary {
    cursor: pointer;
    color: var(--lilac-700);
    list-style: none;
    padding: .2rem 0;
}

.uf-note-edit > summary::-webkit-details-marker { display: none; }
.uf-note-edit > summary::before { content: "✎ "; }
.uf-note-edit > summary:hover { text-decoration: underline; }
.uf-note-edit .uf-daily { margin-top: .5rem; }

/* ---------- Dünden kalan notlar: nazik dürtme ---------- */
.uf-nudge {
    background: linear-gradient(135deg, var(--tint-peach) 0%, var(--bg-elevated) 62%);
    border-color: var(--lilac-500);
}

.uf-nudge .uf-panel-title { font-size: 1rem; }

.uf-ghost-btn {
    flex: 0 0 auto;
    border: 1px solid var(--lilac-500);
    background: transparent;
    color: var(--lilac-700);
    border-radius: 999px;
    font-size: .72rem;
    padding: .18rem .6rem;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}

.uf-ghost-btn:hover {
    background: var(--lilac-600);
    color: #fff;
}

/* Dışa aktarma bağlantıları: PDF / Excel yan yana */
.uf-export {
    display: inline-flex;
    gap: .1rem;
    align-items: center;
    margin: .35rem 0 0;
}

.uf-export .uf-link {
    font-size: .78rem;
    padding: .16rem .55rem;
    border-radius: 999px;
    border: 1px solid var(--separator);
    text-decoration: none;
    white-space: nowrap;
}

.uf-export .uf-link + .uf-link { margin-inline-start: .3rem; }

.uf-export .uf-link:hover {
    background: var(--lilac-100);
    border-color: var(--lilac-300);
}


/* ================= Kart varyantları ================= */

/* Yapılacaklar: lila kart */
/* Flat fill rather than a gradient. The old fade ran diagonally from --lilac-100 to
   --bg-elevated, so the list sat on two different shades; in dark mode it ran from a
   pale lilac to near-black across one card. --tint-lilac and --ink-lilac are defined in
   both themes, unlike --lilac-100/--lilac-700, so the card now follows the theme. */
.uf-panel.is-lilac {
    background: var(--tint-lilac);
    border-color: var(--lilac-300);
}

.uf-panel.is-lilac .uf-panel-title { color: var(--ink-lilac); }

/* Rutin İşler: daha küçük, daha sakin */
.uf-panel.is-compact .uf-panel-title { font-size: .95rem; }
.uf-panel.is-compact .uf-panel-body { padding-block: var(--sp-2); }
.uf-panel.is-compact .uf-item { padding-block: .3rem; }
.uf-panel.is-compact .uf-item-text { font-size: .82rem; }

/* ================= Rutin İşler: yatay şerit ================= */

.uf-routines {
    margin-bottom: var(--sp-5);
}

.uf-routines-head {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .55rem;
}

.uf-routines-title {
    margin: 0;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--label-secondary);
}

.uf-routines-sub {
    font-size: .78rem;
    color: var(--label-tertiary);
    font-variant-numeric: tabular-nums;
}

/* Kartlar yan yana; sığmazsa şerit kendi içinde kayar, sayfa kaymaz. */
.uf-routines-strip {
    display: flex;
    gap: .6rem;
    overflow-x: auto;
    padding-bottom: .35rem;
    scrollbar-width: thin;
}

/* Kendi sayfasında yatay kaydırmaya gerek yok: yer bol, kartlar satır satır dizilir
   ve hepsi tek bakışta görünür. */
.uf-routines.is-page .uf-routines-strip {
    flex-wrap: wrap;
    overflow-x: visible;
}

.uf-routines-weeks {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-bottom: var(--sp-4);
}

.uf-routines-weeklabel {
    font-size: .8125rem;
    color: var(--label-secondary);
    font-variant-numeric: tabular-nums;
}

.uf-routines-empty {
    margin: 0 0 var(--sp-3);
    font-size: .875rem;
    color: var(--label-secondary);
}

.uf-routine {
    position: relative;
    flex: 0 0 auto;
    width: 176px;
    border-radius: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--separator);
    box-shadow: var(--shadow-card);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.uf-routine:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
}

/* Kartın tamamı tek bir düğme: nereye basarsan bas o hafta işaretlenir. */
.uf-routine-face {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
    width: 100%;
    padding: .8rem .85rem .75rem;
    border: 0;
    background: transparent;
    text-align: start;
    border-radius: inherit;
    cursor: pointer;
}

.uf-routine-face:disabled { cursor: default; }

.uf-routine-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--gray3);
    color: transparent;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.uf-routine-face:hover .uf-routine-mark {
    border-color: var(--lilac-500);
    color: var(--lilac-300);
}

.uf-routine-title {
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--label);
}

.uf-routine-when {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .1rem .45rem;
    border-radius: 999px;
}

.uf-routine.tone-week .uf-routine-when { background: var(--tint-sky); color: var(--ink-sky); }
.uf-routine.tone-month .uf-routine-when { background: var(--tint-peach); color: var(--ink-peach); }

/* Bu hafta yapıldı */
.uf-routine.is-done {
    background: linear-gradient(150deg, var(--lime-100) 0%, var(--bg-elevated) 78%);
    border-color: var(--lime-600);
}

.uf-routine.is-done .uf-routine-mark {
    background: var(--lime-500);
    border-color: var(--lime-600);
    color: var(--ink-900);
}

.uf-routine.is-done .uf-routine-title {
    text-decoration: line-through;
    text-decoration-color: var(--lime-600);
    text-decoration-thickness: 2px;
    color: var(--label-secondary);
}

.uf-routine-x {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
    /* Flex rather than line-height: it holds an SVG now, and line-height centres text. */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: var(--bg-fill);
    color: var(--label-secondary);
    opacity: 0;
    transition: opacity .15s ease, background-color .15s ease;
}

.uf-routine-x:focus-visible {
    opacity: 1;
    outline: 2px solid var(--sys-red);
    outline-offset: 1px;
}

.uf-routine:hover .uf-routine-x,
.uf-routine:focus-within .uf-routine-x { opacity: 1; }

.uf-routine-x:hover { background: var(--sys-red); color: #fff; }

/* Yeni rutin kartı */
.uf-routine.is-new {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: .7rem .75rem;
    background: transparent;
    border-style: dashed;
    border-color: var(--lilac-300);
    box-shadow: none;
}

.uf-routine.is-new:hover { transform: none; box-shadow: none; }

.uf-routine-input,
.uf-routine-select {
    width: 100%;
    font-size: .8rem;
    padding: .3rem .5rem;
    border: 1px solid var(--separator);
    border-radius: 9px;
    background: var(--bg-elevated);
    color: var(--label);
}

.uf-routine-add {
    align-self: flex-start;
    border: 0;
    border-radius: 999px;
    background: var(--lime-500);
    color: var(--ink-900);
    font-size: .76rem;
    font-weight: 700;
    padding: .25rem .8rem;
}

.uf-routine-add:hover { background: var(--lime-600); }

@media (prefers-reduced-motion: reduce) {
    .uf-routine, .uf-routine-mark { transition: none; }
    .uf-routine:hover { transform: none; }
}

/* ================= Tamamlama kutlaması (yalnız proje/rutin işleri) ================= */

.uf-burst {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    pointer-events: none;
    animation: uf-burst-fly .6s cubic-bezier(.2, .7, .3, 1) forwards;
}

@keyframes uf-burst-fly {
    0%   { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.4) rotate(220deg); }
}

.is-celebrating {
    animation: uf-pop .42s cubic-bezier(.2, 1.6, .4, 1);
}

@keyframes uf-pop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.32); }
    100% { transform: scale(1); }
}

/* ================= Sayfa açılışı: kartlar sırayla belirir ================= */

.uf-dash .uf-stat,
.uf-dash .uf-routine,
.uf-dash .uf-panel {
    animation: uf-rise .5s cubic-bezier(.22, 1, .36, 1) backwards;
}

.uf-dash .uf-stat:nth-child(1)   { animation-delay: .02s; }
.uf-dash .uf-stat:nth-child(2)   { animation-delay: .06s; }
.uf-dash .uf-stat:nth-child(3)   { animation-delay: .10s; }
.uf-dash .uf-stat:nth-child(4)   { animation-delay: .14s; }
.uf-dash .uf-routine:nth-child(1){ animation-delay: .16s; }
.uf-dash .uf-routine:nth-child(2){ animation-delay: .20s; }
.uf-dash .uf-routine:nth-child(3){ animation-delay: .24s; }
.uf-dash .uf-routine:nth-child(4){ animation-delay: .28s; }
.uf-dash .uf-routine:nth-child(n+5) { animation-delay: .30s; }
.uf-dash .uf-col .uf-panel:nth-child(1) { animation-delay: .26s; }
.uf-dash .uf-col .uf-panel:nth-child(2) { animation-delay: .32s; }
.uf-dash .uf-col .uf-panel:nth-child(3) { animation-delay: .38s; }
.uf-dash .uf-col .uf-panel:nth-child(n+4) { animation-delay: .42s; }

@keyframes uf-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}


@media (prefers-reduced-motion: reduce) {
    .uf-dash .uf-stat,
    .uf-dash .uf-routine,
    .uf-dash .uf-panel,
    .is-celebrating { animation: none; }

    .uf-burst { display: none; }
}

/* ================= Üst bar araması ================= */

.uf-topsearch {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 20rem;
    flex: 1 1 12rem;
}

.uf-topsearch svg {
    position: absolute;
    inset-inline-start: 10px;
    width: 15px;
    height: 15px;
    color: var(--label-tertiary);
    pointer-events: none;
}

.uf-topsearch input {
    width: 100%;
    font-size: .84rem;
    padding: .38rem .7rem .38rem 2rem;
    border: 1px solid var(--separator);
    border-radius: 999px;
    background: var(--bg-fill);
    color: var(--label);
    transition: border-color .15s ease, background-color .15s ease;
}

.uf-topsearch input::placeholder { color: var(--label-tertiary); }

.uf-topsearch input:focus {
    outline: none;
    background: var(--bg-elevated);
    border-color: var(--lilac-500);
    box-shadow: 0 0 0 3px var(--lilac-100);
}

@media (max-width: 575.98px) {
    .uf-topsearch { max-width: 9rem; flex: 0 1 9rem; }
}

/* ---------- Arama sonuçları ---------- */

.uf-search-again {
    display: flex;
    gap: .4rem;
    margin-bottom: var(--sp-4);
    max-width: 34rem;
}

.uf-hit {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .1rem;
    border-bottom: 1px solid var(--separator);
    text-decoration: none;
    color: inherit;
}

.uf-hit:last-child { border-bottom: 0; }
.uf-hit:hover { background: var(--bg-fill); border-radius: 8px; }

.uf-hit-text {
    flex: 1 1 auto;
    font-size: .88rem;
    color: var(--label);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uf-hit-meta {
    flex: 0 0 auto;
    font-size: .75rem;
    color: var(--label-tertiary);
    white-space: nowrap;
}

.uf-hit.is-done .uf-hit-text {
    text-decoration: line-through;
    color: var(--label-tertiary);
}

/* ---------- Not etiketleri ---------- */

.uf-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: var(--sp-3);
}

.uf-tag {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .76rem;
    font-weight: 600;
    padding: .18rem .6rem;
    border-radius: 999px;
    background: var(--lilac-100);
    color: var(--lilac-700);
    text-decoration: none;
    border: 1px solid transparent;
}

.uf-tag:hover { border-color: var(--lilac-300); }
.uf-tag.is-on { background: var(--lilac-600); color: #fff; }
.uf-tag b { font-variant-numeric: tabular-nums; }

/* Durum raporu, dışa aktarma satırının başındaki asıl düğme */
.uf-export .uf-link.is-lead {
    background: var(--lime-500);
    border-color: var(--lime-600);
    color: var(--ink-900);
    font-weight: 700;
}

.uf-export .uf-link.is-lead:hover { background: var(--lime-600); }

/* ================= Toplantı notları ================= */

.uf-meetings {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.uf-meeting {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    background: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    color: var(--label);
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease;
}

.uf-meeting:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lift);
    color: var(--label);
}

.uf-meeting-date {
    font-size: .8125rem;
    color: var(--label-secondary);
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
}

.uf-meeting-title {
    font-weight: 600;
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}

.uf-meeting-counts {
    display: flex;
    gap: var(--sp-1);
    flex: 0 0 auto;
}

/* Madde yazma satırı: başlıkla aynı hizada, düğme sağda. */
.uf-meeting-add {
    display: flex;
    gap: var(--sp-2);
    margin-bottom: var(--sp-3);
}

.uf-meeting-add .btn { flex: 0 0 auto; }

/* Numbering comes from a counter, not from the list marker: the rows are flex
   containers, and a flex item stops rendering its ::marker. */
.uf-meeting-items {
    list-style: none;
    counter-reset: madde;
    margin: 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.uf-meeting-text::before {
    content: counter(madde) ". ";
    color: var(--label-tertiary);
    font-variant-numeric: tabular-nums;
}

.uf-meeting-item {
    counter-increment: madde;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2);
    padding: var(--sp-2) 0;
    border-bottom: 1px solid var(--separator);
}

.uf-meeting-item:last-child { border-bottom: none; }

.uf-meeting-text {
    flex: 1 1 260px;
    min-width: 0;
    word-break: break-word;
}

/* Göreve dönüşmüş madde geri planda kalır: iş artık planın içinde. */
.uf-meeting-item.is-task .uf-meeting-text { color: var(--label-secondary); }

.uf-meeting-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.uf-meeting-convert {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
}

.uf-meeting-convert .form-select { width: auto; min-width: 5.5rem; }

@media (max-width: 575.98px) {
    .uf-meeting-add { flex-direction: column; }
    .uf-meeting-add .btn { width: 100%; }
}

/* ---------- Açık / koyu tema düğmesi ---------- */

.uf-theme-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--separator);
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--label-secondary);
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.uf-theme-toggle:hover {
    background: var(--bg-fill);
    color: var(--label);
}

.uf-theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.uf-theme-toggle svg { width: 18px; height: 18px; }

/* Karşıya geçileceği için: açıkta ay, koyuda güneş görünür. */
.uf-theme-toggle .uf-theme-sun { display: none; }

:root[data-theme="dark"] .uf-theme-toggle .uf-theme-moon { display: none; }
:root[data-theme="dark"] .uf-theme-toggle .uf-theme-sun { display: inline; }

/* ---------- Çizelgede versiyon ayraçları ---------- */

/* Yalnızca görsel: çubuğun üstünde ince bir çizgi ve küçük bir etiket. */
.uf-gantt-version {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px dashed var(--label-secondary);
    pointer-events: none;
    z-index: 3;
}

.uf-gantt-version-tag {
    position: absolute;
    top: -2px;
    left: 4px;
    padding: 1px .3rem 2px;
    border-radius: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--separator);
    color: var(--label-secondary);
    font-size: .625rem;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    /* Ad üstte, tarih altında: "ne zaman" ipucu metninde saklı kalmasın. */
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
}

.uf-gantt-version-name { font-weight: 700; color: var(--label); }

.uf-gantt-version-date { font-size: .5625rem; color: var(--label-tertiary); }

/* ---------- Versiyon ekranı ---------- */

.uf-version-add {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-bottom: var(--sp-3);
}

.uf-version-add .form-control { width: auto; flex: 1 1 10rem; }

.uf-version-add .btn { flex: 0 0 auto; }

.uf-versions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}

.uf-version {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) 0;
    border-bottom: 1px solid var(--separator);
}

.uf-version:last-child { border-bottom: none; }

.uf-version-name { font-weight: 600; }

.uf-version-date {
    margin-right: auto;
    font-size: .8125rem;
    color: var(--label-secondary);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
    .uf-version-add { flex-direction: column; }
    .uf-version-add .form-control, .uf-version-add .btn { width: 100%; flex: 0 0 auto; }
}

/* Panodaki plan listesinde yuvarlak yalnızca göstergedir; işaretleme projenin
   panosunda yapılır. Tıklanabilir görünmemesi için imleç ve durum ayrı verilir. */
.uf-check.is-static { cursor: default; }

.uf-check.is-static[data-done="true"] {
    background: var(--sys-green);
    border-color: var(--sys-green);
}

.uf-check.is-static[data-done="true"] svg { opacity: 1; }

/* ---------- Proje raporu: iki sütun ---------- */

.uf-report {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3);
    align-items: start;
}

.uf-report-col {
    background: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: var(--sp-4);
}

.uf-report-head {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    margin-bottom: var(--sp-3);
}

.uf-report-title {
    margin: 0;
    font-size: .9375rem;
    font-weight: 600;
}

.uf-report-count {
    font-size: .8125rem;
    color: var(--label-tertiary);
    font-variant-numeric: tabular-nums;
}

.uf-report-empty {
    margin: 0;
    font-size: .875rem;
    color: var(--label-secondary);
}

.uf-report-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.uf-report-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2);
    padding: var(--sp-2) 0;
    border-bottom: 1px solid var(--separator);
}

.uf-report-item:last-child { border-bottom: none; }

.uf-report-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .875rem;
    word-break: break-word;
}

/* Biten işin metni geri planda: bu sütun "ne yapıldı" sorusuna bakılan yer. */
.uf-report-col.is-done .uf-report-text { color: var(--label-secondary); }

.uf-report-date {
    font-size: .75rem;
    color: var(--label-tertiary);
    font-variant-numeric: tabular-nums;
}

/* Versiyon geçiş düğmeleri: sütunun başındaki küçük seçim şeridi. */
.uf-version-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: var(--sp-3);
}

.uf-version-tab {
    border: 1px solid var(--separator);
    background: var(--bg-elevated);
    color: var(--label-secondary);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: .6875rem;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease);
}

.uf-version-tab:hover { background: var(--bg-fill); color: var(--label); }

.uf-version-tab.is-active {
    background: var(--tint-sky);
    border-color: var(--tint-sky);
    color: var(--ink-sky);
}

/* Finished work is split into versions. The heading is quiet on purpose — it separates
   the list rather than competing with the column title above it. */
.uf-report-group + .uf-report-group { margin-top: var(--sp-3); }

.uf-report-group-head {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--separator);
    margin-bottom: 4px;
}

.uf-report-group-name {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--label);
}

.uf-hello-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-wrap: wrap;
}

@media (max-width: 767.98px) {
    .uf-report { grid-template-columns: 1fr; }
}

/* ---------- Kullanıcıya açık/kapalı ekranlar ---------- */

.uf-screen-group { margin-bottom: var(--sp-3); }

.uf-screen-group-title {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--label-tertiary);
    margin-bottom: .25rem;
}

/* ---------- Proje istekleri ---------- */

.uf-requests {
    margin-top: var(--sp-3);
    background: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: var(--sp-4);
}

.uf-request {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--sp-2);
    padding: var(--sp-2) 0;
    border-bottom: 1px solid var(--separator);
}

.uf-request:last-child { border-bottom: none; }

.uf-request-text {
    flex: 1 1 260px;
    min-width: 0;
    font-size: .875rem;
    word-break: break-word;
}

.uf-request-meta {
    font-size: .75rem;
    color: var(--label-tertiary);
    white-space: nowrap;
}
