:root {
    --sidebar-width: 264px;
    --sidebar-bg: #0f172a;
    --sidebar-bg-2: #111c33;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-accent: #2563eb;
    --topbar-h: 64px;
    --brand: #2563eb;
    --brand-600: #1d4ed8;
    --bg: #f1f5f9;
    --card-radius: 14px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: #1e293b;
}

/* ---------- Layout shell ---------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform .25s ease;
}

.sidebar__brand {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 0 1.25rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    flex-shrink: 0;
}

.sidebar__brand .brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--sidebar-accent);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.1rem;
}

.sidebar__nav {
    overflow-y: auto;
    padding: 1rem .75rem 2rem;
    flex: 1;
}

.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }

.nav-group__title {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    padding: .9rem .85rem .35rem;
    font-weight: 600;
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .58rem .85rem;
    border-radius: 9px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: .9rem;
    margin-bottom: 2px;
    transition: background .15s, color .15s;
    position: relative;
}

.nav-link-item i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
}

.nav-link-item:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.nav-link-item.active {
    background: var(--sidebar-accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .35);
}

.nav-link-item .badge-soon {
    margin-left: auto;
    font-size: .6rem;
    background: rgba(255, 255, 255, .1);
    color: #cbd5e1;
    padding: .15rem .4rem;
    border-radius: 6px;
    font-weight: 600;
}

/* ---------- Main ---------- */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: .5rem 1rem;
    padding: 0 1rem 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    min-width: 0;
}

.topbar__toggle {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    color: #475569;
    display: none;
    cursor: pointer;
}

.topbar__title {
    font-weight: 600;
    font-size: 1.05rem;
    color: #0f172a;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 0 1 auto;
    max-width: min(280px, 32vw);
}

.topbar__spacer { flex: 1 1 auto; min-width: .5rem; }

.topbar .workspace-switcher,
.topbar .lang-switcher,
.topbar .dropdown { flex-shrink: 0; }

@media (max-width: 575.98px) {
    .topbar { padding: 0 .75rem; gap: .35rem .5rem; }
    .topbar__title { max-width: 120px; font-size: .95rem; }
    .user-chip span.d-none.d-sm-block { display: none !important; }
}

.user-chip {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #1e293b;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 600;
}

.content {
    padding: 1.75rem 1.5rem;
    flex: 1;
}

.app-footer {
    padding: .65rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    text-align: center;
}

.app-powered-by {
    font-size: .78rem;
    color: #94a3b8;
}

.app-powered-by a {
    color: #64748b;
    font-weight: 600;
    text-decoration: none;
}

.app-powered-by a:hover {
    color: var(--brand);
    text-decoration: underline;
}

.auth-footer {
    margin-top: 1.25rem;
    text-align: center;
}

.page-head {
    margin-bottom: 1.5rem;
}

.page-head h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.page-head p {
    margin: .25rem 0 0;
    color: #64748b;
    font-size: .9rem;
}

/* ---------- Cards ---------- */
.card-soft {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
}

.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
    transition: transform .15s, box-shadow .15s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-icon.amber { background: #fef3c7; color: #d97706; }
.stat-icon.violet { background: #ede9fe; color: #7c3aed; }
.stat-icon.rose { background: #ffe4e6; color: #e11d48; }
.stat-icon.slate { background: #e2e8f0; color: #475569; }

.stat-label {
    font-size: .82rem;
    color: #64748b;
    margin: 0;
}

.stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    margin: .1rem 0 0;
    color: #0f172a;
}

.stat-card--compact {
    padding: .85rem 1rem;
    gap: .75rem;
}

.stat-card--compact .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    border-radius: 10px;
}

.stat-card--compact .stat-value {
    font-size: 1.25rem;
}

.page-head--compact h1 {
    font-size: 1.5rem;
    margin-bottom: .15rem;
}

.page-head--compact p {
    font-size: .9rem;
}

/* ---------- Dashboard modules (kart grid) ---------- */
.dash-modules-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.35rem 1.35rem;
}

.dash-modules-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.dash-modules-panel__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 .25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.dash-modules-panel__title i {
    color: var(--brand);
    font-size: 1.15rem;
}

.dash-modules-panel__sub {
    margin: 0;
    font-size: .84rem;
    color: #64748b;
    max-width: 520px;
}

.dash-modules-panel__toggle i {
    transition: transform .2s ease;
}

.dash-modules--expanded .dash-modules-panel__toggle i {
    transform: rotate(180deg);
}

.dash-modules-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

@media (min-width: 576px) {
    .dash-modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .dash-modules-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .dash-modules-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

a.dash-module-card--clickable {
    text-decoration: none;
    color: #0f172a;
    cursor: pointer;
}

a.dash-module-card--clickable:hover,
a.dash-module-card--clickable:focus,
a.dash-module-card--clickable:focus-visible {
    text-decoration: none;
    color: #0f172a;
    outline: none;
}

a.dash-module-card--clickable:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .35), 0 8px 24px rgba(37, 99, 235, .14);
}

.dash-module-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 176px;
    padding: 0;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
    transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
    position: relative;
    overflow: hidden;
}

.dash-module-card__body {
    flex: 1;
    padding: 1rem 1.1rem .65rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.dash-module-card--clickable:hover {
    border-color: #93c5fd;
    background: #f8fbff;
    box-shadow: 0 12px 32px rgba(37, 99, 235, .14);
    transform: translateY(-2px);
}

.dash-module-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    margin-bottom: .75rem;
    flex-shrink: 0;
}

.dash-module-card__icon--blue { background: #dbeafe; color: #2563eb; }
.dash-module-card__icon--green { background: #dcfce7; color: #16a34a; }
.dash-module-card__icon--violet { background: #ede9fe; color: #7c3aed; }
.dash-module-card__icon--amber { background: #fef3c7; color: #d97706; }
.dash-module-card__icon--rose { background: #ffe4e6; color: #e11d48; }
.dash-module-card__icon--slate { background: #e2e8f0; color: #475569; }

.dash-module-card__title {
    font-size: .94rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 .35rem;
    color: #0f172a;
    text-decoration: none;
}

.dash-module-card__desc {
    font-size: .78rem;
    line-height: 1.45;
    color: #64748b;
    margin: 0;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dash-module-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    width: 100%;
    margin: 0;
    padding: .65rem 1rem;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    color: #1d4ed8;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: none;
    border-top: 1px solid #bfdbfe;
    border-radius: 0 0 12px 12px;
    transition: background .2s, color .2s;
}

.dash-module-card__btn i {
    font-size: 1rem;
    transition: transform .2s;
}

.dash-module-card--clickable:hover .dash-module-card__btn {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border-top-color: #1d4ed8;
}

.dash-module-card--clickable:hover .dash-module-card__btn i {
    transform: translateX(3px);
}

.dash-module-card--disabled {
    cursor: not-allowed;
    background: #f8fafc;
    opacity: .9;
    box-shadow: none;
}

.dash-module-card--disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #e2e8f0;
    background: #f8fafc;
}

.dash-module-card__btn--muted {
    color: #64748b;
    background: #f1f5f9;
    border-top-color: #e2e8f0;
}

.dash-module-card--extra {
    display: none;
}

.dash-modules--expanded .dash-module-card--extra {
    display: flex;
}

.dash-metrics-accordion .accordion-button {
    font-size: .92rem;
    font-weight: 600;
    padding: .85rem 1rem;
}

.dash-metrics-accordion .accordion-body {
    padding: 1rem;
    background: #f8fafc;
}

body.dash-navigating {
    cursor: wait;
}

body.dash-navigating .dash-module-card {
    pointer-events: none;
    opacity: .7;
}

/* ---------- Tables ---------- */
.table-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-card .table {
    margin: 0;
}

.table-card .table thead th {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 600;
    padding: .85rem 1rem;
}

.table-card .table tbody td {
    padding: .8rem 1rem;
    vertical-align: middle;
    border-color: #f1f5f9;
}

.badge-role {
    background: #eef2ff;
    color: #4338ca;
    font-weight: 600;
    font-size: .72rem;
    padding: .25rem .55rem;
    border-radius: 6px;
}

.badge-status-active { background: #dcfce7; color: #15803d; }
.badge-status-passive { background: #fee2e2; color: #b91c1c; }

/* ---------- Auth ---------- */
.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 410px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(2, 6, 23, .4);
    padding: 2.25rem;
}

.auth-card .brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    margin: 0 auto 1rem;
}

/* ---------- Misc ---------- */
.coming-soon {
    display: grid;
    place-items: center;
    text-align: center;
    padding: 3rem 1rem;
}

.coming-soon .cs-icon {
    width: 86px;
    height: 86px;
    border-radius: 22px;
    background: #eef2ff;
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 2.6rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .topbar__toggle { display: inline-flex; }
    .sidebar-backdrop {
        position: fixed; inset: 0; background: rgba(2,6,23,.5); z-index: 1035; display: none;
    }
    .sidebar-backdrop.show { display: block; }
}

/* ---------- Donor CRM ---------- */
.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .15rem .55rem;
    margin: 0 .15rem .15rem 0;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}

.tag-badge .tag-remove {
    background: rgba(255, 255, 255, .25);
    border: none;
    color: #fff;
    border-radius: 999px;
    width: 16px;
    height: 16px;
    line-height: 14px;
    font-size: .8rem;
    padding: 0;
    cursor: pointer;
}

.tag-badge .tag-remove:hover { background: rgba(255, 255, 255, .45); }

.form-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.form-card-title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid #eef2f7;
}

.stat-tile {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.stat-tile .stat-label { font-size: .8rem; color: #64748b; font-weight: 600; }
.stat-tile .stat-value { font-size: 1.45rem; font-weight: 700; color: #0f172a; margin: .15rem 0; }
.stat-tile .stat-hint { font-size: .72rem; color: #94a3b8; }

.donor-tabs .nav-link {
    color: #475569;
    font-weight: 600;
    border: none;
    border-bottom: 2px solid transparent;
}

.donor-tabs .nav-link.active {
    color: var(--brand);
    background: transparent;
    border-bottom: 2px solid var(--brand);
}

.detail-list dt { color: #64748b; font-weight: 600; padding: .4rem 0; }
.detail-list dd { padding: .4rem 0; margin-bottom: 0; color: #0f172a; }

.timeline { list-style: none; padding-left: 0; margin: 0; }
.timeline li {
    border-left: 2px solid #e2e8f0;
    padding: 0 0 1rem 1rem;
    position: relative;
}
.timeline li::before {
    content: "";
    position: absolute;
    left: -5px;
    top: .35rem;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--brand);
}
.timeline li.important::before { background: #f59e0b; }

.empty-state i { opacity: .5; }

/* ---------- Language switcher ---------- */
.lang-switcher .lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    border-radius: 999px;
    padding: .35rem .7rem;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
}

.lang-switcher .lang-toggle:hover { background: #e2e8f0; }
.lang-switcher .dropdown-item.active { background: var(--brand); color: #fff; }
.lang-switcher .dropdown-item.active:hover { background: var(--brand-600); }

/* ============================================================
   UI/UX Faz — ortak app-* componentleri (admin)
   ============================================================ */
.app-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.app-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    align-items: flex-start;
    gap: .85rem;
}

.app-stat-card .stat-icon { flex-shrink: 0; }

.app-section { margin-bottom: 1.5rem; }

.app-badge {
    display: inline-flex;
    align-items: center;
    padding: .22rem .6rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}
.app-badge--success { background: #dcfce7; color: #166534; }
.app-badge--warning { background: #fef3c7; color: #92400e; }
.app-badge--danger { background: #fee2e2; color: #991b1b; }
.app-badge--info { background: #dbeafe; color: #1e40af; }
.app-badge--secondary { background: #f1f5f9; color: #475569; }
.app-badge--muted { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }

.app-empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #64748b;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: var(--card-radius);
}
.app-empty-state__icon { font-size: 2.25rem; opacity: .4; display: block; margin-bottom: .65rem; }
.app-empty-state__title { font-weight: 700; color: #0f172a; }

.app-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.app-page-header__title { font-size: 1.35rem; font-weight: 800; color: #0f172a; margin: 0; }
.app-page-header__sub { color: #64748b; font-size: .9rem; margin-top: .25rem; }

.app-action-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.app-filter-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.app-filter-panel__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .75rem 1rem;
    border: 0;
    background: #f8fafc;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
}
.app-filter-panel__toggle:hover { background: #f1f5f9; }
.app-filter-panel__body { padding: 1rem; }

.app-timeline { list-style: none; padding: 0; margin: 0; }
.app-timeline__item {
    position: relative;
    padding: 0 0 1rem 1.5rem;
    border-left: 2px solid #e2e8f0;
}
.app-timeline__item:last-child { border-left-color: transparent; }
.app-timeline__dot {
    position: absolute;
    left: -7px;
    top: .2rem;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--brand);
}
.app-timeline__item.pending .app-timeline__dot { background: #cbd5e1; }

.app-copy-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: .75rem 1rem;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-weight: 700;
}

/* Sidebar grupları — collapse */
.nav-group { margin-bottom: .35rem; }
.nav-group__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .65rem;
    margin-top: .5rem;
    border: 0;
    background: rgba(255,255,255,.04);
    color: #94a3b8;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
}
.nav-group__toggle:hover { background: rgba(255,255,255,.08); color: #cbd5e1; }
.nav-group__toggle .bi-chevron-down { transition: transform .2s ease; font-size: .65rem; }
.nav-group__toggle[aria-expanded="false"] .bi-chevron-down { transform: rotate(-90deg); }
.nav-group .collapse .nav-link-item { margin-left: .15rem; }

.topbar__search {
    display: none;
    max-width: 280px;
    flex: 1;
}
.topbar__search input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: .4rem .85rem .4rem 2rem;
    font-size: .85rem;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat .65rem center;
}
@media (min-width: 992px) {
    .topbar__search { display: block; }
}
.topbar__notify {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    margin-right: .5rem;
}

.workspace-switcher .workspace-toggle {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workspace-label {
    margin-right: .5rem;
    align-self: center;
}

.auth-card--wide {
    max-width: 720px;
}

.brand-logo--lg {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--brand);
    color: #fff;
    display: inline-grid;
    place-items: center;
    font-size: 1.8rem;
}

.workspace-card {
    border: 1px solid #e2e8f0;
    transition: box-shadow .2s ease, border-color .2s ease;
}

.workspace-card:hover:not(.workspace-card--disabled) {
    border-color: #0d6efd;
    box-shadow: 0 8px 24px rgba(13, 110, 253, .12);
}

.workspace-card--disabled {
    opacity: .75;
}

/* --- Bağışçı CRM (Sprint 1) --- */
.donor-crm-page .donor-crm-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    border: 1px solid #e2e8f0;
}

.donor-crm-kpi {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: .75rem 1rem;
    height: 100%;
}

.donor-crm-kpi-label {
    display: block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    margin-bottom: .25rem;
}

.donor-crm-kpi-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.donor-crm-kpi-value--sm {
    font-size: 1rem;
}

.donor-crm-kpi-value small {
    font-size: .75rem;
    font-weight: 500;
    color: #64748b;
}

.donor-crm-dl dt {
    font-size: .75rem;
    color: #64748b;
    margin-bottom: .15rem;
}

.donor-crm-dl dd {
    font-size: .875rem;
    margin-bottom: .5rem;
}

.donor-crm-mini-list .list-group-item {
    background: transparent;
}

.donor-crm-tabs-card .nav-tabs {
    border-bottom-color: #e2e8f0;
}

.donor-crm-tabs-card .nav-link.active {
    font-weight: 600;
}

.donor-crm-list-table .donor-crm-name-link:hover {
    color: var(--brand, #0d6efd) !important;
}

.donor-crm-list-row:hover {
    background: #f8fafc;
}

.donor-crm-filter-card {
    background: #f8fafc;
}

@media (max-width: 768px) {
    .donor-crm-kpi-value {
        font-size: 1.1rem;
    }
}

/* Sprint 17: modül yardım kutuları */
.app-help-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
    border: 1px solid #bae6fd;
    border-radius: 10px;
    overflow: hidden;
}

.app-help-box__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1rem;
    font-weight: 600;
    font-size: .9rem;
    color: #0c4a6e;
}

.app-help-box__header--toggle {
    cursor: pointer;
    user-select: none;
}

.app-help-box__header--toggle:hover {
    background: rgba(14, 165, 233, .08);
}

.app-help-box__icon {
    color: #0284c7;
}

.app-help-box__chevron {
    font-size: .75rem;
    transition: transform .2s;
}

.app-help-box__header[aria-expanded="false"] .app-help-box__chevron {
    transform: rotate(-90deg);
}

.app-help-box__body {
    padding: 0 1rem .85rem 1rem;
    font-size: .875rem;
    color: #334155;
}

.app-help-box__steps {
    margin: 0;
    padding-left: 1.25rem;
}

.app-help-box__role {
    font-size: .8125rem;
    color: #475569;
    background: #fff;
    border-radius: 6px;
    padding: .4rem .6rem;
    border: 1px dashed #cbd5e1;
}

.app-help-box__warn {
    font-size: .8125rem;
    color: #b45309;
    background: #fffbeb;
    border-radius: 6px;
    padding: .4rem .6rem;
}

.app-help-box__footer a {
    color: #0369a1;
}

/* PageHelp — sayfa bazlı offcanvas yardım */
.page-help-trigger {
    width: 2rem;
    height: 2rem;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-help-trigger i {
    font-size: 1.1rem;
}

.page-help-trigger:hover,
.page-help-trigger:focus {
    color: #2563eb;
    border-color: #2563eb;
}

.page-help-offcanvas {
    width: min(420px, 100vw);
}

.page-help-section__title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.35rem;
}

.page-help-section__body {
    font-size: 0.9rem;
    color: #334155;
    white-space: pre-line;
}

.page-help-fields dt {
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.page-help-fields dd {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: #475569;
}

.page-help-warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    font-size: 0.85rem;
}

.page-help-perms {
    font-size: 0.85rem;
    color: #64748b;
}

/* ============================================================
   Admin UI polish — formlar, tablolar, sayfa düzeni (global)
   ============================================================ */

.content {
    max-width: 1440px;
}

/* —— Sayfa başlığı —— */
.page-head,
.app-page-header {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    padding: 1.15rem 1.35rem;
    margin-bottom: 1.35rem;
    box-shadow: var(--shadow-sm);
}

.page-head h1,
.app-page-header__title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0f172a;
}

.page-head p,
.app-page-header__sub {
    color: #64748b;
    font-size: .875rem;
    line-height: 1.45;
}

/* —— Form kontrolleri (tüm admin) —— */
.content .form-label {
    font-size: .8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: .4rem;
    letter-spacing: .01em;
}

.content .form-control,
.content .form-select {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: .55rem .85rem;
    font-size: .9rem;
    color: #0f172a;
    background-color: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.content .form-control:hover,
.content .form-select:hover {
    border-color: #94a3b8;
}

.content .form-control:focus,
.content .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.content .form-control::placeholder {
    color: #94a3b8;
}

.content .form-text,
.content small.text-muted {
    display: block;
    margin-top: .35rem;
    font-size: .78rem;
    color: #64748b;
    line-height: 1.45;
}

.content .form-check-label {
    font-size: .875rem;
    color: #334155;
}

.content .form-switch .form-check-input {
    width: 2.4em;
    height: 1.25em;
    cursor: pointer;
}

.content .validation-summary-errors,
.content div[asp-validation-summary] {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: .75rem 1rem;
    font-size: .875rem;
}

.content .field-validation-error,
.content span.text-danger.small {
    display: block;
    margin-top: .3rem;
    font-size: .78rem;
}

/* —— Panel kartları (form bölümleri) —— */
.admin-panel,
.form-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.admin-panel__head {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .95rem 1.35rem;
    margin: 0;
    font-size: .92rem;
    font-weight: 700;
    color: #0f172a;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.admin-panel__head i {
    color: var(--brand);
    font-size: 1.05rem;
}

.form-card-title {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .92rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-card-title i {
    color: var(--brand);
}

.admin-panel__body {
    padding: 1.35rem 1.5rem;
}

.admin-panel__foot {
    padding: 1rem 1.5rem 1.35rem;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.admin-panel--tabs .admin-panel__tabs {
    padding: 0 1.25rem;
    margin: 0;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.admin-panel--tabs .admin-panel__tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: .85rem 1rem;
    font-weight: 600;
    font-size: .875rem;
    color: #64748b;
    border-radius: 0;
}

.admin-panel--tabs .admin-panel__tabs .nav-link:hover {
    color: #334155;
    background: rgba(255, 255, 255, .6);
}

.admin-panel--tabs .admin-panel__tabs .nav-link.active {
    color: var(--brand);
    background: #fff;
    border-bottom-color: var(--brand);
}

.admin-form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
}

@media (min-width: 992px) {
    .admin-form-sidebar {
        position: sticky;
        top: calc(var(--topbar-h) + 1.25rem);
        align-self: flex-start;
    }
}

.admin-save-bar {
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.admin-save-bar .btn-primary {
    padding: .65rem 1rem;
    font-weight: 600;
    border-radius: 10px;
}

/* —— table-card: tablo vs form ayrımı —— */
.table-card {
    margin-bottom: 1.25rem;
}

/* Form / filtre içeren kartlara iç boşluk */
.table-card:not(:has(.table)):not(:has(.table-responsive)) {
    padding: 1.35rem 1.5rem;
}

/* Tab içeren kartlar */
.table-card:has(> .nav-tabs) {
    padding: 0;
}

.table-card:has(> .nav-tabs) > .nav-tabs {
    padding: 0 1.25rem;
    margin-bottom: 0;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.table-card:has(> .nav-tabs) > .nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: .85rem 1rem;
    font-weight: 600;
    font-size: .875rem;
    color: #64748b;
    border-radius: 0;
}

.table-card:has(> .nav-tabs) > .nav-tabs .nav-link.active {
    color: var(--brand);
    background: #fff;
    border-bottom-color: var(--brand);
}

.table-card:has(> .nav-tabs) > .tab-content {
    padding: 1.35rem 1.5rem;
}

.table-card > h6 {
    font-size: .92rem;
    font-weight: 700;
    color: #0f172a;
    padding-bottom: .75rem;
    margin-bottom: 1.1rem !important;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: .45rem;
}

.table-card > h6 i {
    color: var(--brand);
}

.table-card > form.row,
.table-card > form:not(.table) {
    padding: 1.25rem 1.5rem;
}

.table-card > form.row.p-1,
.table-card > form.row[class*="p-"] {
    padding: 1.25rem 1.5rem !important;
}

/* —— Tablolar: okunaklı çizgiler —— */
.table-card .table thead th {
    background: #f1f5f9;
    border-bottom: 2px solid #cbd5e1;
    color: #475569;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    padding: .9rem 1rem;
    white-space: nowrap;
}

.table-card .table tbody td {
    padding: .85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
    font-size: .875rem;
}

.table-card .table tbody tr:last-child td {
    border-bottom: none;
}

.table-card .table tbody tr:hover {
    background: #f8fafc;
}

.table-card .table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.table-card .table tbody tr:nth-child(even):hover {
    background: #f1f5f9;
}

/* —— Filtre satırı —— */
.admin-filter-bar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    padding: 1.15rem 1.35rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.admin-filter-bar .form-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
}

/* —— Alert mesajları —— */
.content > .alert {
    border: none;
    border-radius: 12px;
    padding: .85rem 1.1rem;
    font-size: .875rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}

.content > .alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.content > .alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.content > .alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* —— Butonlar —— */
.content .btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: .875rem;
    padding: .5rem .95rem;
}

.content .btn-primary {
    box-shadow: 0 1px 2px rgba(37, 99, 235, .2);
}

.content .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, .25);
}

.content .btn-outline-secondary {
    border-color: #cbd5e1;
    color: #475569;
}

.content .btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* —— Badge —— */
.content .badge.bg-light.text-dark,
.content .badge.bg-light.text-dark.border {
    border: 1px solid #e2e8f0 !important;
    font-weight: 600;
    padding: .35rem .55rem;
}

/* —— Boş durum —— */
.table-card .text-center.text-muted.py-5 {
    padding: 2.5rem 1.5rem !important;
    color: #64748b !important;
}

/* —— Detay listeleri —— */
.detail-list dt {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.detail-list dd {
    font-size: .9rem;
    font-weight: 500;
}

/* —— Haber galeri yükleme —— */
.news-admin-gallery-item__remove {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .5rem;
    font-size: .75rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin: 0;
    cursor: pointer;
}
