/* Görev Yönetimi (WorkItems): ortak e-invoice.css değişkenleri ve bileşenleri üzerine kurulur. */

.wi-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    border-bottom: 1px solid var(--app-border, #dbe4ee);
    margin-bottom: 1rem;
}

.wi-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    padding: 0.55rem 0.8rem;
    color: var(--app-text-muted, #475569);
    font-weight: 600;
    cursor: pointer;
}

.wi-tab[aria-selected="true"] {
    border-bottom-color: var(--app-primary, #0f766e);
    color: var(--app-primary-strong, #115e59);
}

.wi-count {
    min-width: 1.4rem;
    border-radius: 999px;
    background: var(--app-surface-muted, #f1f5f9);
    padding: 0.05rem 0.45rem;
    font-size: 0.75rem;
    text-align: center;
}

.wi-tab[aria-selected="true"] .wi-count,
.wi-count.attention {
    background: var(--app-primary, #0f766e);
    color: #fff;
}

.wi-filters {
    display: grid;
    grid-template-columns: minmax(12rem, 2fr) repeat(3, minmax(8rem, 1fr)) auto auto;
    gap: 0.625rem;
    align-items: end;
    margin-bottom: 1rem;
}

.wi-filters label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.wi-filters .wi-check {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 0.5rem;
}

.wi-badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #334155;
}

.wi-status--review { background: #ede9fe; color: #5b21b6; }
.wi-status--warning { background: #fef3c7; color: #92400e; }
.wi-status--open { background: #e0f2fe; color: #075985; }
.wi-status--progress { background: #ccfbf1; color: #115e59; }
.wi-status--done { background: #dcfce7; color: #166534; }
.wi-status--closed { background: #e2e8f0; color: #475569; }

.wi-priority--urgent { background: #fee2e2; color: #991b1b; }
.wi-priority--high { background: #ffedd5; color: #9a3412; }
.wi-priority--normal { background: #f1f5f9; color: #334155; }
.wi-priority--low { background: #f8fafc; color: #64748b; }

.wi-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
}

.wi-row-link {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.wi-row-link:hover,
.wi-row-link:focus-visible {
    color: var(--app-primary-strong, #115e59);
    text-decoration: underline;
}

.wi-overdue {
    color: #b91c1c;
    font-weight: 700;
}

.wi-detail {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
    gap: 1rem;
    align-items: start;
}

.wi-detail-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.wi-text {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

/* .einvoice-page h2 tek sınıftan daha özgül olduğu için bu kurallar kapsamlandırıldı. */
.einvoice-page .wi-section-title {
    margin: 1.5rem 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--app-text-muted, #475569);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.einvoice-page .wi-section-title:first-child {
    margin-top: 0;
}

.einvoice-page .wi-check input[type="checkbox"] {
    width: 1.1rem;
    min-width: 1.1rem;
    height: 1.1rem;
    min-height: 1.1rem;
    padding: 0;
    accent-color: var(--app-primary, #0f766e);
}

.wi-check > span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.einvoice-page-heading .wi-nowrap,
.wi-action-bar .einvoice-button {
    white-space: nowrap;
}

.wi-facts {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.45rem 0.875rem;
    margin: 0;
    font-size: 0.875rem;
}

.wi-facts dt {
    color: var(--app-text-muted, #475569);
    font-weight: 600;
}

.wi-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.wi-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wi-history {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wi-history li {
    position: relative;
    padding: 0 0 0.875rem 1.1rem;
    border-left: 2px solid var(--app-border, #dbe4ee);
    margin-left: 0.3rem;
    font-size: 0.875rem;
}

.wi-history li::before {
    content: "";
    position: absolute;
    left: -0.4rem;
    top: 0.3rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--app-primary, #0f766e);
}

.wi-history time {
    color: var(--app-text-muted, #475569);
    font-size: 0.75rem;
}

.wi-history .wi-change {
    display: block;
    margin-top: 0.15rem;
}

.wi-history .wi-note {
    display: block;
    margin-top: 0.25rem;
    color: var(--app-text-muted, #475569);
    white-space: pre-wrap;
}

.wi-form label,
.wi-modal-form label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.wi-form textarea,
.wi-modal-form textarea {
    min-height: 7rem;
    resize: vertical;
}

.wi-hint {
    color: var(--app-text-muted, #475569);
    font-size: 0.8125rem;
    font-weight: 400;
}

.wi-required::after {
    content: " *";
    color: #b91c1c;
}

.wi-approval-row td {
    vertical-align: top;
}

.wi-approval-row small.wi-text {
    display: block;
    max-width: 36rem;
    margin-top: 0.3rem;
    color: var(--app-text-muted, #475569);
}

.wi-approval-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.wi-approval-actions select {
    min-width: 10rem;
}

.wi-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.wi-member {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--app-border, #dbe4ee);
    border-radius: 999px;
    padding: 0.15rem 0.3rem 0.15rem 0.6rem;
    font-size: 0.8125rem;
}

.wi-member button {
    border: 0;
    background: none;
    color: #b91c1c;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.25rem;
}

.wi-inactive {
    opacity: 0.6;
}

@media (max-width: 960px) {
    .wi-detail {
        grid-template-columns: minmax(0, 1fr);
    }

    .wi-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .wi-filters {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Faz 2: yorumlar, ekler, izleme, bildirim zili ---------- */

.wi-collab-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.25rem;
    color: var(--app-text-muted, #475569);
}

.wi-link-button {
    border: 0;
    background: none;
    padding: 0;
    color: var(--app-primary-strong, #115e59);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.wi-link-button.danger {
    color: #b91c1c;
}

.wi-link-button:hover:not(:disabled) {
    text-decoration: underline;
}

.wi-attachments,
.wi-comments {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wi-attachments li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.6rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--app-border, #dbe4ee);
    font-size: 0.875rem;
}

.wi-attachments small,
.wi-comment-meta small,
.wi-comment-meta time {
    color: var(--app-text-muted, #475569);
    font-size: 0.75rem;
}

.einvoice-page .wi-upload {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.6rem;
}

.wi-comments li {
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.6rem;
    border: 1px solid var(--app-border, #dbe4ee);
    border-radius: 0.75rem;
    background: var(--app-surface-muted, #f8fafc);
}

.wi-comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
}

/* Yorumun sağında Düzenle ve çöp kutusu; silme onayı aynı satırda açılır. */
.wi-comment-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.wi-comment-delete.wi-icon-button {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.85rem;
}

.wi-comment-delete.wi-icon-button:hover:not(:disabled) {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.wi-comment-confirm {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #b91c1c;
    font-size: 0.8125rem;
    font-weight: 600;
}

.wi-comment-form {
    margin-top: 0.75rem;
}

.wi-comment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.einvoice-page .wi-inline-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 11rem;
}

.wi-bell {
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
}

.wi-bell-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(51, 65, 85, 0.14);
    border-radius: 0.75rem;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
}

.wi-bell-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.wi-bell-count {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    min-width: 1.15rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    padding: 0.05rem 0.3rem;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
}

.wi-bell-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.wi-bell-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 1201;
    width: min(24rem, calc(100vw - 2rem));
    max-height: 70vh;
    overflow: auto;
    border: 1px solid var(--app-border, #dbe4ee);
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.wi-bell-panel header,
.wi-bell-panel footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.9rem;
    font-size: 0.875rem;
}

.wi-bell-panel header {
    border-bottom: 1px solid var(--app-border, #dbe4ee);
}

.wi-bell-panel footer {
    border-top: 1px solid var(--app-border, #dbe4ee);
}

.wi-bell-panel ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wi-bell-panel li button {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 0.2rem;
    border: 0;
    border-bottom: 1px solid #eef2f6;
    background: none;
    padding: 0.6rem 0.9rem;
    text-align: left;
    font-size: 0.8125rem;
    color: #334155;
    cursor: pointer;
}

.wi-bell-panel li.unread button {
    background: #f0fdfa;
    color: #0f172a;
    font-weight: 600;
}

.wi-bell-panel li button:hover {
    background: #f1f5f9;
}

.wi-bell-panel time {
    color: #64748b;
    font-size: 0.6875rem;
    font-weight: 400;
}

.wi-bell-empty {
    margin: 0;
    padding: 1rem 0.9rem;
    color: #64748b;
    font-size: 0.875rem;
}

.wi-ticket-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    margin-top: 0.6rem;
    font-size: 0.8125rem;
}

.wi-ticket-strip a.wi-ticket-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--app-border, #dbe4ee);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    color: #0f172a;
    text-decoration: none;
}

.wi-ticket-item-title {
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wi-ticket-strip a.wi-ticket-item:hover {
    border-color: var(--app-primary, #0f766e);
}

/* ---------- Görev açma: yapıştırılan resimler ---------- */

.wi-pasted {
    margin-top: 1rem;
    padding: 0.85rem;
    border: 1px dashed var(--app-border-strong, #7c8798);
    border-radius: 0.75rem;
    background: var(--app-surface-muted, #f8fafc);
}

.wi-pasted-heading {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.wi-pasted-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0 0 0.6rem;
    padding: 0;
    list-style: none;
}

.wi-pasted-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.wi-pasted-list small {
    color: var(--app-text-muted, #475569);
}

.einvoice-page .wi-upload-button {
    display: inline-flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8125rem;
}

/* ---------------------------------------------------------- resim ekleri */
.wi-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
}

.wi-thumb {
    display: block;
    width: 140px;
    height: 100px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--app-border, #dbe4ee);
    border-radius: 10px;
    background: var(--app-surface-muted, #f8fafc);
    cursor: zoom-in;
}

.wi-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.15s ease;
}

.wi-thumb:hover img,
.wi-thumb:focus-visible img {
    transform: scale(1.04);
}

.wi-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.82);
    outline: none;
}

.wi-lightbox figure {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(1200px, 100%);
    max-height: 100%;
    margin: 0;
}

.wi-lightbox img {
    max-width: 100%;
    max-height: calc(100vh - 7rem);
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.wi-lightbox figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: #e2e8f0;
    font-size: 0.875rem;
}

.wi-lightbox-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.wi-lightbox-actions a,
.wi-lightbox-actions button {
    min-width: 2.25rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    color: #f8fafc;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

/* --------------------------------------------------------- geliştirme panosu */
/* Tek satırlık filtre çubuğu: etiketler düğmelerin içinde, kısayollar sağda. */
.einvoice-card.wi-board-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.5rem 0.65rem;
    overflow: visible;
}

.wi-board-filters {
    display: flex;
    flex: 1 1 32rem;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.wi-board-shortcuts {
    display: flex;
    flex: 0 0 auto;
    gap: 0.45rem;
}

.wi-board-shortcuts .einvoice-button {
    justify-content: center;
    min-height: 2.25rem;
}

.wi-board-search {
    position: relative;
    display: flex;
    flex: 1 1 12rem;
    max-width: 22rem;
    align-items: center;
}

.wi-board-search i {
    position: absolute;
    left: 0.7rem;
    color: #94a3b8;
    font-size: 0.8rem;
    pointer-events: none;
}

.einvoice-page .wi-board-search input {
    width: 100%;
    height: 2.25rem;
    min-height: 0;
    padding: 0 0.75rem 0 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    font-size: 0.8125rem;
}

.einvoice-page .wi-board-search input:focus {
    border-color: var(--app-primary, #0f766e);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgb(15 118 110 / 0.15);
}

@media (max-width: 560px) {
    .wi-board-search {
        flex-basis: 100%;
        max-width: none;
    }

    .wi-board-shortcuts {
        flex-basis: 100%;
    }

    .wi-board-shortcuts .einvoice-button {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* ---------- Filtre seçimi (WorkItemFilterSelect) ---------- */

.wi-fs {
    position: relative;
    flex: 0 1 auto;
    min-width: 0;
}

.wi-fs-trigger {
    display: inline-flex;
    max-width: 18rem;
    height: 2.25rem;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    padding: 0 0.75rem;
    color: #0f172a;
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.wi-fs-trigger:hover:not(:disabled) {
    border-color: #cbd5e1;
    background: #fff;
}

.wi-fs-trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgb(15 118 110 / 0.2);
}

.wi-fs-trigger:disabled {
    opacity: 0.6;
    cursor: default;
}

.wi-fs-icon {
    color: #94a3b8;
    font-size: 0.75rem;
}

.wi-fs-label {
    color: #64748b;
    font-weight: 500;
}

.wi-fs-label::after {
    content: ":";
}

.wi-fs-value {
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wi-fs-chevron {
    margin-left: 0.1rem;
    color: #94a3b8;
    font-size: 0.65rem;
    transition: transform 0.15s ease;
}

.wi-fs.is-open .wi-fs-chevron {
    transform: rotate(180deg);
}

/* Varsayılan dışında seçim yapılınca filtre renklenir. */
.wi-fs.is-active .wi-fs-trigger {
    border-color: rgb(15 118 110 / 0.35);
    background: #f0fdfa;
}

.wi-fs.is-active .wi-fs-icon,
.wi-fs.is-active .wi-fs-value {
    color: var(--app-primary-strong, #115e59);
}

.wi-fs-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1500;
}

.wi-fs-panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 1501;
    width: max(100%, 15rem);
    max-width: min(22rem, calc(100vw - 2rem));
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 18px 40px rgb(15 23 42 / 0.16), 0 2px 6px rgb(15 23 42 / 0.06);
    animation: wi-fs-in 0.12s ease-out;
}

@keyframes wi-fs-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.wi-fs-search {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.wi-fs-search i {
    position: absolute;
    left: 1.1rem;
    color: #94a3b8;
    font-size: 0.75rem;
}

.einvoice-page .wi-fs-search input {
    width: 100%;
    height: 2rem;
    min-height: 0;
    padding: 0 0.6rem 0 1.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #f8fafc;
    font-size: 0.8125rem;
}

.einvoice-page .wi-fs-search input:focus {
    border-color: var(--app-primary, #0f766e);
    background: #fff;
    outline: none;
}

.wi-fs-options {
    display: flex;
    max-height: 18rem;
    flex-direction: column;
    gap: 1px;
    overflow-y: auto;
    padding: 0.35rem;
    scrollbar-width: thin;
}

.wi-fs-option {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.55rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    padding: 0.45rem 0.6rem;
    color: #1e293b;
    font: inherit;
    font-size: 0.8125rem;
    text-align: left;
    cursor: pointer;
}

.wi-fs-option:hover,
.wi-fs-option:focus-visible {
    outline: none;
    background: #f1f5f9;
}

.wi-fs-option.is-selected {
    background: #f0fdfa;
    color: var(--app-primary-strong, #115e59);
    font-weight: 700;
}

.wi-fs-option-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wi-fs-option small {
    color: #94a3b8;
    font-size: 0.7rem;
}

.wi-fs-option .fa-check {
    color: var(--app-primary, #0f766e);
    font-size: 0.75rem;
}

.wi-fs-dot {
    width: 0.6rem;
    height: 0.6rem;
    flex: 0 0 auto;
    border-radius: 999px;
}

.wi-fs-empty {
    padding: 0.75rem;
    color: #94a3b8;
    font-size: 0.8125rem;
    text-align: center;
}


/* Sütunlar eşit boyda; her sütunun rengi üst çizgi, nokta ve sayaçta tekrarlanır. */
.wi-board {
    --wi-col-accent: #64748b;
    --wi-col-tint: #f8fafc;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.wi-board-loading {
    opacity: 0.7;
}

.wi-board-new { --wi-col-accent: #dc2626; --wi-col-tint: #fef2f2; }
.wi-board-progress { --wi-col-accent: #eab308; --wi-col-tint: #fefce8; }
.wi-board-done { --wi-col-accent: #16a34a; --wi-col-tint: #f0fdf4; }

.wi-board-column {
    display: flex;
    flex-direction: column;
    min-height: 26rem;
    padding: 0.875rem 0.75rem 0.75rem;
    border: 1px solid var(--app-border, #e2e8f0);
    border-top: 3px solid var(--wi-col-accent);
    border-radius: 14px;
    background: linear-gradient(180deg, var(--wi-col-tint), #f8fafc 9rem);
    transition: border-color 0.12s ease, background 0.12s ease, opacity 0.12s ease;
}

.wi-board-column > header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.25rem;
}

.wi-board-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: var(--wi-col-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wi-col-accent) 18%, transparent);
}

.einvoice-page .wi-board-column h2 {
    margin: 0;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
}

.wi-board-count {
    min-width: 1.5rem;
    margin-left: auto;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--wi-col-accent) 14%, #fff);
    color: color-mix(in srgb, var(--wi-col-accent) 80%, #000);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
}

.wi-board-hint {
    margin: 0.3rem 0.25rem 0.75rem;
    color: var(--app-text-muted, #64748b);
    font-size: 0.75rem;
}

.wi-board-cards {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.5rem;
}

/* Geniş ekranda pano ekrana sığar; her sütun kendi içinde ayrı kayar. */
@media (min-width: 961px) {
    .einvoice-page.wi-board-page {
        height: 100%;
        min-height: 0;
    }

    .wi-board {
        flex: 1 1 auto;
        min-height: 0;
    }

    .wi-board-column {
        min-height: 0;
    }

    .wi-board-cards {
        min-height: 0;
        margin-right: -0.4rem;
        padding-right: 0.4rem;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }

    /* Kartlar sıkışmaz; sığmayanlar sütunun kaydırmasına kalır. */
    .wi-board-cards > * {
        flex-shrink: 0;
    }
}

.wi-board-empty {
    display: grid;
    flex: 1;
    max-height: 7rem;
    place-items: center;
    padding: 1rem 0.5rem;
    border: 1px dashed color-mix(in srgb, var(--wi-col-accent) 35%, #cbd5e1);
    border-radius: 10px;
    color: var(--app-text-muted, #64748b);
    font-size: 0.8125rem;
    text-align: center;
}

/* Sürükleme sırasında yalnız kartın gidebileceği sütunlar vurgulanır. */
.wi-dragging .wi-board-column:not(.wi-drop-allowed) {
    opacity: 0.5;
}

.wi-board-column.wi-drop-allowed {
    border-style: dashed;
    border-color: var(--wi-col-accent);
    border-top-style: solid;
}

.wi-board-column.wi-drop-over {
    border-style: solid;
    background: color-mix(in srgb, var(--wi-col-accent) 12%, #fff);
}

.wi-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.7rem 0.75rem 0.6rem 0.9rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

/* Öncelik, kartın solundaki ince şeritle gösterilir. */
.wi-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: #cbd5e1;
    content: "";
}

.wi-card-urgent::before { background: #dc2626; }
.wi-card-high::before { background: #ea580c; }
.wi-card-normal::before { background: #64748b; }
.wi-card-low::before { background: #cbd5e1; }

.wi-card[draggable="true"] {
    cursor: grab;
}

.wi-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.wi-card.wi-card-dragging {
    opacity: 0.45;
}

.wi-card.wi-card-busy {
    opacity: 0.6;
    pointer-events: none;
}

.wi-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.wi-card-top .wi-code {
    color: #64748b;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}

.wi-card-top .wi-badge {
    padding: 0.1rem 0.5rem;
    font-size: 0.6875rem;
}

.wi-card-title {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.wi-card-title:hover {
    color: var(--app-primary-strong, #115e59);
    text-decoration: underline;
}

.wi-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

.wi-card-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.05rem 0.45rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
}

.wi-card-chip.wi-overdue {
    background: #fef2f2;
    color: #b91c1c;
}

.wi-card-chip.wi-subtasks-complete {
    background: #f0fdf4;
}

.wi-overdue {
    color: #b91c1c;
    font-weight: 700;
}

.wi-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1.75rem;
    padding-top: 0.45rem;
    border-top: 1px solid #f1f5f9;
}

.wi-card-unassigned {
    color: #94a3b8;
    font-size: 0.75rem;
    font-style: italic;
}

.wi-card-people {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 0.4rem;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 600;
}

.wi-card-people-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wi-avatars {
    display: inline-flex;
    flex-shrink: 0;
}

.wi-avatar {
    display: inline-grid;
    width: 1.75rem;
    height: 1.75rem;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #64748b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.wi-avatar + .wi-avatar {
    margin-left: -0.4rem;
}

.wi-avatar-0 { background: #0d9488; }
.wi-avatar-1 { background: #4f46e5; }
.wi-avatar-2 { background: #d97706; }
.wi-avatar-3 { background: #db2777; }
.wi-avatar-4 { background: #0284c7; }
.wi-avatar-5 { background: #65a30d; }

.wi-card-actions {
    display: inline-flex;
    flex-shrink: 0;
    gap: 0.3rem;
}

.wi-card-btn {
    padding: 0.2rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.wi-card-btn:hover:not(:disabled) {
    border-color: #0d9488;
    background: #f0fdfa;
    color: #115e59;
}

.wi-card-btn-back {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.wi-card-btn-back:hover:not(:disabled) {
    border-color: #f59e0b;
    background: #fef3c7;
    color: #78350f;
}

.wi-card-btn-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.wi-card-btn-done:hover:not(:disabled) {
    border-color: #16a34a;
    background: #dcfce7;
    color: #14532d;
}

.wi-card-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

@media (max-width: 960px) {
    .wi-board,
    .wi-board-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .wi-board-column {
        min-height: 0;
    }
}

/* ------------------------------------------------------------- alt görevler */
.wi-subtasks {
    margin: 0.5rem 0 1rem;
}

.wi-subtasks-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.wi-subtasks-heading small {
    color: var(--app-text-muted, #475569);
    font-weight: 700;
}

.wi-subtask-progress {
    position: relative;
    width: 120px;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--app-border, #e2e8f0);
}

.wi-subtask-progress span {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: #16a34a;
}

.wi-subtask-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.5rem 0;
    padding: 0;
    list-style: none;
}

.wi-subtask-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--app-border, #e2e8f0);
    border-radius: 8px;
}

.wi-subtask-list li label {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.5rem;
    min-width: 12rem;
    cursor: pointer;
}

.wi-subtask-list li input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #16a34a;
}

.wi-subtask-list li.done .wi-subtask-title {
    color: var(--app-text-muted, #64748b);
    text-decoration: line-through;
}

.wi-subtask-list li small {
    color: var(--app-text-muted, #64748b);
}

.wi-subtask-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(8rem, 12rem) auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.wi-subtask-drafts {
    margin: 0;
    padding: 0.75rem;
    border: 1px dashed var(--app-border, #cbd5e1);
    border-radius: 10px;
}

.einvoice-page .wi-subtask-drafts legend {
    width: auto;
    margin: 0;
    padding: 0 0.35rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.wi-subtasks-complete {
    color: #166534;
    font-weight: 700;
}

@media (max-width: 560px) {
    .wi-subtask-add {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Görev sayfalarında başlığın sağ üstündeki düğmeler sade ve küçük; sığmayınca alt satıra geçer. */
.wi-page .einvoice-heading-actions {
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.375rem;
}

.wi-page .einvoice-heading-actions .einvoice-button {
    width: auto;
    min-height: 2rem;
    padding: 0.375rem 0.7rem;
    font-size: 0.78rem;
    box-shadow: none;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .wi-page .einvoice-heading-actions {
        flex-direction: row;
        justify-content: flex-start;
    }
}

/* Liste ve panoda büyük başlık kutusu yok; yalnız sağa yaslı kısayol düğmeleri. */
.wi-page-bar {
    display: flex;
    justify-content: flex-end;
}

.wi-page-bar:not(:has(.einvoice-button)) {
    display: none;
}

/* İletirken geliştirici seçimi */
.einvoice-page .wi-dev-picker {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.einvoice-page .wi-dev-picker legend {
    width: auto;
    margin: 0 0 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.wi-dev-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 0.375rem 0.75rem;
    max-height: 14rem;
    overflow-y: auto;
}

.wi-dev-options small {
    color: var(--app-muted, #64748b);
}

/* ---------------------------------------------- panoda görev ayrıntısı penceresi */
.wi-detail-modal-backdrop {
    z-index: 1600;
}

.wi-detail-modal {
    display: flex;
    flex-direction: column;
    width: min(76rem, 100%);
    height: min(92dvh, 100%);
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: var(--app-radius-lg, 16px);
    background: #f8fafc;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    outline: none;
}

.wi-detail-modal-bar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.wi-detail-modal-close {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.wi-detail-modal-close:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.wi-detail-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Pencere içindeki ayrıntı sayfası kendi genişliğini ve dış boşluğunu bırakır. */
.wi-detail-modal .einvoice-page.wi-detail-embedded {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1rem;
}

.wi-card {
    cursor: pointer;
}

/* Görev Aç penceresi: ayrıntı penceresinden dar, içerik kadar uzun. */
.wi-detail-modal.wi-create-modal {
    width: min(48rem, 100%);
    height: auto;
    max-height: min(92dvh, 100%);
    background: #fff;
}

.wi-create-modal .wi-detail-modal-bar {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0;
    border: 0;
    background: transparent;
}

.wi-create-modal {
    position: relative;
}

.wi-create-modal-body {
    padding: 1.25rem 1.5rem 1.25rem;
}

.wi-create-modal .wi-form-head {
    padding-right: 2.5rem;
}

.einvoice-alert .wi-link-button {
    margin-left: 0.5rem;
}

/* Görev formunda eksik alan: alan kırmızı çerçeve, altında kısa uyarı. */
.einvoice-page .wi-field-invalid .wi-input,
.wi-field-invalid .wi-fs-trigger {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgb(220 38 38 / 0.12);
}

.wi-field-error {
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Form hatası Görevi Aç düğmesinin hemen üstünde, tek satırda. */
.einvoice-alert.wi-form-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
}

/* "Görev açıldı" gibi kısa bildirimler: içerik kadar geniş, tek satır, kapatılabilir. */
.einvoice-alert.wi-toast {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.35rem 0.4rem 0.35rem 0.75rem;
}

.wi-toast > span {
    min-width: 0;
}

.wi-toast .wi-link-button {
    margin-left: 0.25rem;
    white-space: nowrap;
}

.wi-toast-close {
    display: grid;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
}

.wi-toast-close:hover {
    background: rgb(0 0 0 / 0.06);
    opacity: 1;
}

@media (max-width: 640px) {
    .wi-detail-modal {
        height: 100%;
    }

    .wi-detail-modal .einvoice-page.wi-detail-embedded {
        padding: 0.75rem;
    }
}

/* Kartta atayan kişi ve eklenme zamanı */
.wi-card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.75rem;
    color: #64748b;
    font-size: 0.7rem;
}

/* ---------- Görevler listesi: duyarlı yerleşim ---------- */

.wi-list-table th.wi-col-title,
.wi-list-table td.wi-col-title {
    min-width: 15rem;
}

@media (max-width: 960px) {
    .wi-filters > label:first-child {
        grid-column: 1 / -1;
    }

    .wi-filters > button[type="submit"] {
        justify-self: end;
    }
}

@media (max-width: 640px) {
    /* Sekmeler alt satıra kaymak yerine yatay kayar. */
    .wi-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        margin-inline: -0.25rem;
    }

    .wi-tabs::-webkit-scrollbar {
        display: none;
    }

    .wi-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.5rem 0.65rem;
    }
}

/* Telefonda da Durum ve Tür yan yana kalır; filtre alanı kısa tutulur. */
@media (max-width: 560px) {
    .wi-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem 0.6rem;
    }

    .wi-filters .wi-check {
        padding-bottom: 0;
        align-self: center;
    }

    .wi-filters > button[type="submit"] {
        justify-self: stretch;
    }
}

@media (max-width: 340px) {
    .wi-filters {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Dar ekranda tablo satırları kart olur; tüm kart görevi açar. */
@media (max-width: 820px) {
    .einvoice-table-wrap.wi-list-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .wi-list-table,
    .wi-list-table tbody {
        display: block;
        min-width: 0;
    }

    .wi-list-table thead {
        display: none;
    }

    .wi-list-table tbody tr {
        position: relative;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem 0.9rem;
        margin-bottom: 0.65rem;
        border: 1px solid var(--app-border, #dbe4ee);
        border-radius: var(--app-radius, 0.75rem);
        background: #fff;
        padding: 0.8rem 0.9rem;
        box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
    }

    .wi-list-table tbody tr:hover {
        border-color: var(--app-primary, #0f766e);
        background: #fff;
    }

    .wi-list-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
        min-width: 0;
        border: 0;
        padding: 0;
        overflow-wrap: anywhere;
        text-align: left;
    }

    .wi-list-table td[data-label]::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .wi-list-table td:not([data-label])::before {
        content: none;
    }

    .wi-list-table td.wi-col-title {
        grid-column: 1 / -1;
        min-width: 0;
        font-size: 0.9rem;
        line-height: 1.35;
    }

    /* Öncelik ve durum rozetleri başlığın altında yan yana durur. */
    .wi-list-table td.wi-col-title {
        order: -2;
    }

    .wi-list-table td.wi-col-badge {
        order: -1;
        flex-direction: row;
    }

    .wi-list-table .wi-row-link::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
    }

    .wi-list-table .wi-row-link:focus-visible {
        text-decoration: none;
    }

    .wi-list-table .wi-row-link:focus-visible::after {
        outline: 2px solid var(--app-primary, #0f766e);
        outline-offset: 2px;
    }
}

/* Tablette kartlar iki sütunda dizilir. */
@media (min-width: 561px) and (max-width: 820px) {
    .wi-list-table tbody {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .wi-list-table tbody tr {
        margin-bottom: 0;
    }
}

@media (max-width: 340px) {
    .wi-list-table tbody tr {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Avatarlar ---------- */

.wi-avatar-img {
    display: inline-block;
    object-fit: cover;
    background: #e2e8f0;
}

.wi-avatar.wi-avatar-preview {
    width: 6rem;
    height: 6rem;
    border-width: 3px;
    font-size: 2.2rem;
    box-shadow: 0 4px 14px rgb(15 23 42 / 0.12);
}

.wi-avatar-built {
    display: inline-grid;
    flex-shrink: 0;
    width: 6rem;
    height: 6rem;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 999px;
    color: #fff;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 4px 14px rgb(15 23 42 / 0.12);
}

.wi-avatar-stage {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1rem;
}

.wi-avatar-stage strong {
    font-size: 1.05rem;
}

.wi-avatar-stage .wi-hint {
    margin: 0.25rem 0 0;
}

.einvoice-page .wi-avatar-builder fieldset {
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
    min-width: 0;
}

.einvoice-page .wi-avatar-builder legend {
    margin-bottom: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.wi-avatar-choices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(2.9rem, 1fr));
    gap: 0.45rem;
}

.wi-avatar-choice {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid var(--app-border, #dbe4ee);
    border-radius: 0.75rem;
    background: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
}

/* Çizimle gelen hazır karakter (ör. asker) düğmeyi doldurur. */
.wi-avatar-choice-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0.65rem;
}

.wi-avatar-choice-svg svg {
    display: block;
    width: 100%;
    height: 100%;
}

.wi-avatar-choice:has(.wi-avatar-choice-svg) {
    padding: 0;
    overflow: hidden;
}

.wi-avatar-choice:hover {
    border-color: var(--app-primary, #0f766e);
}

.wi-avatar-choice[aria-pressed="true"],
.wi-avatar-color[aria-pressed="true"] {
    outline: 3px solid var(--app-primary, #0f766e);
    outline-offset: 2px;
}

.wi-avatar-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.wi-avatar-color {
    width: 2.1rem;
    height: 2.1rem;
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 0 0 1px var(--app-border, #dbe4ee);
    cursor: pointer;
}

.wi-avatar-photo {
    margin-bottom: 1rem;
}

.wi-avatar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--app-border, #dbe4ee);
}

/* ---------- Kafa oluşturucu ---------- */

.wi-avatar-face {
    display: inline-block;
    flex-shrink: 0;
    width: 6rem;
    height: 6rem;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgb(15 23 42 / 0.12);
}

.wi-avatar-face svg,
.wi-avatar-hair-art svg {
    display: block;
    width: 100%;
    height: 100%;
}

.wi-avatar-segment,
.wi-avatar-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.wi-avatar-segment {
    margin-bottom: 1rem;
}

.wi-avatar-segment button,
.wi-avatar-options button {
    border: 1px solid var(--app-border, #dbe4ee);
    border-radius: 999px;
    background: #fff;
    padding: 0.35rem 0.85rem;
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.wi-avatar-segment button[aria-pressed="true"],
.wi-avatar-options button[aria-pressed="true"] {
    border-color: var(--app-primary, #0f766e);
    background: var(--app-primary, #0f766e);
    color: #fff;
}

.wi-avatar-segment .wi-avatar-random {
    margin-left: auto;
}

.wi-avatar-hairs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr));
    gap: 0.5rem;
}

.wi-avatar-hair {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid var(--app-border, #dbe4ee);
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.4rem 0.3rem;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.wi-avatar-hair[aria-pressed="true"] {
    outline: 3px solid var(--app-primary, #0f766e);
    outline-offset: 1px;
}

.wi-avatar-hair-art {
    width: 3.6rem;
    height: 3.6rem;
    overflow: hidden;
    border-radius: 999px;
}

/* ---------- Geliştirici Paneli ---------- */

/* Sayfa (html/body) kaydırılmaz; üst çubuk sabit kalır, içerik alanı kendi içinde kayar. */
.dev-shell {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    background: #f1f5f9;
}

.dev-topbar {
    position: sticky;
    top: 0;
    z-index: 1100;
    /* Telefonda menü ikinci satıra iner; çubuk küçülüp içeriği taşırmasın. */
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 3.5rem;
    padding: 0.45rem clamp(0.75rem, 2vw, 1.5rem);
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: 0 6px 18px rgb(15 23 42 / 0.25);
}

.dev-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.55rem;
    color: #fff;
    font-size: 0.95rem;
    text-decoration: none;
}

.dev-brand-mark {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 0.6rem;
    background: linear-gradient(135deg, #14b8a6, #6366f1);
    color: #fff;
    font-size: 0.85rem;
}

.dev-nav {
    display: flex;
    flex: 1 1 auto;
    gap: 0.25rem;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.dev-nav::-webkit-scrollbar {
    display: none;
}

.dev-nav a {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.dev-nav a:hover {
    background: rgb(255 255 255 / 0.08);
    color: #fff;
}

.dev-nav a.active {
    background: #fff;
    color: #0f172a;
}

.dev-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.5rem;
}

.dev-actions .wi-bell {
    margin-left: 0;
}

.dev-switch,
.dev-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2rem;
    border: 1px solid rgb(255 255 255 / 0.2);
    border-radius: 999px;
    background: transparent;
    padding: 0.3rem 0.75rem;
    color: #e2e8f0;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.dev-logout {
    width: 2rem;
    justify-content: center;
    padding: 0;
}

.dev-switch:hover,
.dev-logout:hover {
    background: rgb(255 255 255 / 0.1);
    color: #fff;
}

.dev-me {
    display: inline-flex;
}

.dev-me .wi-avatar {
    width: 2rem;
    height: 2rem;
    border-color: #334155;
    font-size: 0.8rem;
}

.dev-content {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (max-width: 640px) {
    .dev-topbar {
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
    }

    .dev-brand-copy {
        display: none;
    }

    .dev-nav {
        order: 3;
        flex-basis: 100%;
    }

    .dev-actions {
        margin-left: auto;
    }

    .dev-switch span {
        display: none;
    }
}

/* ---------- Görev formu (Görev Aç ve Düzenle) ---------- */

.wi-form-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.wi-form-head-icon {
    display: inline-grid;
    width: 2.6rem;
    height: 2.6rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, #14b8a6, #6366f1);
    color: #fff;
}

.wi-form-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.1rem;
}

.wi-form-head p {
    margin: 0.15rem 0 0;
    color: #64748b;
    font-size: 0.8125rem;
}

.wi-form.einvoice-form-grid {
    gap: 1rem;
}

.wi-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.wi-field-label {
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 700;
}

.wi-field-label small {
    color: #94a3b8;
    font-weight: 500;
}

.einvoice-page .wi-input {
    min-height: 2.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #f8fafc;
    padding: 0.55rem 0.8rem;
    font-size: 0.875rem;
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.einvoice-page .wi-input:hover {
    border-color: #cbd5e1;
}

.einvoice-page .wi-input:focus {
    border-color: var(--app-primary, #0f766e);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgb(15 118 110 / 0.15);
}

.einvoice-page .wi-input-title {
    min-height: 2.9rem;
    font-size: 1rem;
    font-weight: 600;
}

.einvoice-page textarea.wi-input {
    min-height: 8rem;
    resize: vertical;
    line-height: 1.5;
}

/* Açılır seçimin form görünümü: tam genişlik, dikdörtgen. */
.wi-fs--field {
    width: 100%;
}

.wi-fs--field .wi-fs-trigger {
    width: 100%;
    max-width: none;
    height: 2.6rem;
    border-radius: 0.65rem;
    padding: 0 0.8rem;
    font-size: 0.875rem;
}

.wi-fs--field .wi-fs-value {
    flex: 1 1 auto;
    text-align: left;
    font-weight: 600;
}

.wi-fs--field.is-placeholder .wi-fs-value {
    color: #94a3b8;
    font-weight: 500;
}

.wi-fs--field .wi-fs-trigger:focus-visible,
.wi-fs--field.is-open .wi-fs-trigger {
    border-color: var(--app-primary, #0f766e);
    background: #fff;
}

.wi-fs--field .wi-fs-panel {
    width: 100%;
    max-width: none;
}

/* Tek tıkla seçilen etiketler (Tür, Öncelik). */
.wi-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.wi-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    padding: 0.3rem 0.8rem;
    color: #334155;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.wi-chip i {
    color: #94a3b8;
    font-size: 0.8rem;
}

.wi-chip:hover:not(:disabled) {
    border-color: #cbd5e1;
    background: #fff;
}

.wi-chip[aria-checked="true"] {
    border-color: var(--app-primary, #0f766e);
    background: #f0fdfa;
    color: var(--app-primary-strong, #115e59);
    box-shadow: 0 0 0 2px rgb(15 118 110 / 0.12);
}

.wi-chip[aria-checked="true"] i {
    color: var(--app-primary, #0f766e);
}

.wi-chip-priority .wi-fs-dot { background: #64748b; }
.wi-chip-urgent .wi-fs-dot { background: #dc2626; }
.wi-chip-high .wi-fs-dot { background: #ea580c; }
.wi-chip-low .wi-fs-dot { background: #cbd5e1; }

.wi-chip-urgent[aria-checked="true"] {
    border-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
    box-shadow: 0 0 0 2px rgb(220 38 38 / 0.12);
}

.wi-chip-high[aria-checked="true"] {
    border-color: #ea580c;
    background: #fff7ed;
    color: #9a3412;
    box-shadow: 0 0 0 2px rgb(234 88 12 / 0.12);
}

.wi-icon-button {
    display: inline-grid;
    width: 2.1rem;
    height: 2.1rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}

.wi-icon-button:hover:not(:disabled) {
    border-color: #fecaca;
    background: #fef2f2;
    color: #dc2626;
}

.wi-add-button {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.25rem;
    border: 1px dashed #94a3b8;
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.35rem 0.85rem;
    color: #334155;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
}

.wi-add-button:hover {
    border-color: var(--app-primary, #0f766e);
    color: var(--app-primary-strong, #115e59);
}

.wi-subtask-drafts .wi-subtask-add {
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem) auto;
}

.wi-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

/* Resim alanı: yapıştırma ve dosya seçme. */
.wi-dropzone {
    margin-top: 1rem;
    border: 1.5px dashed #cbd5e1;
    border-radius: 0.85rem;
    background: #f8fafc;
    padding: 0.85rem 1rem;
}

.wi-dropzone-body {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.wi-dropzone-icon {
    display: inline-grid;
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 0.7rem;
    background: #e0f2fe;
    color: #0369a1;
}

.wi-dropzone-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.wi-dropzone-copy strong {
    color: #0f172a;
    font-size: 0.875rem;
}

.wi-dropzone-copy small {
    color: #64748b;
    font-size: 0.75rem;
}

.wi-dropzone-copy kbd {
    border: 1px solid #cbd5e1;
    border-radius: 0.3rem;
    background: #fff;
    padding: 0 0.3rem;
    color: #334155;
    font-size: 0.7rem;
    box-shadow: none;
}

/* Ortak stil sayfadaki label'ları ızgara yapar; düğme gibi davranan label yan yana dizilir. */
.einvoice-page label.wi-add-button {
    display: inline-flex;
    flex-direction: row;
    white-space: nowrap;
}

.wi-dropzone-pick {
    position: relative;
    align-self: center;
}

.wi-dropzone-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.wi-dropzone-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    padding: 0.15rem 0.2rem 0.15rem 0.7rem;
    font-size: 0.78rem;
}

.wi-dropzone-list li small {
    color: #94a3b8;
}

.wi-dropzone-list .wi-icon-button {
    width: 1.6rem;
    height: 1.6rem;
}

@media (max-width: 560px) {
    .wi-dropzone-body {
        flex-wrap: wrap;
    }

    .wi-dropzone-pick {
        width: 100%;
        justify-content: center;
    }

    .wi-subtask-drafts .wi-subtask-add {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .wi-subtask-drafts .wi-subtask-add .wi-fs {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* ---------- Görev sayfalarında ortak form görünümü ---------- */
/* Özel bileşene çevrilmeyen yerlerde de (Projeler, pencereler) alanlar aynı görünür. */
.einvoice-page.wi-page :where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="search"]), select, textarea) {
    min-height: 2.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background-color: #f8fafc;
    padding: 0.55rem 0.8rem;
    color: #0f172a;
    font-size: 0.875rem;
    box-shadow: none;
    transition: border-color 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
}

.einvoice-page.wi-page :where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="search"]), select, textarea):hover {
    border-color: #cbd5e1;
}

.einvoice-page.wi-page :where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="search"]), select, textarea):focus {
    border-color: var(--app-primary, #0f766e);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgb(15 118 110 / 0.15);
}

/* Kalan düz seçimler de aynı ok simgesiyle görünür. */
.einvoice-page.wi-page :where(select) {
    appearance: none;
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22 fill=%22%2394a3b8%22%3E%3Cpath d=%22M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4Z%22/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    cursor: pointer;
}

.einvoice-page.wi-page :where(textarea) {
    min-height: 6rem;
    line-height: 1.5;
    resize: vertical;
}

.einvoice-page.wi-page .wi-input-title {
    min-height: 2.9rem;
    font-size: 1rem;
    font-weight: 600;
}

.wi-modal-form label,
.wi-form label {
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 700;
}

/* ---------- Görev detayı ---------- */

.wi-detail .einvoice-card {
    border-radius: 1rem;
}

.einvoice-page .wi-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.6rem 0 0.7rem;
    padding-top: 1.2rem;
    border-top: 1px solid #f1f5f9;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

/* Yalnız kartın en üstündeki başlıkta ayırıcı çizgi olmaz. */
.einvoice-page .einvoice-card > .wi-section-title:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

/* Alt görev başlığı ilerleme çubuğuyla aynı satırda; ayırıcı çizgi satırın tamamında. */
.einvoice-page .wi-subtasks-heading .wi-section-title {
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    border: 0;
}

.einvoice-page .wi-subtasks-heading {
    margin: 1.6rem 0 0.7rem;
    padding-top: 1.2rem;
    border-top: 1px solid #f1f5f9;
}

.einvoice-page .wi-section-title > i {
    display: inline-grid;
    width: 1.75rem;
    height: 1.75rem;
    place-items: center;
    border-radius: 0.5rem;
    background: #f0fdfa;
    color: var(--app-primary, #0f766e);
    font-size: 0.8rem;
}

.wi-section-count {
    min-width: 1.4rem;
    border-radius: 999px;
    background: #f1f5f9;
    padding: 0.05rem 0.45rem;
    color: #64748b;
    font-size: 0.72rem;
    text-align: center;
}

.wi-section-title + .wi-text {
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
    background: #f8fafc;
    padding: 0.75rem 0.9rem;
    color: #1e293b;
}

/* İzleme: küçük aç-kapa düğmesi. */
.wi-collab-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.wi-collab-toolbar small {
    color: #94a3b8;
}

.wi-watch {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    padding: 0.25rem 0.8rem;
    color: #475569;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.wi-watch.is-on {
    border-color: rgb(15 118 110 / 0.35);
    background: #f0fdfa;
    color: var(--app-primary-strong, #115e59);
}

.wi-watch:hover:not(:disabled) {
    border-color: var(--app-primary, #0f766e);
}

/* Ekler */
.wi-upload-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
    margin-top: 0.6rem;
}

.wi-attachments {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wi-attachments li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.6rem;
    border: 1px solid #f1f5f9;
    border-radius: 0.65rem;
    background: #f8fafc;
    padding: 0.35rem 0.4rem 0.35rem 0.75rem;
    font-size: 0.8125rem;
}

.wi-attachments li small {
    flex: 1 1 auto;
}

/* Yorumlar */
.wi-comments {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
}

.wi-comments li {
    border: 1px solid #f1f5f9;
    border-radius: 0.85rem;
    background: #f8fafc;
    padding: 0.65rem 0.85rem;
}

.wi-comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.3rem;
    font-size: 0.8125rem;
}

.wi-comment-meta .wi-avatar {
    width: 1.6rem;
    height: 1.6rem;
    border: 0;
}

.wi-comment-meta .wi-link-button {
    margin-left: auto;
}

.wi-comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wi-comment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.einvoice-page label.wi-hours-field {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
}

.einvoice-page.wi-page .wi-hours-field .wi-input {
    width: 5.5rem;
    min-height: 2.25rem;
    padding: 0.3rem 0.6rem;
}

/* Geçmiş: zaman çizelgesi */
.wi-history li {
    padding: 0 0 0.9rem 1.2rem;
    border-left: 2px solid #e2e8f0;
    color: #334155;
    font-size: 0.8125rem;
}

.wi-history li::before {
    left: -0.38rem;
    top: 0.25rem;
    width: 0.65rem;
    height: 0.65rem;
    border: 2px solid #fff;
    background: #14b8a6;
    box-shadow: 0 0 0 1px #99f6e4;
}

.wi-history li:last-child {
    border-left-color: transparent;
}

.wi-history .wi-change {
    color: #0f172a;
}

.wi-history .wi-note {
    border-left: 2px solid #e2e8f0;
    padding-left: 0.5rem;
}

/* Bilgi kutusu */
.wi-facts {
    gap: 0;
    font-size: 0.8125rem;
}

.wi-facts dt,
.wi-facts dd {
    padding: 0.45rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.wi-facts dt {
    padding-right: 0.75rem;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.wi-facts dd {
    color: #0f172a;
    font-weight: 600;
    text-align: right;
}

.wi-facts dt:last-of-type,
.wi-facts dd:last-of-type {
    border-bottom: 0;
}

/* Alt görev paneli */
.wi-subtasks .wi-subtask-add {
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem) auto;
}

/* ---------- Görevler listesi filtreleri ---------- */

.wi-list-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.wi-toggle-pill {
    display: inline-flex;
    height: 2.25rem;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    padding: 0 0.8rem;
    color: #475569;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.wi-toggle-pill i {
    color: #94a3b8;
}

.wi-toggle-pill.is-on {
    border-color: rgb(15 118 110 / 0.35);
    background: #f0fdfa;
    color: var(--app-primary-strong, #115e59);
}

.wi-toggle-pill.is-on i {
    color: var(--app-primary, #0f766e);
}

@media (max-width: 560px) {
    .wi-subtasks .wi-subtask-add {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .wi-subtasks .wi-subtask-add .wi-fs {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .wi-facts dd {
        text-align: left;
    }
}
