﻿:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 82px;
    --primary-color: #1e3a5f;
    --primary-light: #2d5a8e;
    --sidebar-bg: #1a2332;
    --sidebar-text: #b8c5d6;
    --sidebar-active: #3b82f6;
    --header-bg: #fff;
    --body-bg: #f0f2f5;
    --card-bg: #fff;
    --rate-pill-bg: #f3f0ff;
    --rate-pill-border: #c4b5fd;
    --rate-pill-code: #5b21b6;
}

[data-bs-theme="dark"] {
    --header-bg: #1e2130;
    --body-bg: #141622;
    --card-bg: #1e2130;
    --sidebar-bg: #12141f;
    --rate-pill-bg: #2a2540;
    --rate-pill-border: #5b4b8a;
    --rate-pill-code: #a78bfa;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--body-bg);
    margin: 0;
    transition: background 0.2s;
}

/* Login */
.login-body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 45%, #2563eb 100%);
    position: relative;
    overflow-x: hidden;
}

.login-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.82) 0%, rgba(30, 58, 95, 0.72) 50%, rgba(37, 99, 235, 0.55) 100%);
    z-index: 0;
}

.login-body.has-login-bg::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--login-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.login-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: login-card-in 0.45s ease-out;
}

@keyframes login-card-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Koyu üst alan — beyaz kurumsal logo için */
.login-card-brand {
    padding: 2rem 2rem 1.75rem;
    background:
        radial-gradient(ellipse at top, rgba(59, 130, 246, 0.35) 0%, transparent 65%),
        linear-gradient(160deg, #0b1220 0%, #152a45 55%, #1e3a5f 100%);
    color: #fff;
    position: relative;
}

.login-card-brand::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.login-card-logo {
    max-height: 80px;
    max-width: 240px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.login-card-logo-fallback {
    width: 68px;
    height: 68px;
    margin: 0 auto 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
}

.login-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.35rem;
    line-height: 1.35;
}

.login-card-subtitle {
    font-size: 0.8125rem;
    color: rgba(226, 232, 240, 0.85);
    margin: 0;
}

.login-card-body {
    padding: 1.5rem 2rem 1.25rem;
    background: #fff;
}

.login-card-footer {
    padding: 0 2rem 1.35rem;
    background: #fff;
}

.login-card-footer small {
    color: #94a3b8;
    font-size: 0.75rem;
}

.login-form-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.25rem;
}

.login-form-lead {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 1.25rem;
}

.login-input-group .input-group-text {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
    border-right: 0;
}

.login-input-group .form-control {
    border-color: #e2e8f0;
    background: #fff;
    padding: 0.625rem 0.875rem;
    border-left: 0;
}

.login-input-group .form-control:focus {
    border-color: #93c5fd;
    box-shadow: none;
}

.login-input-group:focus-within .input-group-text {
    border-color: #93c5fd;
    color: #2563eb;
}

.login-input-group:focus-within {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    border-radius: 0.375rem;
}

.login-submit-btn {
    padding: 0.7rem 1rem;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, #1a3352 0%, #1d4ed8 100%);
}

.login-bg-preview-box {
    min-height: 120px;
    overflow: hidden;
}

.login-bg-preview-box img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

@media (max-width: 480px) {
    .login-card-brand,
    .login-card-body,
    .login-card-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .login-card-logo {
        max-height: 64px;
    }

    .login-card-title {
        font-size: 1rem;
    }
}
/* App Layout */
.app-wrapper {
    display: block;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: clip;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease, width 0.3s ease;
}

body.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar-brand {
   /* padding: 1rem 1.25rem;*/
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
    /*background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));*/
}

.sidebar-fallback-icon {
    font-size: 1.75rem;
    color: #fff;
}

.sidebar-logo-full {
    display: block;
}

.sidebar-logo-favicon {
    display: none;
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 10px;
}

.sidebar-nav { padding: 0.75rem 0; }

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    padding: 0.6rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.sidebar-nav .nav-link > i:first-child {
    width: 20px;
    min-width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(59, 130, 246, 0.15);
    border-left-color: var(--sidebar-active);
}

.sidebar-nav .submenu .nav-link {
    padding-left: 2.5rem;
    font-size: 0.85rem;
}

.submenu-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.menu-parent[aria-expanded="true"] .submenu-arrow {
    transform: rotate(180deg);
}

.app-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease, width 0.3s ease, max-width 0.3s ease;
}

body.sidebar-collapsed .app-main {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
    max-width: calc(100% - var(--sidebar-collapsed-width));
}

.app-header {
    background: var(--header-bg);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    min-height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    min-width: 0;
    flex-wrap: wrap;
    row-gap: 0.35rem;
}

.app-header > div {
    min-width: 0;
}

.page-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(42vw, 28rem);
}

[data-bs-theme="dark"] .app-header {
    border-bottom-color: rgba(255,255,255,0.08);
}

[data-bs-theme="dark"] .sidebar-toggle-btn,
[data-bs-theme="dark"] .page-title {
    color: #e2e8f0 !important;
}

.sidebar-toggle-btn {
    text-decoration: none !important;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
}

.sidebar-backdrop.show {
    display: block;
}

.icon-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn.header-icon-btn {
    background-color: #fff;
    color: #334155;
    border-color: #dee2e6 !important;
}

.btn.header-icon-btn:hover,
.btn.header-icon-btn:focus {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .btn.header-icon-btn {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .btn.header-icon-btn:hover,
[data-bs-theme="dark"] .btn.header-icon-btn:focus {
    background-color: #334155;
    color: #f8fafc;
    border-color: #475569 !important;
}

.badge.db-version-badge {
    background-color: #fff;
    color: #334155;
    border-color: #dee2e6 !important;
}

[data-bs-theme="dark"] .badge.db-version-badge {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155 !important;
}

.app-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.card {
    background: var(--card-bg);
}

/* KPI Cards */
.kpi-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.1);
}

.kpi-card-modern .card-body {
    padding: 1.15rem 1.25rem;
}

.kpi-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.kpi-icon-primary { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
.kpi-icon-info { background: rgba(14, 165, 233, 0.12); color: #0ea5e9; }
.kpi-icon-success { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.kpi-icon-danger { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.kpi-icon-warning { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.kpi-icon-purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.kpi-icon-navy { background: rgba(30, 58, 95, 0.12); color: #1e3a5f; }
.kpi-icon-teal { background: rgba(20, 184, 166, 0.12); color: #0f766e; }

.dash-tx-icon-navy { background: rgba(30, 58, 95, 0.12); color: #1e3a5f; }

.dash-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dash-ops-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.06) 0%, rgba(37, 99, 235, 0.08) 100%);
    border: 1px solid rgba(30, 58, 95, 0.08);
}

.dash-ops-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e3a5f;
    background: rgba(30, 58, 95, 0.1);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
}

.dash-ops-kpi {
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-ops-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.dash-ops-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.dash-ops-kpi-navy { background: rgba(30, 58, 95, 0.12); color: #1e3a5f; }
.dash-ops-kpi-info { background: rgba(14, 165, 233, 0.12); color: #0284c7; }
.dash-ops-kpi-teal { background: rgba(20, 184, 166, 0.12); color: #0f766e; }
.dash-ops-kpi-warning { background: rgba(245, 158, 11, 0.14); color: #d97706; }
.dash-ops-kpi-success { background: rgba(16, 185, 129, 0.12); color: #059669; }

.dash-ops-kpi-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.dash-ops-kpi-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

[data-bs-theme="dark"] .dash-ops-hero {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.25) 0%, rgba(37, 99, 235, 0.15) 100%);
    border-color: rgba(148, 163, 184, 0.12);
}

[data-bs-theme="dark"] .dash-ops-badge {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.15);
}

[data-bs-theme="dark"] .dash-ops-kpi-value { color: #e2e8f0; }
[data-bs-theme="dark"] .dash-ops-kpi-label { color: #94a3b8; }

.dash-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
}
.dash-pill-navy { background: rgba(30, 58, 95, 0.1); color: #1e3a5f; }
.dash-pill-success { background: rgba(16, 185, 129, 0.12); color: #059669; }
.dash-pill-danger { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.dash-pill-kdv { background: rgba(14, 165, 233, 0.14); color: #0284c7; }
.dash-pill-tevkifat { background: rgba(245, 158, 11, 0.16); color: #d97706; }
.dash-pill-warning { background: rgba(245, 158, 11, 0.16); color: #d97706; }

.finance-stat-kdv {
    background: linear-gradient(160deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: rgba(14, 165, 233, 0.22);
}
.finance-stat-kdv .finance-stat-value { color: #0369a1; }
.finance-stat-tevkifat {
    background: linear-gradient(160deg, #fffbeb 0%, #fef3c7 100%);
    border-color: rgba(245, 158, 11, 0.28);
}
.finance-stat-tevkifat .finance-stat-value { color: #b45309; }

.dash-tx-taxline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.3rem;
}
.dash-tax-chip {
    font-size: 0.65rem;
    font-weight: 650;
    border-radius: 6px;
    padding: 0.12rem 0.4rem;
    line-height: 1.3;
    white-space: nowrap;
}
.dash-tax-kdv {
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
}
.dash-tax-tevkifat {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

[data-bs-theme="dark"] .finance-stat-kdv {
    background: linear-gradient(160deg, #0c4a6e 0%, #0f172a 100%) !important;
    border-color: rgba(56, 189, 248, 0.25);
}
[data-bs-theme="dark"] .finance-stat-kdv .finance-stat-value { color: #7dd3fc !important; }
[data-bs-theme="dark"] .finance-stat-tevkifat {
    background: linear-gradient(160deg, #78350f 0%, #0f172a 100%) !important;
    border-color: rgba(251, 191, 36, 0.25);
}
[data-bs-theme="dark"] .finance-stat-tevkifat .finance-stat-value { color: #fbbf24 !important; }
[data-bs-theme="dark"] .dash-pill-kdv { background: rgba(56, 189, 248, 0.15); color: #7dd3fc; }
[data-bs-theme="dark"] .dash-pill-tevkifat { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
[data-bs-theme="dark"] .dash-pill-warning { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
[data-bs-theme="dark"] .dash-tax-kdv { background: rgba(56, 189, 248, 0.16); color: #7dd3fc; }
[data-bs-theme="dark"] .dash-tax-tevkifat { background: rgba(251, 191, 36, 0.16); color: #fbbf24; }


.dash-chart-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}
.dash-chart-card .card-body { padding: 1.25rem 1.35rem; }
.dash-chart-wrap { position: relative; height: 280px; }
.dash-chart-wrap-sm { height: 240px; }
.dash-chart-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}
.dash-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.35rem;
    vertical-align: middle;
}
.dash-dot-invoice { background: #1e3a5f; }
.dash-dot-collection { background: #10b981; }

.dash-tx-list-compact .dash-tx-item {
    padding: 0.45rem 0.25rem;
    gap: 0.65rem;
}
.dash-tx-list-compact .dash-tx-icon {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
    border-radius: 10px;
}
.dash-tx-list-compact .dash-tx-name {
    font-size: 0.82rem;
}
.dash-tx-list-compact .dash-tx-meta {
    font-size: 0.7rem;
}
.dash-tx-list-compact .dash-tx-amount {
    font-size: 0.8rem;
}
.dash-top-parties .dash-tx-header {
    margin-bottom: 0.5rem;
}

[data-bs-theme="dark"] .kpi-icon-navy { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }
[data-bs-theme="dark"] .dash-tx-icon-navy { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }
[data-bs-theme="dark"] .dash-pill-navy { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }
[data-bs-theme="dark"] .kpi-value { color: #e2e8f0; }
[data-bs-theme="dark"] .dash-chart-card,
[data-bs-theme="dark"] .kpi-card,
[data-bs-theme="dark"] .finance-stat-card {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.kpi-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.kpi-danger .kpi-value { color: #dc2626; }

.finance-stat-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.finance-stat-card .card-body {
    padding: 1.15rem 1.25rem;
}

.finance-stat-value.text-success { color: #059669 !important; }
.finance-stat-value.text-warning { color: #d97706 !important; }

.kpi-offer-stats .fw-bold {
    color: #0f172a;
}

/* Dashboard transaction-style widgets */
.dash-tx-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.dash-tx-card .card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.dash-recent-panel {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 14px;
    padding: 0.4rem 0.45rem 0.5rem;
    margin-top: 0.15rem;
}

.dash-recent-table {
    --bs-table-bg: transparent;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.4rem;
    font-size: 0.875rem;
    margin: 0 !important;
}
.dash-recent-table thead th {
    font-size: 0.68rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border: 0 !important;
    background: transparent;
    white-space: nowrap;
    padding: 0.35rem 0.85rem 0.45rem;
}
.dash-recent-table tbody td {
    border: 0 !important;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    padding: 0.8rem 0.85rem;
    vertical-align: middle;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.dash-recent-table tbody tr td:first-child {
    border-radius: 12px 0 0 12px;
}
.dash-recent-table tbody tr td:last-child {
    border-radius: 0 12px 12px 0;
}
.dash-recent-table .dash-tx-name {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
}
.dash-recent-table .dash-tx-date,
.dash-recent-table .dash-tx-branch {
    display: block;
    margin-top: 0.2rem;
}
.dash-date-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 999px;
    padding: 0.12rem 0.55rem;
    line-height: 1.4;
    white-space: nowrap;
}
.dash-branch-chip {
    display: inline-block;
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 550;
    color: #334155;
    background: rgba(30, 58, 95, 0.07);
    border-radius: 8px;
    padding: 0.28rem 0.55rem;
}
.dash-recent-table .dash-tx-meta-strong {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}
.dash-recent-table .dash-tx-meta {
    white-space: normal;
    margin-top: 0.12rem;
    font-size: 0.75rem;
    color: #94a3b8;
}
.dash-recent-table .dash-tx-amount {
    font-size: 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.dash-recent-empty td {
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 1.5rem 0.85rem !important;
    border-radius: 12px !important;
}
.dash-recent-row { cursor: pointer; }
.dash-recent-row:hover td {
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}
.dash-recent-row:hover td:first-child {
    box-shadow: inset 3px 0 0 #1e3a5f, 0 4px 14px rgba(15, 23, 42, 0.07);
}

[data-bs-theme="dark"] .dash-recent-panel {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.55) 0%, rgba(15, 23, 42, 0.45) 100%);
    border-color: rgba(148, 163, 184, 0.1);
}
[data-bs-theme="dark"] .dash-recent-table thead th { color: #94a3b8; }
[data-bs-theme="dark"] .dash-recent-table tbody td {
    background: rgba(30, 41, 59, 0.85);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
[data-bs-theme="dark"] .dash-recent-table .dash-tx-name { color: #f1f5f9; }
[data-bs-theme="dark"] .dash-date-pill {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.12);
}
[data-bs-theme="dark"] .dash-branch-chip {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.12);
}
[data-bs-theme="dark"] .dash-recent-table .dash-tx-meta-strong { color: #e2e8f0; }
[data-bs-theme="dark"] .dash-recent-row:hover td {
    background: rgba(51, 65, 85, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
[data-bs-theme="dark"] .dash-recent-row:hover td:first-child {
    box-shadow: inset 3px 0 0 #60a5fa, 0 4px 16px rgba(0, 0, 0, 0.25);
}

.dash-tx-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dash-tx-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.dash-tx-subtitle {
    font-size: 0.8rem;
    color: #64748b;
}

.dash-tx-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.dash-tx-badge-success { background: rgba(16, 185, 129, 0.12); color: #059669; }
.dash-tx-badge-warning { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.dash-tx-badge-info { background: rgba(14, 165, 233, 0.12); color: #0284c7; }

/* Durum rozetleri — Talepler / Teklifler / Faturalar */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.7rem 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.2;
    white-space: nowrap;
    border: 1px solid transparent;
    vertical-align: middle;
}

.status-badge-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    flex-shrink: 0;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}

.status-badge--slate {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
    border-color: rgba(100, 116, 139, 0.18);
}
.status-badge--sky {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    border-color: rgba(14, 165, 233, 0.2);
}
.status-badge--violet {
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
    border-color: rgba(139, 92, 246, 0.2);
}
.status-badge--amber {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.22);
}
.status-badge--emerald {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.2);
}
.status-badge--rose {
    background: rgba(244, 63, 94, 0.12);
    color: #e11d48;
    border-color: rgba(244, 63, 94, 0.2);
}
.status-badge--indigo {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.2);
}
.status-badge--teal {
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
    border-color: rgba(20, 184, 166, 0.22);
}

[data-bs-theme="dark"] .status-badge--slate {
    background: rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.22);
}
[data-bs-theme="dark"] .status-badge--sky {
    background: rgba(56, 189, 248, 0.16);
    color: #7dd3fc;
}
[data-bs-theme="dark"] .status-badge--violet {
    background: rgba(167, 139, 250, 0.16);
    color: #c4b5fd;
}
[data-bs-theme="dark"] .status-badge--amber {
    background: rgba(251, 191, 36, 0.16);
    color: #fbbf24;
}
[data-bs-theme="dark"] .status-badge--emerald {
    background: rgba(52, 211, 153, 0.16);
    color: #6ee7b7;
}
[data-bs-theme="dark"] .status-badge--rose {
    background: rgba(251, 113, 133, 0.16);
    color: #fda4af;
}
[data-bs-theme="dark"] .status-badge--indigo {
    background: rgba(129, 140, 248, 0.16);
    color: #a5b4fc;
}
[data-bs-theme="dark"] .status-badge--teal {
    background: rgba(45, 212, 191, 0.16);
    color: #5eead4;
}

/* Liste tabloları — modern satır düzeni */
.list-table tbody td {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.list-code {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 6.5rem;
}

.list-code-main {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
    letter-spacing: 0.01em;
}

.list-code-meta {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    background: rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    width: fit-content;
}

.list-date {
    font-variant-numeric: tabular-nums;
    font-weight: 550;
    color: #475569;
    white-space: nowrap;
}

.pay-when {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 6.5rem;
}

.pay-when-date {
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    color: #0f172a;
    white-space: nowrap;
}

.pay-when-code {
    font-size: 0.75rem;
    color: #64748b;
    letter-spacing: 0.01em;
}

.pay-status {
    font-weight: 600;
    color: #334155;
}

.pay-status-sub {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
}

.pay-method {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0.55rem 0.15rem 0.4rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--pay-method, #64748b) 16%, #fff);
    color: var(--pay-method, #334155);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.pay-method::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: var(--pay-method, #64748b);
}

[data-bs-theme="dark"] .pay-when-date {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .pay-status {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .pay-method {
    background: color-mix(in srgb, var(--pay-method, #94a3b8) 22%, transparent);
}

.list-branch,
.list-party {
    display: inline-block;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #334155;
    font-weight: 500;
}

.list-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 10rem;
    max-width: 22rem;
}

.list-title {
    font-weight: 650;
    color: #0f172a;
    line-height: 1.3;
}

.list-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.list-amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    white-space: nowrap;
}

.list-firm {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 8rem;
    max-width: 16rem;
}

.list-firm-branch {
    font-weight: 650;
    color: #0f172a;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-firm-party {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-active-rev {
    font-size: 0.68rem;
    font-weight: 700;
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    white-space: nowrap;
}

.list-rev-btn {
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
}

.list-rev-btn:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #94a3b8;
}

.list-rev-btn.is-multi {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
}

.list-rev-btn.is-multi:hover {
    background: #6d28d9;
    border-color: #6d28d9;
    color: #fff;
}

.offer-rev-dialog {
    width: calc(100vw - 2rem);
    max-width: 1080px;
}

.offer-rev-dialog .modal-body {
    max-height: min(70vh, 640px);
    overflow: auto;
}

.offer-rev-table {
    width: 100%;
}

.offer-rev-table thead th {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
    border-bottom-width: 1px;
    padding: 0.75rem 0.85rem;
    white-space: nowrap;
}

.offer-rev-table tbody td {
    padding: 0.8rem 0.85rem;
    border-color: rgba(148, 163, 184, 0.18);
    vertical-align: middle;
}

.offer-rev-row {
    cursor: pointer;
}

.offer-rev-row.is-current {
    background: rgba(124, 58, 237, 0.06);
}

.offer-rev-row.is-active {
    box-shadow: inset 3px 0 0 #10b981;
}

.offer-rev-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    height: 1.8rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.8rem;
}

.offer-rev-row.is-active .offer-rev-no {
    background: #10b981;
    color: #fff;
}

.offer-rev-open {
    font-size: 0.8rem;
    font-weight: 700;
    color: #7c3aed;
}

.offer-cmp-board .row {
    --bs-gutter-x: 0.75rem;
}

.offer-cmp-cols,
.offer-cmp-section,
.offer-cmp-line,
.offer-cmp-totals {
    margin-top: 0;
}

.offer-cmp-colhead,
.offer-cmp-cell,
.offer-cmp-section-bar,
.offer-cmp-total-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.offer-cmp-colhead {
    padding: 0.45rem 0.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: 0;
}

.offer-cmp-cell {
    height: 100%;
    min-height: 3.25rem;
    padding: 0.7rem 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 0;
}

.offer-cmp-main {
    min-width: 0;
    flex: 1 1 auto;
}

.offer-cmp-desc {
    margin-top: 0;
    white-space: pre-wrap;
    line-height: 1.35;
    color: #0f172a;
}

.offer-cmp-nums {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.85rem;
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
}

.offer-cmp-nums span {
    min-width: 5.5rem;
}

.offer-cmp-nums strong,
.offer-cmp-section-bar strong,
.offer-cmp-total-row strong {
    min-width: 7.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.offer-cmp-cell.is-missing .offer-cmp-desc,
.offer-cmp-missing-label {
    color: #9f1239;
}

.offer-cmp-missing-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
}

.offer-cmp-section-bar {
    width: 100%;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-top: 0;
    background: #eef1f4;
    color: inherit;
    text-align: left;
}

.offer-cmp-section-bar.is-expanded .offer-cmp-chevron {
    transform: rotate(90deg);
}

.offer-cmp-cell.is-same {
    background: rgba(16, 185, 129, 0.2);
}

.offer-cmp-cell.is-price {
    background: rgba(245, 158, 11, 0.3);
}

.offer-cmp-section-bar.is-missing,
.offer-cmp-cell.is-missing {
    background: rgba(244, 63, 94, 0.2);
}

.offer-cmp-chevron {
    display: inline-block;
    transition: transform 0.15s ease;
    margin-right: 0.15rem;
}

.offer-cmp-cell.is-collapsed {
    display: none;
}

.offer-cmp-total-row {
    align-items: center;
    padding: 0.45rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-top: 0;
    background: #fff;
}

.offer-cmp-total-row.is-grand {
    font-weight: 700;
}

[data-bs-theme="dark"] .offer-cmp-colhead,
[data-bs-theme="dark"] .offer-cmp-section-bar {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .offer-cmp-cell,
[data-bs-theme="dark"] .offer-cmp-total-row {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .offer-cmp-desc {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .offer-cmp-cell.is-same {
    background: rgba(16, 185, 129, 0.22);
}

[data-bs-theme="dark"] .offer-cmp-cell.is-price {
    background: rgba(245, 158, 11, 0.24);
}

[data-bs-theme="dark"] .offer-cmp-cell.is-missing,
[data-bs-theme="dark"] .offer-cmp-section-bar.is-missing {
    background: rgba(244, 63, 94, 0.24);
}

[data-bs-theme="dark"] .offer-cmp-cell.is-missing .offer-cmp-desc,
[data-bs-theme="dark"] .offer-cmp-missing-label {
    color: #fda4af;
}

.list-action-btn {
    border-radius: 999px;
    padding-inline: 0.85rem;
    font-weight: 600;
}

.list-pdf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1.15rem;
    line-height: 1;
    text-decoration: none;
    border-radius: 0.35rem;
}
.list-pdf-icon.is-active {
    color: #dc2626;
}
.list-pdf-icon.is-active:hover {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.08);
}
.list-pdf-icon.is-inactive {
    color: #cbd5e1;
    cursor: default;
    opacity: 0.55;
}
[data-bs-theme="dark"] .list-pdf-icon.is-inactive {
    color: #64748b;
}
[data-bs-theme="dark"] .list-pdf-icon.is-active {
    color: #f87171;
}

[data-bs-theme="dark"] .list-code-main,
[data-bs-theme="dark"] .list-title,
[data-bs-theme="dark"] .list-amount {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .list-branch,
[data-bs-theme="dark"] .list-party,
[data-bs-theme="dark"] .list-date {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .list-code-meta {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

[data-bs-theme="dark"] .list-firm-branch {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .list-firm-party {
    color: #94a3b8;
}

[data-bs-theme="dark"] .list-active-rev {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
}

[data-bs-theme="dark"] .list-rev-btn {
    background: transparent;
    border-color: #475569;
    color: #cbd5e1;
}

[data-bs-theme="dark"] .offer-rev-table thead th {
    background: #1e293b;
    color: #94a3b8;
}

[data-bs-theme="dark"] .offer-rev-no {
    background: #334155;
    color: #e2e8f0;
}

.list-stat-card .card-body {
    padding: 1rem 1.15rem;
}

.list-title.text-decoration-none:hover {
    color: var(--bs-primary);
}

.app-filter-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.app-filter-card .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.app-filter-card .form-check-label {
    font-size: 0.875rem;
    color: #475569;
}

.invoice-filter-totals {
    padding: 1rem 1.15rem 1.15rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.7));
}

.invoice-totals-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 1.75rem;
    justify-content: flex-end;
}

.invoice-total-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 8rem;
    text-align: right;
}

[data-bs-theme="dark"] .invoice-filter-totals {
    background: rgba(15, 23, 42, 0.35);
}

.dash-tx-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
}

.dash-tx-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.35rem;
    border-radius: 12px;
    transition: background 0.15s ease;
}

.dash-tx-item-link {
    text-decoration: none;
    color: inherit;
}

.dash-tx-item-link:hover {
    background: rgba(15, 23, 42, 0.04);
}

.dash-tx-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.dash-tx-icon-success { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.dash-tx-icon-info { background: rgba(14, 165, 233, 0.12); color: #0ea5e9; }
.dash-tx-icon-purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.dash-tx-icon-secondary { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.dash-tx-icon-danger { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.dash-tx-icon-primary { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
.dash-tx-icon-warning { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.dash-ship-tile {
    display: block;
    height: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-ship-tile:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.dash-tx-body {
    flex: 1;
    min-width: 0;
}

.dash-tx-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.dash-tx-branch {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.25;
    margin-top: 0.1rem;
}

.dash-tx-name .dash-tx-date {
    font-weight: 500;
    color: #94a3b8;
}

.dash-tx-body > .dash-tx-date {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.25;
    margin-top: 0.1rem;
}

.dash-tx-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-tx-amount {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.dash-tx-amount-positive { color: #059669; }
.dash-tx-amount-negative { color: #dc2626; }
.dash-tx-amount-neutral { color: #0f172a; }

.dash-tx-empty {
    padding: 1.5rem 0.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.dash-tx-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e2e8f0;
}

[data-bs-theme="dark"] .dash-tx-title,
[data-bs-theme="dark"] .dash-tx-name,
[data-bs-theme="dark"] .dash-tx-amount-neutral {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .dash-tx-branch {
    color: #94a3b8;
}

[data-bs-theme="dark"] .dash-tx-name .dash-tx-date,
[data-bs-theme="dark"] .dash-tx-body > .dash-tx-date {
    color: #64748b;
}

[data-bs-theme="dark"] .dash-tx-item-link:hover {
    background: rgba(255, 255, 255, 0.04);
}

[data-bs-theme="dark"] .dash-tx-footer {
    border-top-color: #334155;
}

.calendar-note-checklist {
    max-height: 140px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.calendar-note-check-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

.calendar-note-check-item .form-check-input {
    margin: 0;
    flex-shrink: 0;
}

/* DataTables — modern */
.app-table-card {
    overflow: hidden;
    max-width: 100%;
}

.app-table-card .table-responsive {
    padding: 0;
    overflow-x: auto;
    max-width: 100%;
}

.app-table-card > .dt-container,
.app-datatable + .dt-container,
.app-datatable ~ .dt-container,
div.dt-container {
    padding: 0.75rem 1rem 1rem;
}

div.dt-container .dt-layout-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.75rem;
}

div.dt-container .dt-layout-row:last-child {
    margin-bottom: 0;
    margin-top: 0.75rem;
}

div.dt-container .dt-layout-table {
    margin: 0;
    width: 100%;
    overflow-x: auto;
}

div.dt-container .dt-search,
div.dt-container .dt-length,
div.dt-container .dt-info,
div.dt-container .dt-paging {
    display: block !important;
    visibility: visible !important;
}

div.dt-container .dt-length label,
div.dt-container .dt-search label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

div.dt-container .dt-length select {
    border-radius: 8px;
    padding: 0.35rem 2rem 0.35rem 0.65rem;
    border-color: #e2e8f0;
    font-size: 0.875rem;
}

div.dt-container .dt-search input {
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    border-color: #e2e8f0;
    font-size: 0.875rem;
    min-width: 200px;
}

div.dt-container .dt-search input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.15);
}

div.dt-container table.dataTable thead th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.85rem 0.75rem;
}

div.dt-container table.dataTable tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

div.dt-container .dt-info {
    font-size: 0.85rem;
    color: #64748b;
    padding-top: 0.75rem;
}

div.dt-container .dt-paging {
    padding-top: 0.75rem;
}

div.dt-container .dt-paging .dt-paging-button {
    border-radius: 8px !important;
    min-width: 36px;
    height: 36px;
    /*padding: 0 0.5rem !important;*/
    margin-left: 0.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    /*border: 1px solid #e2e8f0 !important;*/
    background: #fff !important;
    color: #475569 !important;
}

div.dt-container .dt-paging .dt-paging-button:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button.current:hover {
    background: #7c3aed !important;
    border-color: #7c3aed !important;
    color: #fff !important;
}

div.dt-container .dt-paging .dt-paging-button.disabled,
div.dt-container .dt-paging .dt-paging-button.disabled:hover {
    opacity: 0.45;
    background: #f8fafc !important;
}

[data-bs-theme="dark"] div.dt-container .dt-paging .dt-paging-button {
    background: #1e2130 !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] div.dt-container .dt-paging .dt-paging-button.current {
    background: #7c3aed !important;
    border-color: #7c3aed !important;
    color: #fff !important;
}

.modal-pick-table-wrap div.dt-container {
    padding: 0.5rem 0;
}

.modal-pick-table-wrap .dt-layout-row,
.modal-pick-table-wrap .dt-search,
.modal-pick-table-wrap .dt-paging,
.modal-pick-table-wrap .dataTables_filter,
.modal-pick-table-wrap .dataTables_paginate,
.modal-pick-table-wrap .dataTables_info,
.modal-pick-table-wrap .dataTables_length {
    display: block !important;
    visibility: visible !important;
}

.modal-pick-table-wrap .dt-search input,
.modal-pick-table-wrap .dataTables_filter input {
    min-width: 12rem;
}

/* form.modal-content: scrollable modalda footer sabit, body kayar */
.modal-dialog-scrollable > form.modal-content {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
}
.modal-dialog-scrollable > form.modal-content > .modal-body {
    overflow-y: auto;
}

/* Menu checkbox tree */
.menu-check-item { margin-bottom: 0.5rem; }
.menu-checkbox-tree { max-height: 560px; overflow-y: auto; }
.menu-sort-list { margin: 0; padding: 0; min-height: 0.4rem; }
.menu-sort-list > .menu-sort-item > .menu-sort-list {
    margin-left: 1.25rem;
    padding-left: 0.35rem;
    border-left: 1px dashed rgba(15, 23, 42, 0.12);
    min-height: 0.55rem;
}
.menu-sort-item { margin: 0.15rem 0; }
.menu-sort-item.is-collapsed > .menu-sort-list {
    display: none;
}
.menu-sort-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.4rem;
    border-radius: 0.35rem;
}
.menu-sort-row:hover { background: rgba(15, 23, 42, 0.04); }
.menu-sort-drag {
    cursor: grab;
    flex: 0 0 auto;
    line-height: 1;
    padding: 0.15rem;
}
.menu-sort-drag:active { cursor: grabbing; }
.menu-sort-toggle {
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 0;
    border-radius: 0.3rem;
    background: transparent;
    color: #64748b;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.menu-sort-toggle:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}
.menu-sort-toggle.is-hidden {
    visibility: hidden;
    pointer-events: none;
}
.menu-sort-toggle .bi {
    transition: transform 0.15s ease;
    font-size: 0.85rem;
}
.menu-sort-item:not(.is-collapsed) > .menu-sort-row > .menu-sort-toggle .bi {
    transform: rotate(90deg);
}
.menu-sort-count {
    font-size: 0.65rem;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 0.25rem;
}
.menu-sort-ghost { opacity: 0.55; background: rgba(59, 130, 246, 0.12); }
.menu-sort-chosen > .menu-sort-row {
    background: rgba(59, 130, 246, 0.08);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.25);
}
.menu-sort-dragging { opacity: 0.9; }

/* Mobile */
@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
    .app-main,
    body.sidebar-collapsed .app-main {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }
    body.sidebar-collapsed .app-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    body.sidebar-collapsed .sidebar-logo-full {
        display: block;
    }
    body.sidebar-collapsed .sidebar-logo-favicon {
        display: none;
    }
    body.sidebar-collapsed .sidebar-nav .nav-link {
        justify-content: flex-start;
        padding: 0.6rem 1.25rem;
        gap: 0.6rem;
    }
    body.sidebar-collapsed .sidebar-nav .nav-link span,
    body.sidebar-collapsed .sidebar-nav .submenu-arrow {
        display: inline !important;
    }
    body.sidebar-collapsed .sidebar-nav .collapse {
        display: block !important;
    }
    .topbar-rate-group {
        max-width: 100%;
        order: 3;
        width: 100%;
        justify-content: flex-end;
    }
    .rate-pill {
        max-width: calc(100vw - 150px);
        overflow: hidden;
    }
    .app-header {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    .page-title {
        max-width: 34vw;
        font-size: 1rem;
    }
    .app-content {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    div.dt-container .dt-search,
    div.dt-container .dt-length {
        width: 100%;
    }
    div.dt-container .dt-search input {
        min-width: 0;
        width: min(100%, 16rem);
    }
    .table-responsive,
    .card,
    form {
        max-width: 100%;
    }
    #dashboardCalendar .fc-toolbar.fc-header-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    #dashboardCalendar .fc .fc-toolbar-chunk {
        justify-content: center;
        flex-wrap: wrap;
    }
    #dashboardCalendar .fc-daygrid-day-frame {
        min-height: 78px;
    }
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Sidebar logo */
.sidebar-logo-img {
    display: block;
    /*max-height: 52px;*/
    max-width: 180px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.18));
}

.sidebar-brand {
    gap: 0.6rem;
}

@media (min-width: 992px) {
    body.sidebar-collapsed .sidebar-brand {
        padding: 1rem 0.75rem;
    }

    body.sidebar-collapsed .sidebar-brand-link {
        width: 52px;
        min-height: 52px;
        margin-inline: auto;
    }

    body.sidebar-collapsed .sidebar-logo-full {
        display: none;
    }

    body.sidebar-collapsed .sidebar-logo-favicon {
        display: block;
    }

    body.sidebar-collapsed .sidebar-nav .nav-link {
        justify-content: center;
        padding: 0.8rem 0.5rem;
        gap: 0;
    }

    body.sidebar-collapsed .sidebar-nav .nav-link span,
    body.sidebar-collapsed .sidebar-nav .submenu-arrow,
    body.sidebar-collapsed .sidebar-nav .collapse {
        display: none !important;
    }

    body.sidebar-collapsed .sidebar-nav .nav-link > i:first-child {
        margin: 0;
        font-size: 1.1rem;
    }

    body.sidebar-collapsed .app-sidebar {
        width: var(--sidebar-collapsed-width);
    }
}

/* Header rates pill — görseldeki mor badge stili */
.topbar-rate-group {
    max-width: 420px;
}

.rate-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--rate-pill-bg);
    border: 1px solid var(--rate-pill-border);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    white-space: nowrap;
    transition: opacity 0.2s ease;
    min-height: 32px;
    box-shadow: 0 10px 24px rgba(91, 33, 182, 0.10);
}

.rate-pill.rate-pill-fade {
    opacity: 0;
}

.rate-pill-code {
    font-weight: 700;
    color: var(--rate-pill-code);
    font-size: 0.82rem;
}

.rate-pill-date {
    font-size: 0.72rem;
}

.rate-pill-sep {
    color: #94a3b8;
    font-weight: 300;
}

.rate-pill-values {
    font-weight: 600;
    color: #334155;
}

[data-bs-theme="dark"] .rate-pill-values {
    color: #e2e8f0;
}

.rate-pill-currency {
    font-weight: 500;
    color: #64748b;
}

#btnTopbarRatesRefresh.spinning i {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.rate-table-code {
    font-weight: 700;
    color: var(--rate-pill-code);
}

.db-version-badge {
    font-size: 0.75rem;
    font-weight: 500;
    align-items: center;
    gap: 0.25rem;
}

/* Settings */
.logo-preview-box {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.92));
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-preview-box img {
    max-height: 100px;
    max-width: 100%;
}

.favicon-preview-box {
    min-height: 120px;
}

.favicon-preview-box img {
    max-width: 48px;
    max-height: 48px;
}

.rate-card .rate-code {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Calendar — sidebar + main */
.app-calendar-sidebar {
    background: #fafbfc;
}

@media (min-width: 992px) {
    .app-calendar-sidebar {
        max-width: 300px;
        flex: 0 0 300px;
    }

    .app-calendar-main {
        flex: 1 1 auto;
        min-width: 0;
    }
}

.app-calendar-filter-item {
    cursor: pointer;
    color: #334155;
    user-select: none;
}

.app-calendar-filter-item .filter-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

#dashboardCalendarMini {
    --fc-border-color: transparent;
    --fc-today-bg-color: transparent;
}

.mini-month-picker .fc {
    font-size: 0.8rem;
}

.mini-month-picker .fc-toolbar {
    margin-bottom: 0.75rem !important;
    gap: 0.5rem;
}

.mini-month-picker .fc-toolbar-title {
    font-size: 0.95rem !important;
    font-weight: 700;
    color: #1e293b;
    text-transform: capitalize;
    text-align: left;
}

.mini-month-picker .fc-toolbar-chunk {
    display: flex;
    align-items: center;
}

.mini-month-picker .fc-toolbar-chunk:last-child {
    gap: 0.35rem;
}

.mini-month-picker .fc-button {
    border-radius: 50% !important;
    width: 2rem;
    height: 2rem;
    padding: 0 !important;
    font-size: 0.8rem !important;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mini-month-picker .fc-button-primary {
    background: #f1f5f9;
    border-color: #f1f5f9;
    color: #64748b;
}

.mini-month-picker .fc-button-primary:hover {
    background: #e2e8f0;
    border-color: #e2e8f0;
    color: #334155;
}

.mini-month-picker .fc-col-header-cell {
    border: none;
}

.mini-month-picker .fc-col-header-cell-cushion {
    font-size: 0.7rem;
    font-weight: 500;
    color: #94a3b8;
    padding: 0.35rem 0;
    text-decoration: none;
}

.mini-month-picker .fc-daygrid-day-frame {
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-month-picker .fc-daygrid-day-top {
    flex-direction: row;
    justify-content: center;
    width: 100%;
}

.mini-month-picker .fc-daygrid-day-number {
    font-size: 0.78rem;
    font-weight: 500;
    color: #334155 !important;
    text-decoration: none !important;
    float: none;
    padding: 0;
    width: 1.85rem;
    height: 1.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
}

.mini-month-picker .fc-day-other .fc-daygrid-day-number {
    color: #cbd5e1 !important;
}

.mini-month-picker .fc-day-today .fc-daygrid-day-number {
    background: #ede9fe;
    color: #7c3aed !important;
    font-weight: 700;
}

.mini-month-picker .fc-daygrid-day.mini-cal-selected .fc-daygrid-day-number {
    background: #ddd6fe;
    color: #6d28d9 !important;
    font-weight: 700;
}

.mini-month-picker .fc-scrollgrid,
.mini-month-picker .fc-theme-standard td,
.mini-month-picker .fc-theme-standard th {
    border: none;
}

.mini-month-picker .fc-daygrid-day {
    cursor: pointer;
}

.mini-month-picker .fc-daygrid-day:hover .fc-daygrid-day-number {
    background: #f1f5f9;
}

.calendar-event-modal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

[data-bs-theme="dark"] .mini-month-picker .fc-toolbar-title {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .mini-month-picker .fc-daygrid-day-number {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .mini-month-picker .fc-day-other .fc-daygrid-day-number {
    color: #475569 !important;
}

[data-bs-theme="dark"] .app-calendar-sidebar {
    background: #1a1d2b;
}

[data-bs-theme="dark"] .app-calendar-filter-item {
    color: #e2e8f0;
}

.dashboard-calendar-card {
    border-radius: 20px;
    overflow: hidden;
}

#dashboardCalendar {
    min-height: 520px;
    width: 100%;
}

#dashboardCalendar .fc {
    width: 100%;
}

#dashboardCalendar .fc-view-harness {
    min-height: 460px;
}

#dashboardCalendar .fc-toolbar-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: capitalize;
}

#dashboardCalendar .fc-toolbar {
    margin-bottom: 1.25rem;
}

#dashboardCalendar .fc-toolbar.fc-header-toolbar {
    gap: 0.75rem;
    align-items: center;
}

#dashboardCalendar .fc .fc-toolbar-chunk {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#dashboardCalendar .fc-button {
    border-radius: 10px !important;
    font-size: 0.85rem !important;
    font-weight: 600;
    box-shadow: none !important;
    padding: 0.55rem 0.95rem !important;
}

#dashboardCalendar .fc-button-primary {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #475569;
}

#dashboardCalendar .fc-button-primary:hover,
#dashboardCalendar .fc-button-primary:focus {
    background: #ede9fe;
    border-color: #ddd6fe;
    color: #6d28d9;
}

#dashboardCalendar .fc-button-primary:not(:disabled).fc-button-active,
#dashboardCalendar .fc-button-primary:not(:disabled):active {
    background: #ede9fe;
    border-color: #ddd6fe;
    color: #7c3aed;
}

#dashboardCalendar .fc .fc-prev-button,
#dashboardCalendar .fc .fc-next-button {
    width: 40px;
    padding: 0.55rem 0 !important;
}

#dashboardCalendar .fc-theme-standard td,
#dashboardCalendar .fc-theme-standard th,
#dashboardCalendar .fc-scrollgrid {
    border-color: rgba(226, 232, 240, 0.85);
}

#dashboardCalendar .fc-scrollgrid {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.95);
}

#dashboardCalendar .fc-col-header-cell {
    background: #fff;
    padding: 0.3rem 0;
}

#dashboardCalendar .fc-col-header-cell-cushion {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    padding: 0.8rem 0.35rem;
}

#dashboardCalendar .fc-daygrid-day-frame {
    min-height: 108px;
    background: #fff;
}

#dashboardCalendar .fc-daygrid-day-number {
    font-size: 0.92rem;
    color: #64748b;
    padding: 0.6rem 0.75rem 0;
}

#dashboardCalendar .fc-day-other .fc-daygrid-day-number {
    color: #cbd5e1;
}

#dashboardCalendar .fc-day-today {
    background: rgba(124, 58, 237, 0.05) !important;
}

#dashboardCalendar .fc-day-today .fc-daygrid-day-number {
    color: #7c3aed;
    font-weight: 700;
}

#dashboardCalendar .fc-col-header-cell-cushion,
#dashboardCalendar .fc-daygrid-day-number,
#dashboardCalendar .fc-list-day-text,
#dashboardCalendar .fc-list-day-side-text {
    color: inherit;
    text-decoration: none;
}

#dashboardCalendar .fc-daygrid-event {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 0.22rem 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
}

#dashboardCalendar .fc-list-event {
    cursor: pointer;
}

#dashboardCalendar .fc-h-event {
    background: #ede9fe;
    color: #7c3aed;
}

#dashboardCalendar .fc-list-event-dot {
    border-color: #7c3aed;
}

#dashboardCalendar .fc .fc-daygrid-more-link {
    color: #64748b;
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

[data-bs-theme="dark"] #dashboardCalendar .fc-button-primary {
    background: #25293c;
    border-color: #31364d;
    color: #cbd5e1;
}

[data-bs-theme="dark"] #dashboardCalendar .fc-button-primary:hover,
[data-bs-theme="dark"] #dashboardCalendar .fc-button-primary:not(:disabled).fc-button-active {
    background: #3b315f;
    border-color: #55458c;
    color: #ddd6fe;
}

[data-bs-theme="dark"] #dashboardCalendar .fc-col-header-cell,
[data-bs-theme="dark"] #dashboardCalendar .fc-daygrid-day-frame {
    background: #1e2130;
}

[data-bs-theme="dark"] #dashboardCalendar .fc-scrollgrid,
[data-bs-theme="dark"] #dashboardCalendar .fc-theme-standard td,
[data-bs-theme="dark"] #dashboardCalendar .fc-theme-standard th {
    border-color: rgba(71, 85, 105, 0.5);
}

[data-bs-theme="dark"] #dashboardCalendar .fc-daygrid-day-number,
[data-bs-theme="dark"] #dashboardCalendar .fc-col-header-cell-cushion {
    color: #cbd5e1;
}

.card {
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.kpi-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95));
}

[data-bs-theme="dark"] .kpi-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.95)) !important;
    border-color: rgba(148, 163, 184, 0.12);
}

[data-bs-theme="dark"] .kpi-card .kpi-label {
    color: #94a3b8;
}

[data-bs-theme="dark"] .kpi-card .kpi-value {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .logo-preview-box {
    background-color: var(--card-bg) !important;
    border-color: rgba(148, 163, 184, 0.10);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
}

[data-bs-theme="dark"] .finance-stat-card:not(.finance-stat-kdv):not(.finance-stat-tevkifat),
[data-bs-theme="dark"] .dash-chart-card,
[data-bs-theme="dark"] .dash-tx-card {
    background: var(--card-bg) !important;
    background-image: none !important;
}

[data-bs-theme="dark"] .finance-stat-card .kpi-label,
[data-bs-theme="dark"] .finance-stat-card .text-muted,
[data-bs-theme="dark"] .dash-chart-card .text-muted,
[data-bs-theme="dark"] .dash-tx-subtitle {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .finance-stat-card .finance-stat-value,
[data-bs-theme="dark"] .dash-chart-card .h6,
[data-bs-theme="dark"] .dash-tx-title {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .dash-hero .h4 {
    color: #f1f5f9;
}

/* Messaging widget */
#btnMessagingToggle.has-unread,
.msg-fab.has-unread {
    border-color: #8b5cf6 !important;
    background: rgba(139, 92, 246, 0.1) !important;
}

#btnMessagingToggle.has-unread #messagingHeaderIcon,
.msg-fab.has-unread i {
    color: #7c3aed;
}

.messaging-unread-badge {
    font-size: 0.65rem;
    min-width: 1.1rem;
    padding: 0.2em 0.45em;
}

.header-profile-link {
    border-radius: 12px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.header-profile-link:hover {
    transform: translateY(-1px);
}

.header-profile-link:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.45);
    outline-offset: 2px;
}

.header-profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    overflow: hidden;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.header-profile-initial {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6366f1;
}

.system-clock-modal,
.logout-confirm-modal {
    border-radius: 1.1rem;
    overflow: hidden;
    background: linear-gradient(165deg, #ffffff 0%, #f4f6fb 100%);
}

.offer-line-catalog-modal {
    border-radius: 1rem;
    overflow: hidden;
}

.offer-line-catalog-modal .dataTables_wrapper .dt-search,
.offer-line-catalog-modal .dataTables_wrapper .dataTables_filter {
    display: none !important;
}

.offer-line-catalog-modal #offerLineCatalogTable {
    font-size: 0.8125rem;
}

.offer-line-catalog-modal #offerLineCatalogTable thead th {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.45rem 0.65rem;
    white-space: nowrap;
}

.offer-line-catalog-modal #offerLineCatalogTable td {
    padding: 0.4rem 0.65rem;
    vertical-align: top;
}

.offer-line-catalog-modal #offerLineCatalogTable td:first-child {
    max-width: 34rem;
    white-space: normal;
}

.offer-line-catalog-modal .offer-line-catalog-desc {
    color: inherit;
    font-weight: 500;
    line-height: 1.3;
}

.offer-line-catalog-modal .offer-line-catalog-meta {
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: var(--bs-secondary-color);
    line-height: 1.35;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.35rem;
    align-items: baseline;
}

.offer-line-catalog-modal .offer-line-catalog-code {
    font-weight: 600;
    color: var(--bs-primary);
}

.offer-line-catalog-modal .offer-line-catalog-sep {
    opacity: 0.55;
}

.offer-process-catalog-dialog {
    --bs-modal-width: min(1180px, 97vw);
}

.offer-process-catalog-modal {
    border-radius: 1rem;
    overflow: hidden;
}

.offer-process-catalog-modal .opc-filter-form .form-label {
    margin-bottom: 0.2rem;
}

.offer-process-catalog-modal .dataTables_wrapper .dt-search,
.offer-process-catalog-modal .dataTables_wrapper .dataTables_filter {
    display: none !important;
}

.offer-process-catalog-modal #offerProcessCatalogTable {
    font-size: 0.875rem;
}

.offer-process-catalog-modal #offerProcessCatalogTable thead th {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.7rem 0.55rem;
    white-space: nowrap;
    color: var(--bs-secondary-color);
}

.offer-process-catalog-modal #offerProcessCatalogTable td {
    padding: 0.7rem 0.55rem;
    vertical-align: middle;
}

.offer-process-catalog-modal .opc-step-col {
    width: 3.2rem;
}

.offer-process-catalog-modal .opc-process {
    min-width: 16rem;
}

.offer-process-catalog-modal .opc-code {
    font-weight: 600;
    text-decoration: none;
    color: var(--bs-primary);
}

.offer-process-catalog-modal .opc-title {
    margin-top: 0.15rem;
    font-size: 0.84rem;
    line-height: 1.3;
    color: inherit;
}

.offer-process-catalog-modal .opc-meta {
    margin-top: 0.12rem;
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

.offer-process-catalog-modal .opc-date {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

.offer-process-catalog-modal .opc-check {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.offer-process-catalog-modal .opc-check.is-done {
    color: #059669;
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.28);
}

.offer-process-catalog-modal .opc-check.is-active {
    color: #0284c7;
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(14, 165, 233, 0.35);
}

.offer-process-catalog-modal .opc-check.is-pending {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.22);
}

.offer-process-catalog-modal .opc-eye-btn {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: transparent;
    color: var(--bs-secondary-color);
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 0.55rem;
    display: inline-grid;
    place-items: center;
}

.offer-process-catalog-modal .opc-eye-btn:hover {
    color: var(--bs-primary);
    border-color: rgba(13, 110, 253, 0.35);
    background: rgba(13, 110, 253, 0.06);
}

.offer-process-catalog-modal .track-status-chip {
    font-size: 0.72rem;
    padding: 0.28rem 0.55rem;
}

[data-bs-theme="dark"] .offer-process-catalog-modal .opc-check.is-pending {
    color: #64748b;
    background: rgba(100, 116, 139, 0.18);
}

.system-clock-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    opacity: 0.55;
}

.system-clock-close:hover {
    opacity: 1;
}

[data-bs-theme="dark"] .system-clock-modal,
[data-bs-theme="dark"] .logout-confirm-modal {
    background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
}

.system-clock-icon,
.logout-confirm-icon {
    width: 3.25rem;
    height: 3.25rem;
    margin-inline: auto;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
}

.system-clock-icon {
    color: #0f766e;
    background: rgba(13, 148, 136, 0.12);
    border: 1px solid rgba(13, 148, 136, 0.2);
}

.logout-confirm-icon {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.18);
}

.system-clock-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #64748b;
}

.system-clock-time {
    font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
    font-size: 2.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.system-clock-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

.system-clock-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: #64748b;
    background: rgba(148, 163, 184, 0.16);
}

.logout-confirm-title {
    font-weight: 700;
    color: #0f172a;
}

.logout-confirm-text {
    font-size: 0.92rem;
    line-height: 1.45;
}

[data-bs-theme="dark"] .system-clock-time,
[data-bs-theme="dark"] .logout-confirm-title {
    color: #f8fafc;
}

[data-bs-theme="dark"] .system-clock-date {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .system-clock-label,
[data-bs-theme="dark"] .system-clock-meta,
[data-bs-theme="dark"] .logout-confirm-text {
    color: #94a3b8;
}

[data-bs-theme="dark"] .system-clock-meta {
    background: rgba(148, 163, 184, 0.12);
}

[data-bs-theme="dark"] .system-clock-icon {
    color: #5eead4;
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.22);
}

[data-bs-theme="dark"] .logout-confirm-icon {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.22);
}

.msg-widget {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1055;
}

.msg-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.msg-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
    color: #fff;
}

.msg-fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.msg-panel {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(920px, calc(100vw - 2rem));
    height: min(640px, calc(100vh - 6rem));
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    flex-direction: column;
}

.msg-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}

.msg-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.msg-panel-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
}

.msg-panel-close:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #6366f1 !important;
}

.msg-panel-inner {
    display: flex;
    flex: 1;
    min-height: 0;
}

.msg-sidebar {
    width: 320px;
    min-width: 280px;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.msg-sidebar-head {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.msg-search-wrap {
    position: relative;
    margin-bottom: 0.75rem;
}

.msg-search-wrap i {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
}

.msg-search-wrap input {
    padding-left: 2rem;
    border-radius: 10px;
    background: #f8fafc;
}

.msg-tabs {
    display: flex;
    gap: 0.35rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 10px;
}

.msg-tab {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
}

.msg-tab.active {
    background: #fff;
    color: #6366f1;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.msg-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.msg-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding: 0.35rem 0.5rem;
}

.msg-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.msg-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0.65rem 0.6rem;
    border-radius: 12px;
    transition: background 0.15s ease;
    position: relative;
}

.msg-list-item:hover,
.msg-list-item.unread {
    background: #fff;
}

.msg-list-item.unread {
    box-shadow: inset 3px 0 0 #8b5cf6;
}

.msg-list-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.msg-list-avatar.user-tone { background: rgba(14, 165, 233, 0.12); color: #0ea5e9; }
.msg-list-avatar.dept-tone { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.msg-list-avatar.role-tone { background: rgba(16, 185, 129, 0.12); color: #10b981; }

.msg-list-body { flex: 1; min-width: 0; }

.msg-list-top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: baseline;
}

.msg-list-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-list-time {
    font-size: 0.7rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.msg-list-preview {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-list-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8b5cf6;
    flex-shrink: 0;
}

.msg-empty {
    text-align: center;
    color: #94a3b8;
    padding: 1.5rem 0.75rem;
    font-size: 0.85rem;
}

.msg-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #f1f5f9;
}

.msg-main-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.msg-back-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
}

.msg-back-btn:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #6366f1 !important;
}

.msg-main-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msg-main-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
}

.msg-main-sub {
    font-size: 0.75rem;
    color: #64748b;
}

.msg-history-wrap {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem 0.5rem;
    min-height: 0;
    position: relative;
}

.msg-history-loader {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.msg-history {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-bottom: 0.5rem;
}

.msg-bubble-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    max-width: 85%;
}

.msg-bubble-row.mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-bubble-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.msg-bubble-avatar.mine {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.msg-bubble-wrap { min-width: 0; }

.msg-bubble-sender {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 0.15rem;
    padding-left: 0.35rem;
}

.msg-bubble {
    background: #fff;
    border-radius: 14px 14px 14px 4px;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    word-break: break-word;
}

.msg-bubble-row.mine .msg-bubble {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    border-radius: 14px 14px 4px 14px;
}

.msg-bubble-time {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 0.2rem;
    padding: 0 0.35rem;
}

.msg-compose {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem 1rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.msg-compose input {
    border-radius: 12px;
    flex: 1;
}

.msg-send-btn {
    border-radius: 12px;
    width: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msg-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-align: center;
    padding: 2rem;
}

.msg-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

@media (max-width: 767.98px) {
    .msg-panel {
        width: calc(100vw - 1rem);
        height: calc(100vh - 5rem);
        right: -0.25rem;
    }

    .msg-sidebar {
        width: 100%;
        min-width: 0;
    }

    .msg-main {
        width: 100%;
    }
}

[data-bs-theme="dark"] .msg-panel {
    background: #1e2130;
    border-color: rgba(71, 85, 105, 0.5);
}

[data-bs-theme="dark"] .msg-panel-head {
    background: #1e2130;
    border-color: #334155;
}

[data-bs-theme="dark"] .msg-panel-title {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .msg-sidebar,
[data-bs-theme="dark"] .msg-main-head,
[data-bs-theme="dark"] .msg-compose {
    background: #1a1d2b;
    border-color: #334155;
}

[data-bs-theme="dark"] .msg-sidebar-head {
    background: #1e2130;
}

[data-bs-theme="dark"] .msg-list-name,
[data-bs-theme="dark"] .msg-main-title {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .msg-bubble {
    background: #25293c;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .msg-main {
    background: #141622;
}

.profile-avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(99, 102, 241, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-initial,
.msg-avatar-initial {
    font-weight: 700;
    font-size: 1.35rem;
    color: #6366f1;
}

.msg-list-avatar img,
.msg-bubble-avatar img,
.msg-main-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.msg-list-avatar,
.msg-bubble-avatar,
.msg-main-avatar {
    overflow: hidden;
}

.msg-list-avatar.role-tone,
.msg-main-avatar.role-tone {
    background: rgba(16, 185, 129, 0.12);
}

.msg-list-avatar.role-tone .msg-avatar-initial,
.msg-main-avatar.role-tone .msg-avatar-initial {
    color: #10b981;
}

.msg-bubble-avatar .msg-avatar-initial {
    font-size: 0.75rem;
}

/* Dropzone */
.app-dropzone {
    position: relative;
    border: 2px dashed #94a3b8;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.08);
    padding: 1.25rem;
    transition: border-color 0.15s, background 0.15s;
}
.app-dropzone.is-dragover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}
.app-dropzone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.app-dropzone-inner {
    text-align: center;
    pointer-events: none;
    color: #475569;
}
.app-dropzone-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.75rem;
    position: relative;
    z-index: 3;
}
.app-dropzone-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #e2e8f0;
    aspect-ratio: 1;
}
.app-dropzone-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.app-dropzone-thumb .thumb-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.25rem;
    font-size: 0.65rem;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-dropzone-thumb.is-file {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    font-size: 0.7rem;
    text-align: center;
}

/* Offer gallery */
.offer-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
}
@media (max-width: 992px) {
    .offer-gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .offer-gallery { grid-template-columns: repeat(2, 1fr); }
}
.offer-gallery-item {
    background: var(--card-bg, #fff);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.offer-gallery-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    background: #e2e8f0;
    cursor: zoom-in;
    overflow: hidden;
}
.offer-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}
.offer-gallery-thumb:hover img {
    transform: scale(1.04);
}
.offer-gallery-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
    color: #64748b;
    cursor: pointer;
}
.offer-gallery-file i { font-size: 1.75rem; }
.offer-gallery-file span { font-size: 0.75rem; }
.offer-gallery-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
}
.offer-gallery-delete {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* Offer lines layout */
/* Teklif detay: sıra no + kalem kontrol (sıra no kaydedilmez) */
.offer-show-lines-table .offer-line-no-col {
    width: 2.25rem;
    text-align: center;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.offer-show-lines-table .offer-line-check-col {
    width: 2rem;
    text-align: center;
    vertical-align: middle;
}
.offer-show-lines-table .offer-line-check {
    cursor: pointer;
    margin: 0;
}
.offer-show-lines-table tr.offer-line-checked > td {
    background: rgba(220, 38, 38, 0.12);
}
.offer-show-lines-table .offer-section-subtotal {
    font-weight: 700;
    white-space: nowrap;
}

/* Teklif başlık akordeon */
.offer-section-toggle {
    line-height: 1;
    vertical-align: middle;
    color: inherit !important;
    text-decoration: none !important;
}
.offer-section-toggle .bi {
    display: inline-block;
    transition: transform 0.15s ease;
}
.offer-section-row.is-expanded .offer-section-toggle .bi,
.js-offer-section-row.is-expanded .offer-section-toggle .bi {
    transform: rotate(90deg);
}
tr.offer-section-child.is-collapsed {
    display: none !important;
}
[data-bs-theme="dark"] .offer-show-lines-table tr.offer-line-checked > td {
    background: rgba(248, 113, 113, 0.18);
}

.offer-lines-table .offer-line-desc { min-width: 280px; }
.offer-lines-table td { vertical-align: top; }
.offer-lines-table .offer-line-drag {
    cursor: grab;
    width: 36px;
    text-align: center;
    padding-top: 0.65rem !important;
    user-select: none;
}
.offer-lines-table .offer-line-drag:active { cursor: grabbing; }
.offer-lines-table .offer-section-row .offer-line-desc,
.offer-lines-table .offer-section-desc {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.45);
    min-height: calc(1.5em + 0.5rem + 2px);
    height: calc(1.5em + 0.5rem + 2px);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    resize: vertical;
}
.offer-lines-table .offer-section-row td {
    background: #f1f5f9;
    vertical-align: middle;
}
.offer-lines-table tr.offer-line-ghost {
    opacity: 0.55;
    background: #e2e8f0;
}
tr.offer-section-row > td {
    background: #eef1f4 !important;
    vertical-align: middle !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}
tr.offer-section-row .badge {
    font-weight: 600;
    line-height: 1.2;
    vertical-align: middle;
}
[data-bs-theme="dark"] .offer-lines-table .offer-section-row td,
[data-bs-theme="dark"] tr.offer-section-row > td {
    background: rgba(148, 163, 184, 0.12) !important;
}
.ts-dropdown { z-index: 2000 !important; }

.offer-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
}
.offer-toolbar > .btn,
.offer-toolbar > a.btn,
.offer-toolbar > .dropdown {
    flex: 0 0 auto;
    white-space: nowrap;
}
.offer-toolbar > .btn,
.offer-toolbar > a.btn,
.offer-toolbar > .dropdown > .btn,
.offer-toolbar > form .btn {
    font-weight: 600;
    border: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.offer-toolbar > form {
    display: inline-flex;
    margin: 0;
    flex: 0 0 auto;
}
.offer-toolbar > form .btn {
    white-space: nowrap;
}

/* Invoice detail */
.inv-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    font-size: 0.8125rem;
    margin-bottom: 0.35rem;
}
.inv-detail-back:hover { color: #1e3a5f; }
.inv-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}
.inv-detail-meta {
    color: #64748b;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}
.inv-detail-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #94a3b8;
    display: inline-block;
}
.inv-stat-card {
    background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    height: 100%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.inv-stat-card-accent {
    background: linear-gradient(160deg, #f0fdfa 0%, #ecfeff 100%);
    border-color: rgba(13, 148, 136, 0.18);
}
.inv-stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.inv-stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
}
.inv-card-header {
    background: transparent;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding: 0.9rem 1.15rem;
}
.inv-lines-card,
.inv-media-card {
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.inv-lines-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    font-weight: 600;
    background: #f8fafc;
    border-bottom-width: 1px;
}
.inv-lines-table tbody td,
.inv-lines-table tfoot th {
    vertical-align: middle;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.inv-lines-table tfoot th {
    font-weight: 600;
    background: #f8fafc;
}
.inv-empty-media {
    padding: 1.5rem 0.5rem;
    text-align: center;
    font-size: 0.9rem;
}
.inv-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.65rem;
}
@media (max-width: 1200px) {
    .inv-gallery { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .inv-gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .inv-gallery { grid-template-columns: repeat(2, 1fr); }
}
.inv-gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}
.inv-gallery-item.is-selected {
    border-color: rgba(220, 38, 38, 0.55);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18);
}
.inv-gallery-check {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    z-index: 3;
    margin: 0;
    width: 1.35rem;
    height: 1.35rem;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 0.35rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
    cursor: pointer;
}
.inv-gallery-check .form-check-input {
    margin: 0;
    float: none;
    cursor: pointer;
}
[data-bs-theme="dark"] .inv-gallery-check {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(148, 163, 184, 0.35);
}
.inv-gallery-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    background: #e2e8f0;
    cursor: zoom-in;
    overflow: hidden;
}
.inv-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}
.inv-gallery-thumb:hover img { transform: scale(1.05); }
.inv-gallery-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-decoration: none;
    color: #64748b;
    cursor: pointer;
}
.inv-gallery-file i { font-size: 1.5rem; }
.inv-gallery-file span {
    font-size: 0.68rem;
    padding: 0 0.35rem;
    text-align: center;
    line-height: 1.2;
}
.inv-gallery-caption {
    font-size: 0.68rem;
    color: #64748b;
    padding: 0.35rem 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}
.inv-gallery-caption-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.inv-gallery-size {
    font-size: 0.64rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.offer-gallery-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    white-space: normal;
    overflow: visible;
}
.offer-gallery-caption .btn {
    flex-shrink: 0;
    padding: 0.1rem 0.35rem;
    line-height: 1.2;
}
.inv-invoice-files {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.inv-invoice-file {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}
.inv-invoice-file-invoice,
.inv-invoice-file-offer {
    border-color: rgba(245, 158, 11, 0.28);
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}
.inv-invoice-file-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}
.inv-invoice-file-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.16);
    color: #d97706;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.inv-invoice-file-offer .inv-invoice-file-icon {
    background: rgba(234, 179, 8, 0.18);
    color: #b45309;
}
.inv-invoice-file-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.inv-invoice-file-meta strong {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.inv-invoice-file-meta small { font-size: 0.72rem; }

/* Fatura mail ek listesi */
.inv-mail-files {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}
@media (max-width: 575.98px) {
    .inv-mail-files { grid-template-columns: 1fr; }
}
.inv-mail-file {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    background: #f8fafc;
    min-width: 0;
    cursor: pointer;
    margin: 0;
}
.inv-mail-file-check {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    cursor: pointer;
}
label.inv-mail-file:has(.inv-mail-file-check:not(:checked)) {
    opacity: 0.62;
    background: #fff;
}
.inv-mail-file-icon {
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: #e2e8f0;
    color: #334155;
}
.inv-mail-file-invoice .inv-mail-file-icon {
    background: #dbeafe;
    color: #1d4ed8;
}
.inv-mail-file-offer .inv-mail-file-icon {
    background: #fef3c7;
    color: #b45309;
}
.inv-mail-file-media .inv-mail-file-icon,
.inv-mail-file-image .inv-mail-file-icon {
    background: #dcfce7;
    color: #15803d;
}
.inv-mail-file-pdf .inv-mail-file-icon {
    background: #fee2e2;
    color: #b91c1c;
}
.offer-mail-plain-box {
    padding: 0.9rem 1rem;
    border: 2px solid #2563eb;
    border-radius: 0.75rem;
    background: #eff6ff;
}
.offer-mail-plain-box .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.2rem;
    border-color: #2563eb;
}
.offer-mail-plain-box .form-check-label {
    color: #1e3a8a;
}
.offer-mail-plain-box .form-check-label .small {
    color: #334155;
}
[data-bs-theme="dark"] .offer-mail-plain-box {
    background: #1e3a5f;
    border-color: #60a5fa;
}
[data-bs-theme="dark"] .offer-mail-plain-box .form-check-label {
    color: #dbeafe;
}
[data-bs-theme="dark"] .offer-mail-plain-box .form-check-label .small {
    color: #cbd5e1;
}
.inv-mail-file-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.inv-mail-file-meta strong {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
}
.inv-mail-file-meta small {
    font-size: 0.72rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
[data-bs-theme="dark"] .inv-mail-file {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.18);
}
[data-bs-theme="dark"] .inv-mail-file-meta strong { color: #e2e8f0; }
[data-bs-theme="dark"] .inv-mail-file-meta small { color: #94a3b8; }
[data-bs-theme="dark"] .inv-mail-file-icon { background: #334155; color: #cbd5e1; }

.inv-lightbox-dialog { max-width: min(1100px, 96vw); }
.inv-lightbox-content {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    overflow: hidden;
}
.inv-lightbox-body {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 3.5rem 1.25rem;
}
.inv-lightbox-img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 8px;
    object-fit: contain;
}
.inv-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    z-index: 2;
    transition: background 0.15s ease;
}
.inv-lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.inv-lightbox-prev { left: 0.75rem; }
.inv-lightbox-next { right: 0.75rem; }

[data-bs-theme="dark"] .inv-detail-title,
[data-bs-theme="dark"] .inv-stat-value { color: #f1f5f9; }
[data-bs-theme="dark"] .inv-stat-card {
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
    border-color: rgba(148, 163, 184, 0.12);
}
[data-bs-theme="dark"] .inv-stat-card-accent {
    background: linear-gradient(160deg, #134e4a 0%, #0f172a 100%);
    border-color: rgba(45, 212, 191, 0.2);
}
[data-bs-theme="dark"] .inv-lines-card,
[data-bs-theme="dark"] .inv-media-card,
[data-bs-theme="dark"] .inv-gallery-item {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.12);
}
[data-bs-theme="dark"] .inv-invoice-file,
[data-bs-theme="dark"] .inv-invoice-file-invoice,
[data-bs-theme="dark"] .inv-invoice-file-offer {
    background: linear-gradient(135deg, #422006 0%, #78350f 100%);
    border-color: rgba(251, 191, 36, 0.28);
}
[data-bs-theme="dark"] .inv-invoice-file-icon {
    background: rgba(251, 191, 36, 0.18);
    color: #fbbf24;
}
[data-bs-theme="dark"] .inv-lines-table thead th,
[data-bs-theme="dark"] .inv-lines-table tfoot th {
    background: rgba(15, 23, 42, 0.55);
    color: #94a3b8;
}
[data-bs-theme="dark"] .inv-gallery-thumb { background: #334155; }
[data-bs-theme="dark"] .inv-detail-back:hover { color: #93c5fd; }

/* Invoice edit table — ferah kolonlar + yatay kaydırma */
.inv-edit-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.inv-edit-table {
    min-width: 920px;
}
.inv-edit-table th,
.inv-edit-table td {
    padding: 0.65rem 0.55rem;
    vertical-align: middle;
}
.inv-edit-col-desc { min-width: 240px; }
.inv-edit-col-unit { min-width: 110px; }
.inv-edit-col-qty { min-width: 90px; }
.inv-edit-col-price { min-width: 120px; }
.inv-edit-col-tax { min-width: 120px; }
.inv-edit-col-wh { min-width: 130px; }
.inv-edit-col-total { min-width: 120px; }
.inv-edit-table .form-control,
.inv-edit-table .form-select {
    min-height: 34px;
}

/* Global loading modal */
.app-loading-modal {
    border-radius: 16px;
    background: #fff;
}
.app-loading-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto;
    border: 3px solid rgba(30, 58, 95, 0.15);
    border-top-color: #1e3a5f;
    border-radius: 50%;
    animation: app-loading-spin 0.75s linear infinite;
}
@keyframes app-loading-spin {
    to { transform: rotate(360deg); }
}
#appLoadingModal {
    z-index: 1100;
}
body.app-is-loading .modal-backdrop {
    z-index: 1090;
    background-color: rgba(15, 23, 42, 0.55);
}
body.app-is-loading .modal.show:not(#appLoadingModal) {
    pointer-events: none;
}
body.app-is-loading .modal.show:not(#appLoadingModal) .modal-content {
    filter: grayscale(1);
    opacity: 0.45;
    box-shadow: none;
}
[data-bs-theme="dark"] .app-loading-modal {
    background: #1e293b;
}
[data-bs-theme="dark"] .app-loading-spinner {
    border-color: rgba(148, 163, 184, 0.2);
    border-top-color: #93c5fd;
}

/* Faturalar listesi — sade modern görünüm */
.inv-list-card {
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.inv-list-table thead th {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}
.inv-list-table tbody td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    vertical-align: middle;
}
.inv-list-table tbody tr:last-child td { border-bottom: 0; }
.inv-list-table tbody tr:hover td {
    background: rgba(30, 58, 95, 0.03);
}
.inv-list-invoice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 12rem;
}
.inv-list-pdf {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    text-decoration: none;
}
.inv-list-pdf.is-active {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}
.inv-list-pdf.is-active:hover {
    background: rgba(220, 38, 38, 0.16);
    color: #b91c1c;
}
.inv-list-pdf.is-inactive {
    background: #f1f5f9;
    color: #cbd5e1;
}
.inv-list-invoice-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
    min-width: 0;
}
.inv-list-no {
    font-weight: 700;
    font-size: 0.92rem;
    color: #0f172a;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.inv-list-date {
    font-size: 0.75rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}
.inv-list-date-col {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.inv-list-party {
    display: block;
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #334155;
    font-weight: 500;
    font-size: 0.9rem;
}
.inv-list-party-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.inv-list-branch {
    display: block;
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 400;
}
.inv-list-amt {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-size: 0.875rem;
}
.inv-list-amt-muted {
    color: #64748b;
    font-weight: 500;
}
.inv-list-amt-kdv {
    color: #0369a1;
    font-weight: 650;
    background: rgba(14, 165, 233, 0.12);
    border-radius: 8px;
    padding: 0.28rem 0.5rem;
    display: inline-block;
}
.inv-list-amt-tevkifat {
    color: #b45309;
    font-weight: 650;
    background: rgba(245, 158, 11, 0.14);
    border-radius: 8px;
    padding: 0.28rem 0.5rem;
    display: inline-block;
}
.inv-list-amt-total {
    color: #0f172a;
    font-weight: 700;
    font-size: 0.95rem;
}
.inv-list-currency {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.04em;
    margin-top: 0.1rem;
}
.inv-list-open {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1e3a5f;
    background: rgba(30, 58, 95, 0.08);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.inv-list-open:hover {
    background: #1e3a5f;
    color: #fff;
}
.inv-list-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.95rem 1.15rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.inv-list-summary-count {
    font-size: 0.85rem;
    color: #64748b;
}
.inv-list-summary-count strong { color: #0f172a; }
.inv-list-summary-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.inv-list-summary-chip {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    min-width: 8rem;
}
.inv-list-summary-chip span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}
.inv-list-summary-chip strong {
    font-size: 0.95rem;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}
.inv-list-summary-chip.is-kdv {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.22);
}
.inv-list-summary-chip.is-kdv span { color: #0284c7; }
.inv-list-summary-chip.is-kdv strong { color: #0369a1; }
.inv-list-summary-chip.is-tevkifat {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.28);
}
.inv-list-summary-chip.is-tevkifat span { color: #d97706; }
.inv-list-summary-chip.is-tevkifat strong { color: #b45309; }
.inv-list-summary-chip.is-total {
    background: rgba(30, 58, 95, 0.08);
    border-color: rgba(30, 58, 95, 0.16);
}
.inv-list-summary-chip.is-total strong { color: #1e3a5f; }
@media (max-width: 991.98px) {
    .inv-list-party { max-width: 12rem; }
    .inv-list-branch { max-width: 12rem; }
}
[data-bs-theme="dark"] .inv-list-card {
    border-color: rgba(148, 163, 184, 0.12);
}
[data-bs-theme="dark"] .inv-list-table thead th {
    background: rgba(15, 23, 42, 0.55);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.1);
}
[data-bs-theme="dark"] .inv-list-table tbody td {
    border-color: rgba(148, 163, 184, 0.08);
}
[data-bs-theme="dark"] .inv-list-table tbody tr:hover td {
    background: rgba(148, 163, 184, 0.06);
}
[data-bs-theme="dark"] .inv-list-no,
[data-bs-theme="dark"] .inv-list-amt-total,
[data-bs-theme="dark"] .inv-list-summary-count strong,
[data-bs-theme="dark"] .inv-list-summary-chip strong {
    color: #f1f5f9;
}
[data-bs-theme="dark"] .inv-list-party,
[data-bs-theme="dark"] .inv-list-amt-muted {
    color: #cbd5e1;
}
[data-bs-theme="dark"] .inv-list-branch {
    color: #94a3b8;
}
[data-bs-theme="dark"] .inv-list-date-col {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .inv-list-amt-kdv {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.16);
}
[data-bs-theme="dark"] .inv-list-amt-tevkifat {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.18);
}
[data-bs-theme="dark"] .inv-list-summary-chip.is-kdv {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.22);
}
[data-bs-theme="dark"] .inv-list-summary-chip.is-kdv span,
[data-bs-theme="dark"] .inv-list-summary-chip.is-kdv strong { color: #7dd3fc; }
[data-bs-theme="dark"] .inv-list-summary-chip.is-tevkifat {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.24);
}
[data-bs-theme="dark"] .inv-list-summary-chip.is-tevkifat span,
[data-bs-theme="dark"] .inv-list-summary-chip.is-tevkifat strong { color: #fbbf24; }
[data-bs-theme="dark"] .inv-list-summary-chip.is-total {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.22);
}
[data-bs-theme="dark"] .inv-list-summary-chip.is-total strong { color: #93c5fd; }
[data-bs-theme="dark"] .inv-list-pdf.is-inactive {
    background: #334155;
    color: #64748b;
}
[data-bs-theme="dark"] .inv-list-open {
    background: rgba(96, 165, 250, 0.12);
    color: #93c5fd;
}
[data-bs-theme="dark"] .inv-list-open:hover {
    background: #3b82f6;
    color: #fff;
}
[data-bs-theme="dark"] .inv-list-summary {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: rgba(148, 163, 184, 0.1);
}
[data-bs-theme="dark"] .inv-list-summary-chip {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.12);
}

/* Mail şablonu editörü */
.mail-template-editor {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    background: var(--bs-body-bg);
}
.mail-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
}
.mail-editor-panes {
    position: relative;
    min-height: 280px;
}
.mail-editor-pane {
    display: none;
}
.mail-editor-pane.is-active {
    display: block;
}
.mail-editor-preview {
    background: #f3f4f6;
    min-height: 320px;
}
.mail-editor-iframe {
    display: block;
    width: 100%;
    min-height: 420px;
    height: 520px;
    border: 0;
    background: #fff;
}
.mail-editor-code .mail-editor-textarea {
    border: 0;
    border-radius: 0;
    resize: vertical;
    min-height: 420px;
    font-size: 0.8125rem;
    line-height: 1.45;
    tab-size: 2;
}
.mail-editor-code .mail-editor-textarea:focus {
    box-shadow: none;
}
[data-bs-theme="dark"] .mail-editor-preview {
    background: #0f172a;
}
[data-bs-theme="dark"] .mail-editor-iframe {
    background: #fff;
}

.simple-mail-editor {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    background: #fff;
}
.simple-mail-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
}
.simple-mail-toolbar-sep {
    width: 1px;
    height: 1.15rem;
    background: var(--bs-border-color);
    margin: 0 0.2rem;
}
.simple-mail-surface {
    padding: 0.75rem 0.85rem;
    min-height: 160px;
    background: #fff;
    color: #222;
    font-size: 14px;
    line-height: 1.55;
    outline: none;
}
.simple-mail-surface:focus {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.25);
}
.simple-mail-surface ul,
.simple-mail-surface ol {
    margin: 0.35rem 0 0.35rem 1.25rem;
    padding: 0;
}
[data-bs-theme="dark"] .simple-mail-editor {
    background: #fff;
    border-color: rgba(148, 163, 184, 0.28);
}
[data-bs-theme="dark"] .simple-mail-surface {
    background: #fff;
    color: #222;
}



/* ===== Süreç Takibi ===== */
.track-page { width: 100%; max-width: none; }
.track-stat {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    height: 100%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.track-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.2rem;
}
.track-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.track-stat-request { border-top: 3px solid #0ea5e9; }
.track-stat-surveyed { border-top: 3px solid #14b8a6; }
.track-stat-offer { border-top: 3px solid #f59e0b; }
.track-stat-pending { border-top: 3px solid #ea580c; }
.track-stat-approved { border-top: 3px solid #10b981; }
.track-stat-invoice { border-top: 3px solid #1e3a5f; }

.track-table-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.track-table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}
.track-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    white-space: nowrap;
    padding: 0.85rem 1rem;
}
.track-table tbody td {
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    vertical-align: middle;
}
.track-table tbody tr:last-child td { border-bottom: 0; }
.track-table tbody tr:hover { background: rgba(248, 250, 252, 0.9); }

.track-status-td {
    padding: 0.55rem 0.65rem !important;
    width: 140px;
}
.track-status-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    text-align: center;
    line-height: 1.2;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}
.track-status-chip-request { background: #579bfc; }
.track-status-chip-surveyed { background: #14b8a6; }
.track-status-chip-offer { background: #fdab3d; }
.track-status-chip-pending { background: #ea580c; }
.track-status-chip-approved { background: #00c875; }
.track-status-chip-invoiced { background: #1e3a5f; }

.track-process-code {
    color: #1e3a5f;
    font-weight: 700;
    font-size: 0.86rem;
    text-decoration: none;
}
.track-process-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.track-action-th,
.track-action-td {
    padding-left: 0.35rem !important;
    padding-right: 0.65rem !important;
}
.track-eye-btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 0.55rem;
    border: 1px solid rgba(30, 58, 95, 0.18);
    background: #f8fafc;
    color: #1e3a5f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.track-eye-btn:hover {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
}
.track-process-title {
    font-size: 0.92rem;
    font-weight: 650;
    color: #0f172a;
    margin-top: 0.15rem;
    line-height: 1.3;
}
.track-process-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    color: #64748b;
    margin-top: 0.25rem;
}
.track-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cbd5e1;
    display: inline-block;
}
.track-progress {
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.track-progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #1e3a5f, #0ea5e9);
    border-radius: inherit;
}

.track-step-mini {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    min-width: 0;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.65rem;
    padding: 0.5rem 0.6rem;
    border-left-width: 3px;
}
.track-step-mini-request { border-left-color: #579bfc; }
.track-step-mini-surveyed { border-left-color: #14b8a6; }
.track-step-mini-offer { border-left-color: #fdab3d; }
.track-step-mini-pending { border-left-color: #ea580c; }
.track-step-mini-approved { border-left-color: #00c875; }
.track-step-mini-invoice { border-left-color: #1e3a5f; }
.track-step-mini.is-done {
    background: #f0fdf4;
    border-color: rgba(16, 185, 129, 0.28);
}
.track-step-mini.is-active {
    background: #eff6ff;
    border-color: rgba(14, 165, 233, 0.35);
    box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.12);
}
.track-step-mini.is-pending {
    align-items: center;
    color: #94a3b8;
    font-size: 0.78rem;
    background: #f8fafc;
    border-style: dashed;
    border-color: rgba(148, 163, 184, 0.35);
}
.track-step-mini-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
}
.track-step-mini-check {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #10b981;
    color: #fff;
    font-size: 0.7rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.25);
}
.track-step-mini.is-active .track-step-mini-check {
    background: #0ea5e9;
    box-shadow: 0 1px 2px rgba(14, 165, 233, 0.3);
}
.track-step-mini-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.track-step-mini-code {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e3a5f;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-step-mini-user {
    font-size: 0.7rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 9.5rem;
}
.track-step-mini-user i { margin-right: 0.15rem; }

.track-amount { color: #0f172a; font-size: 0.9rem; white-space: nowrap; }

.track-summary-modal {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
}
.track-summary-kicker {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 0.15rem;
}
.track-summary-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    background: #f8fafc;
}
.track-summary-amount {
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}
.track-summary-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.track-summary-log-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.85rem;
    padding: 0.9rem 1rem;
    background: #f8fafc;
}
.track-summary-log-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
    color: #334155;
}
.track-summary-log-item + .track-summary-log-item {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.45);
}
.track-summary-step {
    display: flex;
    gap: 0.7rem;
    padding: 0.85rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #fff;
}
.track-summary-step.is-done {
    background: #f0fdf4;
    border-color: rgba(16, 185, 129, 0.28);
}
.track-summary-step.is-active {
    background: #eff6ff;
    border-color: rgba(14, 165, 233, 0.35);
}
.track-summary-step.is-pending { opacity: 0.72; }
.track-summary-step-marker {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #64748b;
    flex-shrink: 0;
}
.track-summary-step.is-done .track-summary-step-marker {
    background: #10b981;
    color: #fff;
}
.track-summary-step.is-active .track-summary-step-marker {
    background: #0ea5e9;
    color: #fff;
}
.track-summary-step-marker span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.track-summary-step-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.track-summary-step-head strong {
    font-size: 0.9rem;
    color: #0f172a;
}
.track-summary-step-head span {
    font-size: 0.72rem;
    color: #64748b;
}
.track-summary-step-meta {
    font-size: 0.78rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.2rem;
}
.track-summary-step-code {
    margin-top: 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
}
.track-summary-step-code a {
    color: #1e3a5f;
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .track-summary-top { grid-template-columns: 1fr; }
    .track-summary-steps { grid-template-columns: 1fr; }
}

.track-user-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.track-user-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
.track-user-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.track-user-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e3a5f;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.track-user-name {
    font-size: 0.9rem;
    color: #0f172a;
}
.track-user-bar {
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.track-user-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #1e3a5f, #38bdf8);
}
.track-metric {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}
.track-metric-request { background: rgba(14, 165, 233, 0.12); color: #0369a1; }
.track-metric-offer { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.track-metric-invoice { background: rgba(30, 58, 95, 0.12); color: #1e3a5f; }

[data-bs-theme="dark"] .track-stat,
[data-bs-theme="dark"] .track-table-card,
[data-bs-theme="dark"] .track-user-card {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.14);
}
[data-bs-theme="dark"] .track-stat-value,
[data-bs-theme="dark"] .track-process-title,
[data-bs-theme="dark"] .track-user-name,
[data-bs-theme="dark"] .track-amount,
[data-bs-theme="dark"] .track-step-mini-code,
[data-bs-theme="dark"] .track-summary-step-head strong,
[data-bs-theme="dark"] .track-summary-amount {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .track-table thead th,
[data-bs-theme="dark"] .track-user-table thead th {
    background: #0f172a;
    color: #94a3b8;
}
[data-bs-theme="dark"] .track-eye-btn {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
}
[data-bs-theme="dark"] .track-eye-btn:hover {
    background: #38bdf8;
    border-color: #38bdf8;
    color: #0f172a;
}
[data-bs-theme="dark"] .track-step-mini {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.16);
}
[data-bs-theme="dark"] .track-step-mini.is-done { background: rgba(16, 185, 129, 0.12); }
[data-bs-theme="dark"] .track-step-mini.is-active { background: rgba(14, 165, 233, 0.12); }
[data-bs-theme="dark"] .track-step-mini.is-pending {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(148, 163, 184, 0.22);
}
[data-bs-theme="dark"] .track-summary-top {
    background: #0f172a;
}
[data-bs-theme="dark"] .track-summary-step {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.16);
}
[data-bs-theme="dark"] .track-summary-step.is-done { background: rgba(16, 185, 129, 0.12); }
[data-bs-theme="dark"] .track-summary-step.is-active { background: rgba(14, 165, 233, 0.12); }
[data-bs-theme="dark"] .track-progress,
[data-bs-theme="dark"] .track-user-bar { background: #334155; }
[data-bs-theme="dark"] .track-status-chip-request { background: #3b82f6; }
[data-bs-theme="dark"] .track-status-chip-surveyed { background: #0d9488; }
[data-bs-theme="dark"] .track-status-chip-offer { background: #f59e0b; }
[data-bs-theme="dark"] .track-status-chip-pending { background: #c2410c; }
[data-bs-theme="dark"] .track-status-chip-approved { background: #10b981; }
[data-bs-theme="dark"] .track-status-chip-invoiced { background: #334155; }
[data-bs-theme="dark"] .track-summary-log-card {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(148, 163, 184, 0.22);
}
[data-bs-theme="dark"] .track-table tbody tr:hover { background: rgba(15, 23, 42, 0.45); }

/* ——— Raporlar (kompakt / modern) ——— */
.reports-page {
    font-size: 0.8125rem;
    color: #334155;
}

.reports-page .rp-title {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin: 0;
}

.reports-page .rp-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0.15rem 0 0;
}

.reports-page .rp-back {
    font-size: 0.7rem;
    color: #94a3b8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.2rem;
}

.reports-page .rp-back:hover { color: var(--bs-primary); }

.reports-page .rp-btn {
    font-size: 0.72rem;
    padding: 0.28rem 0.7rem;
    border-radius: 0.45rem;
    font-weight: 600;
}

.report-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.85rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    overflow: hidden;
}

.report-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.report-card .card-body { padding: 0.9rem 1rem; }

.report-card-icon {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.6rem;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.08));
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.report-card-title {
    font-size: 0.82rem;
    font-weight: 650;
    color: #0f172a;
    margin: 0 0 0.2rem;
}

.report-card-desc {
    font-size: 0.7rem;
    line-height: 1.35;
    color: #94a3b8;
    margin: 0;
}

.report-card-cta {
    font-size: 0.68rem;
    font-weight: 600;
    color: #2563eb;
    padding: 0 1rem 0.75rem;
}

.reports-page .rp-filter {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.85rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.03);
    background: #fff;
}

.reports-page .rp-filter .card-body { padding: 0.75rem 0.9rem; }

.reports-page .rp-filter .form-label {
    font-size: 0.68rem;
    font-weight: 650;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.reports-page .rp-filter .form-control,
.reports-page .rp-filter .form-select,
.reports-page .rp-filter .ts-control {
    font-size: 0.78rem;
    min-height: 2rem;
    padding-top: 0.28rem;
    padding-bottom: 0.28rem;
}

.reports-page .rp-stat {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #fff, #f8fafc);
    box-shadow: none;
}

.reports-page .rp-stat .card-body { padding: 0.7rem 0.85rem; }

.reports-page .rp-stat-label {
    font-size: 0.65rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 0.2rem;
}

.reports-page .rp-stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.2;
}

.reports-page .rp-table-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.85rem;
    overflow: hidden;
}

.reports-page .rp-table-card .table {
    font-size: 0.75rem;
    margin-bottom: 0;
}

.reports-page .rp-table-card .table thead th {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    background: #f8fafc;
    border-bottom-width: 1px;
    padding: 0.55rem 0.7rem;
    white-space: nowrap;
}

.reports-page .rp-table-card .table tbody td {
    padding: 0.45rem 0.7rem;
    color: #475569;
    vertical-align: middle;
}

.reports-page .rp-chart-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.85rem;
}

.reports-page .rp-chart-card .card-body { padding: 0.85rem 1rem; }

.reports-page .rp-chart-title {
    font-size: 0.8rem;
    font-weight: 650;
    color: #0f172a;
    margin: 0;
}

.reports-page .rp-chart-sub {
    font-size: 0.68rem;
    color: #94a3b8;
    margin: 0.15rem 0 0;
}

[data-bs-theme="dark"] .reports-page { color: #cbd5e1; }
[data-bs-theme="dark"] .reports-page .rp-title,
[data-bs-theme="dark"] .report-card-title,
[data-bs-theme="dark"] .reports-page .rp-chart-title,
[data-bs-theme="dark"] .reports-page .rp-stat-value { color: #f1f5f9; }
[data-bs-theme="dark"] .report-card,
[data-bs-theme="dark"] .reports-page .rp-filter,
[data-bs-theme="dark"] .reports-page .rp-stat,
[data-bs-theme="dark"] .reports-page .rp-table-card,
[data-bs-theme="dark"] .reports-page .rp-chart-card {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.2);
}
[data-bs-theme="dark"] .reports-page .rp-table-card .table thead th {
    background: rgba(15, 23, 42, 0.7);
    color: #94a3b8;
}
[data-bs-theme="dark"] .reports-page .rp-stat {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.7));
}

/* Finansal Analiz */
.fa-page .fa-manual-hint {
    font-size: 0.72rem;
    color: #64748b;
    background: rgba(13, 110, 253, 0.06);
    border: 1px solid rgba(13, 110, 253, 0.12);
    border-radius: 0.4rem;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.15rem;
}
.fa-mini-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0.8rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.9);
}
.fa-mini-stat span {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    font-weight: 600;
}
.fa-mini-stat strong {
    font-size: 0.92rem;
    color: #0f172a;
}
.fa-section-head { margin-bottom: 0.65rem; }
.fa-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}
.fa-section-intro {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0.2rem 0 0;
}
.fa-ratio-card {
    height: 100%;
    border-radius: 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    padding: 0.85rem 0.95rem;
    border-left: 3px solid #94a3b8;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.fa-ratio-card.fa-status-good { border-left-color: #198754; }
.fa-ratio-card.fa-status-warn { border-left-color: #fd7e14; }
.fa-ratio-card.fa-status-bad { border-left-color: #dc3545; }
.fa-ratio-card.fa-status-na { border-left-color: #94a3b8; }
.fa-ratio-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.fa-ratio-name {
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
    line-height: 1.3;
}
.fa-ratio-badge {
    flex: 0 0 auto;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}
.fa-status-good .fa-ratio-badge { background: rgba(25, 135, 84, 0.12); color: #146c43; }
.fa-status-warn .fa-ratio-badge { background: rgba(253, 126, 20, 0.14); color: #b45309; }
.fa-status-bad .fa-ratio-badge { background: rgba(220, 53, 69, 0.12); color: #b02a37; }
.fa-ratio-value {
    font-size: 1.45rem;
    font-weight: 760;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin-bottom: 0.35rem;
}
.fa-ratio-formula code {
    font-size: 0.68rem;
    color: #475569;
    background: #f8fafc;
    border-radius: 0.3rem;
    padding: 0.15rem 0.35rem;
}
.fa-ratio-explain {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.45rem 0 0;
    line-height: 1.45;
}
.fa-ratio-components {
    list-style: none;
    margin: 0.65rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.3rem;
}
.fa-ratio-components li {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.74rem;
    padding: 0.3rem 0.4rem;
    border-radius: 0.35rem;
    background: #f8fafc;
}
.fa-ratio-components span { color: #64748b; }
.fa-ratio-components strong { color: #0f172a; }
.fa-altman-meter { margin-top: 0.75rem; }
.fa-altman-track {
    position: relative;
    height: 1.6rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #dc3545 0%, #dc3545 36%, #fd7e14 36%, #fd7e14 60%, #198754 60%, #198754 100%);
    overflow: hidden;
}
.fa-altman-zones {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    font-size: 0.62rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.fa-altman-zones span { flex: 1; text-align: center; }
.fa-altman-marker {
    position: absolute;
    top: 0.15rem;
    bottom: 0.15rem;
    width: 0.35rem;
    margin-left: -0.175rem;
    border-radius: 999px;
    background: #0f172a;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.fa-altman-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.62rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}
.fa-stat-hint {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    line-height: 1.35;
}
.fa-mini-stat em {
    font-style: normal;
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.3;
}
.fa-mini-stat small {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
}
.fa-ratio-abbrev {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
}
.fa-ratio-components li span small {
    display: block;
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 0.1rem;
}
.fa-compare-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.65rem;
    overflow: hidden;
}
.fa-compare-table {
    font-size: 0.78rem;
    margin: 0;
}
.fa-compare-table thead th {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    background: #f8fafc;
    border-bottom-width: 1px;
    white-space: nowrap;
}
.fa-compare-section {
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}
.fa-compare-name { font-weight: 700; color: #0f172a; }
.fa-compare-abbrev {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 0.1rem;
}
.fa-compare-formula {
    margin-top: 0.25rem;
}
.fa-compare-formula code {
    font-size: 0.65rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
}
.fa-compare-bench {
    color: #475569;
    max-width: 14rem;
}
.fa-compare-explain {
    color: #64748b;
    max-width: 18rem;
    line-height: 1.4;
}
.fa-compare-table .fa-ratio-badge {
    display: inline-block;
}
.fa-compare-table .fa-status-good.fa-ratio-badge { background: rgba(25, 135, 84, 0.12); color: #146c43; }
.fa-compare-table .fa-status-warn.fa-ratio-badge { background: rgba(253, 126, 20, 0.14); color: #b45309; }
.fa-compare-table .fa-status-bad.fa-ratio-badge { background: rgba(220, 53, 69, 0.12); color: #b02a37; }
.fa-compare-table .fa-status-na.fa-ratio-badge { background: #f1f5f9; color: #64748b; }
.fa-glossary-item {
    height: 100%;
    padding: 0.75rem 0.85rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
}
.fa-glossary-abbr {
    font-size: 0.85rem;
    font-weight: 760;
    color: #0f172a;
}
.fa-glossary-full {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.15rem;
}
.fa-glossary-mean {
    font-size: 0.76rem;
    color: #334155;
    margin-top: 0.35rem;
    line-height: 1.4;
}
/* Finansal SWOT */
.fa-swot-chip {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
}
.fa-swot-disclaimer {
    font-size: 0.74rem;
    color: #64748b;
    background: rgba(253, 126, 20, 0.08);
    border: 1px solid rgba(253, 126, 20, 0.18);
    border-radius: 0.5rem;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.85rem;
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    line-height: 1.45;
}
.fa-swot-disclaimer .bi { color: #fd7e14; margin-top: 0.1rem; }
.fa-swot-hero {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 0.85rem;
}
@media (max-width: 767px) {
    .fa-swot-hero { grid-template-columns: 1fr; }
}
.fa-swot-score {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    animation: faSwotIn 0.45s ease both;
}
.fa-swot-ring {
    --fa-score: 50;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    flex: 0 0 auto;
    background: conic-gradient(
        #198754 calc(var(--fa-score) * 1%),
        rgba(148, 163, 184, 0.25) 0
    );
    display: grid;
    place-items: center;
    position: relative;
}
.fa-swot-score.fa-status-warn .fa-swot-ring {
    background: conic-gradient(#fd7e14 calc(var(--fa-score) * 1%), rgba(148, 163, 184, 0.25) 0);
}
.fa-swot-score.fa-status-bad .fa-swot-ring {
    background: conic-gradient(#dc3545 calc(var(--fa-score) * 1%), rgba(148, 163, 184, 0.25) 0);
}
.fa-swot-ring-inner {
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}
.fa-swot-ring-inner strong {
    font-size: 1.35rem;
    font-weight: 780;
    color: #0f172a;
}
.fa-swot-ring-inner span {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 600;
}
.fa-swot-score-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
}
.fa-swot-score-status {
    font-size: 1.05rem;
    font-weight: 760;
    color: #0f172a;
    margin: 0.15rem 0 0.35rem;
}
.fa-swot-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.fa-swot-counts span {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
}
.fa-swot-counts .c-s { background: rgba(25, 135, 84, 0.12); color: #146c43; }
.fa-swot-counts .c-w { background: rgba(253, 126, 20, 0.14); color: #b45309; }
.fa-swot-counts .c-o { background: rgba(13, 110, 253, 0.12); color: #0a58ca; }
.fa-swot-counts .c-t { background: rgba(220, 53, 69, 0.12); color: #b02a37; }
.fa-swot-summary {
    padding: 0.95rem 1.1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.03), rgba(13, 110, 253, 0.05));
    animation: faSwotIn 0.55s ease both;
}
.fa-swot-summary-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.35rem;
}
.fa-swot-summary p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #0f172a;
}
.fa-swot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 991px) {
    .fa-swot-grid { grid-template-columns: 1fr; }
}
.fa-swot-quad {
    border-radius: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    padding: 0.85rem 0.95rem;
    min-height: 12rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    animation: faSwotIn 0.5s ease both;
}
.fa-swot-quad:nth-child(2) { animation-delay: 0.05s; }
.fa-swot-quad:nth-child(3) { animation-delay: 0.1s; }
.fa-swot-quad:nth-child(4) { animation-delay: 0.15s; }
.fa-swot-quad:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.fa-swot-s { border-top: 3px solid #198754; }
.fa-swot-w { border-top: 3px solid #fd7e14; }
.fa-swot-o { border-top: 3px solid #0d6efd; }
.fa-swot-t { border-top: 3px solid #dc3545; }
.fa-swot-quad-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.65rem;
}
.fa-swot-quad-head h3 {
    font-size: 0.88rem;
    font-weight: 750;
    margin: 0;
    color: #0f172a;
}
.fa-swot-quad-head small {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 600;
}
.fa-swot-quad-head > .bi {
    margin-left: auto;
    font-size: 1.15rem;
    opacity: 0.55;
}
.fa-swot-s .fa-swot-quad-head > .bi { color: #198754; }
.fa-swot-w .fa-swot-quad-head > .bi { color: #fd7e14; }
.fa-swot-o .fa-swot-quad-head > .bi { color: #0d6efd; }
.fa-swot-t .fa-swot-quad-head > .bi { color: #dc3545; }
.fa-swot-letter {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.45rem;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
}
.fa-swot-s .fa-swot-letter { background: #198754; }
.fa-swot-w .fa-swot-letter { background: #fd7e14; }
.fa-swot-o .fa-swot-letter { background: #0d6efd; }
.fa-swot-t .fa-swot-letter { background: #dc3545; }
.fa-swot-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}
.fa-swot-list li {
    padding: 0.55rem 0.6rem;
    border-radius: 0.45rem;
    background: #f8fafc;
}
.fa-swot-item-top {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    align-items: flex-start;
}
.fa-swot-item-top strong {
    font-size: 0.8rem;
    color: #0f172a;
    line-height: 1.3;
}
.fa-swot-tag {
    flex: 0 0 auto;
    font-size: 0.62rem;
    font-weight: 700;
    color: #64748b;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    padding: 0.1rem 0.4rem;
}
.fa-swot-list p {
    margin: 0.3rem 0 0.35rem;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.4;
}
.fa-swot-impact {
    display: flex;
    gap: 0.15rem;
    font-size: 0.55rem;
    color: #94a3b8;
}
.fa-swot-s .fa-swot-impact .bi-circle-fill { color: #198754; }
.fa-swot-w .fa-swot-impact .bi-circle-fill { color: #fd7e14; }
.fa-swot-o .fa-swot-impact .bi-circle-fill { color: #0d6efd; }
.fa-swot-t .fa-swot-impact .bi-circle-fill { color: #dc3545; }
.fa-swot-empty {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0.5rem 0 0;
    line-height: 1.45;
}
.fa-swot-actions-head h3 {
    font-size: 0.95rem;
    font-weight: 750;
    margin: 0;
    color: #0f172a;
}
.fa-swot-actions-head p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.15rem 0 0.65rem;
}
.fa-swot-action-card {
    display: flex;
    gap: 0.65rem;
    height: 100%;
    padding: 0.75rem 0.85rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    transition: border-color 0.15s ease, transform 0.15s ease;
    animation: faSwotIn 0.55s ease both;
}
.fa-swot-action-card:hover {
    border-color: rgba(13, 110, 253, 0.35);
    transform: translateY(-1px);
}
.fa-swot-action-num {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 0.4rem;
    background: #0f172a;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 750;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}
.fa-swot-action-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}
.fa-swot-action-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0.25rem 0 0.3rem;
}
.fa-swot-action-meta span {
    font-size: 0.62rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.1rem 0.4rem;
}
.fa-swot-action-card p {
    margin: 0;
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.4;
}
@keyframes faSwotIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
[data-bs-theme="dark"] .fa-swot-score,
[data-bs-theme="dark"] .fa-swot-summary,
[data-bs-theme="dark"] .fa-swot-quad,
[data-bs-theme="dark"] .fa-swot-action-card,
[data-bs-theme="dark"] .fa-swot-ring-inner {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.2);
}
[data-bs-theme="dark"] .fa-swot-list li { background: rgba(30, 41, 59, 0.65); }
[data-bs-theme="dark"] .fa-swot-score-status,
[data-bs-theme="dark"] .fa-swot-summary p,
[data-bs-theme="dark"] .fa-swot-quad-head h3,
[data-bs-theme="dark"] .fa-swot-item-top strong,
[data-bs-theme="dark"] .fa-swot-action-title,
[data-bs-theme="dark"] .fa-swot-actions-head h3,
[data-bs-theme="dark"] .fa-swot-ring-inner strong {
    color: #f1f5f9;
}
[data-bs-theme="dark"] .fa-swot-chip {
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
}

.fa-notes {
    border: 1px dashed rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 252, 0.8);
}
.fa-notes-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 0.45rem;
}
.fa-notes ul {
    padding-left: 1.1rem;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
}
[data-bs-theme="dark"] .fa-mini-stat,
[data-bs-theme="dark"] .fa-ratio-card,
[data-bs-theme="dark"] .fa-notes,
[data-bs-theme="dark"] .fa-glossary-item,
[data-bs-theme="dark"] .fa-compare-card {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.2);
}
[data-bs-theme="dark"] .fa-section-title,
[data-bs-theme="dark"] .fa-ratio-name,
[data-bs-theme="dark"] .fa-ratio-value,
[data-bs-theme="dark"] .fa-mini-stat strong,
[data-bs-theme="dark"] .fa-ratio-components strong,
[data-bs-theme="dark"] .fa-compare-name,
[data-bs-theme="dark"] .fa-glossary-abbr,
[data-bs-theme="dark"] .fa-glossary-mean {
    color: #f1f5f9;
}
[data-bs-theme="dark"] .fa-compare-table thead th {
    background: rgba(15, 23, 42, 0.7);
    color: #94a3b8;
}
[data-bs-theme="dark"] .fa-ratio-formula code,
[data-bs-theme="dark"] .fa-ratio-components li {
    background: rgba(30, 41, 59, 0.7);
    color: #cbd5e1;
}
[data-bs-theme="dark"] .fa-page .fa-manual-hint {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #94a3b8;
}

/* === Kartima AI Chatbot (kb-chat) === */
.kb-chat {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1080;
    font-family: inherit;
}
.kb-chat-fab {
    position: relative;
    width: 3.85rem;
    height: 3.85rem;
    border-radius: 50%;
    border: none;
    background: var(--kb-chat-fab, #0d6efd);
    color: #fff;
    box-shadow: 0 10px 28px color-mix(in srgb, var(--kb-chat-fab, #0d6efd) 45%, transparent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.kb-chat-fab:hover,
.kb-chat-fab.is-open {
    transform: scale(1.06);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--kb-chat-fab, #0d6efd) 55%, transparent);
}
.kb-chat-fab-icon {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    display: block;
}
.kb-chat-avatar-icon {
    width: 2.15rem;
    height: 2.15rem;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.kb-chat-fab-svg,
.kb-chat-avatar-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    line-height: 0;
    width: 100%;
    height: 100%;
}
.kb-chat-fab-svg svg {
    width: 2.5rem;
    height: 2.5rem;
}
.kb-chat-avatar-svg svg {
    width: 2.15rem;
    height: 2.15rem;
    display: block;
    margin: 0 auto;
}
.kb-chat-fab-pulse {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--kb-chat-fab, #0d6efd) 50%, transparent);
    animation: kb-chat-pulse 1.6s ease-out infinite;
    pointer-events: none;
}
@keyframes kb-chat-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.35); opacity: 0; }
}
.kb-chat-nudge {
    position: absolute;
    right: 0;
    bottom: calc(3.85rem + 0.85rem);
    width: min(19.5rem, calc(100vw - 2rem));
    padding: 0.9rem 1rem 0.85rem;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 1rem;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.18);
    animation: kb-chat-nudge-in 0.35s ease;
}
@keyframes kb-chat-nudge-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.kb-chat-nudge-close {
    position: absolute;
    top: 0.35rem;
    right: 0.45rem;
    border: none;
    background: transparent;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--bs-secondary-color, #6c757d);
    cursor: pointer;
}
.kb-chat-nudge-text {
    margin: 0 1rem 0.75rem 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--bs-body-color, #212529);
}
.kb-chat-nudge-actions {
    display: flex;
    gap: 0.45rem;
}
.kb-chat-chip {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
.kb-chat-chip-yes {
    background: var(--kb-chat-fab, var(--bs-primary, #0d6efd));
    color: #fff;
}
.kb-chat-chip-no {
    background: transparent;
    border-color: var(--bs-border-color, #dee2e6);
    color: var(--bs-body-color, #212529);
}
.kb-chat-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1075;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    animation: kb-chat-fade-in 0.2s ease;
}
@keyframes kb-chat-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
.kb-chat-panel {
    position: absolute;
    right: 0;
    bottom: calc(3.85rem + 0.75rem);
    width: min(26rem, calc(100vw - 1.5rem));
    height: min(34rem, calc(100vh - 5.5rem));
    background: var(--bs-body-bg, #fff);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.15rem;
    box-shadow: 0 20px 56px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.22s ease, height 0.22s ease, transform 0.22s ease, border-radius 0.22s ease;
}
.kb-chat.kb-chat-expanded {
    z-index: 1085;
}
.kb-chat.kb-chat-expanded .kb-chat-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: min(52rem, calc(100vw - 2rem));
    height: min(42rem, calc(100vh - 2.5rem));
    border-radius: 1.25rem;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
    z-index: 1086;
}
.kb-chat.kb-chat-expanded .kb-chat-fab,
.kb-chat.kb-chat-expanded .kb-chat-nudge {
    visibility: hidden;
    pointer-events: none;
}
.kb-chat.kb-chat-expanded .kb-chat-body {
    padding: 1.15rem 1.25rem;
}
.kb-chat.kb-chat-expanded .kb-chat-bubble.kb-chat-rich {
    max-width: 100%;
}
.kb-chat.kb-chat-expanded .kb-chat-chart-inner {
    height: 220px;
}
body.kb-chat-modal-open {
    overflow: hidden;
}
.kb-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(13, 110, 253, 0.02));
}
.kb-chat-head-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.kb-chat-avatar {
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 0.95rem;
    background: var(--kb-chat-fab, #0d6efd);
    color: #fff;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 0;
    line-height: 0;
    text-align: center;
}
.kb-chat-head strong {
    display: block;
    font-size: 0.95rem;
}
.kb-chat-head span {
    display: block;
    font-size: 0.72rem;
    color: var(--bs-secondary-color, #6c757d);
}
.kb-chat-head-actions {
    display: flex;
    gap: 0.25rem;
}
.kb-chat-icon-btn {
    border: none;
    background: transparent;
    color: var(--bs-secondary-color, #6c757d);
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.kb-chat-icon-btn:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--bs-body-color, #212529);
}
.kb-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.95rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background:
        radial-gradient(circle at top right, rgba(13, 110, 253, 0.07), transparent 45%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.9), var(--bs-body-bg, #fff));
}
.kb-chat-bubble {
    max-width: 92%;
    width: fit-content;
    padding: 0.65rem 0.85rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: start;
    word-break: break-word;
}
.kb-chat-bubble:not(.kb-chat-rich) {
    white-space: pre-wrap;
}
.kb-chat-rich {
    max-width: 100%;
    white-space: normal;
}
.kb-chat-bot {
    align-self: flex-start;
    margin-right: auto;
    background: #fff;
    color: var(--bs-body-color, #212529);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-bottom-left-radius: 0.3rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.kb-chat-user {
    align-self: flex-end;
    margin-left: auto;
    background: linear-gradient(145deg, #0d6efd, #0a58ca);
    color: #fff;
    border-bottom-right-radius: 0.3rem;
}
.kb-chat-lead {
    margin: 0;
    font-weight: 600;
}
.kb-chat-muted {
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6c757d);
}
.kb-chat-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0.55rem 0 0.35rem;
}
.kb-chat-kpi {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}
.kb-chat-kpi-card {
    background: rgba(13, 110, 253, 0.06);
    border-radius: 0.65rem;
    padding: 0.45rem 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.kb-chat-kpi-label {
    font-size: 0.68rem;
    color: var(--bs-secondary-color, #6c757d);
}
.kb-chat-kpi-value {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
}
.kb-chat-table-wrap {
    overflow-x: auto;
    margin-top: 0.25rem;
    border-radius: 0.55rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
}
.kb-chat-table {
    width: 100%;
    margin: 0;
    font-size: 0.75rem;
    border-collapse: collapse;
}
.kb-chat-table th,
.kb-chat-table td {
    padding: 0.42rem 0.55rem;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    text-align: left;
    white-space: nowrap;
}
.kb-chat-table th {
    background: rgba(15, 23, 42, 0.04);
    font-weight: 600;
}
.kb-chat-table td:last-child,
.kb-chat-table th:last-child {
    text-align: right;
}
.kb-chat-table tr:last-child td {
    border-bottom: none;
}
.kb-chat-table tbody tr:hover td {
    background: rgba(13, 110, 253, 0.04);
}
.kb-chat-amt {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.kb-chat-table-foot {
    margin-top: 0.45rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
    background: rgba(13, 110, 253, 0.08);
    font-size: 0.8rem;
    text-align: right;
}
.kb-chat-insight {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--bs-secondary-color, #495057);
}
.kb-chat-delta-up {
    color: #dc3545 !important;
}
.kb-chat-delta-down {
    color: #198754 !important;
}
.kb-chat-delta-flat {
    color: var(--bs-secondary-color, #6c757d);
}
.kb-chat-table-foot.kb-chat-delta-up {
    background: rgba(220, 53, 69, 0.08);
}
.kb-chat-table-foot.kb-chat-delta-down {
    background: rgba(25, 135, 84, 0.1);
}
.kb-chat-chart {
    margin-top: 0.55rem;
}
.kb-chat-chart-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.kb-chat-chart-inner {
    height: 170px;
    position: relative;
}
.kb-chat-thinking {
    opacity: 0.7;
    font-style: italic;
}
.kb-chat-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 0.85rem;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    background: var(--bs-body-bg, #fff);
}
.kb-chat-form .form-control {
    flex: 1;
    border-radius: 999px;
    padding-left: 0.9rem;
}
.kb-chat-form .btn {
    border-radius: 999px;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
[data-bs-theme="dark"] .kb-chat-bot {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-bs-theme="dark"] .kb-chat-kpi-card {
    background: rgba(59, 130, 246, 0.12);
}
[data-bs-theme="dark"] .kb-chat-nudge,
[data-bs-theme="dark"] .kb-chat-panel {
    background: #0f172a;
}
[data-bs-theme="dark"] .kb-chat-body {
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 45%), #0f172a;
}
[data-bs-theme="dark"] .kb-chat-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}
[data-bs-theme="dark"] .kb-chat-fab {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
@media (max-width: 576px) {
    .kb-chat {
        right: 0.75rem;
        bottom: 0.75rem;
    }
    .kb-chat-panel,
    .kb-chat-nudge {
        width: calc(100vw - 1.5rem);
    }
    .kb-chat-panel {
        height: min(72vh, 32rem);
    }
    .kb-chat.kb-chat-expanded .kb-chat-panel {
        width: calc(100vw - 1rem);
        height: calc(100vh - 1rem);
        border-radius: 0.85rem;
    }
}
