/* ============================================================
   Notlarım — Component stylesheet
   Sidebar, buttons, forms, modals, toasts, lists, cards.
   ============================================================ */

/* ---------- Brand / auth -------------------------------------- */
.auth-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: var(--sp-6);
    background:
        radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
        var(--bg);
}

.auth-card {
    width: min(440px, 100%);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-2xl);
    padding: var(--sp-8) var(--sp-7) var(--sp-7);
    box-shadow: var(--shadow-lg);
}

.auth-brand { text-align: center; margin-bottom: var(--sp-7); }
.auth-brand h1 {
    font-size: var(--fs-2xl);
    font-weight: 700;
    letter-spacing: -.01em;
    margin-top: var(--sp-3);
}
.auth-sub { color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--sp-1); }
.auth-intro { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--sp-5); line-height: var(--lh-relaxed); }

.brand-mark {
    width: 48px; height: 48px;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -.02em;
    margin: 0 auto;
    box-shadow: 0 6px 18px -4px color-mix(in srgb, var(--accent) 60%, transparent);
}

.auth-form { display: grid; gap: var(--sp-4); }
.auth-form label { display: grid; gap: var(--sp-2); font-size: var(--fs-sm); }
.auth-form label > span { color: var(--text-muted); font-weight: 500; }
.auth-form .checkbox { flex-direction: row; align-items: center; gap: var(--sp-2); display: flex; }
.auth-form .checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }
.auth-form .checkbox > span { color: var(--text); }
.auth-hint { color: var(--text-muted); font-size: var(--fs-xs); margin: calc(var(--sp-3) * -1) 0 0 26px; line-height: 1.4; }

.auth-foot {
    margin-top: var(--sp-6);
    text-align: center;
    font-size: var(--fs-xs);
    color: var(--text-subtle);
}

.auth-success {
    text-align: center;
    padding: var(--sp-4) 0;
}
.auth-success h2 {
    color: var(--success);
    font-size: var(--fs-xl);
    margin-bottom: var(--sp-2);
}
.auth-success p {
    color: var(--text-muted);
    margin-bottom: var(--sp-5);
}

/* ---------- Buttons ----------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-4);
    height: 36px;
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
    cursor: pointer;
    white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent) inset;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}
.btn-danger:hover {
    background: var(--danger-soft);
    border-color: var(--danger);
}

.btn-block { width: 100%; }
.btn-sm { height: 30px; padding: 0 var(--sp-3); font-size: var(--fs-xs); }

.icon-btn {
    width: 30px; height: 30px;
    border-radius: var(--r-sm);
    display: inline-grid; place-items: center;
    color: var(--text-muted);
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn.sm { width: 22px; height: 22px; }

/* Touch cihazlarda dokunma hedefini 44×44'e çıkar (WCAG 2.5.5 AAA) */
@media (pointer: coarse) {
    .icon-btn:not(.sm) { width: 44px; height: 44px; }
    .icon-btn.sm { width: 36px; height: 36px; }
}

/* ---------- Form inputs ----------------------------------------- */
input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
textarea,
select {
    width: 100%;
    height: 38px;
    padding: 0 var(--sp-3);
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
input[type="search"] { padding-left: var(--sp-8); }
textarea { height: auto; padding: var(--sp-3); resize: vertical; min-height: 90px; line-height: var(--lh-normal); }

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

input::placeholder, textarea::placeholder { color: var(--text-subtle); }

/* ---------- Alerts ----------------------------------------- */
.alert {
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    border: 1px solid transparent;
}
.alert-error {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 25%, transparent);
}
.alert-success {
    background: var(--success-soft);
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 25%, transparent);
}

/* ---------- Sidebar ---------------------------------------- */
.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-4) var(--sp-4) var(--sp-3);
    gap: var(--sp-3);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    min-width: 0;
}
.sidebar .brand-mark {
    width: 28px; height: 28px; font-size: .85rem;
    border-radius: var(--r-md);
    box-shadow: none;
}
.brand-text {
    font-weight: 600;
    font-size: var(--fs-md);
    letter-spacing: -.01em;
}

.sidebar-search {
    position: relative;
    padding: 0 var(--sp-4) var(--sp-3);
}
.sidebar-search svg {
    position: absolute;
    left: calc(var(--sp-4) + var(--sp-3));
    top: 50%;
    transform: translateY(-60%);
    color: var(--text-subtle);
    pointer-events: none;
}
.sidebar-search input {
    height: 34px;
    background: var(--bg);
    border-color: transparent;
    font-size: var(--fs-sm);
}
.sidebar-search input:focus { background: var(--bg-elev); }

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--sp-1) var(--sp-2);
}
.nav-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
    color: var(--text-muted);
    font-weight: 500;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active {
    background: var(--bg-elev);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.nav-item svg { flex-shrink: 0; opacity: .85; }

.sidebar-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: var(--sp-4) var(--sp-2) var(--sp-3);
    overflow: hidden;
}
.sidebar-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-3) var(--sp-2);
    font-size: .6875rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-subtle);
    font-weight: 600;
}

.notebook-tree {
    overflow-y: auto;
    flex: 1;
    padding: var(--sp-1) 0;
    font-size: var(--fs-sm);
}

.nb-node {
    user-select: none;
}
.nb-row {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    padding: var(--sp-1) var(--sp-2);
    border-radius: var(--r-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
    position: relative;
}
.nb-row:hover { background: var(--bg-hover); color: var(--text); }
.nb-row.active {
    background: var(--bg-elev);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.nb-row .caret {
    width: 16px; height: 16px;
    display: inline-grid; place-items: center;
    color: var(--text-subtle);
    transition: transform var(--dur-fast) var(--ease);
}
.nb-node.open > .nb-row .caret { transform: rotate(90deg); }
.nb-row .caret.empty { visibility: hidden; }
.nb-row .icon { font-size: .95em; }
.nb-row .name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nb-row .actions {
    opacity: 0;
    display: flex;
    gap: 2px;
    transition: opacity var(--dur-fast) var(--ease);
}
.nb-row:hover .actions { opacity: 1; }
.nb-row .actions button {
    width: 20px; height: 20px;
    border-radius: var(--r-xs);
    display: grid; place-items: center;
    color: var(--text-subtle);
}
.nb-row .actions button:hover { background: var(--bg-active); color: var(--text); }

.nb-children {
    display: none;
    margin-left: var(--sp-4);
    padding-left: var(--sp-2);
    border-left: 1px dashed var(--border);
}
.nb-node.open > .nb-children { display: block; }

.nb-note {
    position: relative;
    display: flex;
    align-items: stretch;
    margin: 1px 0;
    border-radius: var(--r-sm);
    transition: background var(--dur-fast) var(--ease);
}
.nb-note:hover { background: var(--bg-hover); }
.nb-note-link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 4px var(--sp-2);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--dur-fast) var(--ease);
}
.nb-note:hover .nb-note-link { color: var(--text); }
.nb-note-link svg { flex-shrink: 0; opacity: .7; }
.nb-note-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nb-note-trash {
    flex-shrink: 0;
    width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-subtle);
    border-radius: var(--r-sm);
    opacity: 0;
    transition: opacity var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nb-note:hover .nb-note-trash { opacity: 1; }
.nb-note-trash:hover { background: var(--bg-active); color: var(--danger); }

.nb-empty {
    padding: var(--sp-3);
    font-size: var(--fs-xs);
    color: var(--text-subtle);
    text-align: center;
    line-height: var(--lh-snug);
}

.sidebar-foot {
    padding: var(--sp-3) var(--sp-3) var(--sp-4);
    border-top: 1px solid var(--border);
    position: relative;
}
.user-chip {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    width: 100%;
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--r-md);
    color: var(--text);
    transition: background var(--dur-fast) var(--ease);
}
.user-chip:hover { background: var(--bg-hover); }
.avatar {
    width: 28px; height: 28px;
    border-radius: var(--r-full);
    background: var(--accent);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 600;
    font-size: .75rem;
    flex-shrink: 0;
}
.user-name {
    flex: 1;
    font-size: var(--fs-sm);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.user-menu {
    position: absolute;
    left: var(--sp-3);
    right: var(--sp-3);
    bottom: calc(100% - var(--sp-2));
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-1);
    z-index: var(--z-dropdown);
    animation: pop-in var(--dur-fast) var(--ease-out);
}
.user-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
    color: var(--text);
    transition: background var(--dur-fast) var(--ease);
}
.user-menu button:hover { background: var(--bg-hover); }
.user-menu hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-1) 0; }

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

/* ---------- View headers / toolbars ------------------------------- */
.view-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-7) var(--sp-4);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 5;
}
.view-head h1 {
    font-size: var(--fs-xl);
    font-weight: 600;
    letter-spacing: -.01em;
}
.view-head .meta {
    color: var(--text-subtle);
    font-size: var(--fs-sm);
    margin-top: 4px;
    line-height: 1.4;
}
.view-head .actions { display: flex; gap: var(--sp-2); }

.view-body {
    padding: var(--sp-6) var(--sp-7);
    max-width: 1280px;
}

/* Empty states */
@keyframes empty-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes empty-icon-pop {
    0%   { opacity: 0; transform: scale(.6); }
    60%  { opacity: 1; transform: scale(1.08); }
    100% { opacity: .6; transform: scale(1); }
}
.empty-state {
    padding: var(--sp-10) var(--sp-5);
    text-align: center;
    color: var(--text-subtle);
    animation: empty-fade-in .45s ease-out both;
}
.empty-state .icon {
    font-size: 2rem;
    opacity: .6;
    margin-bottom: var(--sp-3);
    animation: empty-icon-pop .55s cubic-bezier(.34,1.56,.64,1) both;
    animation-delay: .08s;
}
@media (prefers-reduced-motion: reduce) {
    .empty-state, .empty-state .icon { animation: none; }
}
.empty-state h2 {
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--sp-2);
}
.empty-state p {
    font-size: var(--fs-sm);
    max-width: 400px;
    margin: 0 auto var(--sp-5);
    line-height: var(--lh-relaxed);
}
.empty-state .empty-cta {
    margin-top: var(--sp-2);
    animation: empty-fade-in .55s ease-out .15s both;
}

/* ---------- Note list (grid + list) ------------------------------ */
.note-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--sp-4);
}

.note-card {
    --card-accent: var(--text-subtle);
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    border-left: 4px solid var(--card-accent);
    border-radius: var(--r-lg);
    padding: var(--sp-5);
    cursor: pointer;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.note-card:hover {
    border-color: var(--accent);
    border-left-color: var(--card-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.note-card h3 {
    font-size: var(--fs-md);
    font-weight: 600;
    letter-spacing: -.005em;
    line-height: var(--lh-snug);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.note-card .preview {
    flex: 1;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: var(--lh-snug);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.note-card .meta {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--fs-xs);
    color: var(--text-subtle);
    border-top: 1px solid var(--border);
    padding-top: var(--sp-2);
    margin-top: auto;
}
.note-card .meta .spacer { flex: 1; }
.note-card .pin { color: var(--accent); }
.note-card .folder-chip {
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: var(--fs-xs);
    max-width: 60%;
}
.note-card .folder-chip:hover { background: transparent; color: var(--accent); text-decoration: underline; }
.note-card .folder-chip-sep { color: var(--text-subtle); font-weight: 400; margin: 0 2px; }
.note-card-tags { margin-bottom: var(--sp-1); }

.folder-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 60%;
    padding: 2px 8px;
    border-radius: var(--r-full);
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    line-height: 1.5;
    border: 1px solid var(--border);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.folder-chip:hover { background: var(--bg-hover); color: var(--text); }
.folder-chip.muted { opacity: .55; cursor: default; }
.folder-chip.muted:hover { background: var(--bg-subtle); color: var(--text-muted); }
.folder-chip-sep { color: var(--text-subtle); margin: 0 2px; font-weight: 400; }

/* ========== View selector ========== */
.view-sel {
    height: 36px;
    padding: 0 var(--sp-3);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    color: var(--text);
    font-size: var(--fs-sm);
    cursor: pointer;
}

/* ========== Mini kart (V2) ========== */
.note-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--sp-2); }
.note-mini-card {
    background: var(--bg-elev); border: 1px solid var(--border);
    border-left: 3px solid var(--accent); border-radius: var(--r-sm);
    padding: 10px 12px; cursor: pointer;
    transition: background var(--dur-fast), border-color var(--dur-fast);
    display: flex; flex-direction: column; gap: 4px;
}
.note-mini-card:hover { background: var(--bg-subtle); }
.note-mini-card h3 { margin: 0; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-mini-card .meta-line { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-subtle); justify-content: space-between; }
.note-mini-card .muted { color: var(--text-subtle); }

/* ========== Liste önizlemeli (V4) ========== */
.note-listpre { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; }
.note-listpre-row { display: flex; gap: var(--sp-4); padding: 14px 18px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--dur-fast); }
.note-listpre-row:last-child { border-bottom: 0; }
.note-listpre-row:hover { background: var(--bg-subtle); }
.note-listpre-row .left { flex: 1; min-width: 0; }
.note-listpre-row .left h3 { margin: 0 0 4px; font-size: var(--fs-md); }
.note-listpre-row .left .preview { color: var(--text-muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-listpre-row .left .meta-line { display: flex; gap: var(--sp-2); align-items: center; margin-top: 6px; flex-wrap: wrap; }
.note-listpre-row .right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.note-listpre-row .date { font-size: var(--fs-xs); color: var(--text-subtle); }

/* ========== Tablo (V5) ========== */
.note-table .note-table-wrap { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; }
.note-table table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.note-table th, .note-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.note-table th { background: var(--bg-subtle); color: var(--text-muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.note-table tr { cursor: pointer; transition: background var(--dur-fast); }
.note-table tr:hover { background: var(--bg-subtle); }

/* ========== Timeline (V6) ========== */
.note-timeline .group { margin-bottom: var(--sp-5); }
.note-timeline .group-h { font-size: var(--fs-xs); color: var(--text-subtle); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 var(--sp-2); display: flex; align-items: center; gap: var(--sp-2); }
.note-timeline .group-h::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.note-timeline .group-list { display: flex; flex-direction: column; gap: 4px; }
.note-timeline .item { display: flex; gap: var(--sp-3); align-items: center; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; transition: border-color var(--dur-fast); }
.note-timeline .item:hover { border-color: var(--accent); }
.note-timeline .item .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.note-timeline .item .title { flex: 1; font-weight: 500; }
.note-timeline .item .date { color: var(--text-subtle); font-size: var(--fs-xs); }

/* ========== Defter gruplu (V7) ========== */
.note-bynb .nb-group { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); margin-bottom: var(--sp-4); overflow: hidden; }
.note-bynb .nb-group-h { padding: 12px 16px; background: var(--bg-subtle); display: flex; align-items: center; gap: var(--sp-2); border-bottom: 1px solid var(--border); font-weight: 600; font-size: var(--fs-sm); }
.note-bynb .nb-group-h .count { margin-left: auto; background: var(--surface); color: var(--text-muted); padding: 2px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 500; }
.note-bynb .nb-group-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-2); padding: 12px 16px; }
.note-bynb .item { padding: 10px; border: 1px solid var(--border); border-radius: var(--r-sm); cursor: pointer; transition: background var(--dur-fast); background: var(--bg-subtle); }
.note-bynb .item:hover { background: var(--surface); border-color: var(--accent); }
.note-bynb .item h3 { margin: 0 0 4px; font-size: 13px; }
.note-bynb .item .date { font-size: 10px; color: var(--text-subtle); }

/* ========== Galeri (V8) ========== */
.note-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-3); }
.note-gallery-card { background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--border-strong); overflow: hidden; cursor: pointer; transition: transform var(--dur-fast), box-shadow var(--dur-fast); }
.note-gallery-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.note-gallery-card .thumb { height: 140px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.9); font-size: 32px; }
.note-gallery-card .body { padding: 12px; }
.note-gallery-card .body h3 { margin: 0 0 4px; font-size: 14px; }
.note-gallery-card .body .date { font-size: var(--fs-xs); color: var(--text-subtle); }

/* ========== Masonry (V9) ========== */
.note-masonry { columns: 4 220px; column-gap: var(--sp-3); }
@media (max-width: 900px) { .note-masonry { columns: 2 200px; } }
.note-masonry-card { break-inside: avoid; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 14px; margin-bottom: var(--sp-3); cursor: pointer; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); display: block; }
.note-masonry-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.note-masonry-card h3 { margin: 0 0 6px; font-size: 14px; }
.note-masonry-card .preview { font-size: var(--fs-sm); color: var(--text-muted); }
.note-masonry-card .meta { font-size: var(--fs-xs); color: var(--text-subtle); margin-top: 8px; }
.note-masonry-card .muted { color: var(--text-subtle); }

/* ========== Yoğun liste (V10) ========== */
.note-dense { columns: 2; column-gap: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; }
.note-dense-row { break-inside: avoid; display: flex; gap: 8px; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 12.5px; }
.note-dense-row:hover { background: var(--bg-subtle); }
.note-dense-row .icon { width: 14px; text-align: center; flex-shrink: 0; }
.note-dense-row .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-dense-row .date { font-size: 10px; color: var(--text-subtle); flex-shrink: 0; }

.note-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg-elev);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.note-list-header,
.note-list-item {
    --card-accent: transparent;
    display: grid;
    grid-template-columns: minmax(180px, 2fr) minmax(120px, 1fr) minmax(100px, 1.2fr) 90px 90px;
    gap: var(--sp-3);
    align-items: center;
    padding: 6px var(--sp-4);
    border-bottom: 1px solid var(--border);
    border-left: 3px solid var(--card-accent);
}
.note-list-header {
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 8px var(--sp-4);
    cursor: default;
    border-left: 3px solid transparent;
}
.note-list-item {
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease), border-left-color var(--dur-fast) var(--ease);
    font-size: var(--fs-sm);
}
.note-list-item:last-child { border-bottom: 0; }
.note-list-item:hover { background: var(--bg-subtle); }
.note-list-item .col-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-list-item .col-nb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-list-item .col-tags { overflow: hidden; }
.note-list-item .col-tags .note-card-tags { display: flex; gap: 4px; flex-wrap: nowrap; overflow: hidden; align-items: center; }
.tag-chip-more {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border);
    cursor: help;
    flex-shrink: 0;
    line-height: 1.5;
}
.tag-chip-more:hover { background: var(--bg-hover); color: var(--text); }
.note-list-item .col-created,
.note-list-item .col-updated { color: var(--text-subtle); font-size: var(--fs-xs); }

/* ---------- Tasks: çoklu görünümler ------------------------ */
.segment-tasks { flex-wrap: wrap; }
.segment-tasks button { padding: 5px 9px; font-size: 12px; }

/* Compact */
.task-compact { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.task-compact-row { display: flex; align-items: center; gap: 8px; padding: 4px 12px; border-bottom: 1px solid var(--border); font-size: 13px; cursor: pointer; }
.task-compact-row:last-child { border-bottom: 0; }
.task-compact-row:hover { background: var(--bg-subtle); }
.task-compact-row.done .title { text-decoration: line-through; color: var(--text-subtle); }
.task-compact-row.imp .title { font-weight: 500; }
.task-compact-row .tc-check { width: 16px; height: 16px; border: 1.5px solid var(--text-subtle); border-radius: 4px; background: transparent; cursor: pointer; flex-shrink: 0; display: grid; place-items: center; font-size: 10px; color: #fff; }
.task-compact-row .tc-check.done { background: var(--success); border-color: var(--success); }
.task-compact-row .star { color: var(--warn); font-size: 12px; }
.task-compact-row .title { flex: 1; }
.task-compact-row .due { font-size: 11px; color: var(--text-subtle); }

/* Group sections (priority/folder/date) */
.task-priority, .task-folder, .task-date { display: flex; flex-direction: column; gap: var(--sp-4); }
.task-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.task-group.overdue { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.task-group-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--bg-subtle); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); margin: 0; }
.task-group-h .dot { width: 8px; height: 8px; border-radius: 50%; }
.task-group-h .count { margin-left: auto; background: var(--surface); color: var(--text-muted); padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.task-group-h .progress { flex-shrink: 0; width: 60px; height: 4px; background: var(--bg-subtle); border-radius: 999px; overflow: hidden; }
.task-group-h .progress-fill { display: block; height: 100%; background: var(--success); }
.task-group-body { padding: 8px; display: flex; flex-direction: column; gap: 4px; }

/* Mini cards */
.task-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.task-mini-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-sm); padding: 8px 10px; cursor: pointer; transition: background var(--dur-fast); }
.task-mini-card.imp { border-left-color: var(--danger); }
.task-mini-card.done { opacity: .6; }
.task-mini-card.done .title { text-decoration: line-through; }
.task-mini-card:hover { background: var(--bg-subtle); }
.task-mini-card .title { font-size: 13px; font-weight: 500; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-mini-card .meta { font-size: 10px; color: var(--text-subtle); }

/* Eisenhower */
.task-eisen { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.task-quad { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px; min-height: 200px; }
.task-quad.q1 { border-top: 3px solid var(--danger); }
.task-quad.q2 { border-top: 3px solid var(--accent); }
.task-quad.q3 { border-top: 3px solid var(--warn); }
.task-quad.q4 { border-top: 3px solid var(--text-subtle); }
.task-quad .quad-h { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; padding-bottom: 6px; border-bottom: 1px solid var(--border); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.task-quad .quad-h .count { margin-left: auto; background: var(--bg-subtle); padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.task-quad .quad-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; cursor: pointer; }
.task-quad .quad-row:hover { background: var(--bg-subtle); border-radius: 4px; padding-left: 4px; }
.task-quad .quad-row.done .title { text-decoration: line-through; color: var(--text-subtle); }
.task-quad .quad-row .tc-check { width: 14px; height: 14px; border: 1.5px solid var(--text-subtle); border-radius: 3px; background: transparent; flex-shrink: 0; }

/* Calendar */
.task-cal-wrap { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 16px; }
.task-cal-wrap .cal-h { font-weight: 600; font-size: 14px; margin-bottom: 12px; text-align: center; text-transform: capitalize; }
.task-cal-wrap .cal-h-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; font-size: 10px; color: var(--text-subtle); text-transform: uppercase; text-align: center; }
.task-cal-wrap .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.task-cal-wrap .cal-cell { aspect-ratio: 1; border: 1px solid var(--border); border-radius: 4px; padding: 4px; font-size: 11px; min-height: 60px; display: flex; flex-direction: column; }
.task-cal-wrap .cal-cell.empty { background: var(--bg-subtle); border-color: transparent; }
.task-cal-wrap .cal-cell.today { background: var(--accent); color: #fff; }
.task-cal-wrap .cal-cell .day-num { font-weight: 600; }
.task-cal-wrap .cal-cell .dots { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 4px; }
.task-cal-wrap .cal-cell .task-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.task-cal-wrap .cal-cell .task-dot.imp { background: var(--danger); }
.task-cal-wrap .cal-cell .task-dot.done { background: var(--success); opacity: .6; }
.task-cal-wrap .cal-cell .more { font-size: 9px; color: var(--text-subtle); margin-top: auto; }
.task-cal-wrap .cal-cell.today .task-dot { background: #fff; }

/* Gantt */
.task-gantt-wrap { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 12px; }
.task-gantt-wrap .gantt-row { display: grid; grid-template-columns: 200px 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); align-items: center; cursor: pointer; }
.task-gantt-wrap .gantt-row:last-child { border-bottom: 0; }
.task-gantt-wrap .gantt-row:hover { background: var(--bg-subtle); }
.task-gantt-wrap .task-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-gantt-wrap .gantt-bar { height: 18px; background: var(--bg-subtle); border-radius: 4px; position: relative; }
.task-gantt-wrap .bar-fill { position: absolute; height: 100%; background: var(--accent); border-radius: 4px; }
.task-gantt-wrap .bar-fill.imp { background: var(--danger); }
.task-gantt-wrap .bar-fill.done { background: var(--success); opacity: .6; }

/* ---------- Tasks ------------------------------------------ */
.task-list { display: flex; flex-direction: column; gap: var(--sp-1); }

.task-item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.task-item:hover { border-color: var(--border-strong); }
.task-item.done { opacity: .65; }
.task-item.done .title { text-decoration: line-through; color: var(--text-muted); }

.task-check {
    width: 18px; height: 18px;
    border: 2px solid var(--border-strong);
    border-radius: var(--r-xs);
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    display: grid; place-items: center;
    transition: all var(--dur-fast) var(--ease);
}
.task-check:hover { border-color: var(--accent); }
.task-item.done .task-check {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.task-body { flex: 1; min-width: 0; }
.task-body .title { font-weight: 500; font-size: var(--fs-sm); line-height: var(--lh-snug); cursor: pointer; }
.task-body .desc { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; line-height: var(--lh-snug); }

.task-meta {
    display: flex;
    gap: var(--sp-2);
    margin-top: var(--sp-2);
    flex-wrap: wrap;
    font-size: var(--fs-xs);
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px var(--sp-2);
    border-radius: var(--r-full);
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.4;
}
.chip.priority-high { background: var(--danger-soft); color: var(--danger); }
.chip.priority-mid  { background: var(--warn-soft); color: var(--warn); }
.chip.priority-low  { background: var(--success-soft); color: var(--success); }
.chip.due-overdue   { background: var(--danger-soft); color: var(--danger); }

.task-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity var(--dur-fast) var(--ease);
}
.task-item:hover .task-actions { opacity: 1; }

/* ---------- Tasks v2 (board + list) ---------------------------- */
.tasks-view { display: flex; flex-direction: column; gap: var(--sp-5); }

.task-quickadd {
    display: grid;
    grid-template-columns: 1fr 200px auto;
    gap: var(--sp-2);
    padding: var(--sp-3);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}
.task-quickadd:has(> input[type="text"]:only-of-type):not(:has(select)) {
    grid-template-columns: 1fr auto;
}
.task-quickadd input,
.task-quickadd select { height: 38px; }
.task-quickadd input[type="text"] { font-weight: 500; }

.task-board {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-4);
    align-items: start;
}
@media (max-width: 980px) {
    .task-board { grid-template-columns: 1fr; }
    .task-quickadd { grid-template-columns: 1fr; }
    .task-quickadd > button { width: 100%; }
}

.task-col {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-3);
    min-height: 220px;
    transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.task-col.drag-over {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 60%, var(--bg-subtle));
}
.task-col-head {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 4px var(--sp-2) var(--sp-3);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--sp-3);
}
.task-col-head .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--col, var(--accent));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--col) 25%, transparent);
}
.task-col-head .label { flex: 1; }
.task-col-head .count {
    background: var(--bg);
    color: var(--text-muted);
    border-radius: var(--r-full);
    padding: 2px 8px;
    font-size: var(--fs-xs);
    font-weight: 600;
}
.task-col-body { display: flex; flex-direction: column; gap: var(--sp-2); }

.task-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--sp-2);
    align-items: flex-start;
    padding: var(--sp-3);
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--text-subtle);
    border-radius: var(--r-md);
    cursor: grab;
    transition: border-color var(--dur-fast) var(--ease),
                box-shadow   var(--dur-fast) var(--ease),
                transform    var(--dur-fast) var(--ease);
}
.task-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border-strong);
}
.task-card.dragging { opacity: .4; cursor: grabbing; }
.task-card.important {
    border-left-color: var(--danger);
    border-left-width: 4px;
    box-shadow: inset 2px 0 0 color-mix(in srgb, var(--danger) 15%, transparent);
}
.task-card.important:hover {
    box-shadow: var(--shadow-sm), inset 2px 0 0 rgba(239, 68, 68, .25);
}
.task-card.done { opacity: .65; }
.task-card.done .tc-title { text-decoration: line-through; color: var(--text-muted); }

.tc-check {
    width: 20px; height: 20px;
    border: 2px solid var(--border-strong);
    border-radius: var(--r-sm);
    display: grid; place-items: center;
    color: #fff;
    margin-top: 1px;
    transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
    flex-shrink: 0;
}
.tc-check:hover { border-color: var(--accent); }
.task-card.done .tc-check { background: var(--success); border-color: var(--success); }

.tc-body { min-width: 0; cursor: pointer; }
.tc-title {
    font-size: var(--fs-sm);
    font-weight: 500;
    line-height: var(--lh-snug);
    word-break: break-word;
}
.tc-desc {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 4px;
    line-height: var(--lh-snug);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: var(--sp-2);
}
.tc-date {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: var(--r-full);
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.01em;
    border: 1px solid var(--border);
}
.tc-date-done { color: #059669; border-color: color-mix(in srgb, #10b981 30%, var(--border)); background: color-mix(in srgb, #10b981 8%, var(--bg-subtle)); }
.tc-date-arc  { color: #7c3aed; border-color: color-mix(in srgb, #8b5cf6 30%, var(--border)); background: color-mix(in srgb, #8b5cf6 8%, var(--bg-subtle)); }
.tc-date-due  { color: var(--danger); font-weight: 600; border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); background: color-mix(in srgb, var(--danger) 8%, var(--bg-subtle)); }

.archive-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    margin-bottom: var(--sp-3);
    background: color-mix(in srgb, #8b5cf6 7%, var(--surface));
    border: 1px solid color-mix(in srgb, #8b5cf6 25%, var(--border));
    border-radius: var(--r-md);
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}
.archive-banner-icon { font-size: 18px; flex-shrink: 0; line-height: 1.4; }
.archive-banner-text { flex: 1; min-width: 0; }
.archive-banner-text b { color: var(--text); }
.archive-banner-close {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: var(--text-subtle);
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: var(--r-sm);
    font-size: 18px;
    line-height: 1;
    display: grid;
    place-items: center;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.archive-banner-close:hover { background: var(--bg-hover); color: var(--text); }

.task-detail .td-dates {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: var(--sp-3);
    padding-top: var(--sp-3);
    border-top: 1px dashed var(--border);
    font-size: 12px;
    color: var(--text-muted);
}
.task-detail .td-dates b { color: var(--text); font-weight: 600; }

.tc-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--r-full);
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid var(--border);
}
.tc-chip.person {
    background: rgba(139,92,246,.12);
    color: #6d28d9;
    border-color: transparent;
}
[data-theme="dark"] .tc-chip.person,
[data-theme="midnight"] .tc-chip.person,
[data-theme="solarized-dark"] .tc-chip.person,
[data-theme="nord"] .tc-chip.person { color: #c4b5fd; }
a.tc-chip.note {
    background: rgba(99,102,241,.12);
    color: #4f46e5;
    border-color: transparent;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
a.tc-chip.note:hover { background: rgba(99,102,241,.22); color: #3730a3; }
[data-theme="dark"] a.tc-chip.note,
[data-theme="midnight"] a.tc-chip.note,
[data-theme="solarized-dark"] a.tc-chip.note,
[data-theme="nord"] a.tc-chip.note { color: #a5b4fc; }

.tc-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tc-actions button {
    width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-sm);
    color: var(--text-subtle);
    transition: background var(--dur-fast) var(--ease),
                color      var(--dur-fast) var(--ease),
                opacity    var(--dur-fast) var(--ease);
}
.tc-actions button:hover { background: var(--bg-hover); color: var(--text); }
.tc-actions button[data-act="delete"]:hover { color: var(--danger); }
/* Edit + Delete hide until card hover. ★ stays visible so the state is legible. */
.tc-actions button:not(.tc-star) { opacity: 0; }
.task-card:hover .tc-actions button:not(.tc-star) { opacity: 1; }
.tc-star.on { color: #f59e0b; }
.tc-star.on:hover { color: #d97706; background: rgba(245, 158, 11, .12); }

/* List variant of tasks-v2 */
.task-list-sec { margin-bottom: var(--sp-5); }
.task-list-head {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-bottom: var(--sp-2);
    color: var(--text);
}
.task-list-head .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--col, var(--accent));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--col) 25%, transparent);
}
.task-list-head .count {
    background: var(--bg-subtle);
    color: var(--text-muted);
    border-radius: var(--r-full);
    padding: 2px 8px;
    font-size: var(--fs-xs);
    font-weight: 600;
}
.task-list-body { display: flex; flex-direction: column; gap: var(--sp-2); }
.task-card.dense { padding: var(--sp-2) var(--sp-3); }
.task-card.dense .tc-desc { -webkit-line-clamp: 1; margin-top: 2px; opacity: .75; }
.task-card { cursor: pointer; }
.task-card .tc-actions button,
.task-card .tc-check { cursor: pointer; }

/* === Task detail modal (mini pencere) === */
.modal-task-detail { max-width: 520px; }
.task-detail { display: flex; flex-direction: column; gap: 14px; }
.task-detail .td-head { display: flex; flex-direction: column; gap: 6px; }
.task-detail .td-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}
.task-detail .td-status .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--col, var(--accent));
    display: inline-block;
}
.task-detail .td-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    word-break: break-word;
}
.task-detail .td-title.done { text-decoration: line-through; color: var(--text-muted); }
.task-detail .td-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
    padding: 10px 12px;
    background: var(--bg-subtle);
    border-radius: 8px;
}
.task-detail .td-desc.muted { color: var(--text-muted); font-style: italic; background: transparent; padding: 0; }
.task-detail .td-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.task-detail .td-tags .muted { font-size: 12px; color: var(--text-muted); }

#taskMeta { display: flex; gap: 6px; }

/* ---------- Modals -------------------------------------------- */
.modal-root {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    pointer-events: none;
}
.modal-root > * { pointer-events: auto; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fade-in var(--dur-fast) var(--ease);
}
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    animation: modal-in var(--dur) var(--ease-out);
    overflow: hidden;
}
.modal-head {
    padding: var(--sp-5) var(--sp-6) var(--sp-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
}
.modal-head h2 { font-size: var(--fs-lg); font-weight: 600; }
.modal-body { padding: 0 var(--sp-6) var(--sp-5); overflow-y: auto; }
.modal-body .form-row { margin-bottom: var(--sp-4); }
.modal-body label { display: block; font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-2); font-weight: 500; }
.modal-foot {
    padding: var(--sp-4) var(--sp-6);
    display: flex;
    justify-content: flex-end;
    gap: var(--sp-2);
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
}

.modal-confirm .modal-body { padding-top: var(--sp-2); padding-bottom: var(--sp-4); color: var(--text-muted); line-height: var(--lh-relaxed); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
    from { opacity: 0; transform: translate(-50%, -46%) scale(.97); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ---------- Toasts -------------------------------------------- */
.toast-root {
    position: fixed;
    bottom: var(--sp-5);
    right: var(--sp-5);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    pointer-events: none;
}
.toast {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--sp-3) var(--sp-4);
    box-shadow: var(--shadow-lg);
    font-size: var(--fs-sm);
    animation: toast-in var(--dur) var(--ease-out);
    pointer-events: auto;
    max-width: 360px;
    display: flex;
    gap: var(--sp-3);
    align-items: flex-start;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--accent); }
.toast.leaving { animation: toast-out var(--dur) var(--ease) forwards; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(16px); }
}

/* ---------- Command palette -------------------------------- */
.palette {
    position: fixed;
    top: 18vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(540px, calc(100vw - 2rem));
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-xl);
    z-index: calc(var(--z-modal) + 1);
    overflow: hidden;
    animation: modal-in var(--dur) var(--ease-out);
}
.palette-input {
    width: 100%;
    height: 52px;
    padding: 0 var(--sp-5);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border);
    font-size: var(--fs-lg);
    border-radius: 0;
}
.palette-input:focus { box-shadow: none; border-color: var(--border); }
.palette-list { max-height: 50vh; overflow-y: auto; padding: var(--sp-2); }
.palette-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
    color: var(--text);
    cursor: pointer;
}
.palette-item.active, .palette-item:hover { background: var(--bg-hover); }
.palette-item .kind { font-size: var(--fs-xs); color: var(--text-subtle); }
.palette-empty { padding: var(--sp-6); text-align: center; color: var(--text-subtle); font-size: var(--fs-sm); }

/* ---------- Floating new note/task button -------------------- */
.fab {
    position: fixed;
    right: var(--sp-6);
    bottom: var(--sp-6);
    width: 52px; height: 52px;
    border-radius: var(--r-full);
    background: var(--accent);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: var(--shadow-xl);
    transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
    z-index: 30;
}
.fab:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* ---------- Topbar inside a view --------------------------- */
.topbar {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-5);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.topbar .crumb {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar .actions { display: flex; gap: var(--sp-1); }

/* ---------- Kanban board (tasks) ---------------------------- */
/* ---------- Segmented control ------------------------------ */
.segment {
    display: inline-flex;
    background: var(--bg-subtle);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid var(--border);
    gap: 2px;
}
.segment button {
    padding: 6px 12px;
    border: 0;
    background: transparent;
    border-radius: 7px;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.segment button svg { width: 14px; height: 14px; flex-shrink: 0; }
.segment button:hover { color: var(--text); }
.segment button.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/* ---------- Dashboard widgets ------------------------------ */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--sp-5);
}
.widget {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-5);
}
.widget h3 {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: var(--sp-3);
}
.widget .stat {
    font-size: var(--fs-3xl);
    font-weight: 700;
    letter-spacing: -.02em;
}
.widget .stat-label {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    margin-top: var(--sp-1);
}

/* ---------- Trash views ------------------------------------ */
.trash-list > * + * { margin-top: var(--sp-2); }
.trash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--sp-3);
}
.trash-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--sp-3);
    display: flex; flex-direction: column; gap: var(--sp-2);
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.trash-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.trash-card-head { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-xs); color: var(--text-muted); }
.trash-card-kind {
    padding: 2px 8px; border-radius: 999px;
    background: var(--bg-subtle); color: var(--text-muted);
    font-weight: 600; letter-spacing: .3px;
}
.trash-card-kind.note { background: rgba(99,102,241,.14); color: #6366f1; }
.trash-card-kind.task { background: rgba(16,185,129,.14); color: #10b981; }
.trash-card-title { font-weight: 600; color: var(--text); line-height: 1.3; }
.trash-card-preview { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.trash-card-actions { display: flex; gap: var(--sp-2); margin-top: auto; }

/* ---------- Utility ---------------------------------------- */
.hidden { display: none !important; }
.spacer { flex: 1; }
.muted  { color: var(--text-muted); }
.center { text-align: center; }

/* ---------- Tag chips -------------------------------------- */
.tag-chip {
    --tag-color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    background: color-mix(in srgb, var(--tag-color) 12%, transparent);
    color: color-mix(in srgb, var(--tag-color) 85%, var(--text));
    border: 1px solid color-mix(in srgb, var(--tag-color) 30%, transparent);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease;
}
.tag-chip:hover { background: color-mix(in srgb, var(--tag-color) 22%, transparent); }
.tag-chip-sm   { padding: 2px 8px; font-size: 11px; }
.tag-chip-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--tag-color);
    flex-shrink: 0;
}
.tag-chip-name { font-weight: 500; }
.tag-chip-x {
    background: transparent;
    border: 0;
    font-size: 15px;
    line-height: 1;
    padding: 0 2px;
    color: inherit;
    opacity: .55;
    cursor: pointer;
    border-radius: 50%;
}
.tag-chip-x:hover { opacity: 1; background: rgba(0,0,0,.06); }

.note-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

/* ---------- Tag input (autocomplete) ----------------------- */
.tag-input {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 6px 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 38px;
}
.tag-input:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.tag-input-chips { display: contents; }
.tag-input-field {
    flex: 1;
    min-width: 120px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    outline: none;
    padding: 2px 4px;
}
.tag-input-suggest {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
    padding: 4px;
    z-index: 50;
    max-height: 240px;
    overflow-y: auto;
}
.tag-sugg-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    text-align: left;
}
.tag-sugg-item:hover,
.tag-sugg-item.active { background: var(--bg-subtle); }
.tag-sugg-create {
    color: var(--accent);
    font-weight: 500;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 8px;
}

/* ---------- Sidebar tag list ------------------------------- */
.tag-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 2px 0;
}
.tag-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
}
.tag-row:hover { background: var(--bg-subtle); }
.tag-row:hover .tag-row-actions { opacity: 1; }
.tag-row-link {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    overflow: hidden;
}
.tag-row-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tag-row-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity .15s ease;
}
.tag-row-actions button {
    background: transparent;
    border: 0;
    padding: 3px;
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
}
.tag-row-actions button:hover {
    background: var(--bg);
    color: var(--text);
}

/* ---------- Tag overview page ------------------------------ */
.tag-section { margin-bottom: 28px; }
.tag-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 10px;
}
.empty-state.sm {
    padding: 20px;
    font-size: 13px;
    color: var(--text-muted);
}
.task-row-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
}
.task-row-compact:hover {
    background: var(--bg-subtle);
    border-color: var(--border);
}
.task-status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    flex-shrink: 0;
}
.task-status-dot.done {
    background: var(--accent);
    border-color: var(--accent);
}
.task-title { flex: 1; font-size: 14px; }
.task-title.done { text-decoration: line-through; opacity: .6; }
.task-meta { font-size: 12px; color: var(--text-muted); }

/* ---------- Top tabs (primary nav) ------------------------- */
.app-tabs {
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 6px 10px 0;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    overflow-x: auto;
    scrollbar-width: thin;
}
.app-tabs .tab-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px 8px 0 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    box-shadow: none;
    white-space: nowrap;
    position: relative;
    bottom: -1px;
    border-bottom: 2px solid transparent;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.app-tabs .tab-item:hover {
    color: var(--text);
    background: var(--bg);
}
.app-tabs .tab-item.active {
    color: var(--accent);
    background: var(--bg);
    border-bottom-color: var(--accent);
    box-shadow: none;
}
.app-tabs .tab-item svg { flex-shrink: 0; opacity: .85; }

/* ---------- Tag filter + scrollable tag list --------------- */
.sidebar-section-tags { min-height: 140px; }
.tag-filter-wrap {
    padding: 0 var(--sp-3) var(--sp-2);
}
.tag-filter-input {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 10px;
    font-size: 12px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
}
.tag-filter-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}
.tag-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 var(--sp-2) var(--sp-2);
}
.tag-row.hidden { display: none !important; }

/* ---------- Finans ----------------------------------------- */
.finans-view {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 1280px;
    margin-inline: auto;
    width: 100%;
}

/* Sidebar gizlendiğinde restore (hamburger) üst sekmelerin üzerine binmesin */
.app.sidebar-collapsed .app-tabs { padding-left: 56px; }
@media (max-width: 840px) {
    .app:not(.sidebar-open) .app-tabs { padding-left: 56px; }
}
.finans-section h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 14px;
}
.section-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.section-head-row h2 { margin: 0; }

/* Card overview grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.finans-card {
    --card-color: #64748b;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.finans-card:hover { border-color: color-mix(in srgb, var(--card-color) 45%, var(--border)); }
.finans-card::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px;
    border-radius: 12px 0 0 12px;
    background: var(--card-color);
}
.finans-card.paid {
    background: color-mix(in srgb, var(--accent) 6%, var(--bg));
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.finans-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.finans-card-name {
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.finans-card-name .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--card-color);
}
.finans-card-cut {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.cut-days {
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 500;
}
.cut-days.warn { background: #fef3c7; color: #92400e; }

.finans-card-breakdown {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.finans-card-breakdown > div {
    background: var(--bg-subtle);
    padding: 10px 12px;
    border-radius: 10px;
    position: relative;
}
.finans-card-breakdown dt {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.finans-card-breakdown .dot-sq {
    width: 8px; height: 8px; border-radius: 2px;
    display: inline-block;
}
.finans-card-breakdown .fcb-subs .dot-sq { background: #0ea5e9; }
.finans-card-breakdown .fcb-inst .dot-sq { background: #f59e0b; }
.finans-card-breakdown dd {
    margin: 6px 0 0;
    font-weight: 700;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}
.finans-card-breakdown .fcb-meta {
    position: absolute;
    top: 10px; right: 12px;
    font-size: 10px;
    color: var(--text-muted);
}

/* Card header total row + stacked bar */
.fc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 4px;
}
.fc-total-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
}
.fc-total-amount {
    font-size: 22px;
    font-weight: 700;
    color: var(--card-color);
    font-variant-numeric: tabular-nums;
}
.fc-stack-bar {
    display: flex;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--bg-subtle);
    margin: 2px 0 4px;
}
.fc-stack-bar .fc-stack-subs { background: #0ea5e9; }
.fc-stack-bar .fc-stack-inst { background: #f59e0b; }

.finans-card footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}
.paid-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    user-select: none;
}
.paid-toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.finans-card.paid .paid-toggle { color: var(--accent); font-weight: 500; }

.finans-card-grand {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, var(--bg)), var(--bg));
    border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}
.finans-card-grand::before { display: none; }
.finans-card-grand .grand-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.finans-card-sub { font-size: 12px; color: var(--text-muted); }

/* === Demo 1 v2: Hero paneli (aylık yük) === */
.finans-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--bg)), var(--bg));
    position: relative;
    overflow: hidden;
}
.finans-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%);
    pointer-events: none;
}
.hero-main { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.hero-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    font-weight: 500;
}
.hero-grand {
    font-size: 42px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    line-height: 1;
    letter-spacing: -.02em;
}
.hero-bar {
    display: flex;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--bg-subtle);
    margin-top: 4px;
}
.hero-bar-subs { background: #0ea5e9; }
.hero-bar-inst { background: #f59e0b; }

.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    position: relative;
}
.hero-split-item {
    padding: 16px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
}
.hero-split-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
}
.hero-subs::before { background: #0ea5e9; }
.hero-inst::before { background: #f59e0b; }
.hsi-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}
.hsi-dot {
    width: 10px; height: 10px;
    border-radius: 3px;
    display: inline-block;
}
.hero-subs .hsi-dot { background: #0ea5e9; }
.hero-inst .hsi-dot { background: #f59e0b; }
.hsi-label {
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.hsi-count {
    margin-left: auto;
    font-size: 11px;
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: 999px;
}
.hsi-amount {
    font-size: 26px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    line-height: 1.1;
}
.hero-subs .hsi-amount { color: #0284c7; }
.hero-inst .hsi-amount { color: #d97706; }
.hsi-foot { font-size: 11px; color: var(--text-muted); }

@media (max-width: 900px) {
    .finans-hero { grid-template-columns: 1fr; }
}

/* Section head row — sub description */
.section-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.section-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.sum-chip {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text);
    font-variant-numeric: tabular-nums;
    border: 1px solid var(--border);
}
.sum-chip-muted { color: var(--text-muted); }
.sum-chip-strong { font-weight: 600; border-color: transparent; color: #fff; }
.sum-chip-subs { background: #0ea5e9; }
.sum-chip-inst { background: #f59e0b; }

/* === Demo 1 v2: Modal form (kart/abonelik/taksit ekle-düzenle) === */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.modal-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}
.modal-form label > span {
    font-weight: 500;
    color: var(--text);
    font-size: 13px;
}
.modal-form input[type="text"],
.modal-form input[type="number"],
.modal-form select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--dur-fast) var(--ease);
}
.modal-form input:focus,
.modal-form select:focus {
    outline: none;
    border-color: var(--accent);
}
.modal-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 500px) {
    .modal-form .form-row { grid-template-columns: 1fr; }
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.color-sw {
    width: 28px; height: 28px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
    padding: 0;
}
.color-sw:hover { transform: scale(1.1); }
.color-sw.sel {
    border-color: var(--text);
    box-shadow: 0 0 0 2px var(--bg);
}

.inst-spacer { flex: 1; }

/* === Demo 1 v2: Kart yönetimi listesi === */
.card-manage-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.card-manage-row {
    display: grid;
    grid-template-columns: 1.5fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    border-left: 4px solid var(--card-color);
    transition: background .15s, border-color .15s;
}
.card-manage-row:hover {
    background: var(--bg-subtle);
    border-color: color-mix(in srgb, var(--card-color) 40%, var(--border));
    border-left-color: var(--card-color);
}
.cm-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cm-color {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: var(--card-color);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--card-color) 18%, transparent);
}
.cm-info { min-width: 0; }
.cm-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.cm-meta { font-size: 12px; color: var(--text-muted); }
.cm-mid { text-align: right; }
.cm-total-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
}
.cm-total {
    font-weight: 700;
    font-size: 16px;
    color: var(--card-color);
    font-variant-numeric: tabular-nums;
}
.cm-actions { display: flex; gap: 6px; }
.cm-actions .btn-sm { padding: 6px 12px; font-size: 12px; }
.cm-actions .btn-danger:hover {
    background: color-mix(in srgb, #dc2626 15%, var(--bg));
    color: #dc2626;
    border-color: #dc2626;
}

@media (max-width: 700px) {
    .card-manage-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .cm-mid { text-align: left; }
    .cm-actions { justify-content: flex-end; }
}

/* Tables */
.finans-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.finans-table th {
    text-align: left;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}
.finans-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.finans-table tr:hover td { background: var(--bg-subtle); }
.finans-table tr.inactive td { opacity: .5; }
.finans-table td.num { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.finans-table .row-actions {
    text-align: right;
    white-space: nowrap;
}
.finans-table .row-actions button {
    background: transparent;
    border: 0;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-muted);
}
.finans-table .row-actions button:hover { background: var(--bg-subtle); color: var(--text); }

.category-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.status-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-subtle);
    color: var(--text-muted);
}
.status-pill.active {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
}

#instList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(442px, 1fr));
    gap: 16px;
}
@media (max-width: 900px) {
    #instList { grid-template-columns: 1fr; }
}

.finans-subs-section,
.finans-inst-section {
    margin-top: 28px;
    padding: 20px 22px 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    position: relative;
    overflow: hidden;
}
.finans-subs-section::before,
.finans-inst-section::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    border-radius: 14px 14px 0 0;
}
.finans-subs-section { border-color: color-mix(in srgb, #0ea5e9 25%, var(--border)); background: color-mix(in srgb, #0ea5e9 4%, var(--surface)); }
.finans-subs-section::before { background: #0ea5e9; }
.finans-subs-section h2::before {
    content: '🔁 ';
    font-size: 0.85em;
}

.finans-inst-section { border-color: color-mix(in srgb, #f59e0b 30%, var(--border)); background: color-mix(in srgb, #f59e0b 4%, var(--surface)); }
.finans-inst-section::before { background: #f59e0b; }
.finans-inst-section h2::before {
    content: '📅 ';
    font-size: 0.85em;
}
.inst-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.inst-card.done { opacity: .55; }
.inst-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.inst-head h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.inst-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.inst-amount { text-align: right; }
.inst-amount .monthly {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.inst-amount .monthly span { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.inst-amount .total-sub { font-size: 11px; color: var(--text-muted); }

.inst-progress { margin: 0; }
.inst-bar {
    height: 8px;
    background: var(--bg-subtle);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
}
.inst-bar span {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width .25s ease;
}
.inst-counts {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.inst-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.inst-actions .btn { padding: 6px 14px; font-size: 13px; }

/* Card chips (bottom section) */
.card-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.card-chip {
    --card-color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 200px;
}
.card-chip-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--card-color);
    flex-shrink: 0;
}
.card-chip-name { font-weight: 600; font-size: 14px; }
.card-chip-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Not PDF yazdırma ------------------------------- */
.print-title { display: none; }

@media print {
    @page { margin: 18mm 16mm; }

    body.printing-note,
    body.printing-note .app,
    body.printing-note .app-body,
    body.printing-note .main,
    body.printing-note .editor-shell {
        display: block !important;
        background: #fff !important;
        color: #000 !important;
        height: auto !important;
        overflow: visible !important;
    }

    body.printing-note .sidebar,
    body.printing-note .sidebar-restore,
    body.printing-note .app-tabs,
    body.printing-note .topbar,
    body.printing-note .editor-toolbar,
    body.printing-note .editor-title,
    body.printing-note .editor-tags,
    body.printing-note .editor-counter,
    body.printing-note .toast-layer,
    body.printing-note .palette-root,
    body.printing-note .modal-root,
    body.printing-note .save-status {
        display: none !important;
    }

    body.printing-note .editor-meta {
        display: flex !important;
        gap: 6pt;
        font-size: 9pt;
        color: #666;
        margin: 0 0 14pt 0;
        padding-bottom: 8pt;
        border-bottom: 1px solid #ddd;
    }

    body.printing-note .editor-wrap {
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    body.printing-note .print-title {
        display: block;
        font-size: 24pt;
        font-weight: 700;
        margin: 0 0 12pt 0;
        color: #000;
        page-break-after: avoid;
    }

    body.printing-note .editor-content {
        font-size: 11pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
        padding: 0 !important;
        min-height: auto !important;
        border: 0 !important;
    }

    body.printing-note .editor-content h1 { font-size: 20pt; margin: 18pt 0 8pt; page-break-after: avoid; }
    body.printing-note .editor-content h2 { font-size: 16pt; margin: 16pt 0 6pt; page-break-after: avoid; }
    body.printing-note .editor-content h3 { font-size: 13pt; margin: 14pt 0 5pt; page-break-after: avoid; }
    body.printing-note .editor-content p  { margin: 0 0 8pt; orphans: 3; widows: 3; }
    body.printing-note .editor-content ul,
    body.printing-note .editor-content ol { margin: 0 0 8pt 18pt; padding: 0; }
    body.printing-note .editor-content li { margin-bottom: 3pt; }
    body.printing-note .editor-content img { max-width: 100% !important; height: auto !important; page-break-inside: avoid; }
    body.printing-note .editor-content table {
        width: 100% !important;
        border-collapse: collapse;
        page-break-inside: avoid;
        margin: 0 0 8pt;
    }
    body.printing-note .editor-content table td,
    body.printing-note .editor-content table th {
        border: 1px solid #999;
        padding: 4pt 6pt;
    }
    body.printing-note .editor-content pre,
    body.printing-note .editor-content code {
        font-family: 'Courier New', monospace;
        font-size: 10pt;
        background: #f4f4f4;
        color: #111;
        border: 1px solid #ddd;
    }
    body.printing-note .editor-content pre {
        padding: 6pt 8pt;
        white-space: pre-wrap;
        word-wrap: break-word;
        page-break-inside: avoid;
    }
    body.printing-note .editor-content code { padding: 1pt 4pt; border-radius: 2pt; }
    body.printing-note .editor-content blockquote {
        border-left: 3pt solid #888;
        margin: 0 0 8pt;
        padding: 0 0 0 10pt;
        color: #333;
        font-style: italic;
    }
    body.printing-note .editor-content a {
        color: #0645ad;
        text-decoration: underline;
    }
}
