/**
 * Agrys | Ön Muhasebe - Özel CSS
 */

/* Genel Stiller */
body {
    background-color: #f8f9fc;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9rem;
}

.container-fluid {
    padding: 0 1.5rem;
}

.app-brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.auth-shell-bar .app-brand-logo {
    width: 34px;
    height: 34px;
}

#sidebar-wrapper .sidebar-heading .app-brand-logo {
    width: 36px;
    height: 36px;
}

/* Kart Stilleri */
.card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

.card-header h6 {
    font-weight: 700;
    font-size: 0.9rem;
    color: #4e73df;
}

/* Kenar Çizgili Kartlar */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.border-left-danger {
    border-left: 0.25rem solid #e74a3b !important;
}

/* Tablo Stilleri */
.table th {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #5a5c69;
    background-color: #f8f9fc;
}

.table-bordered {
    border: 1px solid #e3e6f0;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #e3e6f0;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Tablo responsive ve Tom Select için */
/* 
.table-responsive {
    overflow: visible !important;
}

.card-body {
    overflow: visible !important;
}

table {
    overflow: visible !important;
}

tbody, tr, td {
    overflow: visible !important;
}
*/

/* Form Stilleri */
.form-control {
    font-size: 0.9rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
}

.form-control:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-label {
    font-weight: 600;
    color: #5a5c69;
}

/* Buton Stilleri */
.btn {
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0.35rem;
}

/* İkon-only butonlar — uygulama geneli merkez hizalama */
.btn-contacts-more,
.btn-orders-more,
.btn-invoices-more,
.btn-wb-more,
.orders-status-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    vertical-align: middle;
    overflow: hidden;
}

.btn-contacts-more > i,
.btn-orders-more > i,
.btn-invoices-more > i,
.btn-wb-more > i,
.orders-status-help > i {
    font-size: 0.8125rem;
    line-height: 1;
    display: block;
}

.btn-contacts-more > i::before,
.btn-orders-more > i::before,
.btn-invoices-more > i::before,
.btn-wb-more > i::before,
.orders-status-help > i::before {
    display: block;
    line-height: 1;
}

/* Yalnızca Font Awesome ikonu içeren Bootstrap butonları */
.btn:has(> i[class*="fa-"]:only-child),
.btn:has(> .fas:only-child),
.btn:has(> .far:only-child),
.btn:has(> .fab:only-child) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.btn:has(> i[class*="fa-"]:only-child) > i,
.btn:has(> .fas:only-child) > .fas,
.btn:has(> .far:only-child) > .far,
.btn:has(> .fab:only-child) > .fab {
    line-height: 1;
    flex-shrink: 0;
}

.btn:has(> i[class*="fa-"]:only-child) > i::before,
.btn:has(> .fas:only-child) > .fas::before,
.btn:has(> .far:only-child) > .far::before,
.btn:has(> .fab:only-child) > .fab::before {
    display: block;
    line-height: 1;
}

.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-success:hover {
    background-color: #17a673;
    border-color: #169b6b;
}

.btn-danger {
    background-color: #e74a3b;
    border-color: #e74a3b;
}

.btn-danger:hover {
    background-color: #e02d1b;
    border-color: #d52a1a;
}

/* Navbar Stilleri */
.navbar {
    padding: 0.5rem 1.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Footer Stilleri */
.footer {
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

body.app-shell .app-footer.footer {
    padding: 0.35rem 0;
    min-height: var(--app-footer-h);
    box-sizing: border-box;
}

/* Sabit üst bar + alt footer — yalnızca main kayar */
:root {
    --app-topbar-h: 3.75rem;
    --app-content-gap: 0.5rem;
    --app-footer-h: 2.5rem;
    --app-footer-gap: 0.5rem;
}

html {
    height: 100%;
}

body.app-shell {
    overflow: hidden;
    height: 100%;
    min-height: 100%;
}

body.app-shell #wrapper {
    height: 100%;
    min-height: 0;
    max-height: 100dvh;
    overflow: hidden;
}

body.app-shell #page-content-wrapper.page-content-area {
    height: 100%;
    min-height: 0;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.app-shell .app-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1040;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

body.app-shell .app-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    margin-top: 0 !important;
    box-shadow: 0 -1px 4px rgba(15, 23, 42, 0.06);
}

/* Toast bildirimleri — sağ üst, içeriği itmez */
.app-toast-stack {
    position: fixed;
    top: calc(var(--app-topbar-h, 3.75rem) + 12px);
    right: 16px;
    z-index: 1090;
    width: min(420px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

body.auth-guest-page .app-toast-stack {
    top: 16px;
}

body.term-app .app-toast-stack {
    top: 72px;
}

.app-toast {
    position: relative;
    pointer-events: auto;
    border-radius: 0.65rem;
    padding: 0.95rem 2.5rem 0.95rem 1rem;
    color: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    transform: translateX(calc(100% + 24px));
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.app-toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.app-toast.is-leaving {
    transform: translateX(calc(100% + 24px));
    opacity: 0;
}

.app-toast-title {
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 0.25rem;
}

.app-toast-body {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.45;
    opacity: 0.95;
}

.app-toast-close {
    position: absolute;
    top: 0.55rem;
    right: 0.65rem;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.app-toast-close:hover {
    color: #fff;
}

.app-toast--success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.app-toast--danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.app-toast--warning {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.app-toast--info,
.app-toast--primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

.app-toast--secondary,
.app-toast--light,
.app-toast--dark {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
}

@media (max-width: 767.98px) {
    .app-toast-stack {
        left: 12px;
        right: 12px;
        width: auto;
    }
}

body.app-shell #page-content-wrapper > main {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-top: calc(var(--app-topbar-h) + var(--app-content-gap));
    padding-bottom: 0;
    scroll-padding-top: calc(var(--app-topbar-h) + var(--app-content-gap));
    scroll-padding-bottom: calc(var(--app-footer-h) + var(--app-footer-gap));
}

/* Sabit footer altında kalan içerik — scroll sonunda görünür boşluk */
body.app-shell .app-footer-spacer {
    flex-shrink: 0;
    height: calc(var(--app-footer-h) + var(--app-footer-gap));
    min-height: calc(2.5rem + var(--app-footer-gap));
    pointer-events: none;
}

/* Sayfa içi uyarılar (entegrasyon testi vb.) üst bar altında kalmaması için */
body.app-shell .app-content-alert {
    scroll-margin-top: calc(var(--app-topbar-h) + var(--app-content-gap));
}

/* Yardımcı Sınıflar */
.text-xs {
    font-size: 0.7rem;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

/* Sayfalama Stilleri */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: #4e73df;
    border: 1px solid #e3e6f0;
}

.page-item.active .page-link {
    background-color: #4e73df;
    border-color: #4e73df;
}

/* Uyarı Mesajları */
.alert {
    border: none;
    border-radius: 0.35rem;
}

/* Tom Select Stilleri */
.ts-wrapper {
    position: relative !important;
    z-index: 1 !important;
}

.ts-wrapper.single .ts-control {
    background: white !important;
}

.ts-dropdown {
    /* top/left/width Tom Select tarafından (dropdownParent: body) ayarlanır — left/right zorlamayın */
    z-index: 10000 !important;
    margin-top: 2px !important;
    background: white !important;
    border: 1px solid #d1d3e2 !important;
    border-radius: 0.35rem !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

.ts-control {
    border: 1px solid #d1d3e2 !important;
    border-radius: 0.35rem !important;
    padding: 0.375rem 0.75rem !important;
    min-height: 38px !important;
    background: white !important;
}

.ts-control:focus,
.ts-control.focus {
    border-color: #bac8f3 !important;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25) !important;
    outline: none !important;
}

.ts-dropdown .option {
    padding: 8px 12px !important;
    cursor: pointer !important;
}

.ts-dropdown .option:hover,
.ts-dropdown .option.active {
    background-color: #4e73df !important;
    color: white !important;
}

.ts-dropdown .no-results {
    padding: 8px 12px !important;
    color: #858796 !important;
}

/* Tablo içindeki Tom Select */
table .ts-wrapper {
    width: 100% !important;
    position: relative !important;
}

table .ts-control {
    min-height: 38px !important;
}

table .ts-dropdown {
    min-width: 300px !important;
    z-index: 10000 !important;
}

table td {
    position: relative !important;
}

/* Tom Select Clear Button */
.ts-control .clear-button {
    color: #858796 !important;
    margin-right: 5px !important;
}

.ts-control .clear-button:hover {
    color: #e74a3b !important;
}

/* Giriş Sayfası */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0 1rem;
    }
    
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
} 
/* TailAdmin Theme Overrides */
:root {
    --ta-primary: #3c50e0;
    --ta-bg: #f1f5f9;
    --ta-sidebar: #1c2434;
    --ta-sidebar-hover: #333a48;
    --ta-card: #ffffff;
    --ta-text: #64748b;
    --ta-title: #1c2434;
    --ta-border: #e2e8f0;
}

body {
    background-color: var(--ta-bg);
    color: var(--ta-text);
    padding-top: 0 !important; /* Override inline padding */
}

/* Sidebar Styling */
#sidebar-wrapper {
    background-color: var(--ta-sidebar) !important;
    width: 280px;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1040;
    transition: transform 0.3s ease, margin-left 0.3s ease;
}
#sidebar-wrapper .sidebar-heading {
    background-color: var(--ta-sidebar);
    border-bottom: 1px solid var(--ta-sidebar-hover) !important;
}
#sidebar-wrapper .list-group-item, #sidebar-wrapper .sidebar-link {
    background-color: transparent;
    color: #8a99af;
    border: none;
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}
#sidebar-wrapper .sidebar-link:hover, 
#sidebar-wrapper .sidebar-link.active {
    background-color: var(--ta-sidebar-hover);
    color: #ffffff;
}
#sidebar-wrapper .sidebar-link i {
    width: 24px;
    font-size: 1.1rem;
}

/* Submenu */
.sidebar-submenu {
    list-style: none;
    padding-left: 0;
    background-color: transparent;
    display: none;
}
.sidebar-submenu.show {
    display: block;
}
.sidebar-submenu li a {
    padding: 0.5rem 1.5rem 0.5rem 3rem;
    color: #8a99af;
    display: block;
    text-decoration: none;
    font-size: 0.85rem;
}
.sidebar-submenu li a:hover,
.sidebar-submenu li a.active {
    color: #ffffff;
}

/* Navbar (Top) */
.topbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--ta-border) !important;
}
.topbar .btn-link {
    color: var(--ta-text);
}

/* Mobil: üst çubuktaki açılır menüler (profil, bildirim) taşmasın — fixed stratejisi + genişlik sınırı */
@media (max-width: 767.98px) {
    .topbar {
        overflow: visible;
        z-index: 1050;
    }
    .topbar .navbar-nav .dropdown-menu {
        max-width: calc(100vw - 1rem);
    }
    .topbar .nav-item.dropdown .dropdown-menu.dropdown-menu-end {
        right: 0;
        left: auto;
    }
    #notif-dropdown .dropdown-menu {
        width: min(360px, calc(100vw - 1rem)) !important;
    }
}

/* Cards */
.card {
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    border: 1px solid var(--ta-border);
}
.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--ta-border);
    padding: 1.25rem 1.5rem;
}
.card-header h6, .card-header .h6 {
    color: var(--ta-title);
    font-size: 1rem;
    font-weight: 600;
}

/* Overriding old card borders */
.border-left-primary { border-left-color: var(--ta-primary) !important; }
.text-primary { color: var(--ta-primary) !important; }
.btn-primary { background-color: var(--ta-primary); border-color: var(--ta-primary); }
.btn-primary:hover { background-color: #3142bc; border-color: #3142bc; }

/* Wrapper layout — masaüstü: padding ile içerik kaydır; mobil: tam genişlik + off-canvas sidebar */
#wrapper {
    overflow-x: hidden;
}

/* Masaüstü: sidebar solda sabit, gizlemek için margin */
@media (min-width: 768px) {
    #sidebar-wrapper {
        transform: none;
    }
    #wrapper.toggled #sidebar-wrapper {
        margin-left: -280px;
    }
    #page-content-wrapper.page-content-area {
        padding-left: 280px;
        transition: padding-left 0.3s ease;
    }
    #wrapper.toggled #page-content-wrapper.page-content-area {
        padding-left: 0;
    }
    body.app-shell .app-topbar,
    body.app-shell .app-footer {
        left: 280px;
        transition: left 0.3s ease;
    }
    body.app-shell #wrapper.toggled .app-topbar,
    body.app-shell #wrapper.toggled .app-footer {
        left: 0;
    }
}

/* Mobil: içerik her zaman tam genişlik; sidebar transform ile */
@media (max-width: 767.98px) {
    #wrapper {
        overflow-x: visible;
    }
    body.app-shell #page-content-wrapper > main {
        max-width: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    #page-content-wrapper.page-content-area {
        padding-left: 0 !important;
        transition: none;
    }
    #sidebar-wrapper {
        margin-left: 0 !important;
        transform: translateX(-100%);
        box-shadow: none;
    }
    #wrapper:not(.toggled) #sidebar-wrapper {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.25);
    }
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1035;
        cursor: pointer;
    }
    #wrapper:not(.toggled) .sidebar-backdrop {
        display: block;
    }
    body.sidebar-open-mobile {
        overflow: hidden;
        touch-action: none;
    }
}

/* İstatistik kartları: dar sütunda tek tek harf kırılmasını engelle */
@media (max-width: 767.98px) {
    .border-left-primary .row.no-gutters,
    .border-left-success .row.no-gutters,
    .border-left-info .row.no-gutters,
    .border-left-warning .row.no-gutters {
        flex-wrap: nowrap;
    }
    .border-left-primary .row.no-gutters > .col.mr-2,
    .border-left-success .row.no-gutters > .col.mr-2,
    .border-left-info .row.no-gutters > .col.mr-2,
    .border-left-warning .row.no-gutters > .col.mr-2 {
        flex: 1 1 auto;
        min-width: 0;
    }
    .border-left-primary .text-xs,
    .border-left-success .text-xs,
    .border-left-info .text-xs,
    .border-left-warning .text-xs {
        white-space: normal;
        word-break: normal;
        overflow-wrap: anywhere;
    }
}

.contact-detail-page .contact-detail-card {
    border-radius: 0.5rem;
}

.contact-info-grid .contact-info-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-height: 2.75rem;
}

.contact-info-label {
    font-size: 0.8rem;
    color: #858796;
    font-weight: 500;
}

.contact-info-value {
    font-size: 0.95rem;
    color: #2e2f37;
    word-break: break-word;
}

.contact-btn-edit {
    border-radius: 0.35rem;
}

.contact-ledger-table thead th {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: #858796;
    border-bottom: 1px solid #e3e6f0;
    background: #fff;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.contact-ledger-table tbody td {
    font-size: 0.875rem;
    border-color: #f0f2f8;
    vertical-align: middle;
}

.contact-txn-badge {
    background: #f0f4ff;
    color: #4e73df;
    font-weight: 500;
    font-size: 0.75rem;
}

.contact-sidebar-sticky {
    position: sticky;
    top: 1rem;
}

.contact-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.contact-action-btn {
    padding: 0.85rem 0.5rem;
    font-weight: 500;
    border-radius: 0.35rem;
    background: #fff;
    transition: transform 0.2s cubic-bezier(0.34, 1.4, 0.64, 1),
                background 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease,
                box-shadow 0.2s ease;
}

.contact-action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 115, 223, 0.12);
}

.contact-action-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.contact-action-btn.is-active {
    border-color: #4e73df !important;
    background: linear-gradient(180deg, #f0f4ff 0%, #e8eeff 100%) !important;
    color: #4e73df !important;
    box-shadow: 0 4px 14px rgba(78, 115, 223, 0.18);
}

/* Cari yan panel — geçiş animasyonu */
.contact-sidebar-stage {
    position: relative;
    perspective: 800px;
}

.contact-sidebar-pane {
    transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0.38s;
    transform-origin: top center;
    will-change: opacity, transform;
}

.contact-sidebar-pane.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
    position: relative;
}

.contact-sidebar-pane.is-hidden {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 0;
}

#contactFinancePanel.is-visible {
    z-index: 2;
    box-shadow: 0 8px 28px rgba(78, 115, 223, 0.12);
}

#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > .contact-finance-tabs,
#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > .contact-finance-title,
#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > form > * {
    animation: contactPanelStagger 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > .contact-finance-tabs { animation-delay: 0.06s; }
#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > .contact-finance-title { animation-delay: 0.1s; }
#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > form > *:nth-child(1) { animation-delay: 0.14s; }
#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > form > *:nth-child(2) { animation-delay: 0.18s; }
#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > form > *:nth-child(3) { animation-delay: 0.22s; }
#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > form > *:nth-child(4) { animation-delay: 0.26s; }
#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > form > *:nth-child(5) { animation-delay: 0.3s; }
#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > form > *:nth-child(6) { animation-delay: 0.34s; }
#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > form > *:nth-child(7) { animation-delay: 0.38s; }
#contactFinancePanel.is-visible.is-animating .contact-finance-stagger > form > *:nth-child(8) { animation-delay: 0.42s; }

@keyframes contactPanelStagger {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-finance-title.is-switching {
    animation: contactTitleSwitch 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes contactTitleSwitch {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    45% {
        opacity: 0;
        transform: translateX(-6px);
    }
    55% {
        opacity: 0;
        transform: translateX(6px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.contact-finance-tab {
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.contact-finance-tab:not(.active):hover {
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .contact-sidebar-pane,
    .contact-action-btn,
    .contact-finance-stagger > *,
    .contact-finance-title.is-switching {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

.contact-summary-list .list-group-item {
    font-size: 0.9rem;
}

.contact-balance-row {
    background: #f8f9fc;
    border-top: 1px solid #e3e6f0 !important;
    margin-top: 0.25rem;
}

.btn-contact-statement {
    background: linear-gradient(135deg, #e8e0f7 0%, #ddd6fe 100%);
    border: 1px solid #c4b5fd;
    color: #5b21b6;
    font-weight: 600;
    border-radius: 0.35rem;
}

.btn-contact-statement:hover {
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
    color: #4c1d95;
    border-color: #a78bfa;
}

@media (max-width: 991.98px) {
    .contact-sidebar-sticky {
        position: static;
    }
}

.contact-finance-panel {
    border-radius: 0.5rem;
}

.contact-finance-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 0.35rem;
    overflow: hidden;
}

.contact-finance-tabs .contact-finance-tab {
    border: none;
    background: #fff;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 0.5rem;
}

.contact-finance-tab.active {
    background: #4e73df;
    color: #fff;
}

.contact-finance-tab:hover:not(.active) {
    background: #f8f9fc;
}

.contact-finance-title {
    font-size: 0.95rem;
}

.contact-finance-cancel,
.contact-finance-save {
    font-weight: 500;
    border: 1px solid #c5d4f0;
    color: #4e73df;
}

.contact-finance-cancel:hover,
.contact-finance-save:hover {
    background: #eef2ff;
    border-color: #4e73df;
}

.contact-finance-panel .form-control,
.contact-finance-panel .form-select {
    border-radius: 0.35rem;
    border-color: #e3e6f0;
}

.contact-finance-panel .form-label {
    font-weight: 500;
}

/* Cari işlem satırı — yazdır / sil */
.contact-txn-actions .btn-link {
    line-height: 1;
    opacity: 0.75;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.contact-txn-actions .btn-link:hover {
    opacity: 1;
}

.contact-balance-side {
    display: block;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

.contact-receipt-modal .modal-title {
    color: #2e2f37;
}

.contact-receipt-txn dt {
    font-weight: 500;
}

.contact-receipt-summary {
    background: #f8f9fc;
    border-radius: 0.35rem;
    padding: 0.75rem 1rem;
}

#contactDeleteModal .modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

@media print {
    body * {
        visibility: hidden;
    }
    #contactReceiptPrintArea,
    #contactReceiptPrintArea * {
        visibility: visible;
    }
    #contactReceiptPrintArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

.contacts-list-page {
    max-width: 100%;
}

.contacts-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 0.875rem;
}

.contacts-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #9ca3af;
}

.contacts-list-card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.contacts-toolbar {
    padding: 1rem 1.25rem;
    background: #fff;
}

.contacts-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.contacts-search-wrap {
    position: relative;
    flex: 1 1 280px;
    min-width: 200px;
    max-width: 420px;
}

.contacts-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.9rem;
    pointer-events: none;
}

.contacts-search-input {
    padding-left: 2.35rem;
    border-radius: 0.35rem;
    border-color: #e5e7eb;
    height: 2.5rem;
}

.contacts-search-input:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.15rem rgba(78, 115, 223, 0.15);
}

.contacts-tab-switch .btn {
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.45rem 1rem;
    border-radius: 0.35rem;
}

.contacts-tab-switch .btn-primary.active,
.contacts-tab-switch .btn-primary {
    background: #4e73df;
    border-color: #4e73df;
}

.contacts-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.contacts-actions .btn {
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.35rem;
    white-space: nowrap;
}

.btn-contacts-filter,
.btn-contacts-export {
    background: #eef2ff;
    color: #4e73df;
    border: 1px solid #c7d7fe;
}

.btn-contacts-filter:hover,
.btn-contacts-export:hover {
    background: #dbe4fe;
    color: #3d5fc7;
    border-color: #a5b8fc;
}

.btn-contacts-archive {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn-contacts-archive:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.btn-contacts-add {
    background: #4e73df;
    color: #fff;
    border: 1px solid #4e73df;
}

.btn-contacts-add:hover {
    background: #3d5fc7;
    border-color: #3d5fc7;
    color: #fff;
}

.contacts-table thead th {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #6b7280;
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

.contacts-table tbody td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.contacts-table tbody tr:hover {
    background: #fafbfc;
}

.contacts-name-link:hover {
    color: #4e73df !important;
}

.contacts-status {
    font-size: 0.8125rem;
    font-weight: 600;
}

.contacts-status-active {
    color: #16a34a;
}

.contacts-status-inactive {
    color: #9ca3af;
}

.contacts-balance {
    font-size: 0.95rem;
    color: #1f2937;
}

.contacts-balance-sub {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.1rem;
}

.btn-contacts-more {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    border-radius: 0.35rem;
    line-height: 1;
}

.btn-contacts-more:hover {
    background: #f3f4f6;
    color: #374151;
}

.contacts-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1.25rem;
    background: #fff;
}

.contacts-footer-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.contacts-per-page {
    width: auto;
    min-width: 4.5rem;
    border-color: #e5e7eb;
}

.contacts-pagination .page-link {
    border-radius: 0.35rem;
    margin: 0 0.1rem;
    color: #4b5563;
    border-color: #e5e7eb;
    min-width: 2rem;
    text-align: center;
}

.contacts-pagination .page-item.active .page-link {
    background: #4e73df;
    border-color: #4e73df;
    color: #fff;
}

@media (max-width: 767.98px) {
    .contacts-actions {
        margin-left: 0;
        width: 100%;
    }

    .contacts-tab-switch {
        width: 100%;
    }

    .contacts-tab-switch .btn {
        flex: 1;
    }
}

.orders-list-page {
    max-width: 100%;
}

.orders-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #9ca3af;
}

.orders-summary-card {
    max-width: 280px;
}

.orders-summary-icon {
    width: 48px;
    height: 48px;
    background: #ecfdf5;
    color: #16a34a;
    font-size: 1.25rem;
}

.orders-summary-value {
    font-size: 1.05rem;
    color: #1f2937;
}

.orders-list-card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.orders-toolbar {
    background: #fff;
    padding: 0.75rem 1rem 0;
}

.orders-status-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 0.75rem;
}

.orders-status-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    border-radius: 0.35rem;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s;
}

.orders-status-tab:hover {
    background: #f3f4f6;
    color: #374151;
}

.orders-status-tab.active {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
}

.orders-tab-count {
    margin-left: 0.35rem;
    font-size: 0.7rem;
    opacity: 0.85;
}

.orders-status-help {
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 50%;
    background: #8b5cf6;
    color: #fff;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
}

.orders-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
}

.orders-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 420px;
}

.orders-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
    pointer-events: none;
}

.orders-search-input {
    padding-left: 2.35rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.35rem;
    background: #f9fafb;
    font-size: 0.875rem;
}

.orders-search-input:focus {
    background: #fff;
    border-color: #4e73df;
    box-shadow: 0 0 0 0.15rem rgba(78, 115, 223, 0.15);
}

.orders-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.orders-selected-count {
    min-width: 4.5rem;
    text-align: right;
}

.orders-toolbar-actions .btn {
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.35rem;
    white-space: nowrap;
}

.btn-orders-bulk {
    background: #4e73df;
    color: #fff;
    border: 1px solid #4e73df;
}

.btn-orders-bulk:hover,
.btn-orders-bulk:focus {
    background: #3d5fc7;
    border-color: #3d5fc7;
    color: #fff;
}

.btn-orders-sync,
.btn-orders-export {
    background: #eef2ff;
    color: #4e73df;
    border: 1px solid #c7d7fe;
}

.btn-orders-sync:hover,
.btn-orders-export:hover {
    background: #dbe4fe;
    color: #3d5fc7;
    border-color: #a5b8fc;
}

.btn-orders-add {
    background: #4e73df;
    color: #fff;
    border: 1px solid #4e73df;
}

.btn-orders-add:hover {
    background: #3d5fc7;
    color: #fff;
}

.orders-table thead th {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #6b7280;
    padding: 0.85rem 1rem;
    vertical-align: middle;
    white-space: nowrap;
}

.orders-th-platform {
    white-space: nowrap;
}

.orders-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    font-size: 0.875rem;
}

.orders-table tbody tr:hover {
    background: #fafbfc;
}

.orders-no-link:hover {
    color: #4e73df !important;
}

.orders-platform-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 0.25rem;
}

.orders-product-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orders-status-badge {
    font-weight: 600;
    font-size: 0.7rem;
}

.orders-empty {
    font-size: 0.9rem;
}

.btn-orders-more {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    border-radius: 0.35rem;
    line-height: 1;
}

.btn-orders-more:hover {
    background: #f3f4f6;
    color: #374151;
}

.orders-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1.25rem;
    background: #fff;
}

.orders-footer-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.orders-per-page {
    width: auto;
    min-width: 4.5rem;
    border-color: #e5e7eb;
}

.orders-pagination .page-link {
    border-radius: 0.35rem;
    margin: 0 0.1rem;
    color: #4b5563;
    border-color: #e5e7eb;
}

@media (max-width: 767.98px) {
    .orders-toolbar-actions {
        margin-left: 0;
        width: 100%;
    }

    .orders-search-wrap {
        max-width: 100%;
        width: 100%;
    }

    .orders-summary-card {
        max-width: 100%;
    }
}

.invoices-list-page {
    max-width: 100%;
}

.invoices-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 0.875rem;
}

.invoices-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #9ca3af;
}

.invoices-list-card,
.invoices-inbound-card {
    border-radius: 0.5rem;
    overflow: hidden;
}

body.app-shell .invoices-list-page {
    padding-bottom: calc(var(--app-footer-h) + var(--app-footer-gap) + 1.5rem);
}

.invoices-toolbar {
    padding: 1rem 1.25rem;
    background: #fff;
}

.invoices-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.invoices-search-wrap {
    position: relative;
    flex: 1 1 280px;
    min-width: 200px;
    max-width: 420px;
}

.invoices-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.9rem;
    pointer-events: none;
}

.invoices-search-input {
    padding-left: 2.35rem;
    border-radius: 0.35rem;
    border-color: #e5e7eb;
    height: 2.5rem;
    background: #f9fafb;
}

.invoices-search-input:focus {
    background: #fff;
    border-color: #4e73df;
    box-shadow: 0 0 0 0.15rem rgba(78, 115, 223, 0.15);
}

.invoices-type-switch .btn {
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.45rem 1rem;
    border-radius: 0.35rem;
}

.invoices-type-switch .btn-primary.active,
.invoices-type-switch .btn-primary {
    background: #4e73df;
    border-color: #4e73df;
}

.invoices-tab-count {
    margin-left: 0.35rem;
    font-size: 0.7rem;
    opacity: 0.85;
}

.invoices-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.invoices-actions .btn {
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.35rem;
    white-space: nowrap;
}

.btn-invoices-filter,
.btn-invoices-export {
    background: #eef2ff;
    color: #4e73df;
    border: 1px solid #c7d7fe;
}

.btn-invoices-filter:hover,
.btn-invoices-export:hover {
    background: #dbe4fe;
    color: #3d5fc7;
    border-color: #a5b8fc;
}

.btn-invoices-official {
    background: #ecfdf5;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.btn-invoices-official:hover {
    background: #d1fae5;
    color: #166534;
    border-color: #86efac;
}

.btn-invoices-archive {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn-invoices-archive:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.btn-invoices-add {
    background: #4e73df;
    color: #fff;
    border: 1px solid #4e73df;
}

.btn-invoices-add:hover,
.btn-invoices-add:focus {
    background: #3d5fc7;
    border-color: #3d5fc7;
    color: #fff;
}

.invoices-table thead th {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #6b7280;
    padding: 0.85rem 1rem;
    vertical-align: middle;
    white-space: nowrap;
}

.invoices-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    font-size: 0.875rem;
}

.invoices-table tbody td.text-end {
    white-space: nowrap;
}

.invoices-table tbody tr:hover {
    background: #fafbfc;
}

.invoices-party-link:hover,
.invoices-no-link:hover {
    color: #4e73df !important;
}

.invoices-ebadge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

.invoices-ebadge-signed {
    background: #dcfce7;
    color: #15803d;
}

.invoices-ebadge-draft {
    background: #fef9c3;
    color: #a16207;
}

.invoices-ebadge-failed {
    background: #fee2e2;
    color: #b91c1c;
}

.invoices-ebadge-none {
    background: #f3f4f6;
    color: #6b7280;
}

.invoices-doc-type {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    margin-left: 0.35rem;
    vertical-align: middle;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.invoices-doc-type-earsiv {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.invoices-doc-type-efatura {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.invoices-doc-type-other {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.invoices-empty {
    font-size: 0.9rem;
}

.btn-invoices-more {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    border-radius: 0.35rem;
    line-height: 1;
}

.btn-invoices-more:hover {
    background: #f3f4f6;
    color: #374151;
}

.invoices-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1.25rem;
    background: #fff;
}

.invoices-footer-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.invoices-per-page {
    width: auto;
    min-width: 4.5rem;
    border-color: #e5e7eb;
}

.invoices-pagination .page-link {
    border-radius: 0.35rem;
    margin: 0 0.1rem;
    color: #4b5563;
    border-color: #e5e7eb;
    min-width: 2rem;
    text-align: center;
}

.invoices-inbound-header {
    background: #fff;
}

@media (max-width: 767.98px) {
    .invoices-actions {
        margin-left: 0;
        width: 100%;
    }

    .invoices-type-switch {
        width: 100%;
    }

    .invoices-type-switch .btn {
        flex: 1;
    }

    .invoices-search-wrap {
        max-width: 100%;
        width: 100%;
    }
}

/* Deneme süresi bilgi çubuğu — Geliştirici: Vedat Ardil */
.trial-usage-bar {
    margin: 0 1rem 0.75rem;
    padding: 0.55rem 1rem;
    background: #eef2ff;
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #4338ca;
}

.trial-usage-bar--urgent {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}

.tenants-admin-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    white-space: nowrap;
}

.tenants-admin-table tbody tr.table-warning {
    --bs-table-bg: #fffbeb;
}

.tenants-row-actions .dropdown-toggle::after {
    margin-left: 0.2em;
}

.tenants-sub-dropdown {
    min-width: 220px;
    z-index: 1090 !important;
    max-height: min(70vh, 420px);
    overflow-y: auto;
}

.tenants-sub-dropdown form {
    margin: 0;
}

.tenants-sub-dropdown .dropdown-item {
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
}

.tenants-sub-dropdown .dropdown-item:hover {
    background: #f3f4f6;
}
