/* RevensaSoft Panel — ana stil dosyası
   Marka: primary #25E08A (mint-emerald), yumuşak charcoal zemin #0e1210. Koyu tema varsayılan.
   Light modda yeşil #12B06C, kırık-beyaz yüzey. Font: Inter (RevenueCat tarzı ölçülü ağırlıklar).
   Referans estetik: NeuroBank dashboard — grid dokulu koyu zemin, yüzen yuvarlak
   çerçeve, kart görünümlü sidebar blokları, pill rozetler, accent butonlarda koyu metin. */

:root,
[data-theme="dark"] {
    --bg: #0e1210;
    --grid-line: rgba(255, 255, 255, 0.024);
    --frame: #141917;
    --surface: #191f1c;
    --surface-2: #212824;
    --border: #28302b;
    --border-strong: #374039;
    --text: #eef2ef;
    --text-muted: #8b968f;
    --primary: #25e08a;
    --primary-hover: #45e89d;
    --primary-soft: rgba(37, 224, 138, 0.12);
    --on-primary: #06130d;
    --success: #25e08a;
    --success-soft: rgba(37, 224, 138, 0.12);
    --danger: #ff6b6b;
    --danger-soft: rgba(255, 107, 107, 0.12);
    --warning: #f5b544;
    --warning-soft: rgba(245, 181, 68, 0.12);
    --glow: 0 0 20px rgba(37, 224, 138, 0.10);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.32), 0 12px 32px rgba(0, 0, 0, 0.20);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
    --radius: 14px;
    --radius-lg: 18px;
    --radius-sm: 10px;
    --sidebar-width: 264px;
    --sidebar-width-collapsed: 76px;
    --topbar-height: 68px;
}

[data-theme="light"] {
    --bg: #e9ede9;
    --grid-line: rgba(10, 20, 15, 0.030);
    --frame: #f2f5f2;
    --surface: #f9fbf9;
    --surface-2: #eef2ee;
    --border: #dbe2dd;
    --border-strong: #c6cfc9;
    --text: #232b26;
    --text-muted: #545f57;
    --primary: #12b06c;
    --primary-hover: #0f9c5f;
    --primary-soft: rgba(18, 176, 108, 0.12);
    --on-primary: #06130d;
    --success: #0a7d49;
    --success-soft: rgba(18, 176, 108, 0.12);
    --danger: #dc4b4b;
    --danger-soft: rgba(220, 75, 75, 0.10);
    --warning: #c77700;
    --warning-soft: rgba(199, 119, 0, 0.10);
    --glow: 0 0 0 rgba(0, 0, 0, 0);
    --shadow: 0 1px 3px rgba(15, 25, 20, 0.04), 0 8px 24px rgba(15, 25, 20, 0.05);
    --shadow-lg: 0 16px 48px rgba(15, 25, 20, 0.13);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(ellipse 55% 38% at 75% -6%, rgba(37, 224, 138, 0.05), transparent 65%),
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px),
        var(--bg);
    background-size: auto, 44px 44px, 44px 44px, auto;
    color: var(--text);
    line-height: 1.55;
    transition: color 0.2s ease;
    -webkit-font-smoothing: antialiased;
}

/* Light modda ince stroklar soluk görünüyor; gövde metnini kalınlaştır
   (sadece açık tema — koyu tema 400'de kalır) */
[data-theme="light"] body { font-weight: 500; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
code {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 7px;
    font-size: 0.85em;
}

.text-muted { color: var(--text-muted); }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }

.main {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    padding: 14px 14px 14px 0;
    transition: margin-left 0.2s ease;
}

/* İçerik, referanstaki gibi yuvarlak köşeli yüzen bir çerçevede durur */
.frame {
    background: var(--frame);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-height: calc(100vh - 28px);
    overflow: clip;
}

.content {
    padding: 26px 30px 48px;
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    padding: 14px;
    gap: 12px;
    z-index: 50;
    transition: width 0.2s ease, transform 0.2s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 10px;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    flex-shrink: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #25e08a, #12a866);
    color: #071410;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: var(--glow);
}

.brand-text { font-weight: 600; letter-spacing: 0.01em; font-size: 1.05rem; }

/* Sidebar kart blokları */
.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.sidebar-profile { flex-shrink: 0; }

.sidebar-profile-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.avatar-lg {
    width: 44px; height: 44px;
    border-radius: 14px;
    font-size: 1.15rem;
}

.theme-switch {
    display: inline-flex;
    gap: 2px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
}

.theme-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border: 0;
    background: none;
    border-radius: 999px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.theme-pill svg { width: 15px; height: 15px; }
.theme-pill:hover { color: var(--text); }
.theme-pill.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }

.profile-date {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    margin-bottom: 4px;
}

.profile-welcome {
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.sidebar-nav {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover { background: var(--surface-2); color: var(--text); }

.sidebar-link.active {
    background: var(--surface-2);
    color: var(--text);
    box-shadow: inset 3px 0 0 var(--primary);
}
.sidebar-link.active .sidebar-icon { color: var(--primary); }

.sidebar-icon {
    width: 20px; height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-icon svg { width: 18px; height: 18px; }

/* Daraltılmış sidebar */
body.sidebar-collapsed .sidebar { width: var(--sidebar-width-collapsed); }
body.sidebar-collapsed .main { margin-left: var(--sidebar-width-collapsed); }
body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-profile { display: none; }
body.sidebar-collapsed .sidebar-link { justify-content: center; padding: 10px; }
body.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 8px 0; }
/* Daraltılmışken aktif linkte kutu/çizgi olmasın; sadece ikon yeşil kalsın */
body.sidebar-collapsed .sidebar-link.active { background: none; box-shadow: none; }

/* ---------- Topbar (frame içinde) ---------- */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: color-mix(in srgb, var(--frame) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 26px;
    z-index: 40;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; }

/* Yeni mail bildirimi — zil + okunmamış rozeti */
.mail-bell { position: relative; text-decoration: none; }
.mail-bell.has-unread { color: var(--primary); border-color: var(--primary); box-shadow: var(--glow); }
.mail-bell-badge {
    position: absolute;
    top: -6px; right: -6px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--on-primary);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 999px;
    box-shadow: 0 0 0 2px var(--frame);
}
.mail-bell-badge[hidden] { display: none; }

/* Yeni yorum bildirimi — yıldız zili + dropdown */
.review-bell { position: relative; }
.review-bell-btn { position: relative; }
.review-bell-btn.has-unread { color: var(--primary); border-color: var(--primary); box-shadow: var(--glow); }
.dropdown.review-bell-menu { left: auto; right: 0; min-width: 280px; max-height: 60vh; overflow-y: auto; }
.review-bell-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
}
a.review-bell-item:hover { background: var(--surface-2); }
.review-bell-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.review-bell-item-main strong { font-size: 0.9rem; }
.review-bell-count {
    flex-shrink: 0;
    min-width: 22px; height: 22px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
}
.review-bell-empty { padding: 14px 12px; color: var(--text-muted); font-size: 0.88rem; text-align: center; }

.caret { width: 13px; height: 13px; color: var(--text-muted); flex-shrink: 0; }

/* ---------- Proje switcher & dropdown ---------- */
.project-switcher, .admin-menu { position: relative; }

.project-switcher-btn, .admin-menu-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 600;
    font-size: 0.93rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.project-switcher-btn:hover, .admin-menu-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }

.project-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.project-dot-all { background: linear-gradient(135deg, #25e08a, #12a866); }

.project-icon {
    width: 20px; height: 20px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 7px;
    display: none;
    z-index: 60;
}
.dropdown.open { display: block; }

.admin-menu-dropdown { left: auto; right: 0; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    background: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 500;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease;
}
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.dropdown-item-accent { color: var(--primary); font-weight: 600; }
.dropdown-item-danger { color: var(--danger); }
.dropdown-item-danger:hover { background: var(--danger-soft); color: var(--danger); }

.dropdown-divider { height: 1px; background: var(--border); margin: 6px 5px; }

.dropdown-header { padding: 9px 12px; display: flex; flex-direction: column; }
.dropdown-header small { color: var(--text-muted); }

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    /* Gövdeden miras line-height, yarım-boşluk yüzünden harfi yukarı kaydırıyordu */
    line-height: 1;
    /* Optik denge: büyük harfte baseline altındaki boşluk kullanılmadığı için
       harf göze yukarıda gelir; 2px üst iç boşluk içeriği 1px aşağı alır. */
    padding-top: 2px;
    flex-shrink: 0;
}

/* ---------- Sayfa başlığı ---------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.page-head h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
.page-head p { margin-top: 2px; }

/* Üye detay: üye kodu altında proje adı + durum rozetleri aynı satırda */
.member-subline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.member-subline .badge { margin-right: 0; }

/* ---------- Kartlar ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.card-head h2 { font-size: 1.05rem; font-weight: 600; }

/* Kart köşe aksiyon butonu (referanstaki ↗ tarzı) */
.card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.card-action:hover { border-color: var(--border-strong); color: var(--text); }
.card-action svg { width: 15px; height: 15px; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.card-grid .card { margin-bottom: 0; }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.two-col .card { margin-bottom: 0; }

/* İstatistik kartları */
.stat-card { display: flex; flex-direction: column; gap: 5px; }
.stat-label { color: var(--text-muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.stat-note { color: var(--text-muted); font-size: 0.82rem; }

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 17px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:hover { border-color: var(--border-strong); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--glow);
}

.btn-danger-ghost { color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger); }

.btn-sm { padding: 5px 12px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- Formlar ---------- */
.form-group { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.form-group label { font-weight: 600; font-size: 0.88rem; }

.form-row { display: flex; gap: 14px; }
.form-row .form-group { min-width: 0; }

input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    padding: 10px 13px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.93rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 0.65; }
input:focus, select:focus, textarea:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
input:disabled, select:disabled, textarea:disabled {
    opacity: 0.5;
    color: var(--text-muted);
    cursor: not-allowed;
}

input[type="color"] {
    width: 54px; height: 40px;
    padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.form-hint { color: var(--text-muted); font-size: 0.8rem; }

.form-section-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 22px 0 12px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--border);
}
.form-section-title:first-child { margin-top: 0; }

.test-result { margin-left: 10px; font-size: 0.88rem; font-weight: 600; }
.test-result.ok { color: var(--success); }
.test-result.fail { color: var(--danger); }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s ease; }
.table tbody tr:hover { background: var(--surface-2); }

.table-actions { text-align: right; white-space: nowrap; }
.table-actions .btn { margin-left: 6px; }
.table-actions-col { width: 1%; }

.project-cell { display: inline-flex; align-items: center; gap: 10px; }

/* ---------- Rozetler ---------- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-right: 3px;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-muted { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-android { background: var(--success-soft); color: var(--success); }
.badge-ios { background: rgba(122, 162, 255, 0.12); color: #7aa2ff; }
[data-theme="light"] .badge-ios { background: rgba(37, 99, 235, 0.10); color: #2563eb; }

/* ---------- Sekmeler (pill grup, referanstaki Active/History tarzı) ---------- */
.tabs {
    display: inline-flex;
    gap: 3px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    border: 0;
    background: none;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Üye listesi ---------- */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.filter-bar .filter-search { flex: 2; min-width: 220px; }
.filter-bar select { flex: 1; min-width: 150px; width: auto; }

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pagination { display: flex; align-items: center; gap: 10px; }
.pagination-info { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; min-width: 46px; text-align: center; }

.table-empty { text-align: center; padding: 32px 12px !important; color: var(--text-muted); }
tr.row-link { cursor: pointer; }

.back-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.back-link:hover { color: var(--primary); }

/* ---------- Üye detayı ---------- */
.text-success { color: var(--success); }

/* Abonelik kartı */
.sub-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.sub-card:last-child { margin-bottom: 0; }
.sub-card-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sub-card-main strong { font-size: 0.95rem; }
.sub-card-main small { font-size: 0.82rem; }
.sub-card-badges { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sub-card-revenue { display: flex; flex-direction: column; align-items: flex-end; min-width: 90px; }
.sub-card-revenue strong { font-size: 1.05rem; }
.sub-card-revenue small { font-size: 0.72rem; }

/* Ses oynatma butonu — metin değişse de genişlik sabit kalır (satır zıplamasın) */
.audio-play-btn {
    white-space: nowrap;
    min-width: 104px;
    justify-content: center;
}

/* Dinle/Önizleme kolonu sağa yaslı */
.table th.table-audio { text-align: right; }
.table td.table-audio { text-align: right; }
.audio-play-btn.playing {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
}

/* Katlanabilir kartlar (details/summary) */
.collapse-card { padding: 0; overflow: hidden; }
.collapse-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.98rem;
    list-style: none;
    user-select: none;
    transition: background 0.12s ease;
}
.collapse-card summary::-webkit-details-marker { display: none; }
.collapse-card summary:hover { background: var(--surface-2); }
.collapse-card summary .badge { margin-left: 6px; }
.collapse-chevron { width: 16px; height: 16px; color: var(--text-muted); transition: transform 0.15s ease; flex-shrink: 0; }
.collapse-card[open] > summary .collapse-chevron { transform: rotate(180deg); }
.collapse-card[open] > summary { border-bottom: 1px solid var(--border); }
.collapse-card > .detail-list,
.collapse-card > .table-wrap,
.collapse-card > p { padding: 6px 22px 18px; }

/* ---------- Üye notları ---------- */
.note-list { display: flex; flex-direction: column; gap: 14px; }
.note-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.note-body { font-size: 0.93rem; margin-bottom: 8px; white-space: pre-line; }
.note-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- Dashboard ---------- */
.chart-row { margin-bottom: 20px; }
.chart-box { position: relative; height: 260px; }

.stat-skeleton { display: inline-block; height: 30px; width: 110px; margin: 4px 0; }
.chart-skeleton { height: 100%; }

.mini-list { display: flex; flex-direction: column; }
.mini-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.mini-item:last-child { border-bottom: 0; }
/* Satırın tamamı link — üye detayına (abonelikler sekmesi) gider */
a.mini-item { color: var(--text); text-decoration: none; padding: 11px 10px; margin: 0 -10px; border-radius: var(--radius-sm); transition: background 0.12s ease; }
a.mini-item:hover { background: var(--surface-2); }
.mini-item-main { display: flex; flex-direction: column; min-width: 0; }
.mini-item-main strong { font-size: 0.93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-item-main small { font-size: 0.8rem; }

.rc-warning { padding: 14px 20px; border-color: var(--warning); }
.rc-warning p { font-size: 0.9rem; margin: 4px 0; }

/* ---------- Boş durumlar ---------- */
.empty-state {
    text-align: center;
    padding: 60px 32px;
}
.empty-state .empty-icon { font-size: 2.4rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state h2 { font-size: 1.15rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); max-width: 460px; margin: 0 auto 18px; }
.empty-state-sm { padding: 28px 16px; }
.empty-state-sm p { margin-bottom: 0; }

/* ---------- Detay listesi ---------- */
.detail-list { display: flex; flex-direction: column; }
.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: 0; }
.detail-label { color: var(--text-muted); font-weight: 600; font-size: 0.9rem; }

/* ---------- Modal ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
    z-index: 100;
}
.modal-backdrop.open { display: flex; }

.modal {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 640px;
    animation: modalIn 0.18s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 1.1rem; }

.modal-body { padding: 24px; max-height: 62vh; overflow-y: auto; }

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* ---------- Toast ---------- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 200;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    max-width: 380px;
    padding: 13px 16px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 0.92rem;
    font-weight: 500;
    animation: toastIn 0.22s ease;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast.hide { opacity: 0; transform: translateX(12px); transition: all 0.25s ease; }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Skeleton ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
    min-height: 14px;
}
@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* ---------- Login ---------- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 60% 42% at 50% -6%, rgba(37, 224, 138, 0.07), transparent 70%),
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px),
        var(--bg);
    background-size: auto, 44px 44px, 44px 44px, auto;
}
.login-wrap { width: 100%; max-width: 400px; padding: 16px; }
.login-card { padding: 36px 32px; }
.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand .brand-mark { width: 50px; height: 50px; font-size: 1.5rem; border-radius: 14px; margin-bottom: 14px; }
.login-brand h1 { font-size: 1.25rem; margin-bottom: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); background: var(--bg); }
    body.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
    .main { margin-left: 0 !important; padding: 10px; }
    .frame { min-height: calc(100vh - 20px); }
    .content { padding: 20px 16px 40px; }
    .admin-name { display: none; }
    .form-row { flex-direction: column; gap: 0; }
    .topbar { padding: 0 14px; }
    .project-switcher-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
}

/* ============================================================================
   Görevler — Kanban panosu
   ============================================================================ */

.avatar-sm { width: 22px; height: 22px; font-size: 0.7rem; border-radius: 50%; }
.icon-btn-sm { width: 26px; height: 26px; border-radius: 8px; font-size: 0.9rem; }

/* Yatay kaydırmalı pano */
.board {
    /* İş takibi — marka yeşil-antrasit ailesinde sakin yüzeyler.
       Kolon koyu, kart belirgin biçimde daha açık: temaya uyum + ayırt edicilik.
       Marka yeşili yalnızca vurguda (buton, seçili durum, etiket) kalır. */
    --bd-col: #191f1c;
    --bd-card: #242c27;
    --bd-count: #2e3831;
    --bd-scroll: #3d4841;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 12px;
    height: calc(100vh - 130px);
    min-height: 360px;
    scrollbar-width: thin;
    scrollbar-color: var(--bd-scroll) transparent;
}
[data-theme="light"] .board {
    --bd-col: #eef2ee;
    --bd-card: #ffffff;
    --bd-count: #e2e8e3;
    --bd-scroll: #c9d2cc;
}
.board::-webkit-scrollbar { height: 10px; }
.board::-webkit-scrollbar-thumb { background: var(--bd-scroll); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
.board::-webkit-scrollbar-track { background: transparent; }
.board-loading { display: flex; gap: 18px; }

/* Kolon */
.board-column {
    flex: 0 0 304px;
    max-width: 304px;
    background: var(--bd-col);
    border: 1px solid transparent;
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14), 0 10px 26px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
}
[data-theme="light"] .board-column {
    box-shadow: 0 1px 2px rgba(15, 25, 20, 0.04), 0 10px 26px rgba(15, 25, 20, 0.05);
}
.board-column-head {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 10px 6px 20px;
    min-height: 44px;
    box-sizing: border-box;
    cursor: grab;
}
.board-column-head:active { cursor: grabbing; }
.board-column-title {
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
    min-width: 0;
    letter-spacing: -0.01em;
    cursor: pointer;
    line-height: 22px;
    padding: 3px 5px;
    margin-left: -5px;
    border-radius: 6px;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.board-column-title.editing { background: var(--bd-count); cursor: text; }
.board-column-count {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0 2px;
}
/* Kolon menüsü — Trello tarzı üç-nokta buton + dropdown */
.col-menu-wrap, .card-menu-wrap { position: relative; display: flex; }
.col-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.col-menu:hover,
.col-menu-wrap.open .col-menu { background: var(--bd-count); color: var(--text); }
.col-menu-dropdown, .card-menu-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 168px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    display: none;
    z-index: 30;
}
.col-menu-wrap.open .col-menu-dropdown,
.card-menu-wrap.open .card-menu-dropdown { display: block; }
.col-menu-item, .card-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
}
.col-menu-item:hover, .card-menu-item:hover { background: var(--surface-2); }
.col-menu-delete, .card-menu-delete { color: var(--danger); }

/* Kart modalı başlığındaki aksiyonlar (menü + kapat) */
.card-modal-head-actions { display: flex; align-items: center; gap: 8px; }
.card-menu { font-size: 1.15rem; line-height: 1; }

/* Kart listesi (drop alanı) */
.board-cards {
    padding: 2px 10px 6px;
    overflow-y: auto;
    flex: 1;
    min-height: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--bd-scroll) transparent;
}
.board-cards::-webkit-scrollbar { width: 8px; }
.board-cards::-webkit-scrollbar-thumb { background: var(--bd-scroll); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
.board-cards::-webkit-scrollbar-track { background: transparent; }
/* Boş liste: kart alanı çöksün — üst başlık ile "kart ekle" arası boşluk kalmasın */
.board-cards:empty { min-height: 0; padding-top: 0; padding-bottom: 0; flex: 0 0 auto; }

/* Kart */
.board-card {
    position: relative;
    background: var(--bd-card);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.22), 0 0 1px rgba(0, 0, 0, 0.30);
    transition: border-color 0.15s ease;
}
[data-theme="light"] .board-card { box-shadow: 0 1px 1px rgba(15, 25, 20, 0.10); }
/* Trello tarzı: üzerine gelince yükselme/gölge yerine primary renkli çerçeve */
.board-card:hover { border-color: var(--primary); }
.board-card-title { font-size: 0.92rem; line-height: 1.35; font-weight: 500; }
/* Kart kapak görseli (Trello) */
.board-card-cover { margin: -7px -10px 8px; }
.board-card-cover img { display: block; width: 100%; max-height: 150px; object-fit: cover; }

/* Kartın en üstünde renkli şeritler — öncelik barı + etiketler (Trello tarzı) */
.card-labels-top { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.card-prio-strip { height: 8px; min-width: 40px; border-radius: 999px; }
.card-prio-strip.prio-high { background: var(--danger); }
.card-prio-strip.prio-medium { background: var(--warning); }
.card-prio-strip.prio-low { background: var(--text-muted); }

/* Kart alt bilgisi: solda ikon+sayı, sağda üye avatarı (avatar hep sağda sabit, daralmaz) */
.card-footer { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.card-footer-left { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.card-footer > .avatar-sm { flex: 0 0 auto; margin-left: auto; }
.card-stat { display: inline-flex; align-items: center; gap: 3px; font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.card-stat svg { width: 13px; height: 13px; }
.card-stat.overdue { color: var(--danger); }
.card-stat.done { color: var(--success); }

.board-add-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 10px 8px;
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.board-add-card:hover { background: var(--bd-count); color: var(--text); }
.add-card-plus { font-size: 1.35rem; line-height: 1; font-weight: 500; }

/* Trello tarzı silik "Liste ekle" — kolonların en sağında */
.board-add-list {
    flex: 0 0 300px;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bd-count);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.board-add-list:hover { color: var(--text); }

/* Sürükleme durumları (SortableJS) */
.sortable-ghost { opacity: 0.4; }
.sortable-drag { box-shadow: var(--shadow-lg); }

/* Geniş modal (kart detayı) */
/* Kart detay modalı — iki sütun (sol içerik / sağ yorumlar) */
.card-modal { max-width: 1040px; }
.card-modal-body { display: flex; align-items: stretch; max-height: 76vh; }
.card-main { flex: 1 1 auto; min-width: 0; padding: 22px 24px; overflow-y: auto; }
.card-side {
    flex: 0 0 330px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border-left: 1px solid var(--border);
    background: var(--surface-2);
    overflow-y: auto;
}
/* Kart detay ince/yuvarlak scrollbar'lar */
.card-main, .card-side, .rte-area {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}
.card-main::-webkit-scrollbar, .card-side::-webkit-scrollbar, .rte-area::-webkit-scrollbar { width: 10px; }
.card-main::-webkit-scrollbar-thumb, .card-side::-webkit-scrollbar-thumb, .rte-area::-webkit-scrollbar-thumb {
    background: var(--border-strong); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box;
}
.card-main::-webkit-scrollbar-thumb:hover, .card-side::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.card-main::-webkit-scrollbar-track, .card-side::-webkit-scrollbar-track, .rte-area::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 820px) {
    .card-modal-body { flex-direction: column; max-height: 76vh; overflow-y: auto; }
    .card-main, .card-side { overflow-y: visible; }
    .card-side { flex-basis: auto; border-left: none; border-top: 1px solid var(--border); }
}

/* Checklist ilerleme çubuğu */
.checklist-progress { height: 6px; background: var(--surface-2); border-radius: 999px; margin: 2px 0 12px; overflow: hidden; }
.checklist-progress span { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 999px; transition: width 0.25s ease; }

/* Checklist */
.checklist { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.checklist-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 6px 8px; border-radius: 8px;
    transition: background 0.12s;
}
.checklist-item:hover { background: var(--surface-2); }
.checklist-item input[type="checkbox"] {
    -webkit-appearance: auto; appearance: auto;
    width: 16px; height: 16px; min-width: 16px; flex: 0 0 auto;
    margin: 2px 0 0; padding: 0; border: none; background: none; border-radius: 0;
    box-shadow: none !important; accent-color: var(--primary); cursor: pointer;
}
.checklist-item .checklist-text { flex: 1; font-size: 0.88rem; line-height: 1.4; }
.checklist-item.done .checklist-text { text-decoration: line-through; color: var(--text-muted); }
.checklist-del {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 1.1rem; line-height: 1; flex: 0 0 auto; opacity: 0;
}
.checklist-item:hover .checklist-del { opacity: 0.55; }
.checklist-del:hover { opacity: 1 !important; color: var(--danger); }
.checklist-add { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.checklist-add input { width: 100%; }

/* Yorum paneli başlığı */
.card-side-head {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.82rem; font-weight: 700; color: var(--text);
    padding-bottom: 0;
}
.card-side-head svg { width: 16px; height: 16px; color: var(--text-muted); }
.comment-count {
    margin-left: auto;
    background: var(--surface); color: var(--text-muted);
    border-radius: 999px; padding: 1px 9px;
    font-size: 0.74rem; font-weight: 700;
}

/* Yorum yazma alanı — açıklama editörüyle (rte) aynı renk/çerçeve dili */
.comment-add { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.comment-add textarea {
    width: 100%; resize: vertical; min-height: 40px;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}
.comment-add textarea:focus {
    background: var(--surface);
    border-color: var(--border-strong);
    box-shadow: none;
}
.comment-add:focus-within textarea { min-height: 70px; }

/* Yorumlar — avatar + konuşma balonu */
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment-item { display: flex; gap: 10px; }
.comment-item > .avatar-sm { flex: 0 0 auto; margin-top: 2px; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.comment-head strong { font-size: 0.82rem; }
.comment-head small { flex: 1; font-size: 0.72rem; }
.comment-del {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 1.05rem; line-height: 1; opacity: 0;
    transition: opacity 0.12s, color 0.12s;
}
.comment-item:hover .comment-del { opacity: 0.6; }
.comment-del:hover { opacity: 1 !important; color: var(--danger); }
.comment-body {
    font-size: 0.86rem; line-height: 1.5;
    white-space: pre-wrap; word-wrap: break-word;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 4px 12px 12px 12px;
    padding: 9px 12px;
}
.comment-empty {
    text-align: center; padding: 20px 8px;
    color: var(--text-muted); font-size: 0.82rem; line-height: 1.6;
}

/* Satır içi kart ekleme kutusu */
.card-composer { display: flex; flex-direction: column; gap: 8px; margin: 0 10px 8px; }
.composer-input { width: 100%; resize: vertical; font-size: 0.9rem; }
.composer-actions { display: flex; align-items: center; gap: 8px; }

/* Kart modalı başlığı — üstte liste adı etiketi (Trello'daki liste seçici yerine) */
.card-modal-list {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

/* Gövde: büyük başlık — normalde düz metin, tıklayınca input'a döner */
.card-title-row { display: flex; margin-bottom: 18px; }
/* Başlık düz metin gibi durur; tıklayınca yerinde düzenlenir (input görünümü yok) */
.card-title-text {
    flex: 1;
    min-width: 0;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    padding: 4px 8px;
    margin-left: -8px;
    border-radius: 8px;
    outline: none;
    cursor: text;
    word-wrap: break-word;
    transition: background 0.12s;
}
.card-title-text:focus { background: var(--surface-2); }
.card-title-text:empty:before { content: attr(data-placeholder); color: var(--text-muted); font-weight: 600; }

/* Trello tarzı aksiyon butonları */
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.card-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.card-action-btn:hover { background: var(--surface); border-color: var(--border-strong); }
.card-action-btn.active { border-color: var(--primary); color: var(--primary); }
.card-action-btn svg { width: 15px; height: 15px; }

/* Aksiyon butonuyla gizlenen bölümler */
.cd-section.collapsed { display: none; }

/* Kart modalı — bölümler */
.cd-section { margin-bottom: 18px; }
.cd-label {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 9px;
}

/* Atanan seçici — tek tıkla avatar chip'i */
.assignee-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.assignee-opt {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 13px 5px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 0.8rem; font-weight: 500;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.assignee-opt:hover { border-color: var(--border-strong); color: var(--text); }
.assignee-opt.active { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }
.assignee-none {
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px dashed var(--border-strong); color: var(--text-muted); font-size: 0.85rem;
}

/* Öncelik seçici — segment pill'leri */
.priority-picker { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.prio-opt {
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 0.8rem; font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.prio-opt:hover { border-color: var(--border-strong); color: var(--text); }
.prio-opt.active { border-color: transparent; }
.prio-opt[data-prio=""].active { background: var(--border-strong); color: var(--text); }
.prio-opt.prio-low.active { background: var(--text-muted); color: var(--surface); }
.prio-opt.prio-medium.active { background: var(--warning); color: #241900; }
.prio-opt.prio-high.active { background: var(--danger); color: #fff; }

/* Bitiş tarihi seçici — hızlı butonlar + tema uyumlu tarih girişi */
.due-picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.due-quick {
    padding: 6px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 0.78rem; font-weight: 600;
    cursor: pointer;
    transition: border-color 0.12s, color 0.12s;
}
.due-quick:hover { border-color: var(--primary); color: var(--primary); }
.due-clear:hover { border-color: var(--danger); color: var(--danger); }
.due-input {
    min-width: 158px;
    color-scheme: dark;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
}
.due-input:hover { border-color: var(--border-strong); }
.due-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.due-input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.55; }
.due-input:hover::-webkit-calendar-picker-indicator { opacity: 1; }
[data-theme="light"] .due-input { color-scheme: light; }


/* Açıklama — rich text editör */
.rte { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; }
.rte-toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 5px 6px; border-bottom: 1px solid var(--border); }
.rte-btn {
    min-width: 28px; height: 28px; padding: 0 7px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--text-muted);
    border-radius: 6px; cursor: pointer; font-size: 0.85rem; font-family: inherit;
}
.rte-btn:hover { background: var(--surface); color: var(--text); }
.rte-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.rte-area {
    min-height: 96px; padding: 10px 12px;
    font-size: 0.88rem; line-height: 1.5; color: var(--text);
    outline: none; overflow-wrap: break-word;
}
.rte-area:focus { background: var(--surface); }
.rte-area:empty:before { content: attr(data-placeholder); color: var(--text-muted); }
.rte-area ul, .rte-area ol { padding-left: 22px; margin: 4px 0; }
.rte-area p { margin: 0 0 6px; }

/* Focus'ta beliren kaydet butonu (checklist / yorum ekleme) */
.add-actions { display: none; }
.checklist-add:focus-within .add-actions,
.comment-add:focus-within .add-actions { display: flex; gap: 8px; }

/* Ekler — kapak banner (modal üstü) */
.card-cover-banner { display: none; margin: -22px -24px 18px; }
.card-cover-banner img { display: block; width: 100%; max-height: 220px; object-fit: cover; }

/* Ekler — liste */
.attach-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.attach-item { position: relative; }
.attach-image {
    width: 132px; height: 88px;
    border-radius: 8px; overflow: hidden;
    border: 1px solid var(--border);
}
.attach-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
    padding: 6px;
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 55%);
    transition: opacity 0.12s;
}
.attach-image:hover .attach-overlay { opacity: 1; }
.attach-cover-btn, .attach-del-btn {
    border: none; border-radius: 6px; cursor: pointer;
    font: inherit; font-size: 0.72rem; font-weight: 600;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.55); color: #fff;
}
.attach-cover-btn.active { background: var(--primary); color: var(--on-primary); }
.attach-del-btn:hover { background: var(--danger); }
.attach-file {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    padding: 8px 12px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
}
.attach-file-link { flex: 1; min-width: 0; color: var(--text); text-decoration: none; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-file-link:hover { color: var(--primary); }
.attach-file .attach-del-btn { background: transparent; color: var(--text-muted); }
.attach-file .attach-del-btn:hover { background: transparent; color: var(--danger); }

/* Sürükle-bırak vurgusu */
.modal-backdrop.drag-over .card-modal { outline: 2px dashed var(--primary); outline-offset: -6px; }


@media (max-width: 768px) {
    .board-column { flex-basis: 84vw; max-width: 84vw; }
    .due-input { min-width: 0; flex: 1; }
    .assignee-opt { font-size: 0.78rem; }
}

/* ============================================================================
   Muhasebe
   ============================================================================ */

/* Segment düğmeleri (Aylık/Yıllık, Gelir/Gider) */
.segmented {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.segmented-btn {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.segmented-btn:hover { color: var(--text); }
.segmented-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22); }
.segmented-sm .segmented-btn { padding: 4px 12px; font-size: 0.78rem; }

/* Dönem çubuğu */
.acct-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.acct-period { display: flex; align-items: center; gap: 8px; }
.acct-nav {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.acct-nav:hover { border-color: var(--primary); color: var(--primary); }
.acct-nav svg { width: 17px; height: 17px; }
.acct-period-label { display: flex; flex-direction: column; min-width: 132px; text-align: center; }
.acct-period-label strong { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
.acct-period-label small { font-size: 0.75rem; }
.acct-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Değişim rozeti */
.delta-chip {
    display: inline-flex; align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.delta-chip[hidden] { display: none; }
.delta-good { background: var(--success-soft); color: var(--success); }
.delta-bad { background: var(--danger-soft); color: var(--danger); }
.delta-flat { background: var(--surface-2); color: var(--text-muted); }

/* Kâr kartı + akış şeridi */
.acct-hero {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: 32px;
    align-items: center;
    background:
        radial-gradient(ellipse 60% 120% at 0% 0%, var(--primary-soft), transparent 70%),
        var(--surface);
}
.acct-hero-main { display: flex; flex-direction: column; gap: 6px; }
.acct-hero-value {
    font-size: 2.7rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--primary);
}
.acct-hero-value.is-loss { color: var(--danger); }
.acct-hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.acct-flow { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.acct-flow-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.acct-flow-bar {
    display: flex;
    gap: 3px;
    height: 26px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface-2);
}
.acct-flow-seg { transition: width 0.35s ease; }
.acct-flow-seg:hover { filter: brightness(1.12); }
.acct-flow-empty { width: 100%; height: 100%; background: var(--surface-2); }
.acct-flow-legend { display: flex; gap: 18px; flex-wrap: wrap; }
.acct-flow-item {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.85rem; color: var(--text-muted);
}
.acct-flow-item i { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.acct-flow-item strong { color: var(--text); font-weight: 600; }
.acct-flow-item small { font-size: 0.75rem; }
.acct-flow-loss strong { color: var(--danger); }

/* Özet kartları — sol kenarda tip rengi */
.acct-stat { position: relative; overflow: hidden; }
.acct-stat::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--text-muted);
}
.acct-stat-income::before { background: var(--success); }
.acct-stat-expense::before { background: var(--danger); }
.acct-stat-tax::before { background: var(--warning); }
.acct-stat-net::before { background: var(--primary); }
.acct-stat .stat-value { font-size: 1.65rem; }
.acct-stat-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Kategori dağılımı */
.acct-breakdown { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: center; }
.acct-donut-box { height: 190px; }
.acct-cat-list { display: flex; flex-direction: column; gap: 2px; max-height: 200px; overflow-y: auto; }
.acct-cat {
    display: grid;
    grid-template-columns: 10px 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.88rem;
}
.acct-cat:hover { background: var(--surface-2); }
.acct-cat-dot { width: 10px; height: 10px; border-radius: 3px; }
.acct-cat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-cat-share { font-size: 0.78rem; }
.acct-cat-total { font-weight: 600; }

/* Kayıt listeleri */
.acct-ledger .card-head h2 { display: flex; align-items: center; gap: 8px; }
.acct-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; padding: 0 7px; height: 21px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
}
.acct-txn-list { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; }
.acct-txn {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    text-align: left;
    font: inherit;
    color: var(--text);
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.acct-txn:hover { background: var(--surface-2); border-color: var(--border); }
.acct-txn-dot { width: 10px; height: 10px; border-radius: 3px; }
.acct-txn-main { display: flex; flex-direction: column; min-width: 0; }
.acct-txn-main strong { font-size: 0.92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-txn-main small { font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-txn-amt { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.acct-txn-amt strong { font-size: 0.95rem; font-weight: 600; }
.acct-txn-amt small { font-size: 0.74rem; }
.acct-amt-in { color: var(--success); }
.acct-amt-out { color: var(--danger); }
.acct-badge-fixed { margin-left: 6px; font-size: 0.65rem; padding: 1px 7px; vertical-align: 1px; }

/* Form: tip seçici + vergi önizlemesi */
.segmented-type { display: flex; width: 100%; margin-bottom: 18px; }
.segmented-type .segmented-btn { flex: 1; padding: 8px 16px; }
.segmented-type .segmented-btn[data-type="income"].active { color: var(--success); }
.segmented-type .segmented-btn[data-type="expense"].active { color: var(--danger); }

.check-inline {
    display: flex; align-items: center; gap: 9px;
    padding: 10px 13px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
}
.check-inline input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

.acct-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: var(--surface-2);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
}
.acct-preview > div { display: flex; flex-direction: column; gap: 2px; }
.acct-preview strong { font-size: 1rem; font-weight: 600; }
.acct-preview > div:last-child strong { color: var(--primary); }
.acct-form-expense .acct-preview > div:last-child strong { color: var(--danger); }
.acct-preview-label {
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--text-muted);
}
.acct-preview-hint { margin: -10px 0 16px; line-height: 1.45; }
.acct-preview-hint:empty { display: none; }

@media (max-width: 900px) {
    .acct-hero { grid-template-columns: 1fr; gap: 22px; }
    .acct-breakdown { grid-template-columns: 1fr; }
    .acct-donut-box { height: 170px; }
}
@media (max-width: 768px) {
    .acct-toolbar { align-items: stretch; }
    .acct-toolbar-right { justify-content: space-between; }
    .acct-hero-value { font-size: 2.2rem; }
    .acct-preview { grid-template-columns: 1fr; gap: 6px; }
    .acct-preview > div { flex-direction: row; justify-content: space-between; align-items: center; }
}
