/* ============================================================
   WellFlow Design System — Components
   wf-components.css   (requires wf-tokens.css)
   ============================================================ */

/* ============================== APP SHELL ============================== */
.wf-app {
    display: flex;
    min-height: 100vh;
}

.wf-sidebar {
    width: var(--wf-sidebar-w);
    flex: 0 0 var(--wf-sidebar-w);
    background: var(--wf-sidebar-bg);
    color: var(--wf-sidebar-text);
    display: flex;
    flex-direction: column;
    transition: width var(--wf-transition), flex-basis var(--wf-transition);
    overflow: hidden;
}

.wf-sidebar__brand {
    height: var(--wf-topbar-h);
    display: flex;
    align-items: center;
    gap: var(--wf-space-3);
    padding: 0 var(--wf-space-4);
    color: var(--wf-sidebar-text-on);
    font-weight: var(--wf-fw-bold);
    font-size: var(--wf-fs-md);
    letter-spacing: .2px;
    white-space: nowrap;
}

.wf-sidebar__logo {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: var(--wf-radius-md);
    background: var(--wf-accent);
    color: var(--wf-accent-fg);
    display: grid;
    place-items: center;
    font-weight: var(--wf-fw-bold);
    font-size: var(--wf-fs-base);
}

.wf-sidebar__nav {
    padding: var(--wf-space-3) var(--wf-space-2);
    overflow-y: auto;
    flex: 1;
}

.wf-nav-group__label {
    font-size: var(--wf-fs-xs);
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.40);
    padding: var(--wf-space-4) var(--wf-space-3) var(--wf-space-2);
    white-space: nowrap;
}

.wf-nav-item {
    display: flex;
    align-items: center;
    gap: var(--wf-space-3);
    padding: 9px var(--wf-space-3);
    border-radius: var(--wf-radius-md);
    color: var(--wf-sidebar-text);
    font-size: var(--wf-fs-base);
    font-weight: var(--wf-fw-medium);
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--wf-transition), color var(--wf-transition);
}

    .wf-nav-item:hover {
        background: var(--wf-sidebar-hover);
        color: var(--wf-sidebar-text-on);
        text-decoration: none;
    }

    .wf-nav-item.is-active {
        background: var(--wf-sidebar-active-bg);
        color: var(--wf-sidebar-text-on);
        box-shadow: inset 3px 0 0 var(--wf-accent);
    }

.wf-nav-item__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    opacity: .9;
}

.wf-nav-item__badge {
    margin-left: auto;
}

/* collapsed state */
.wf-app.is-collapsed .wf-sidebar {
    width: var(--wf-sidebar-w-collapsed);
    flex-basis: var(--wf-sidebar-w-collapsed);
}

.wf-app.is-collapsed .wf-nav-item__label,
.wf-app.is-collapsed .wf-nav-group__label,
.wf-app.is-collapsed .wf-sidebar__brand-text,
.wf-app.is-collapsed .wf-nav-item__badge {
    display: none;
}

.wf-app.is-collapsed .wf-nav-item {
    justify-content: center;
}

.wf-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wf-topbar {
    height: var(--wf-topbar-h);
    background: var(--wf-topbar-bg);
    border-bottom: 1px solid var(--wf-border);
    display: flex;
    align-items: center;
    gap: var(--wf-space-3);
    padding: 0 var(--wf-space-5);
    position: sticky;
    top: 0;
    z-index: var(--wf-z-sticky);
}

.wf-topbar__title {
    font-size: var(--wf-fs-md);
    font-weight: var(--wf-fw-semibold);
}

.wf-content {
    padding: var(--wf-space-6);
    flex: 1;
}

/* Başlık zaten topbar'da gösteriliyor (ViewData["Title"]); sayfa gövdesinde
   tekrarlanmaz — burada yalnızca kısa bir açıklama/bağlam satırı yer alır. */
.wf-page-head {
    margin-bottom: var(--wf-space-4);
}

.wf-page-head__sub {
    font-size: var(--wf-fs-md);
    color: var(--wf-text-muted);
}

/* hamburger / icon button */
.wf-iconbtn {
    width: var(--wf-control-h);
    height: var(--wf-control-h);
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: var(--wf-radius-md);
    background: transparent;
    color: var(--wf-text-muted);
    cursor: pointer;
    transition: background var(--wf-transition), color var(--wf-transition);
}

    .wf-iconbtn:hover {
        background: var(--wf-surface-3);
        color: var(--wf-text);
    }

/* ============================== BUTTONS ============================== */
.wf-btn {
    --_h: var(--wf-control-h);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--wf-space-2);
    height: var(--_h);
    padding: 0 var(--wf-space-4);
    border: 1px solid transparent;
    border-radius: var(--wf-radius-md);
    font-size: var(--wf-fs-base);
    font-weight: var(--wf-fw-medium);
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background var(--wf-transition), border-color var(--wf-transition), color var(--wf-transition), box-shadow var(--wf-transition);
}

    .wf-btn:disabled, .wf-btn.is-disabled {
        opacity: .55;
        cursor: not-allowed;
        pointer-events: none;
    }

.wf-btn__icon {
    width: 16px;
    height: 16px;
}

.wf-btn--primary {
    background: var(--wf-accent);
    color: var(--wf-accent-fg);
}

    .wf-btn--primary:hover {
        background: var(--wf-accent-hover);
    }

    .wf-btn--primary:active {
        background: var(--wf-accent-active);
    }

.wf-btn--secondary {
    background: var(--wf-surface);
    color: var(--wf-text);
    border-color: var(--wf-border-strong);
    box-shadow: var(--wf-shadow-sm);
}

    .wf-btn--secondary:hover {
        background: var(--wf-surface-2);
        border-color: var(--wf-text-subtle);
    }

.wf-btn--outline {
    background: transparent;
    color: var(--wf-accent-text);
    border-color: var(--wf-accent);
}

    .wf-btn--outline:hover {
        background: var(--wf-accent-soft);
    }

.wf-btn--ghost {
    background: transparent;
    color: var(--wf-text-muted);
}

    .wf-btn--ghost:hover {
        background: var(--wf-surface-3);
        color: var(--wf-text);
    }

.wf-btn--danger {
    background: var(--wf-danger);
    color: #fff;
}

    .wf-btn--danger:hover {
        filter: brightness(.94);
    }

.wf-btn--sm {
    --_h: var(--wf-control-h-sm);
    padding: 0 var(--wf-space-3);
    font-size: var(--wf-fs-sm);
}

.wf-btn--lg {
    --_h: var(--wf-control-h-lg);
    padding: 0 var(--wf-space-5);
    font-size: var(--wf-fs-md);
}

.wf-btn--icon {
    width: var(--_h);
    padding: 0;
}

.wf-btn--block {
    width: 100%;
}

.wf-btn.is-loading {
    color: transparent !important;
    position: relative;
}

    .wf-btn.is-loading::after {
        content: "";
        position: absolute;
        width: 15px;
        height: 15px;
        border: 2px solid currentColor;
        border-right-color: transparent;
        border-radius: 50%;
        color: var(--wf-accent-fg);
        animation: wf-spin .6s linear infinite;
    }

.wf-btn--secondary.is-loading::after, .wf-btn--outline.is-loading::after, .wf-btn--ghost.is-loading::after {
    color: var(--wf-accent);
}

@keyframes wf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* button group */
.wf-btn-group {
    display: inline-flex;
}

    .wf-btn-group .wf-btn {
        border-radius: 0;
        border-color: var(--wf-border-strong);
    }

        .wf-btn-group .wf-btn:first-child {
            border-radius: var(--wf-radius-md) 0 0 var(--wf-radius-md);
        }

        .wf-btn-group .wf-btn:last-child {
            border-radius: 0 var(--wf-radius-md) var(--wf-radius-md) 0;
        }

        .wf-btn-group .wf-btn + .wf-btn {
            margin-left: -1px;
        }

/* ============================== BADGES / PILLS ============================== */
.wf-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 20px;
    padding: 0 8px;
    border-radius: var(--wf-radius-pill);
    font-size: var(--wf-fs-xs);
    font-weight: var(--wf-fw-semibold);
    line-height: 1;
    white-space: nowrap;
}

.wf-badge--neutral {
    background: var(--wf-surface-3);
    color: var(--wf-text-muted);
}

.wf-badge--accent {
    background: var(--wf-accent-soft);
    color: var(--wf-accent-text);
}

.wf-badge--success {
    background: var(--wf-success-soft);
    color: var(--wf-success-text);
}

.wf-badge--warning {
    background: var(--wf-warning-soft);
    color: var(--wf-warning-text);
}

.wf-badge--danger {
    background: var(--wf-danger-soft);
    color: var(--wf-danger-text);
}

.wf-badge--info {
    background: var(--wf-info-soft);
    color: var(--wf-info-text);
}
/* solid variants */
.wf-badge--solid.wf-badge--accent {
    background: var(--wf-accent);
    color: var(--wf-accent-fg);
}

.wf-badge--solid.wf-badge--success {
    background: var(--wf-success);
    color: #fff;
}

.wf-badge--solid.wf-badge--warning {
    background: var(--wf-warning);
    color: #fff;
}

.wf-badge--solid.wf-badge--danger {
    background: var(--wf-danger);
    color: #fff;
}

.wf-badge--solid.wf-badge--info {
    background: var(--wf-info);
    color: #fff;
}

/* dot status */
.wf-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.wf-dot--success {
    background: var(--wf-success);
}

.wf-dot--warning {
    background: var(--wf-warning);
}

.wf-dot--danger {
    background: var(--wf-danger);
}

.wf-dot--neutral {
    background: var(--wf-text-subtle);
}

/* ============================== ALERTS ============================== */
.wf-alert {
    display: flex;
    gap: var(--wf-space-3);
    padding: var(--wf-space-3) var(--wf-space-4);
    border: 1px solid;
    border-radius: var(--wf-radius-md);
    font-size: var(--wf-fs-base);
}

.wf-alert__icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.wf-alert__title {
    font-weight: var(--wf-fw-semibold);
}

.wf-alert__body {
    color: var(--wf-text-muted);
    margin-top: 2px;
}

.wf-alert--success {
    background: var(--wf-success-soft);
    border-color: var(--wf-success-bd);
    color: var(--wf-success-text);
}

.wf-alert--warning {
    background: var(--wf-warning-soft);
    border-color: var(--wf-warning-bd);
    color: var(--wf-warning-text);
}

.wf-alert--danger {
    background: var(--wf-danger-soft);
    border-color: var(--wf-danger-bd);
    color: var(--wf-danger-text);
}

.wf-alert--info {
    background: var(--wf-info-soft);
    border-color: var(--wf-info-bd);
    color: var(--wf-info-text);
}

.wf-alert .wf-alert__body {
    color: inherit;
    opacity: .85;
}

/* ============================== CARDS ============================== */
.wf-card {
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-lg);
    box-shadow: var(--wf-shadow-sm);
}

.wf-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wf-space-3);
    padding: var(--wf-space-4) var(--wf-space-5);
    border-bottom: 1px solid var(--wf-border);
}

.wf-card__title {
    font-size: var(--wf-fs-md);
    font-weight: var(--wf-fw-semibold);
}

.wf-card__sub {
    font-size: var(--wf-fs-sm);
    color: var(--wf-text-muted);
    margin-top: 1px;
}

.wf-card__body {
    padding: var(--wf-space-5);
}

.wf-card__foot {
    padding: var(--wf-space-3) var(--wf-space-5);
    border-top: 1px solid var(--wf-border);
    background: var(--wf-surface-2);
    border-radius: 0 0 var(--wf-radius-lg) var(--wf-radius-lg);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--wf-space-2);
}

/* Uzun/kaydırmalı içerikli kartlarda (ör. yüzlerce izinli rol paneli)
   kaydet çubuğunu her zaman görünür tutar. */
.wf-card__foot--sticky {
    position: sticky;
    bottom: 0;
    z-index: var(--wf-z-sticky);
}

/* ============================== KPI / STAT CARDS ============================== */
.wf-kpi {
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-lg);
    box-shadow: var(--wf-shadow-sm);
    padding: var(--wf-space-4) var(--wf-space-5);
    display: flex;
    align-items: flex-start;
    gap: var(--wf-space-4);
}

.wf-kpi__icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: var(--wf-radius-md);
    background: var(--wf-accent-soft);
    color: var(--wf-accent-text);
    display: grid;
    place-items: center;
}

    .wf-kpi__icon svg {
        width: 20px;
        height: 20px;
    }

.wf-kpi__label {
    font-size: var(--wf-fs-sm);
    color: var(--wf-text-muted);
    font-weight: var(--wf-fw-medium);
}

.wf-kpi__value {
    font-size: var(--wf-fs-2xl);
    font-weight: var(--wf-fw-bold);
    line-height: 1.15;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

.wf-kpi__delta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: var(--wf-fs-sm);
    font-weight: var(--wf-fw-semibold);
    margin-top: 4px;
}

.wf-kpi__delta--up {
    color: var(--wf-success-text);
}

.wf-kpi__delta--down {
    color: var(--wf-danger-text);
}

/* ============================== FORMS ============================== */
.wf-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wf-label {
    font-size: var(--wf-fs-sm);
    font-weight: var(--wf-fw-medium);
    color: var(--wf-text);
}

.wf-label__req {
    color: var(--wf-danger);
    margin-left: 2px;
}

.wf-help {
    font-size: var(--wf-fs-xs);
    color: var(--wf-text-subtle);
}

.wf-field-error {
    font-size: var(--wf-fs-xs);
    color: var(--wf-danger-text);
}

.wf-input, .wf-select, .wf-textarea {
    width: 100%;
    height: var(--wf-control-h);
    padding: 0 var(--wf-space-3);
    background: var(--wf-surface);
    border: 1px solid var(--wf-border-strong);
    border-radius: var(--wf-radius-md);
    font-size: var(--wf-fs-base);
    color: var(--wf-text);
    transition: border-color var(--wf-transition), box-shadow var(--wf-transition);
}

.wf-textarea {
    height: auto;
    min-height: 78px;
    padding: var(--wf-space-2) var(--wf-space-3);
    resize: vertical;
}

    .wf-input::placeholder, .wf-textarea::placeholder {
        color: var(--wf-text-subtle);
    }

    .wf-input:hover, .wf-select:hover, .wf-textarea:hover {
        border-color: var(--wf-text-subtle);
    }

    .wf-input:focus, .wf-select:focus, .wf-textarea:focus {
        outline: none;
        border-color: var(--wf-accent);
        box-shadow: 0 0 0 3px var(--wf-focus-ring);
    }

    .wf-input:disabled, .wf-select:disabled, .wf-textarea:disabled {
        background: var(--wf-surface-3);
        color: var(--wf-text-subtle);
        cursor: not-allowed;
    }

    .wf-input.is-invalid, .wf-select.is-invalid, .wf-textarea.is-invalid {
        border-color: var(--wf-danger);
    }

        .wf-input.is-invalid:focus {
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--wf-danger) 25%, transparent);
        }

.wf-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6577' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

/* input group (prefix/suffix) */
.wf-input-group {
    display: flex;
}

.wf-input-group__addon {
    display: inline-flex;
    align-items: center;
    padding: 0 var(--wf-space-3);
    background: var(--wf-surface-3);
    border: 1px solid var(--wf-border-strong);
    color: var(--wf-text-muted);
    font-size: var(--wf-fs-sm);
}

    .wf-input-group__addon:first-child {
        border-right: 0;
        border-radius: var(--wf-radius-md) 0 0 var(--wf-radius-md);
    }

    .wf-input-group__addon:last-child {
        border-left: 0;
        border-radius: 0 var(--wf-radius-md) var(--wf-radius-md) 0;
    }

.wf-input-group .wf-input:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.wf-input-group .wf-input:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* checkbox / radio */
.wf-check {
    display: inline-flex;
    align-items: center;
    gap: var(--wf-space-2);
    cursor: pointer;
    font-size: var(--wf-fs-base);
}

    .wf-check input {
        width: 16px;
        height: 16px;
        accent-color: var(--wf-accent);
        cursor: pointer;
    }

/* switch */
.wf-switch {
    display: inline-flex;
    align-items: center;
    gap: var(--wf-space-2);
    cursor: pointer;
}

    .wf-switch input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

.wf-switch__track {
    width: 36px;
    height: 20px;
    border-radius: var(--wf-radius-pill);
    background: var(--wf-border-strong);
    position: relative;
    transition: background var(--wf-transition);
}

    .wf-switch__track::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #fff;
        box-shadow: var(--wf-shadow-sm);
        transition: transform var(--wf-transition);
    }

.wf-switch input:checked + .wf-switch__track {
    background: var(--wf-accent);
}

    .wf-switch input:checked + .wf-switch__track::after {
        transform: translateX(16px);
    }

.wf-switch input:focus-visible + .wf-switch__track {
    box-shadow: 0 0 0 3px var(--wf-focus-ring);
}

/* ============================== TABLE ============================== */
.wf-table-wrap {
    overflow-x: auto;
}

.wf-table {
    font-size: var(--wf-fs-base);
}

    .wf-table thead th {
        text-align: left;
        font-weight: var(--wf-fw-semibold);
        color: var(--wf-text-muted);
        font-size: var(--wf-fs-xs);
        text-transform: uppercase;
        letter-spacing: .04em;
        padding: var(--wf-space-3) var(--wf-space-4);
        background: var(--wf-surface-2);
        border-bottom: 1px solid var(--wf-border);
        white-space: nowrap;
    }

    .wf-table tbody td {
        padding: var(--wf-space-3) var(--wf-space-4);
        border-bottom: 1px solid var(--wf-border);
        vertical-align: middle;
    }

    .wf-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .wf-table tbody tr:hover {
        background: var(--wf-surface-2);
    }

.wf-table--striped tbody tr:nth-child(even) {
    background: var(--wf-surface-2);
}

    .wf-table--striped tbody tr:nth-child(even):hover {
        background: var(--wf-surface-3);
    }

.wf-table th.wf-th--sortable {
    cursor: pointer;
    user-select: none;
}

    .wf-table th.wf-th--sortable:hover {
        color: var(--wf-text);
    }

.wf-th__sort {
    display: inline-block;
    margin-left: 4px;
    opacity: .5;
}

.wf-td--num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Kısa/sabit içerikli sütunlar (rozet, durum, tarih, kod...): içeriği kadar yer kaplasın,
   kalan tüm boşluk esnek (metin) sütunlara gitsin. Birden fazla esnek (class'sız) sütunu
   olan tablolarda (ör. ApplicationUsers/Index: Ad, E-posta, Firma) bu ikili tek başına yeterli:
   esnek sütunlar class'sız kalır, sabit sütunlara wf-th/td--tight veya --actions eklenir. */
.wf-td--tight, .wf-th--tight {
    width: 1%;
    white-space: nowrap;
}

.wf-td--actions, .wf-th--actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

/* Tabloda esnek (class'sız) sütun TEK başınaysa (ör. Companies/Index: sadece "Ad"),
   width:1% + width:100% tablo kombinasyonu güvenilir değil — auto table-layout, table'ı
   doldurmak için sabit genişlikli sütunu yine orantılı büyütür. Bu durumda tabloya
   wf-table--fixed ekleyip <colgroup> ile TÜM sütunlara toplamı %100 eden yüzdeler ver
   (bkz. Companies/Index.cshtml); --capped'i sadece taşan metni "..." ile kısaltmak için
   kullan (title attribute ile tam metin tooltip'te kalır), genişliği colgroup belirler. */
.wf-table--fixed {
    table-layout: fixed;
    min-width: 640px;
}

.wf-td--capped, .wf-th--capped {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* table toolbar + footer */
.wf-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wf-space-3);
    padding: var(--wf-space-3) var(--wf-space-4);
    border-bottom: 1px solid var(--wf-border);
}

.wf-table-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wf-space-3);
    padding: var(--wf-space-3) var(--wf-space-4);
    border-top: 1px solid var(--wf-border);
    color: var(--wf-text-muted);
    font-size: var(--wf-fs-sm);
}

/* ============================== PAGINATION ============================== */
.wf-pagination {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.wf-page {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-md);
    background: var(--wf-surface);
    color: var(--wf-text-muted);
    font-size: var(--wf-fs-sm);
    cursor: pointer;
    transition: var(--wf-transition);
}

    .wf-page:hover {
        background: var(--wf-surface-2);
        color: var(--wf-text);
        text-decoration: none;
    }

    .wf-page.is-active {
        background: var(--wf-accent);
        border-color: var(--wf-accent);
        color: var(--wf-accent-fg);
    }

    .wf-page.is-disabled {
        opacity: .45;
        pointer-events: none;
    }

/* ============================== TABS ============================== */
.wf-tabs {
    display: flex;
    gap: var(--wf-space-1);
    border-bottom: 1px solid var(--wf-border);
}

.wf-tab {
    padding: var(--wf-space-3) var(--wf-space-3);
    font-size: var(--wf-fs-base);
    font-weight: var(--wf-fw-medium);
    color: var(--wf-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color var(--wf-transition), border-color var(--wf-transition);
}

    .wf-tab:hover {
        color: var(--wf-text);
    }

    .wf-tab.is-active {
        color: var(--wf-accent-text);
        border-bottom-color: var(--wf-accent);
    }

.wf-tab-panel {
    padding-top: var(--wf-space-4);
}

    .wf-tab-panel[hidden] {
        display: none;
    }

/* ============================== BREADCRUMB ============================== */
.wf-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--wf-space-2);
    font-size: var(--wf-fs-sm);
    color: var(--wf-text-muted);
}

    .wf-breadcrumb a {
        color: var(--wf-text-muted);
    }

        .wf-breadcrumb a:hover {
            color: var(--wf-accent-text);
        }

.wf-breadcrumb__sep {
    color: var(--wf-text-subtle);
}

.wf-breadcrumb__current {
    color: var(--wf-text);
    font-weight: var(--wf-fw-medium);
}

/* ============================== DROPDOWN ============================== */
.wf-dropdown {
    position: relative;
    display: inline-block;
}

.wf-dropdown__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-md);
    box-shadow: var(--wf-shadow-lg);
    padding: var(--wf-space-1);
    z-index: var(--wf-z-dropdown);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity var(--wf-transition), transform var(--wf-transition);
}

.wf-dropdown.is-open .wf-dropdown__menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.wf-menu-item {
    display: flex;
    align-items: center;
    gap: var(--wf-space-2);
    padding: 7px var(--wf-space-3);
    border-radius: var(--wf-radius-sm);
    font-size: var(--wf-fs-base);
    color: var(--wf-text);
    cursor: pointer;
    white-space: nowrap;
}

    .wf-menu-item:hover {
        background: var(--wf-surface-3);
        text-decoration: none;
    }

.wf-menu-item--danger {
    color: var(--wf-danger-text);
}

.wf-menu-divider {
    height: 1px;
    background: var(--wf-border);
    margin: var(--wf-space-1) 0;
}

/* ============================== COMBOBOX ==============================
   Aranabilir seçim kutusu — binlerce satırlık listelerde (proje, araç vb.)
   native <select> yerine kullanılır. Bkz. wf.js initCombobox(). */
.wf-combobox {
    position: relative;
}

.wf-combobox__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-md);
    box-shadow: var(--wf-shadow-lg);
    padding: var(--wf-space-1);
    z-index: var(--wf-z-dropdown);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity var(--wf-transition), transform var(--wf-transition);
}

.wf-combobox.is-open .wf-combobox__menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.wf-combobox__option {
    padding: 7px var(--wf-space-3);
    border-radius: var(--wf-radius-sm);
    font-size: var(--wf-fs-base);
    color: var(--wf-text);
    cursor: pointer;
}

    .wf-combobox__option[hidden] {
        display: none;
    }

    .wf-combobox__option:hover,
    .wf-combobox__option.is-active {
        background: var(--wf-surface-3);
    }

.wf-combobox__empty {
    padding: 7px var(--wf-space-3);
    font-size: var(--wf-fs-base);
    color: var(--wf-text-muted);
}

/* ============================== MODAL ============================== */
.wf-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(13,27,56,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--wf-space-4);
    z-index: var(--wf-z-modal);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--wf-transition);
}

    .wf-modal-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

.wf-modal {
    width: 100%;
    max-width: 480px;
    background: var(--wf-surface);
    border-radius: var(--wf-radius-lg);
    box-shadow: var(--wf-shadow-lg);
    transform: translateY(8px) scale(.98);
    transition: transform var(--wf-transition);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.wf-modal-backdrop.is-open .wf-modal {
    transform: none;
}

.wf-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--wf-space-4) var(--wf-space-5);
    border-bottom: 1px solid var(--wf-border);
}

.wf-modal__title {
    font-size: var(--wf-fs-md);
    font-weight: var(--wf-fw-semibold);
}

.wf-modal__body {
    padding: var(--wf-space-5);
    overflow-y: auto;
}

.wf-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: var(--wf-space-2);
    padding: var(--wf-space-3) var(--wf-space-5);
    border-top: 1px solid var(--wf-border);
}

/* ============================== TOAST ============================== */
.wf-toasts {
    position: fixed;
    top: var(--wf-space-5);
    right: var(--wf-space-5);
    display: flex;
    flex-direction: column;
    gap: var(--wf-space-2);
    z-index: var(--wf-z-toast);
}

.wf-toast {
    display: flex;
    align-items: flex-start;
    gap: var(--wf-space-3);
    min-width: 280px;
    max-width: 380px;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-left: 3px solid var(--wf-text-subtle);
    border-radius: var(--wf-radius-md);
    box-shadow: var(--wf-shadow-lg);
    padding: var(--wf-space-3) var(--wf-space-4);
    animation: wf-toast-in var(--wf-transition);
}

.wf-toast--success {
    border-left-color: var(--wf-success);
}

.wf-toast--warning {
    border-left-color: var(--wf-warning);
}

.wf-toast--danger {
    border-left-color: var(--wf-danger);
}

.wf-toast--info {
    border-left-color: var(--wf-info);
}

.wf-toast__title {
    font-weight: var(--wf-fw-semibold);
    font-size: var(--wf-fs-base);
}

.wf-toast__msg {
    font-size: var(--wf-fs-sm);
    color: var(--wf-text-muted);
    margin-top: 1px;
}

.wf-toast__close {
    margin-left: auto;
    background: none;
    border: 0;
    color: var(--wf-text-subtle);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.wf-toast.is-leaving {
    opacity: 0;
    transform: translateX(8px);
    transition: opacity var(--wf-transition), transform var(--wf-transition);
}

@keyframes wf-toast-in {
    from {
        opacity: 0;
        transform: translateX(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ============================== AVATAR ============================== */
.wf-avatar {
    width: var(--wf-control-h);
    height: var(--wf-control-h);
    border-radius: 50%;
    background: var(--wf-accent);
    color: var(--wf-accent-fg);
    display: grid;
    place-items: center;
    font-size: var(--wf-fs-sm);
    font-weight: var(--wf-fw-semibold);
}

/* ============================== EMPTY STATE ============================== */
.wf-empty {
    text-align: center;
    padding: var(--wf-space-10) var(--wf-space-5);
    color: var(--wf-text-muted);
}

.wf-empty__icon {
    width: 44px;
    height: 44px;
    margin: 0 auto var(--wf-space-3);
    color: var(--wf-text-subtle);
}

.wf-empty__title {
    font-size: var(--wf-fs-md);
    font-weight: var(--wf-fw-semibold);
    color: var(--wf-text);
}

.wf-empty__text {
    margin-top: 4px;
}

/* ============================== DIVIDER & SECTION ============================== */
.wf-divider {
    height: 1px;
    background: var(--wf-border);
    border: 0;
    margin: var(--wf-space-5) 0;
}

.wf-grid {
    display: grid;
    gap: var(--wf-space-4);
}

.wf-grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

.wf-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.wf-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1100px) {
    .wf-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .wf-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .wf-grid--4, .wf-grid--3, .wf-grid--2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Charts (dependency-free SVG, accent-themed)
   ============================================================ */
.wf-chart svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.wf-chart__grid line {
    stroke: var(--wf-border);
    stroke-width: 1;
}

.wf-chart__axis {
    fill: var(--wf-text-subtle);
    font-size: 10px;
    font-family: var(--wf-font);
}

.wf-chart__bar {
    fill: var(--wf-accent);
    transition: fill var(--wf-transition);
}

.wf-chart__bar--soft {
    fill: var(--wf-accent-soft);
}

.wf-chart__line {
    fill: none;
    stroke: var(--wf-accent);
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.wf-chart__line--muted {
    fill: none;
    stroke: var(--wf-text-subtle);
    stroke-width: 2;
    stroke-dasharray: 5 4;
}

.wf-chart__area {
    fill: var(--wf-accent);
    opacity: .10;
}

.wf-chart__dot {
    fill: var(--wf-surface);
    stroke: var(--wf-accent);
    stroke-width: 2;
}

.wf-donut__seg {
    fill: none;
    stroke-width: 16;
}

.wf-donut__total {
    font-size: 22px;
    font-weight: var(--wf-fw-bold);
    fill: var(--wf-text);
    font-variant-numeric: tabular-nums;
}

.wf-donut__label {
    font-size: 10px;
    fill: var(--wf-text-muted);
}

.wf-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wf-space-4);
    margin-top: var(--wf-space-3);
}

/* ---------- Camera capture panel ----------
   <div data-wf-camera-panel hidden><video data-wf-camera-video>...</div>
   [hidden] burada açıkça sıfırlanıyor: aksi halde aynı özgüllükteki .wf-camera-panel
   display:flex kuralı, tarayıcının [hidden] -> display:none UA kuralını author-origin
   olarak ezip paneli JS henüz göstermeden önce görünür bırakıyordu.               */
.wf-camera-panel[hidden] {
    display: none;
}

.wf-camera-panel {
    display: flex;
    flex-direction: column;
    gap: var(--wf-space-2);
    padding: var(--wf-space-3);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-lg);
    background: var(--wf-surface, #000);
}

.wf-camera-panel video {
    width: 100%;
    max-height: 360px;
    border-radius: var(--wf-radius-md);
    background: #000;
    object-fit: cover;
}

/* Native "Dosya Seç" düğmesi/metni, sabit yükseklikli .wf-input içinde dikey
   ortalanmadan üste yapışık görünüyordu; flex ile diğer input'larla hizalanır. */
/* Native "Dosya Seç" düğmesi + metni tarayıcının shadow DOM'unda render edilir;
   host input'a display:flex/align-items vermek bu içeriği hizalamıyor (flex item
   olarak sayılmıyor). Bunun yerine height:auto + simetrik dikey padding ile
   kutunun içeriğe göre büyümesi sağlanıyor — üstte "yapışık" görünmüyor. */
.wf-input[type="file"] {
    height: auto;
    min-height: var(--wf-control-h);
    padding: var(--wf-space-2) var(--wf-space-3);
    line-height: 1.5;
}

.wf-input[type="file"]::file-selector-button {
    margin-right: var(--wf-space-2);
}

.wf-legend__item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--wf-fs-sm);
    color: var(--wf-text-muted);
}

.wf-legend__swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex: 0 0 10px;
}

/* ranked horizontal bars */
.wf-rank {
    display: flex;
    flex-direction: column;
    gap: var(--wf-space-3);
}

.wf-rank__row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px var(--wf-space-3);
    align-items: center;
}

.wf-rank__name {
    font-size: var(--wf-fs-sm);
    font-weight: var(--wf-fw-medium);
}

.wf-rank__val {
    font-size: var(--wf-fs-sm);
    color: var(--wf-text-muted);
    font-variant-numeric: tabular-nums;
}

.wf-rank__track {
    grid-column: 1 / -1;
    height: 7px;
    background: var(--wf-surface-3);
    border-radius: var(--wf-radius-pill);
    overflow: hidden;
}

.wf-rank__fill {
    height: 100%;
    background: var(--wf-accent);
    border-radius: var(--wf-radius-pill);
}

/* sparkline in KPI */
.wf-kpi__spark {
    margin-left: auto;
    align-self: center;
    width: 76px;
    flex: 0 0 76px;
}

    .wf-kpi__spark svg {
        width: 100%;
        height: 30px;
        display: block;
        overflow: visible;
    }

    .wf-kpi__spark polyline {
        fill: none;
        stroke: var(--wf-accent);
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* progress bar */
.wf-progress {
    height: 8px;
    background: var(--wf-surface-3);
    border-radius: var(--wf-radius-pill);
    overflow: hidden;
}

.wf-progress__fill {
    height: 100%;
    background: var(--wf-accent);
    border-radius: var(--wf-radius-pill);
}

/* ============================================================
   Filter bar (reports)
   ============================================================ */
.wf-filterbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--wf-space-3);
}

    .wf-filterbar .wf-field {
        min-width: 150px;
    }

/* ============================================================
   View router (demo navigation)
   ============================================================ */
.wf-view[hidden] {
    display: none !important;
}

/* ============================================================
   Role & permission editor (master-detail)
   ============================================================ */
.wf-role-layout {
    display: flex;
    align-items: flex-start;
    gap: var(--wf-space-5);
}

.wf-role-sidebar {
    width: 260px;
    flex: 0 0 260px;
    overflow: hidden;
}

.wf-role-sidebar__head {
    padding: var(--wf-space-4);
    border-bottom: 1px solid var(--wf-border);
}

.wf-role-list {
    list-style: none;
    margin: 0;
    padding: var(--wf-space-2);
    max-height: 560px;
    overflow-y: auto;
}

.wf-role-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wf-space-2);
    padding: var(--wf-space-3);
    border-radius: var(--wf-radius-md);
    color: var(--wf-text);
    text-decoration: none;
    font-weight: var(--wf-fw-medium);
}

    .wf-role-list__item:hover {
        background: var(--wf-surface-2);
    }

    .wf-role-list__item.is-active {
        background: var(--wf-accent-soft);
        color: var(--wf-accent);
    }

    .wf-role-list__item[hidden] {
        display: none;
    }

.wf-role-detail {
    flex: 1 1 auto;
    min-width: 0;
}

.wf-permission-group {
    border-bottom: 1px solid var(--wf-border);
}

    .wf-permission-group:last-child {
        border-bottom: none;
    }

    .wf-permission-group[hidden] {
        display: none;
    }

.wf-permission-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wf-space-3);
    padding: var(--wf-space-3) var(--wf-space-5);
    cursor: pointer;
    font-weight: var(--wf-fw-semibold);
    background: var(--wf-surface-2);
}

    .wf-permission-group__head::-webkit-details-marker {
        display: none;
    }

.wf-permission-group__body {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--wf-space-3) var(--wf-space-4);
    padding: var(--wf-space-4) var(--wf-space-5);
}

.wf-permission-group__select-all {
    grid-column: 1 / -1;
    font-weight: var(--wf-fw-semibold);
    padding-bottom: var(--wf-space-3);
    border-bottom: 1px dashed var(--wf-border);
}

.wf-permission-row[hidden] {
    display: none;
}

/* ============================================================
   DESIGN B — "Aydınlık / Modern" (light sidebar variant)
   Same components, different chrome. Toggle: <body data-design="b">
   ============================================================ */
[data-design="b"] {
    --wf-bg: #fafbfc;
    --wf-sidebar-bg: #ffffff;
    --wf-sidebar-bg-2: #ffffff;
    --wf-sidebar-text: #5a6577;
    --wf-sidebar-text-on: #19233a;
    --wf-sidebar-hover: var(--wf-surface-3);
    --wf-sidebar-active-bg: var(--wf-accent-soft);
}

    [data-design="b"] .wf-sidebar {
        border-right: 1px solid var(--wf-border);
    }

    [data-design="b"] .wf-nav-group__label {
        color: var(--wf-text-subtle);
    }

    [data-design="b"] .wf-nav-item.is-active {
        color: var(--wf-accent-text);
        box-shadow: none;
    }

        [data-design="b"] .wf-nav-item.is-active .wf-nav-item__icon {
            opacity: 1;
            color: var(--wf-accent);
        }

    [data-design="b"] .wf-card,
    [data-design="b"] .wf-kpi {
        box-shadow: none;
        border-color: var(--wf-border-strong);
        border-radius: 10px;
    }

    [data-design="b"] .wf-topbar {
        background: var(--wf-surface);
    }

    [data-design="b"] .wf-btn--primary {
        box-shadow: 0 1px 2px color-mix(in srgb, var(--wf-accent) 35%, transparent);
    }

/* ============================================================
   Charts — extra types (gauge, grouped/horizontal bar, multi-line)
   ============================================================ */
.wf-chart__bar--muted {
    fill: var(--wf-border-strong);
}

.wf-chart__line--2 {
    fill: none;
    stroke: var(--wf-info);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wf-chart__line--3 {
    fill: none;
    stroke: var(--wf-success);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wf-gauge__track {
    fill: none;
    stroke: var(--wf-surface-3);
    stroke-width: 14;
}

.wf-gauge__fill {
    fill: none;
    stroke: var(--wf-accent);
    stroke-width: 14;
    stroke-linecap: round;
    transition: stroke var(--wf-transition);
}

.wf-gauge__value {
    font-size: 22px;
    font-weight: var(--wf-fw-bold);
    fill: var(--wf-text);
    font-variant-numeric: tabular-nums;
}

.wf-gauge__label {
    font-size: 10px;
    fill: var(--wf-text-muted);
}

.wf-hbar__track {
    fill: var(--wf-surface-3);
}

.wf-hbar__fill {
    fill: var(--wf-accent);
    transition: fill var(--wf-transition);
}

.wf-hbar__label {
    fill: var(--wf-text);
    font-size: 11px;
    font-family: var(--wf-font);
}

.wf-hbar__val {
    fill: var(--wf-text-muted);
    font-size: 11px;
    font-family: var(--wf-font);
}

/* ============================================================
   DESIGN C — "Gece" (dark theme, black sidebar + orange accent)
   Toggle: <body data-design="c">
   ============================================================ */
[data-design="c"] {
    --wf-bg: #0e1014;
    --wf-surface: #191c22;
    --wf-surface-2: #1f232b;
    --wf-surface-3: #272c35;
    --wf-border: #2a2f39;
    --wf-border-strong: #3a4150;
    --wf-text: #e7eaf0;
    --wf-text-muted: #9aa3b2;
    --wf-text-subtle: #6e7787;
    --wf-text-inverse: #0e1014;
    /* orange accent */
    --wf-accent: #f97316;
    --wf-accent-hover: #fb8a3c;
    --wf-accent-active: #ea580c;
    --wf-accent-soft: rgba(249,115,22,.14);
    --wf-accent-soft-bd: rgba(249,115,22,.30);
    --wf-accent-fg: #1a1206;
    --wf-accent-text: #fdba74;
    --wf-focus-ring: color-mix(in srgb, var(--wf-accent) 45%, transparent);
    /* chrome — black sidebar */
    --wf-sidebar-bg: #0a0b0e;
    --wf-sidebar-bg-2: #0a0b0e;
    --wf-sidebar-text: #8b93a3;
    --wf-sidebar-text-on: #ffffff;
    --wf-sidebar-hover: rgba(255,255,255,.06);
    --wf-sidebar-active-bg: rgba(249,115,22,.16);
    --wf-topbar-bg: var(--wf-surface);
    /* semantic tuned for dark bg */
    --wf-success: #3fab57;
    --wf-success-soft: rgba(63,171,87,.16);
    --wf-success-bd: rgba(63,171,87,.32);
    --wf-success-text: #86d398;
    --wf-warning: #e0a020;
    --wf-warning-soft: rgba(224,160,32,.16);
    --wf-warning-bd: rgba(224,160,32,.32);
    --wf-warning-text: #f0c560;
    --wf-danger: #e5564b;
    --wf-danger-soft: rgba(229,86,75,.16);
    --wf-danger-bd: rgba(229,86,75,.32);
    --wf-danger-text: #f2938b;
    --wf-info: #3f93d6;
    --wf-info-soft: rgba(63,147,214,.16);
    --wf-info-bd: rgba(63,147,214,.32);
    --wf-info-text: #8fc2ec;
}

    [data-design="c"] .wf-sidebar {
        border-right: 1px solid #1b1d22;
    }

    [data-design="c"] .wf-card,
    [data-design="c"] .wf-kpi {
        box-shadow: none;
    }

    [data-design="c"] .wf-btn--primary {
        box-shadow: 0 1px 10px rgba(249,115,22,.28);
    }

    [data-design="c"] ::selection {
        background: var(--wf-accent-soft);
    }

/* ============================================================
   RESPONSIVE — tablet & telefon
   App shell'e tek yerden uygulanır, tüm sayfalar otomatik yararlanır.
   Tablo genişliği için ayrıca bkz. .wf-td--tight / .wf-td--actions.
   ============================================================ */
@media (max-width: 960px) {
    /* Sidebar sabit genişlik yerine ikon-rail'e düşer; içerik için yer açılır.
       Masaüstündeki .is-collapsed ile aynı görünüm, burada otomatik. */
    .wf-sidebar {
        width: var(--wf-sidebar-w-collapsed);
        flex-basis: var(--wf-sidebar-w-collapsed);
    }

    .wf-nav-item__label,
    .wf-nav-group__label,
    .wf-sidebar__brand-text,
    .wf-nav-item__badge {
        display: none;
    }

    .wf-nav-item {
        justify-content: center;
    }

    /* Bu genişlikte sidebar zaten daraltılmış durumda; toggle'ın işlevi kalmıyor. */
    [data-wf-sidebar-toggle] {
        display: none;
    }

    .wf-content {
        padding: var(--wf-space-4);
    }

    .wf-role-layout {
        flex-direction: column;
    }

    .wf-role-sidebar {
        width: 100%;
        flex-basis: auto;
    }

    .wf-role-list {
        max-height: 260px;
    }
}

@media (max-width: 640px) {
    .wf-topbar {
        padding: 0 var(--wf-space-3);
        gap: var(--wf-space-2);
    }

    .wf-topbar__title {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* "Aktif firma" rozeti dar ekranda yer kaplamasın */
    .wf-topbar .wf-badge--neutral {
        display: none;
    }

    .wf-content {
        padding: var(--wf-space-3);
    }

    .wf-card__head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .wf-card__body {
        padding: var(--wf-space-4);
    }

    .wf-filterbar .wf-field {
        min-width: 0;
        flex: 1 1 140px;
    }

    .wf-permission-group__body {
        grid-template-columns: 1fr;
    }

    .wf-permission-group__head {
        padding: var(--wf-space-3) var(--wf-space-4);
        flex-wrap: wrap;
    }
}

/* ============================================================
   DASHBOARD (ana sayfa) — KPI kutuları, aktivite akışı, durum çubuğu
   ============================================================ */
.wf-stat-tile {
    display: flex;
    align-items: center;
    gap: var(--wf-space-4);
    padding: var(--wf-space-5);
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-lg);
    box-shadow: var(--wf-shadow-sm);
    transition: border-color var(--wf-transition), box-shadow var(--wf-transition);
}

a.wf-stat-tile:hover {
    border-color: var(--wf-accent);
    box-shadow: var(--wf-shadow-md);
    text-decoration: none;
}

.wf-stat-tile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: var(--wf-radius-md);
    background: var(--wf-accent-soft);
    color: var(--wf-accent-text);
}

    .wf-stat-tile__icon svg {
        width: 22px;
        height: 22px;
    }

.wf-stat-tile--danger .wf-stat-tile__icon {
    background: var(--wf-danger-soft);
    color: var(--wf-danger-text);
}

.wf-stat-tile--success .wf-stat-tile__icon {
    background: var(--wf-success-soft);
    color: var(--wf-success-text);
}

.wf-stat-tile--warning .wf-stat-tile__icon {
    background: var(--wf-warning-soft);
    color: var(--wf-warning-text);
}

.wf-stat-tile__value {
    font-size: var(--wf-fs-2xl);
    font-weight: var(--wf-fw-bold);
    line-height: var(--wf-lh-tight);
    color: var(--wf-text);
}

.wf-stat-tile__label {
    font-size: var(--wf-fs-sm);
    color: var(--wf-text-muted);
    margin-top: 2px;
}

.wf-stat-tile__sub {
    font-size: var(--wf-fs-xs);
    color: var(--wf-text-subtle);
    margin-top: 3px;
}

/* progress bar renk varyantları (bütçe kullanım oranı vb.) */
.wf-progress__fill--warning {
    background: var(--wf-warning);
}

.wf-progress__fill--danger {
    background: var(--wf-danger);
}

/* proje durumu (Aktif/Tamamlanan/İptal) tek satırlık segmented bar */
.wf-segmented-bar {
    display: flex;
    height: 10px;
    width: 100%;
    border-radius: var(--wf-radius-pill);
    overflow: hidden;
    background: var(--wf-surface-3);
}

.wf-segmented-bar__seg {
    height: 100%;
}

.wf-segmented-bar__seg--active {
    background: var(--wf-success);
}

.wf-segmented-bar__seg--completed {
    background: var(--wf-info);
}

.wf-segmented-bar__seg--cancelled {
    background: var(--wf-danger);
}

.wf-segmented-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wf-space-4);
    margin-top: var(--wf-space-3);
}

.wf-segmented-legend__item {
    display: flex;
    align-items: center;
    gap: var(--wf-space-2);
    font-size: var(--wf-fs-sm);
    color: var(--wf-text-muted);
}

.wf-segmented-legend__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wf-segmented-legend__dot--active {
    background: var(--wf-success);
}

.wf-segmented-legend__dot--completed {
    background: var(--wf-info);
}

.wf-segmented-legend__dot--cancelled {
    background: var(--wf-danger);
}

/* son aktivite akışı */
.wf-activity-feed {
    display: flex;
    flex-direction: column;
}

.wf-activity-item {
    display: flex;
    align-items: flex-start;
    gap: var(--wf-space-3);
    padding: var(--wf-space-3) 0;
    border-bottom: 1px solid var(--wf-border);
}

    .wf-activity-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .wf-activity-item:first-child {
        padding-top: 0;
    }

.wf-activity-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--wf-surface-3);
    color: var(--wf-text-muted);
}

    .wf-activity-item__icon svg {
        width: 15px;
        height: 15px;
    }

.wf-activity-item__body {
    flex: 1 1 auto;
    min-width: 0;
}

.wf-activity-item__text {
    font-size: var(--wf-fs-sm);
    color: var(--wf-text);
}

.wf-activity-item__time {
    font-size: var(--wf-fs-xs);
    color: var(--wf-text-subtle);
    margin-top: 1px;
}

/* şirket/para birimi kırılım chip'leri */
.wf-currency-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--wf-radius-sm);
    background: var(--wf-surface-2);
    border: 1px solid var(--wf-border);
    font-size: var(--wf-fs-xs);
}

    .wf-currency-chip .wf-currency-chip__code {
        font-weight: var(--wf-fw-semibold);
        color: var(--wf-text-muted);
    }

/* karşılama şeridi (kullanıcı ana sayfası) */
.wf-welcome-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wf-space-4);
    padding: var(--wf-space-5) var(--wf-space-6);
    background: linear-gradient(135deg, var(--wf-primary-800), var(--wf-primary-600));
    color: var(--wf-text-inverse);
    border-radius: var(--wf-radius-lg);
    box-shadow: var(--wf-shadow-md);
    margin-bottom: var(--wf-space-5);
}

    .wf-welcome-banner h2 {
        color: var(--wf-text-inverse);
        margin-bottom: 2px;
    }

    .wf-welcome-banner p {
        color: rgba(255,255,255,.75);
        font-size: var(--wf-fs-sm);
    }

/* hızlı işlem butonları (kullanıcı ana sayfası) */
.wf-quick-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--wf-space-2);
    padding: var(--wf-space-4);
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-lg);
    box-shadow: var(--wf-shadow-sm);
    transition: border-color var(--wf-transition), box-shadow var(--wf-transition), transform var(--wf-transition);
}

    .wf-quick-action:hover {
        border-color: var(--wf-accent);
        box-shadow: var(--wf-shadow-md);
        text-decoration: none;
        transform: translateY(-1px);
    }

.wf-quick-action__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--wf-radius-md);
    background: var(--wf-accent-soft);
    color: var(--wf-accent-text);
}

    .wf-quick-action__icon svg {
        width: 18px;
        height: 18px;
    }

.wf-quick-action__label {
    font-size: var(--wf-fs-base);
    font-weight: var(--wf-fw-semibold);
    color: var(--wf-text);
}

@media (max-width: 640px) {
    .wf-welcome-banner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .wf-stat-tile {
        padding: var(--wf-space-4);
    }
}
