/* Genel gövde ve tipografi ayarları */
*,
*::before,
*::after {
    box-sizing: border-box;
}

*{
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.app-page-subtitle {
    text-transform: capitalize !important;
}

:root {
    /* Üst bar yüksekliği (mobil drawer ofseti ile paylaşılır) */
    --app-header-height: 75px;
}

html,
body {
    height: 100%;
}

/* Genel: tablo içi sağ hizalama yardımcıları */
.data-table th.text-end,
.data-table td.text-end,
.data-table th.text-right,
.data-table td.text-right {
    text-align: right !important;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2933;
    background-color: #f4f6f9;
}

/* Panel kabuğu: sayfa gövdesi kaymasın; kaydırma sidebar + ana içerikte */
/* :has() bazı eski mobil tarayıcılarda yok; ana layout’ta body.app-shell ile aynı kural uygulanır */
body:has(.app-root),
body.app-shell {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout: üst bar + sol menü + içerik */
.app-root {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: 100vh;
    overflow: hidden;
}

.app-header {
    height: var(--app-header-height);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    background-color: #0f172a;
    color: #e5e7eb;
    border-bottom: 1px solid #111827;
    z-index: 100;
    position: relative;
    min-width: 0;
    max-width: 100%;
}

.app-header-brand {
    display: grid;
    grid-template-columns: auto 228px minmax(220px, 340px);
    align-items: center;
    column-gap: 14px;
    min-width: 0;
}

.app-mobile-menu-btn {
    margin-right: 6px;
    padding: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.98));
    color: #e2e8f0;
}

.app-mobile-menu-btn svg {
    width: 18px;
    height: 18px;
}

.app-mobile-menu-btn:hover {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.34), rgba(29, 78, 216, 0.4));
    border-color: rgba(96, 165, 250, 0.65);
    color: #ffffff;
}

.app-header-logo-box {
    width: 228px;
    min-width: 195px;
    max-width: 195px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.app-header-logo-img {
    display: block;
    height: 60px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    object-position: left center;
}

.app-header-company-welcome {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
    width: 100%;
    max-width: 340px;
}

.app-header-company-name {
    font-size: 13px;
    font-weight: 600;
    color: #f8fafc;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap; 
    max-width: 340px;
}

.app-header-company-greeting {
    font-size: 12px;
    color: #cbd5e1;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 340px;
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.app-header-license-warning {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.14);
    color: #fef3c7;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.app-header-license-warning-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
    flex: 0 0 auto;
}

.app-header-fiscal-year-form {
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.app-header-fiscal-year {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    background-color: #020617;
    border: 1px solid #4b5563;
}

.app-header-fiscal-year-label {
    font-size: 12px;
    font-weight: 600;
    color: #e5e7eb;
    letter-spacing: 0.02em;
    text-wrap-mode: nowrap;
}

.app-header-fiscal-year-select {
    height: 34px;
    padding: 4px 28px 4px 10px;
    border-radius: 6px;
    border: 1px solid #374151;
    background-color: #111827;
    color: #e5e7eb;
    font-size: 13px;
    outline: none;
}

.app-header-fiscal-year-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.app-header-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    background-color: #020617;
    border: 1px solid #4b5563;
}

.app-header-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background-color: #111827;
    border: 1px solid #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #e5e7eb;
}

.app-header-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.app-header-user-name {
    font-size: 12px;
    font-weight: 600;
}

.app-header-user-role {
    font-size: 11px;
    color: #9ca3af;
}

/* Bildirimler */
.app-header-notifications {
    position: relative;
}

.app-header-notification-btn {
    position: relative;
    background: transparent;
    border: none;
    color: #e5e7eb;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.app-header-notification-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.app-header-notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

.app-header-notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-height: 500px;
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.app-header-notification-dropdown.is-open {
    display: flex;
}

.app-header-notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #374151;
}

.app-header-notification-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}

.app-header-notification-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.app-header-notification-close:hover {
    color: #e5e7eb;
}

.app-header-notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.app-header-notification-loading,
.app-header-notification-empty {
    padding: 24px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.app-header-notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #374151;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.app-header-notification-item:hover {
    background-color: #374151;
}

.app-header-notification-item.is-read {
    opacity: 0.75;
}

.app-header-notification-item.is-read .app-header-notification-item-title {
    color: #cbd5e1;
}

.app-header-notification-item:last-child {
    border-bottom: none;
}

.app-header-notification-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-header-notification-item-title .badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.app-header-notification-item-title .badge-vade {
    background-color: #f59e0b;
    color: white;
}

.app-header-notification-item-title .badge-hatirlatma {
    background-color: #3b82f6;
    color: white;
}

.app-header-notification-item-message {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 4px;
    line-height: 1.4;
}

.app-header-notification-item-meta {
    font-size: 11px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-header-notification-item-amount {
    font-weight: 600;
    color: #e5e7eb;
}

.notification-row-focus {
    background: #2564eb1c !important; 
    transition: box-shadow .25s ease, outline-color .25s ease;
}

.stock-import-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.stock-import-choice-card {
    border: 1px solid #d1d5db;
    background: #f8fafc;
    color: #111827;
    border-radius: 10px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stock-import-choice-card strong {
    font-size: 14px;
}

.stock-import-choice-card span {
    font-size: 12px;
    color: #4b5563;
}

.stock-import-choice-card.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.stock-import-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.stock-import-progress .bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #0ea5e9 100%);
    transition: width .25s ease;
}

.stock-import-mapping-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stock-import-mapping-core-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.stock-import-mapping-image-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.stock-import-mapping-card {
    border: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    padding: 12px;
}

.stock-import-mapping-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stock-import-mapping-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.stock-import-mapping-subtitle {
    margin-top: 2px;
    font-size: 12px;
    color: #475569;
}

.stock-import-mapping-grid .filter-bar-group {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    padding: 8px;
}

.stock-import-mapping-grid .filter-bar-label {
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    letter-spacing: .01em;
}

.stock-import-mapping-grid .form-select {
    margin-top: 4px;
    border-color: #cbd5e1;
    border-radius: 8px;
    min-height: 34px;
}

.stock-import-mapping-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.stock-import-thumb-wrap {
    width: 42px;
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stock-import-thumb-btn {
    padding: 0;
    cursor: zoom-in;
}

.stock-import-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stock-import-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.stock-import-image-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.75);
}

.stock-import-image-lightbox-content {
    position: relative;
    z-index: 1;
    width: min(92vw, 980px);
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    background: #0b1220;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.stock-import-image-lightbox-content img {
    width: 100%;
    max-height: 90vh;
    object-fit: contain;
    display: block;
    background: #0b1220;
}

.stock-import-image-lightbox-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.8);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 900px) {
    .stock-import-choice-grid {
        grid-template-columns: 1fr;
    }
    .stock-import-mapping-core-grid,
    .stock-import-mapping-image-grid {
        grid-template-columns: 1fr;
    }
}

.app-header-notification-footer {
    padding: 12px 16px;
    border-top: 1px solid #374151;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-header-notification-mark-all {
    border: 1px solid #4b5563;
    background-color: #111827;
    color: #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.app-header-notification-mark-all:hover {
    background-color: #1f2937;
    border-color: #6b7280;
}

.cari-balance-short-label {
    cursor: help;
}

/* Uyarı / onay diyalogları (appAlert, appConfirm) */
.app-dialog-root {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app-dialog-root.is-open {
    display: flex;
}

body.app-dialog-open {
    overflow: hidden;
}

.app-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: app-dialog-backdrop-in 0.2s ease;
}

.app-dialog-panel {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow:
        0 24px 48px -12px rgba(15, 23, 42, 0.22),
        0 0 0 1px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    animation: app-dialog-panel-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-dialog-body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 22px 18px;
}

.app-dialog-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-dialog-icon svg {
    width: 22px;
    height: 22px;
}

.app-dialog-copy {
    flex: 1;
    min-width: 0;
}

.app-dialog-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
    margin: 0 0 6px;
}

.app-dialog-message {
    font-size: 14px;
    line-height: 1.55;
    color: #4b5563;
    white-space: pre-wrap;
    word-break: break-word;
}

.app-dialog-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 16px;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
}

.app-dialog-actions .btn {
    min-width: 96px;
    justify-content: center;
}

.app-dialog-root.is-type-info .app-dialog-icon {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.app-dialog-root.is-type-confirm .app-dialog-icon {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
}

.app-dialog-root.is-type-warning .app-dialog-icon {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

.app-dialog-root.is-type-danger .app-dialog-icon {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.app-dialog-root.is-type-danger .app-dialog-title {
    color: #991b1b;
}

@keyframes app-dialog-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes app-dialog-panel-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .app-dialog-root {
        padding: 12px;
        align-items: flex-end;
    }

    .app-dialog-panel {
        width: 100%;
        border-radius: 16px 16px 12px 12px;
    }

    .app-dialog-actions {
        flex-direction: column-reverse;
    }

    .app-dialog-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

.app-header-notification-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.app-header-notification-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.app-logout-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.9;
}

.app-header-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-left: 10px;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.55);
    color: #e5e7eb;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.app-header-logout:hover {
    background: rgba(127, 29, 29, 0.28);
    border-color: rgba(248, 113, 113, 0.5);
    color: #fecaca;
    text-decoration: none;
}

.app-header-logout:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.app-layout {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

/* Mobil: menü açıkken içerik alanına tıklanınca kapanır (backdrop, sidebar’ın altında) */
.app-sidebar-mobile-backdrop {
    display: none;
}

/* ——— Sol menü: üst bar + butonlarla aynı palet (slate + #2563eb) ——— */
.app-sidebar {
    /* Uygulama geneli: header #0f172a, primary #2563eb, gövde #f4f6f9 */
    --sb-primary: #2563eb;
    --sb-primary-bright: #3b82f6;
    --sb-primary-soft: rgba(37, 99, 235, 0.16);
    --sb-primary-ring: rgba(37, 99, 235, 0.35);
    --sb-bg: #0f172a;
    --sb-bg-panel: #1e293b;
    --sb-bg-hover: rgba(51, 65, 85, 0.55);
    --sb-border: rgba(51, 65, 85, 0.95);
    --sb-border-soft: rgba(148, 163, 184, 0.18);
    --sb-text: #f1f5f9;
    --sb-text-muted: #94a3b8;
    width: 228px;
    min-width: 228px;
    max-height: 100%;
    background: var(--sb-bg);
    color: var(--sb-text-muted);
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
    overflow: hidden;
    flex-shrink: 0;
    border-right: 1px solid var(--sb-border);
    transition: width 0.12s ease, min-width 0.12s ease;
}

body.sidebar-collapsed .app-sidebar {
    width: 64px;
    min-width: 64px;
}

.app-sidebar-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 8px 8px;
    border-bottom: 1px solid var(--sb-border);
    background: var(--sb-bg);
    flex-shrink: 0;
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    color: var(--sb-text);
    text-decoration: none;
    border-radius: 6px;
    padding: 2px 4px;
    margin: -2px -4px;
    transition: background-color 0.12s ease;
}

.app-sidebar-brand:hover {
    background-color: var(--sb-bg-hover);
    text-decoration: none;
    color: #fff;
}

.app-sidebar-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: var(--sb-bg-panel);
    border: 1px solid var(--sb-border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.app-sidebar-brand-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.app-sidebar-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    line-height: 1.2;
    transition: opacity 0.15s ease, width 0.2s ease;
}

body.sidebar-collapsed .app-sidebar-brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

.app-sidebar-brand-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--sb-text);
}

.app-sidebar-brand-sub {
    font-size: 10px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--sb-text-muted);
}

.app-sidebar-pin {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--sb-border-soft);
    background: var(--sb-bg-panel);
    color: var(--sb-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.app-sidebar-pin:hover {
    color: #fff;
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(37, 99, 235, 0.22);
}

.app-sidebar-pin-icon {
    width: 16px;
    height: 16px;
    display: block;
    transition: transform 0.15s ease;
}

body.sidebar-collapsed .app-sidebar-pin-icon {
    transform: rotate(180deg);
}

body.sidebar-collapsed .app-sidebar-pin {
    margin-left: auto;
}

.app-sidebar-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 7px 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(71, 85, 105, 0.75) transparent;
}

.app-sidebar-body::-webkit-scrollbar {
    width: 6px;
}

.app-sidebar-body::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.55);
    border-radius: 6px;
}

.app-sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.app-sidebar-nav-group {
    margin: 0;
}

.app-sidebar-details {
    border-radius: 4px;
    background: var(--sb-bg-panel);
    border: 1px solid var(--sb-border-soft);
    overflow: hidden;
}

.app-sidebar-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--sb-text-muted);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.app-sidebar-summary::-webkit-details-marker {
    display: none;
}

.app-sidebar-summary::marker {
    content: none;
}

.app-sidebar-summary:hover {
    color: #cbd5e1;
    background: var(--sb-bg-hover);
}

.app-sidebar-summary-chev {
    width: 8px;
    height: 8px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    margin-top: -4px;
    transition: transform 0.18s ease, border-color 0.15s ease;
    flex-shrink: 0;
    opacity: 0.85;
}

.app-sidebar-details[open] .app-sidebar-summary-chev {
    transform: rotate(225deg);
    margin-top: 2px;
    border-color: var(--sb-primary-bright);
}

body.sidebar-collapsed .app-sidebar-summary,
body.sidebar-collapsed .app-sidebar-summary-chev {
    display: none;
}

body.sidebar-collapsed .app-sidebar-details {
    border: none;
    background: transparent;
    box-shadow: none;
}

body.sidebar-collapsed .app-sidebar-links {
    padding: 0;
    gap: 3px;
}

.app-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 1px 5px 6px;
}

.app-sidebar-links--grouped {
    gap: 4px;
}

.app-sidebar-subdetails {
    border-radius: 3px;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(51, 65, 85, 0.45);
    overflow: hidden;
}

.app-sidebar-subsummary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 8px 5px 10px;
    font-size: 10.5px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.app-sidebar-subsummary::-webkit-details-marker,
.app-sidebar-subsummary::marker {
    display: none;
    content: none;
}

.app-sidebar-subsummary:hover {
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.55);
}

.app-sidebar-subdetails[open] > .app-sidebar-subsummary {
    color: #e2e8f0;
}

.app-sidebar-subdetails[open] > .app-sidebar-subsummary .app-sidebar-summary-chev {
    transform: rotate(225deg);
    margin-top: 2px;
    border-color: var(--sb-primary-bright);
}

.app-sidebar-sublinks {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0 4px 4px 6px;
}

.app-sidebar-link--child {
    padding-left: 6px;
    font-size: 11.5px;
}

.app-sidebar-link--child .app-sidebar-link-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
}

body.sidebar-collapsed .app-sidebar-subsummary,
body.sidebar-collapsed .app-sidebar-sublinks {
    display: none;
}

.app-sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 7px 6px 8px;
    margin: 0;
    border-radius: 4px;
    color: #e2e8f0;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: background-color 0.12s ease, color 0.12s ease;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

.app-sidebar-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 2px;
    border-radius: 0;
    background: var(--sb-primary);
    opacity: 0;
    transition: opacity 0.12s ease;
}

.app-sidebar-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.45);
    color: var(--sb-text-muted);
    transition: background-color 0.12s ease, color 0.12s ease;
}

.app-sidebar-link-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.app-sidebar-link .app-sidebar-link-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.15s ease, width 0.2s ease;
}

body.sidebar-collapsed .app-sidebar-link {
    justify-content: center;
    padding: 7px 4px;
}

body.sidebar-collapsed .app-sidebar-link .app-sidebar-link-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    position: absolute;
}

body.sidebar-collapsed .app-sidebar-link-icon {
    flex: 0 0 auto;
}

.app-sidebar-link:hover {
    background-color: var(--sb-bg-hover);
    color: #fff;
    text-decoration: none;
}

.app-sidebar-link:hover .app-sidebar-link-icon {
    background: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
}

.app-sidebar-link.is-active {
    background: rgba(37, 99, 235, 0.12);
    color: #fff;
}

.app-sidebar-link.is-active::before {
    opacity: 1;
}

.app-sidebar-link.is-active .app-sidebar-link-icon {
    background: rgba(37, 99, 235, 0.2);
    color: #bfdbfe;
}

.app-sidebar-foot {
    padding: 8px 7px 10px;
    border-top: 1px solid var(--sb-border);
    background: var(--sb-bg);
    flex-shrink: 0;
}

.app-sidebar-foot-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-bottom: 6px;
    padding: 2px;
    background: var(--sb-bg-panel);
    border: 1px solid var(--sb-border-soft);
    border-radius: 4px;
}

.app-sidebar-foot-top {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.app-sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 8px;
    border-radius: 2px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.12s ease;
    margin-bottom: 0;
}

.app-sidebar-user:hover {
    background: var(--sb-bg-hover);
    text-decoration: none;
}

.app-sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0;
}

.app-sidebar-user-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
    transition: opacity 0.15s ease;
}

body.sidebar-collapsed .app-sidebar-user-text {
    display: none;
}

body.sidebar-collapsed .app-sidebar-user {
    justify-content: center;
    padding: 6px 4px;
}

body.sidebar-collapsed .app-sidebar-foot-panel {
    flex-direction: column;
    align-items: stretch;
    padding: 4px 2px 6px;
}

body.sidebar-collapsed .app-sidebar-foot-top {
    flex-direction: column;
}

body.sidebar-collapsed .app-sidebar-logout-label {
    display: none;
}

body.sidebar-collapsed .app-sidebar-logout {
    justify-content: center;
    align-self: stretch;
    border-left: none;
    border-top: 1px solid var(--sb-border-soft);
    padding: 8px 4px;
}

.app-sidebar-user-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--sb-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar-user-role {
    font-size: 10px;
    color: var(--sb-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    align-self: stretch;
    margin: 0;
    padding: 0 8px 0 10px;
    border: none;
    border-left: 1px solid var(--sb-border-soft);
    border-radius: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.app-sidebar-logout .app-logout-icon {
    width: 14px;
    height: 14px;
    opacity: 0.95;
}

.app-sidebar-logout:hover {
    color: #fecaca;
    background: rgba(127, 29, 29, 0.2);
    text-decoration: none;
}

.app-sidebar-logout:focus-visible {
    outline: 2px solid var(--sb-primary-bright);
    outline-offset: 1px;
}

.app-sidebar-foot-meta {
    font-size: 9px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    letter-spacing: 0.03em;
}

body.sidebar-collapsed .app-sidebar-foot-meta span:not(:first-child) {
    display: none;
}

body.sidebar-collapsed .app-sidebar-foot-meta .app-sidebar-foot-dot {
    display: none;
}

/* Yönetim: aynı slate + mavi palet */
.app-sidebar--legacy {
    width: 220px;
    min-width: 220px;
}

.app-sidebar--legacy .app-sidebar-nav {
    display: block;
    padding: 8px 10px 12px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    gap: 0;
}

.app-sidebar--legacy .app-sidebar-nav-section {
    margin-top: 10px;
}

.app-sidebar--legacy .app-sidebar-nav-section:first-child {
    margin-top: 0;
}

.app-sidebar--legacy .app-sidebar-nav-section-title {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    padding: 6px 10px;
    color: var(--sb-text-muted);
}

.app-sidebar--legacy .app-sidebar-link {
    padding: 8px 10px;
    gap: 8px;
    box-shadow: none;
}

.app-sidebar--legacy .app-sidebar-link::before {
    display: none;
}

.app-sidebar--legacy .app-sidebar-link.is-active {
    box-shadow: none;
    border: 1px solid rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.1);
}

.app-sidebar--legacy .app-sidebar-footer {
    display: block;
    flex-shrink: 0;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--sb-border);
    font-size: 11px;
    color: var(--sb-text-muted);
    background: var(--sb-bg);
}

.app-content {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    padding: 16px 20px 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

.app-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    min-width: 0;
}

.app-page-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-page-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.app-page-subtitle {
    font-size: 12px;
    color: #6b7280;
}

.app-page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    background-color: #e5e7eb;
    color: #111827;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    height: 30px;
}

/* Alış/Satış ve Faturalar: bazı tarayıcılarda buton üstünde görünen "beyaz nokta" (tap highlight / pseudo) engelle */
.btn,
.cari-tab,
.stok-tab,
.btn-dropdown-toggle {
    -webkit-tap-highlight-color: transparent;
}

.btn::before,
.btn::after,
.cari-tab::before,
.cari-tab::after,
.stok-tab::before,
.stok-tab::after {
    content: none !important;
}

/* Bazı cihazlarda tıklama highlight'ı "beyaz yuvarlak" gibi görünebiliyor */
button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* Dropdown toggle okunu koru; diğer buton pseudo efektlerini kapat */
.btn:not(.btn-dropdown-toggle)::before,
.btn:not(.btn-dropdown-toggle)::after {
    content: none !important;
}

.btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.btn:focus:not(:focus-visible),
.cari-tab:focus:not(:focus-visible),
.stok-tab:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

.btn:hover {
    background-color: #d1d5db;
}

.btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.btn-primary {
    background-color: #2563eb;
    color: #f9fafb;
    border-color: #1d4ed8;
    box-shadow: none;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-ghost {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.6);
    color: #374151;
}

.btn-ghost:hover {
    background-color: #e5e7eb;
}

/* Mobil header menüsü: .btn-ghost açık arka plan için koyu metin rengi verir; #0f172a üzerinde ikon kayboluyordu */
.app-header .app-mobile-menu-btn.btn-ghost {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.98));
    border-color: rgba(148, 163, 184, 0.45);
    color: #f8fafc;
}

.app-header .app-mobile-menu-btn.btn-ghost:hover {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.34), rgba(29, 78, 216, 0.4));
    border-color: rgba(96, 165, 250, 0.65);
    color: #ffffff;
}

/* Sil/Pasif butonları: kırmızı görünüm */
.btn-ghost[class*="delete"],
.btn-ghost[class*="sil"],
button.btn-ghost[class*="delete"],
button.btn-ghost[class*="sil"],
a.btn-ghost[class*="delete"],
a.btn-ghost[class*="sil"] {
    border-color: rgba(248, 113, 113, 0.75);
    color: #b91c1c;
}

.btn-ghost[class*="delete"]:hover,
.btn-ghost[class*="sil"]:hover,
button.btn-ghost[class*="delete"]:hover,
button.btn-ghost[class*="sil"]:hover,
a.btn-ghost[class*="delete"]:hover,
a.btn-ghost[class*="sil"]:hover {
    background-color: #fef2f2;
    border-color: rgba(248, 113, 113, 0.9);
    color: #991b1b;
}

/* Sil onay (confirm) butonu: kırmızı zemin */
.btn-primary[class*="delete-confirm"],
.btn-primary[class*="sil-confirm"],
.btn-primary[class*="delete-confirm"]:hover,
.btn-primary[class*="sil-confirm"]:hover {
    background-color: #dc2626;
    border-color: #b91c1c;
    color: #fff;
}

.btn-sm {
    padding: 4px 9px;
    font-size: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    background-color: #eef2ff;
    color: #3730a3;
}

.tag-soft {
    background-color: #f3f4f6;
    color: #4b5563;
}

.app-page-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.03);
    padding: 16px 18px 18px;
    border: 1px solid #e5e7eb;
    min-width: 0;
}

.app-page-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.app-page-card-header .app-page-card-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
}

.app-page-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.app-page-card-subtitle {
    font-size: 12px;
    color: #6b7280;
}

.app-page-card-body {
    margin-top: 4px;
}

/* Yönetim paneli / eski ekranlar için uyumluluk katmanı */
.card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.03);
    border: 1px solid #e5e7eb;
}

.card-body {
    padding: 16px 18px 18px;
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    font-size: 13px;
}

.alert code {
    background: rgba(15, 23, 42, 0.06);
    padding: 1px 6px;
    border-radius: 6px;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fed7aa;
    color: #92400e;
}

.alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

/* Cari sekmeleri */
.cari-tabs {
    margin-bottom: 10px;
}

.cari-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
}

.cari-tab {
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 6px 10px;
    font-size: 12px;
    background-color: #f3f4f6;
    color: #4b5563;
    cursor: pointer;
    font-weight: 600;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.cari-tab:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.cari-tab.is-active {
    background-color: #ffffff;
    color: #111827;
    border-color: #e5e7eb;
    border-bottom-color: #ffffff;
    box-shadow: 0 -2px 0 #2563eb inset;
    font-weight: 800;
}

.cari-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .25);
}

.cari-tab.is-active:focus-visible {
    box-shadow: 0 -2px 0 #2563eb inset, 0 0 0 3px rgba(37, 99, 235, .22);
}

.cari-tab-close {
    margin-left: 6px;
    font-size: 11px;
    color: #9ca3af;
    cursor: pointer;
}

.cari-tab.is-active .cari-tab-close {
    color: #1d4ed8;
}

a.cari-tab,
a.module-nav-tab {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

a.cari-tab.is-active,
a.module-nav-tab.is-active {
    color: #111827;
}

.cari-tabs-content {
    margin-top: -1px;
}

.cari-tab-pane {
    display: none;
}

.cari-tab-pane.is-active {
    display: block;
}

/* Stok sekmeleri */
.stok-tabs {
    margin-bottom: 10px;
}

.stok-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
}

.stok-tab {
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 6px 10px;
    font-size: 12px;
    background-color: #f3f4f6;
    color: #4b5563;
    cursor: pointer;
    font-weight: 600;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.stok-tab:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.stok-tab.is-active {
    background-color: #ffffff;
    color: #111827;
    border-color: #e5e7eb;
    border-bottom-color: #ffffff;
    box-shadow: 0 -2px 0 #2563eb inset;
    font-weight: 800;
}

.stok-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .25);
}

.stok-tab.is-active:focus-visible {
    box-shadow: 0 -2px 0 #2563eb inset, 0 0 0 3px rgba(37, 99, 235, .22);
}

.stok-tab-close {
    margin-left: 6px;
    font-size: 11px;
    color: #9ca3af;
    cursor: pointer;
}

.stok-tab.is-active .stok-tab-close {
    color: #1d4ed8;
}

.stok-tabs-content {
    margin-top: -1px;
}

.stok-tab-pane {
    display: none;
}

.stok-tab-pane.is-active {
    display: block;
}

/* e‑İrsaliye giden formu: üst alan iç sekmeler */
.ei-giden-form-tabs {
    margin-bottom: 14px;
}

.ei-giden-form-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
}

.ei-giden-form-tab {
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 6px 12px;
    font-size: 12px;
    background-color: #f3f4f6;
    color: #4b5563;
    cursor: pointer;
    font-weight: 600;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ei-giden-form-tab:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.ei-giden-form-tab.is-active {
    background-color: #ffffff;
    color: #111827;
    border-color: #e5e7eb;
    border-bottom-color: #ffffff;
    box-shadow: 0 -2px 0 #2563eb inset;
    font-weight: 800;
}

.ei-giden-form-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .25);
}

.ei-giden-form-tabs-content {
    margin-top: -1px;
    padding-top: 4px;
}

.ei-giden-form-tab-pane {
    display: none;
}

.ei-giden-form-tab-pane.is-active {
    display: block;
}

/* e-irsaliye: taşıyıcı/şoför bloğu daha dolu görünsün */
.ei-transport-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.ei-transport-panel + .form-row {
    margin-top: 6px;
}

[data-ei-giden-form="1"] .ei-transport-picker-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

[data-ei-giden-form="1"] .ei-transport-picker-group {
    min-width: 0;
}

[data-ei-giden-form="1"] .ei-transport-picker-control {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

[data-ei-giden-form="1"] .ei-transport-picker-control .form-control {
    min-width: 0;
    flex: 1 1 auto;
}

[data-ei-giden-form="1"] .ei-transport-picker-control .btn {
    flex: 0 0 52px;
    width: 52px;
    text-align: center;
}

[data-ei-giden-form="1"] .ei-transport-picker-control .btn.btn-ghost {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

[data-ei-giden-form="1"] .ei-transport-picker-control .btn.btn-ghost:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

[data-ei-giden-form="1"] .ei-transport-grid {
    display: grid;
    gap: 12px 16px;
}

[data-ei-giden-form="1"] .ei-transport-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-ei-giden-form="1"] .ei-transport-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

[data-ei-giden-form="1"] .ei-transport-grid .filter-bar-group {
    min-width: 0;
}

@media (max-width: 1100px) {
    [data-ei-giden-form="1"] .ei-transport-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    [data-ei-giden-form="1"] .ei-transport-picker-row,
    [data-ei-giden-form="1"] .ei-transport-grid--2,
    [data-ei-giden-form="1"] .ei-transport-grid--3 {
        grid-template-columns: minmax(0, 1fr);
    }
}

[data-ei-giden-form="1"] .js-ei-tasiyici-selected-label,
[data-ei-giden-form="1"] .js-ei-sofor-selected-label,
[data-ei-giden-form="1"] .js-ei-tasiyici-unvan[readonly],
[data-ei-giden-form="1"] .js-ei-tasiyici-vkn[readonly],
[data-ei-giden-form="1"] .js-ei-sofor-ad[readonly],
[data-ei-giden-form="1"] .js-ei-sofor-soyad[readonly],
[data-ei-giden-form="1"] .js-ei-sofor-tckn[readonly],
[data-ei-giden-form="1"] .js-ei-arac-plaka[readonly],
[data-ei-giden-form="1"] .js-ei-dorse-plaka[readonly] {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a;
    font-weight: 500;
}

/* Senet modalları için tab stilleri */
.tab-container {
    margin-top: 12px;
}

.tab-headers {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 12px;
}

.tab-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #374151;
}

.tab-btn.active {
    color: #111827;
    border-bottom-color: #2563eb;
    font-weight: 800;
}

.tab-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .25);
    border-radius: 8px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Senet düzenleme: sol senet bilgileri, sağ ödeyecek + kefil */
.app-modal-dialog.senet-modal-dialog {
    width: min(1240px, calc(100vw - 40px));
    max-width: min(1240px, calc(100vw - 40px));
}

.senet-modal-split {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.15fr);
    gap: 20px 32px;
    align-items: start;
}

.senet-modal-split__main {
    min-width: 0;
}

.senet-modal-split__parties {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px 18px;
    min-width: 0;
}

.senet-modal-party {
    min-width: 0;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.senet-modal-party .filter-bar-group {
    min-width: 0;
    flex: 1 1 100%;
}

.senet-modal-party .form-control,
.senet-modal-party .form-select {
    max-width: 100%;
    box-sizing: border-box;
}

.senet-modal-party__title {
    margin: 0 0 12px;
    padding-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

.senet-modal-party .form-row {
    margin-bottom: 8px;
}

.senet-modal-party .form-row:last-child {
    margin-bottom: 0;
}

@media (max-width: 1100px) {
    .senet-modal-split {
        grid-template-columns: 1fr;
    }

    .senet-modal-split__parties {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .senet-modal-split__parties {
        grid-template-columns: 1fr;
    }
}

/* Çek düzenleme: sol çek bilgileri, sağ banka bilgileri */
.app-modal-dialog.cek-modal-dialog {
    width: min(1100px, calc(100vw - 40px));
    max-width: min(1100px, calc(100vw - 40px));
}

.cek-modal-split {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(280px, 0.95fr);
    gap: 20px 28px;
    align-items: start;
}

.cek-modal-split__main,
.cek-modal-split__side {
    min-width: 0;
}

.cek-modal-side-card {
    min-width: 0;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.cek-modal-side-card .filter-bar-group {
    min-width: 0;
    flex: 1 1 100%;
}

.cek-modal-side-card .form-control,
.cek-modal-side-card .form-select {
    max-width: 100%;
    box-sizing: border-box;
}

.cek-modal-side-card__title {
    margin: 0 0 12px;
    padding-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

.cek-modal-side-card .form-row {
    margin-bottom: 8px;
}

.cek-modal-side-card .form-row:last-child {
    margin-bottom: 0;
}

@media (max-width: 960px) {
    .cek-modal-split {
        grid-template-columns: 1fr;
    }
}

/* TV Kapanma Animasyonu - Klasik Tüplü TV Efekti */
.tv-shutdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    display: none;
}

.tv-shutdown-overlay.active {
    opacity: 1 !important;
    pointer-events: all !important;
    display: block !important;
}

/* Üst siyah bant */
.tv-shutdown-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: #000;
    transform: translateY(0);
}

/* Alt siyah bant */
.tv-shutdown-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: #000;
    transform: translateY(0);
}

/* Başlangıç durumu - kapalı (siyah ekran) - sadece açılış için */
.tv-shutdown-overlay.active.tv-opening::before {
    height: 50vh;
}

.tv-shutdown-overlay.active.tv-opening::after {
    height: 50vh;
}

/* Kapanış animasyonu - üst ve alt bantlar ortada birleşir (sadece active, tv-opening YOK) */
.tv-shutdown-overlay.active:not(.tv-opening)::before {
    height: 0;
    animation: tvCloseTop 1s ease-in forwards;
}

.tv-shutdown-overlay.active:not(.tv-opening)::after {
    height: 0;
    animation: tvCloseBottom 1s ease-in forwards;
}

@keyframes tvCloseTop {
    0% {
        height: 0;
    }
    100% {
        height: 50vh;
    }
}

@keyframes tvCloseBottom {
    0% {
        height: 0;
    }
    100% {
        height: 50vh;
    }
}

/* Açılış animasyonu - üst ve alt bantlar ortadan yukarı ve aşağı açılır */
.tv-shutdown-overlay.tv-opening {
    pointer-events: none !important;
}

.tv-shutdown-overlay.tv-opening::before {
    animation: tvOpenTop 1s ease-out forwards;
}

.tv-shutdown-overlay.tv-opening::after {
    animation: tvOpenBottom 1s ease-out forwards;
}

@keyframes tvOpenTop {
    0% {
        height: 50vh;
    }
    100% {
        height: 0;
    }
}

@keyframes tvOpenBottom {
    0% {
        height: 50vh;
    }
    100% {
        height: 0;
    }
}

/* Dashboard */
.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    align-items: stretch;
}

.dashboard-kpi-card {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
    min-height: 74px;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    flex: 1 1 220px;
}

.dashboard-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(37,99,235,0.85), rgba(16,185,129,0.75));
    opacity: 0.55;
}

.dashboard-kpi-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
    border-color: #dbe3f3;
}

.dashboard-kpi-label {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

.dashboard-kpi-value {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.01em;
}

.dashboard-kpi-meta {
    margin-top: 4px;
    font-size: 11px;
    color: #6b7280;
}

.dashboard-kpi-more-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    flex: 1 1 100%;
    margin: 0;
    padding: 10px 14px;
    border: 1px dashed #c7d2fe;
    border-radius: 10px;
    background: #f8fafc;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dashboard-kpi-more-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.dashboard-kpi-more-icon {
    display: inline-flex;
    line-height: 0;
    transition: transform 0.3s ease;
}

.dashboard-kpi-more-icon svg {
    display: block;
}

.dashboard-grid.is-kpi-expanded .dashboard-kpi-more-icon {
    transform: rotate(180deg);
}

.dashboard-kpi-extra {
    display: contents;
}

.dashboard-main {
    display: flex;
    gap: 14px;
    align-items: stretch;
}

.dashboard-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.dashboard-col:first-child {
    flex: 2.2 1 0%;
}

.dashboard-col:last-child {
    flex: 1 1 320px;
}

.dashboard-main .app-page-card {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.03);
}

.dashboard-main .app-page-card-header {
    margin-bottom: 10px;
}

.dashboard-main .app-page-card-body {
    margin-top: 0;
}

.dashboard-fullwidth-section {
    margin-top: 12px;
}

.dashboard-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.dashboard-section-subtitle {
    font-size: 11px;
    color: #6b7280;
}

.dashboard-timeline {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.dashboard-timeline-item {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 12px;
}

.dashboard-timeline-item:last-child {
    border-bottom: none;
}

.dashboard-timeline-time {
    width: 60px;
    color: #6b7280;
}

.dashboard-timeline-text {
    flex: 1;
    color: #111827;
}

.dashboard-timeline-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.dashboard-chart-wrap {
    width: 100%;
    height: 260px;
    background: linear-gradient(180deg, rgba(15,23,42,0.02), rgba(15,23,42,0));
    border: 1px solid rgba(229,231,235,0.9);
    border-radius: 10px;
    padding: 10px 10px 6px;
}

.dashboard-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.dashboard-chart-note {
    margin-top: 8px;
    font-size: 11px;
    color: #6b7280;
}

.dashboard-mini-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.dashboard-mini-empty {
    font-size: 12px;
    color: #6b7280;
    padding: 6px 0;
}

.dashboard-mini-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 10px 10px;
    border: 1px solid rgba(229,231,235,0.95);
    background: linear-gradient(180deg, rgba(15,23,42,0.02), rgba(15,23,42,0));
    border-radius: 10px;
}

.dashboard-mini-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.dashboard-mini-title {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.dashboard-mini-amount {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.dashboard-mini-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.dashboard-mini-bar > span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(37,99,235,0.9), rgba(16,185,129,0.85));
}

.dashboard-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 6px;
}

.dashboard-quick-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    background: #ffffff;
    color: #111827;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
    text-align: center;
}

.dashboard-quick-btn:hover {
    background: #f9fafb;
    border-color: #dbe3f3;
    text-decoration: none;
}

.dashboard-quick-btn:active {
    transform: translateY(1px);
}

@media (max-width: 520px) {
    .dashboard-quick-actions {
        grid-template-columns: 1fr;
    }
}

/* Dashboard skeleton loader (Yenile) */
body.is-dashboard-loading .dashboard-chart-wrap,
body.is-dashboard-loading .dashboard-mini-item,
body.is-dashboard-loading .dashboard-mini-empty {
    position: relative;
    overflow: hidden;
}

body.is-dashboard-loading .dashboard-chart-wrap::after,
body.is-dashboard-loading .dashboard-mini-item::after,
body.is-dashboard-loading .dashboard-mini-empty::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(226, 232, 240, 0.65) 0%,
        rgba(241, 245, 249, 0.95) 35%,
        rgba(226, 232, 240, 0.65) 70%
    );
    transform: translateX(-100%);
    animation: dashboardSkeletonShimmer 1.05s ease-in-out infinite;
    border-radius: inherit;
    pointer-events: none;
}

body.is-dashboard-loading .dashboard-chart-note,
body.is-dashboard-loading .dashboard-mini-row,
body.is-dashboard-loading .dashboard-mini-bar,
body.is-dashboard-loading .dashboard-mini-title,
body.is-dashboard-loading .dashboard-mini-amount {
    opacity: 0.35;
}

body.is-dashboard-loading .dashboard-chart-wrap canvas {
    opacity: 0.15;
}

@keyframes dashboardSkeletonShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@media (max-width: 1100px) {
    .dashboard-main {
        flex-direction: column;
    }
}

@media (min-width: 1200px) {
    /* Büyük ekranda KPI kartları daha “düzgün” hizalansın */
    .dashboard-kpi-card {
        flex: 1 1 calc(25% - 12px);
    }
}

@media (max-width: 1199px) and (min-width: 800px) {
    .dashboard-kpi-card {
        flex: 1 1 calc(33.333% - 12px);
    }
}

@media (max-width: 799px) and (min-width: 520px) {
    .dashboard-kpi-card {
        flex: 1 1 calc(50% - 12px);
    }
}

@media (max-width: 519px) {
    .dashboard-kpi-card {
        flex: 1 1 100%;
    }

    .dashboard-kpi-more-btn {
        display: inline-flex;
    }

    .dashboard-kpi-extra {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        flex: 1 1 100%;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.4s ease, opacity 0.25s ease;
    }

    .dashboard-grid.is-kpi-expanded .dashboard-kpi-extra {
        max-height: 2800px;
        opacity: 1;
        pointer-events: auto;
    }
}

/* Formlar */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-bottom: 10px;
    width: 100%;
}

/* Stok detay kartı: alanları düzenli grid göster */
.stock-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 18px;
    margin-bottom: 10px;
    width: 100%;
    align-items: start;
}

.stock-detail-grid .filter-bar-group {
    min-width: 0;
}

/* Stok detay: tüm alan başlıkları (label) kalın */
[data-stock-detail-card] .filter-bar-label {
    font-weight: 700;
}

/* Stok detay: bölüm başlıkları da tam bold olsun */
[data-stock-detail-card] .form-section-title {
    font-weight: 700;
}

/* Stok anlaşmaları: satış fiyatı sütunu sağa yaslı */
.js-stock-agreement-list td:nth-child(4),
[data-stock-detail-card] table.data-table tbody td:nth-child(4) {
    text-align: right;
}

/* Alış/Satış fatura özet kutusu (Toplam/İskonto/KDV/Genel Toplam) */
.invoice-totals-box {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px;
    background: #ffffff;
}

/* Özet kutusu içinde satır/sütun ayraçları */
.invoice-totals-box .form-row {
    gap: 0;
    margin-bottom: 0;
}
.invoice-totals-box .form-row + .form-row {
    border-top: 1px solid #e5e7eb;
}
.invoice-totals-box .filter-bar-group {
    position: static;
    padding-top: 0;
    padding: 10px 12px;
    min-width: 0;
    align-items: stretch;
}
.invoice-totals-box .filter-bar-group + .filter-bar-group {
    border-left: 1px solid #e5e7eb;
}

/* Bu kutuda label "floating" olmasın; çizgileri delmesin */
.invoice-totals-box .filter-bar-label {
    position: static;
    top: auto;
    left: auto;
    padding: 0;
    background: transparent;
    border-radius: 0;
    margin-bottom: 6px;
}

.form-field {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.form-label span.required {
    color: #ef4444;
    margin-left: 2px;
}

.required-marker-auto,
.filter-bar-label .required {
    color: #ef4444;
    margin-left: 2px;
    font-weight: 700;
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #d4d4d8;
    background-color: #ffffff;
    font-size: 13px;
    color: #111827;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.25),
        0 4px 8px rgba(15, 23, 42, 0.08);
    background-color: #ffffff;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-control-static {
    display: block;
    padding: 8px 12px;
    color: #111827;
    font-size: 13px;
    min-height: 38px;
    line-height: 22px;
}

.form-hint {
    font-size: 11px;
    color: #6b6b6b;
}

.form-error {
    font-size: 11px;
    color: #b91c1c;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

/* Form bölümleri (alt başlıklar) */
.form-section {
    margin: 14px 0 8px;
    padding-top: 6px;
    border-top: 1px solid #e5e7eb;
}

.form-section-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #111827;
    padding: 3px 10px;
    border-radius: 999px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}

/* Not: #cariExtreModal için z-index JS (updateModalZIndex) tarafından yönetilir. */

/* Modal */
.app-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.app-modal-dialog {
    position: relative;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.30);
    border: 1px solid #e5e7eb;
    padding: 14px 16px 12px;
    width: 520px;
    max-width: calc(100% - 32px);
    z-index: 10000;
}

.app-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.app-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.app-modal-subtitle {
    font-size: 12px;
    color: #6b7280;
}

.app-modal-close {
    border: none;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

.app-modal-close:hover {
    color: #111827;
}

.app-modal-body {
    margin-top: 4px;
}

.app-modal-footer {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.app-modal.is-open {
    display: flex;
}

/* Mobil: geniş tablolu modallarda yatay kaydırma (Stok Bul, Cari Bul, vb.) */
@media (max-width: 992px) {
    .app-modal-dialog {
        min-width: 0;
    }

    .app-modal-body {
        min-width: 0;
    }

    .app-modal .app-modal-body .table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        max-width: 100%;
    }

    .app-modal .app-modal-body .table-wrapper > table.data-table {
        width: max-content;
        min-width: 100%;
    }
}

/* Cari Hesap Ekstresi modalı: ekrana sığdır ve içerikte scroll kullan */
#cariExtreModal .app-modal-dialog {
    width: min(1250px, calc(100% - 16px)) !important;
    max-height: calc(100vh - 16px);
    display: flex;
    flex-direction: column;
}

#cariExtreModal .app-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

#cariExtreModal .app-modal-body > div:first-child {
    min-width: 0;
}

#cariExtreModal .app-modal-body > div:first-child > div:last-child {
    min-width: 0 !important;
}

#cariExtreModal .extre-modal-dialog {
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

#cariExtreModal .extre-modal-actions .btn {
    min-width: 78px;
}

#cariExtreModal .extre-modal-section {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    background: #f8fafc;
}

#cariExtreModal .extre-modal-content .table-wrapper {
    border-radius: 10px;
}

#cariExtreModal .extre-modal-summary {
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}

#cariExtreModal .extre-summary-item {
    color: #374151;
    font-size: 12px;
}

#cariExtreModal .extre-summary-item-balance {
    color: #111827;
    font-weight: 700;
}

@media (max-width: 1100px) {
    #cariExtreModal .app-modal-body > div:first-child {
        display: block !important;
    }

    #cariExtreModal .app-modal-body > div:first-child > div:first-child {
        max-width: none !important;
        width: 100% !important;
        margin-bottom: 10px;
    }

    #cariExtreModal .app-modal-body > div:first-child > div:last-child {
        min-width: 0 !important;
        width: 100% !important;
    }
}

/* Cari grup silme onayı kutusu */
.cari-group-delete-box {
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #fee2e2;
    background-color: #fef2f2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cari-group-delete-text {
    font-size: 12px;
    color: #7f1d1d;
}

.cari-group-delete-actions {
    display: flex;
    gap: 6px;
}

/* Belge prefix alanı (ayarlar) */
.form-row--belge-prefix-inputs {
    align-items: flex-end;
    margin-bottom: 4px;
}
.form-row--belge-prefix-inputs .belge-prefix-field-group {
    flex: 1 1 200px;
    min-width: 200px;
    max-width: calc(33.333% - 14px);
}
.belge-prefix-field-group .belge-prefix-input-row .form-control {
    min-width: 0;
    width: 100%;
}
.belge-prefix-input-row {
    display: flex;
    gap: 6px;
    align-items: stretch;
    width: 100%;
}
.belge-prefix-input-row .form-control {
    flex: 1 1 auto;
    min-width: 0;
}
.belge-prefix-input-row .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}
.belge-prefix-chips-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 18px;
    width: 100%;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
    box-sizing: border-box;
}
.belge-prefix-chips-col__title {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
@media (max-width: 960px) {
    .form-row--belge-prefix-inputs .belge-prefix-field-group {
        max-width: 100%;
        flex: 1 1 100%;
    }
    .belge-prefix-chips-overview {
        grid-template-columns: 1fr;
    }
}
.form-row--other-prefixes {
    align-items: flex-end;
}
.form-row--other-prefixes .filter-bar-group {
    flex: 1 1 180px;
    min-width: 180px;
}
.belge-prefix-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.belge-prefix-chips--empty {
    font-size: 12px;
}
.belge-prefix-chip {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 12px;
    line-height: 1.3;
}
.belge-prefix-chip.is-default {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.belge-prefix-chip__tag {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #1d4ed8;
}
.belge-prefix-chip__code {
    font-weight: 600;
    color: #111827;
}
.belge-prefix-chip__suffix {
    font-size: 11px;
    font-weight: 500;
}
.belge-prefix-chip__meta {
    color: #6b7280;
    font-size: 11px;
}

/* Tablo görünümleri */
.table-wrapper {
    margin-top: 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow-x: auto;
    overflow-y: visible;
    background-color: #ffffff;
    -webkit-overflow-scrolling: touch;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.data-table thead {
    background-color: #d8d9db;
}

table.data-table th,
table.data-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    white-space: nowrap;
}

/* Stok Bul: geniş ekranda sarma; mobilde yatay kaydırma (app-modal mobil kuralları) */
@media (min-width: 993px) {
    #purchaseStockFindModal table.data-table th,
    #purchaseStockFindModal table.data-table td {
        white-space: normal;
    }
}

#purchaseStockFindModal table.data-table td:nth-child(3) {
    /* Stok adı */
    min-width: 260px;
}

/* Cari anlaşmaları modalı: firma adını satıra sığdır */
#cariAgreementsModal table.data-table td:nth-child(2) {
    white-space: pre-wrap;
}

table.data-table th {
    font-weight: 700;
    font-size: 12px;
    color: #4b5563;
}

table.data-table tbody tr[data-stock-row] {
    cursor: pointer;
}

table.data-table tbody tr:hover {
    background-color: #f9fafb;
}

/* GİB’e gönderilmemiş giden fatura / e-irsaliye taslağı (bekleyen) */
table.data-table tbody tr.data-table-row--gib-taslak td {
    background-color: #fff7ed;
}
table.data-table tbody tr.data-table-row--gib-taslak:hover td {
    background-color: #ffedd5;
}

/* Mobilde eklenen "Daha Fazla Göster" hücresi geniş ekranda tabloya fazladan sütun eklemesin */
table.data-table tbody tr .mobile-card-more-action {
    display: none !important;
}

table.data-table tbody tr:last-child td {
    border-bottom: none;
}

.table-no-data-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 8px;
}

.table-no-data-image {
    width: 300px;
    max-width: 45vw;
    height: auto; 
    object-fit: contain;
}

.table-no-data-text {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    line-height: 1.35;
}

table.data-table td.js-no-data-cell-enhanced,
table.table td.js-no-data-cell-enhanced,
table.data-table th.js-no-data-cell-enhanced,
table.table th.js-no-data-cell-enhanced {
    text-align: center !important;
    white-space: normal !important;
}

/* Input'lu kalem tablosu: hücre içinde ayrı kutu gibi görünmesin */
table.data-table.purchase-items-input-table th,
table.data-table.purchase-items-input-table td {
    padding: 0;
    white-space: nowrap;
}

table.data-table.purchase-items-input-table thead th {
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.2;
}

table.data-table.purchase-items-input-table thead tr {
    height: 38px;
}

table.data-table.purchase-items-input-table tbody td {
    vertical-align: middle;
}

table.data-table.purchase-items-input-table tbody tr {
    cursor: text;
}

table.data-table.purchase-items-input-table tbody td {
    cursor: text;
}

table.data-table.purchase-items-input-table tbody tr:hover td {
    background: #f8fafc;
}

table.data-table.purchase-items-input-table tbody td:hover {
    background: #eef2ff;
}

/* Hücre sınırları (grid hissi) */
table.data-table.purchase-items-input-table thead th {
    border-right: 1px solid rgba(148, 163, 184, 0.45);
}
table.data-table.purchase-items-input-table thead th:last-child {
    border-right: 0;
}

table.data-table.purchase-items-input-table tbody td {
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
table.data-table.purchase-items-input-table tbody td:last-child {
    border-right: 0;
} 

table.data-table.purchase-items-input-table tbody tr:last-child td {
    border-bottom: 1px solid #e5e7eb;
}

/* Hover/focus’ta hücreyi çerçevele */
table.data-table.purchase-items-input-table tbody td:hover {
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.35);
}

table.data-table.purchase-items-input-table tbody td:focus-within {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.35);
}

/* Checkbox kolonu: sabit genişlik + ortalı */
table.data-table.purchase-items-input-table thead th:first-child,
table.data-table.purchase-items-input-table tbody td:first-child {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    padding: 0 !important;
    text-align: center;
    vertical-align: middle;
}

table.data-table.purchase-items-input-table thead th:first-child input[type="checkbox"],
table.data-table.purchase-items-input-table tbody td:first-child input[type="checkbox"] {
    margin: 0 auto !important;
    display: inline-block;
    vertical-align: middle;
}

table.data-table.purchase-items-input-table tbody td:has(.js-purchase-item-input),
table.data-table.purchase-items-input-table tbody td:has(.js-purchase-item-derived) {
    position: relative;
}

table.data-table.purchase-items-input-table .form-control,
table.data-table.purchase-items-input-table .form-select,
table.data-table.purchase-items-input-table input[type="text"],
table.data-table.purchase-items-input-table input[type="number"],
table.data-table.purchase-items-input-table select {
    width: 100%;
    height: 32px;
    padding: 6px 8px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    font-size: 13px;
}

table.data-table.purchase-items-input-table .form-control,
table.data-table.purchase-items-input-table .form-select {
    cursor: text;
}

table.data-table.purchase-items-input-table .form-select {
    cursor: pointer;
}

table.data-table.purchase-items-input-table .form-select {
    padding-right: 22px;
}

table.data-table.purchase-items-input-table .form-control:focus,
table.data-table.purchase-items-input-table .form-select:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: -2px;
}

table.data-table.purchase-items-input-table tbody td:focus-within {
    background: #eef2ff;
}

table.data-table.purchase-items-input-table .js-purchase-item-derived {
    color: #111827;
}

table.data-table.purchase-items-input-table td:last-child {
    padding: 0 6px;
    white-space: nowrap;
}

/* Kalem satırı sil: kırmızı, hücreyi doldurur (fatura / sipariş / teklif) */
table.data-table.purchase-items-input-table thead th.kalem-row-delete-cell {
    padding: 8px 6px;
    text-align: center;
    vertical-align: middle;
}
table.data-table.purchase-items-input-table tbody td.kalem-row-delete-cell {
    padding: 0 !important;
    vertical-align: stretch;
    width: 88px;
    min-width: 72px;
    text-align: center;
    white-space: normal;
}
table.data-table.purchase-items-input-table tbody td.kalem-row-delete-cell:hover,
table.data-table.purchase-items-input-table tbody td.kalem-row-delete-cell:focus-within {
    box-shadow: none !important;
    background: transparent !important;
}
table.data-table.purchase-items-input-table .btn-kalem-row-delete {
    display: block;
    width: 85%;
    margin: 3px auto;
    border-radius: 5px;
    border: 0;
    font-weight: 600;
    /* padding: 10px 6px; */
    line-height: 1.2;
    color: #fff !important;
    background: #dc2626 !important;
    box-shadow: none !important;
}
table.data-table.purchase-items-input-table .btn-kalem-row-delete:hover {
    background: #b91c1c !important;
    color: #fff !important;
}
table.data-table.purchase-items-input-table .btn-kalem-row-delete:active {
    background: #991b1b !important;
    color: #fff !important;
}

/* Teklif/Sipariş kalem satırlarında yükseklik fatura ile aynı olsun */
#teklifKalemlerTable.purchase-items-input-table tbody tr,
#siparisKalemlerBody tr[data-siparis-kalem-index] {
    height: 32px;
}

#teklifKalemlerTable.purchase-items-input-table .js-teklif-row-input,
#siparisKalemlerBody .js-siparis-row-input {
    height: 32px !important;
    min-height: 32px !important;
    line-height: 1.2;
    padding-top: 6px;
    padding-bottom: 6px;
}

/* Sayısal kolonlar: Miktar, KDV % (+ fatura satırında KDV tutarı türetilmiş alan) */
table.data-table.purchase-items-input-table .js-purchase-item-input[data-item-field="miktar"],
table.data-table.purchase-items-input-table .js-purchase-item-input[data-item-field="kdvOrani"],
#teklifKalemlerTable .js-teklif-row-input[data-field="miktar"],
#teklifKalemlerTable .js-teklif-row-input[data-field="kdvOrani"],
#siparisKalemlerBody .js-siparis-row-input[data-field="miktar"],
#siparisKalemlerBody .js-siparis-row-input[data-field="kdvOrani"] {
    text-align: right !important;
}

table.data-table.purchase-items-input-table .js-purchase-item-input[data-item-field="fiyat"],
table.data-table.purchase-items-input-table .js-purchase-item-input[data-item-field="iskontoOrani"],
table.data-table.purchase-items-input-table .js-purchase-item-input[data-item-field="stopajOrani"],
#teklifKalemlerTable .js-teklif-row-input[data-field="fiyat"],
#teklifKalemlerTable .js-teklif-row-input[data-field="iskontoOrani"],
#siparisKalemlerBody .js-siparis-row-input[data-field="fiyat"],
#siparisKalemlerBody .js-siparis-row-input[data-field="iskontoOrani"] {
    text-align: right !important;
}

/* e-İrsaliye kalem miktar */
#eirsaliyeListPage table.ei-kalem-table .js-ei-kalem-miktar,
#eirsaliyeModuleTabsWrap table.ei-kalem-table .js-ei-kalem-miktar {
    text-align: right !important;
}

/* Fatura / Teklif / Sipariş satır sonu tutar alanlarını sağa hizala */
table.data-table.purchase-items-input-table tbody td:has([data-item-tutar]),
#teklifKalemlerBody td.js-teklif-row-isk-tutar,
#siparisKalemlerBody td.js-siparis-row-net-tutar {
    text-align: right !important;
    padding: 0 10px !important;
}

table.data-table.purchase-items-input-table [data-item-tutar] {
    display: inline-block;
    min-width: 100%;
    text-align: right;
}

/* e-İrsaliye kalem tablosu: checkbox kolon kuralı burada uygulanmasın */
#eirsaliyeListPage table.ei-kalem-table thead th:first-child,
#eirsaliyeListPage table.ei-kalem-table tbody td:first-child,
#eirsaliyeModuleTabsWrap table.ei-kalem-table thead th:first-child,
#eirsaliyeModuleTabsWrap table.ei-kalem-table tbody td:first-child {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 8px !important;
    text-align: left !important;
}

#eirsaliyeListPage table.ei-kalem-table thead th,
#eirsaliyeModuleTabsWrap table.ei-kalem-table thead th {
    padding: 8px 10px !important;
}

#eirsaliyeListPage table.ei-kalem-table tbody td:last-child,
#eirsaliyeModuleTabsWrap table.ei-kalem-table tbody td:last-child {
    width: 48px;
    padding: 0 6px !important;
}

/* Kalemler: Satır ekle butonu (tablo ile aynı yükseklik) */
.purchase-items-add-btn {
    height: 32px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1;
    width: auto;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

table.data-table tfoot td {
    background-color: #f9fafb;
    font-weight: 600;
}

/* Alış/Satış kalem tablosu tfoot özet düzeni */
table.data-table tfoot.purchase-items-tfoot td {
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    font-weight: 600;
    padding: 8px 10px;
}

table.data-table tfoot.purchase-items-tfoot tr + tr td {
    border-top: 1px solid #f3f4f6;
}

.tfoot-summary-label {
    color: #6b7280;
    font-size: 12px;
    white-space: nowrap;
}

.tfoot-summary-value {
    font-size: 12px;
    color: #111827;
    min-width: 110px;
    white-space: nowrap;
}

.tfoot-summary-wrap {
    display: flex;
    justify-content: flex-end;
}

/* Yeni tfoot panel (örnekteki gibi) */
.purchase-totals-wrap {
    display: flex;
    justify-content: flex-end;
}

.purchase-items-summary-host {
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
}

.purchase-totals-panel {
    width: 520px;
    max-width: 100%;
    display: grid;
    gap: 10px;
}

.purchase-totals-panel--modern {
    width: 420px;
    background: #ffffff; 
    border-radius: 10px;
    padding: 10px 12px;
    gap: 6px;
}

.purchase-totals-meta {
    display: none;
}

.purchase-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.purchase-totals-row--sub {
    padding: 2px 0;
}

.purchase-totals-label {
    color: #111827;
    font-size: 13px;
    font-weight: 600;
}

.purchase-totals-label--sub {
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
}

.purchase-totals-value {
    min-width: 120px;
    text-align: right;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
}

.purchase-totals-value::after {
    content: ' ₺';
}

.purchase-totals-value--sub {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.purchase-totals-input {
    height: 36px;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.purchase-totals-row--payable {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid #000000;
}

.purchase-totals-row--payable .purchase-totals-label,
.purchase-totals-row--payable .purchase-totals-value {
    color: #bb0000;
    font-size: 15px;
    font-weight: 800;
}

.tfoot-summary-table {
    border-collapse: collapse;
    width: auto;
    min-width: 520px;
}

.tfoot-summary-table td {
    padding: 6px 10px;
    border-top: 1px solid #f3f4f6;
    background: transparent;
}

.tfoot-summary-table tr:first-child td {
    border-top: none;
}

/* Tablo footer pagination (İZİBİZ benzeri) */
.table-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.table-pager-left {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.table-pager-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    min-width: 200px;
}

.table-pager-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
}

.pager-btn:hover {
    background: #f3f4f6;
    text-decoration: none;
}

.pager-btn.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.pager-page {
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    font-weight: 600;
    font-size: 12px;
    color: #111827;
    padding: 0 10px;
}

.pager-limit {
    height: 28px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    font-size: 12px;
    padding: 0 8px;
    color: #111827;
}

/* Bootstrap benzeri `.table` kullanan ekranlar (örn: yönetim) */
table.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background-color: #ffffff;
}

table.table thead {
    background-color: #f3f4f6;
}

table.table th,
table.table td {
    padding: 7px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    white-space: nowrap;
    vertical-align: top;
}

table.table th {
    font-weight: 600;
    font-size: 12px;
    color: #4b5563;
}

table.table tbody tr:hover {
    background-color: #f9fafb;
}

table.table tbody tr:last-child td {
    border-bottom: none;
}

/* Filtre alanı */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.filter-bar-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    position: relative;
    padding-top: 6px;
    flex: 1;
    min-width: 180px;
}

.filter-bar-label {
    font-size: 13px;
    color: #374151;
    position: absolute;
    top: -8px;
    left: 12px;
    padding: 0 4px;
    background-color: #fff;
    border-radius: 999px;
}

/* Filtrelerde input genişlikleri */
.filter-bar-group .form-control,
.filter-bar-group .form-select {
    min-width: 190px;
}

.mobile-filter-trigger-row {
    display: none;
}
.mobile-filter-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.mobile-filter-trigger-btn:hover,
.mobile-filter-trigger-btn:focus {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}
.mobile-filter-trigger-btn svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.mobile-filter-offcanvas-head,
.mobile-filter-offcanvas-backdrop {
    display: none;
}

.app-sidebar-mobile-shortcuts {
    display: none;
}

/* Cari grubu satırı için inline düzen */
.cari-group-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    flex-wrap: nowrap;
}

.cari-group-inline input.form-control,
.cari-group-inline .form-control,
.cari-group-inline select.form-select {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: 100%;
}

/* Tarih aralığı: iki date input yan yana ama taşmadan */
.cari-group-inline > input[type="date"] {
    flex: 1 1 0;
    min-width: 140px;
}

.cari-group-inline .btn {
    flex: 0 0 auto;
    white-space: nowrap;
    height: 35px;
}

/* Sekme rozeti (taslak sayısı) */
.cari-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 4px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    background: #fef3c7;
    color: #b45309;
    vertical-align: middle;
}

.cari-tab.is-active .cari-tab-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Gelen faturalar: işlenme / eşleştirme durumu (checkbox yanı) */
.inv-select-with-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.inv-gelen-match-badge {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

.inv-gelen-match-badge--ok {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #86efac;
}

.inv-gelen-match-badge--ok::before {
    content: '✓';
}

.inv-gelen-match-badge--pending {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.inv-gelen-match-badge--pending::before {
    content: '✕';
    font-size: 10px;
}

/* Modal / dar iki sütun: hesap seçim satırı taşmasın */
.app-modal-body .form-row > .filter-bar-group {
    min-width: 0;
}

.app-modal-body .filter-bar-group .form-control,
.app-modal-body .filter-bar-group .form-select {
    min-width: 0;
}

/* Fatura Kes: Cari seçimi bloğu (Gelen/Giden sekmesindeki yeni form) */
.purchase-cari-pick{
    display:flex;
    flex-direction:row;
    align-items:stretch;
    justify-content:flex-start;
    gap:10px;
    width:100%;
    padding:10px 12px;
    border:1px solid #e5e7eb;
    border-radius:10px;
    background:linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}
.purchase-cari-picked{
    min-width:0;
    flex:1 1 auto;
    display:flex;
    flex-direction:column;
    gap:2px;
}
.purchase-cari-picked-title{
    font-size:12px;
    color:#6b7280;
}
.purchase-cari-picked-value{
    font-size:14px;
    font-weight:600;
    color:#111827;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* Ödeme / Tahsilat modalları: cari seçim kartı */
.payment-cari-pick-wrap .filter-bar-label {
    display: none;
}
.payment-cari-pick {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.payment-cari-pick--income {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 48%, #f0fdf4 100%);
    border-color: #6ee7b7;
}
.payment-cari-pick--expense {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 48%, #fffbeb 100%);
    border-color: #fdba74;
}
.payment-cari-pick-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.payment-cari-pick--income .payment-cari-pick-icon {
    color: #047857;
}
.payment-cari-pick--expense .payment-cari-pick-icon {
    color: #c2410c;
}
.payment-cari-picked {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.payment-cari-picked-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.payment-cari-pick--income .payment-cari-picked-label {
    color: #059669;
}
.payment-cari-pick--expense .payment-cari-picked-label {
    color: #ea580c;
}
.payment-cari-picked-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.payment-cari-pick--has-cari .payment-cari-picked-name {
    color: #111827;
}
.payment-cari-pick-btn {
    flex: 0 0 auto;
    font-weight: 600;
    border-radius: 8px;
    height: 36px;
    padding: 0 14px;
    white-space: nowrap;
}
.payment-cari-pick--income .payment-cari-pick-btn {
    color: #047857;
    background: #fff;
    border: 1px solid #34d399;
    box-shadow: 0 1px 2px rgba(5, 150, 105, 0.12);
}
.payment-cari-pick--income .payment-cari-pick-btn:hover {
    background: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}
.payment-cari-pick--expense .payment-cari-pick-btn {
    color: #c2410c;
    background: #fff;
    border: 1px solid #fb923c;
    box-shadow: 0 1px 2px rgba(234, 88, 12, 0.12);
}
.payment-cari-pick--expense .payment-cari-pick-btn:hover {
    background: #fff7ed;
    border-color: #f97316;
    color: #9a3412;
}
@media (max-width: 520px) {
    .payment-cari-pick {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .payment-cari-pick-btn {
        width: 100%;
        margin-top: 2px;
    }
}

.cari-find-empty {
    text-align: center;
    padding: 32px 16px;
    color: #9ca3af;
}
.cari-find-empty-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-top: 8px;
}
.cari-find-empty-hint {
    font-size: 12px;
    margin-top: 4px;
}
.cari-find-table-pager .pager-btn {
    min-width: 72px;
}
.purchase-cari-summary{
    width:100%;
    padding:10px 12px;
    border:1px solid #eef2f7;
    border-radius:10px;
    background:#fff;
    color:#374151;
    font-size:12px;
    line-height:1.45;
}

/* Icon-only buttons + search icon (no external icon lib) */
.btn-icon-only{
    padding-left: 8px !important;
    padding-right: 8px !important;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Stok seçimi satırı: yatay taşma yerine grid düzen */
.purchase-kalem-form-row {
    display: grid !important;
    /* Tek satır + taşmasın: fr kolonlar, min-width zorlaması yok */
    justify-content: space-between;
    grid-template-columns:
        100px   /* stok bul */
        1.1fr  /* stok kodu */
        2.2fr  /* stok adı */
        0.7fr  /* kdv */
        1.1fr  /* kdv durumu */
        0.7fr  /* miktar */
        0.9fr  /* birim */
        0.9fr  /* fiyat */
        0.9fr  /* tutar */
        0.6fr  /* isk % */
        0.8fr  /* isk tut */
        0.6fr  /* stpj % */
        0.8fr  /* stpj tut */
        0.7fr; /* ekle */
    gap: 6px;
    /* align-items: end; */
}

.purchase-kalem-form-row .filter-bar-group {
    min-width: 0;
    max-width: 100%;
}

.purchase-kalem-form-row .form-control,
.purchase-kalem-form-row .form-select {
    width: 100%;
    min-width: 0;
}

.purchase-kalem-form-row .filter-bar-group {
    margin: 0;
}

.purchase-kalem-form-row .filter-bar-label {
    white-space: nowrap;
}

/* Satışta da stopaj alanları kullanılabiliyor; is-sales varyantı kaldırıldı. */

@media (max-width: 1200px) {
    .purchase-kalem-form-row {
        gap: 5px;
        grid-template-columns:
            36px 1fr 2fr 0.7fr 1fr 0.7fr 0.9fr 0.9fr 0.9fr 0.6fr 0.8fr 0.6fr 0.8fr 0.7fr;
    }
}

/* Bu satırda inputlar daha kompakt olsun ki taşma yapmasın */
.purchase-kalem-form-row .form-control,
.purchase-kalem-form-row .form-select {
    height: 34px;
    padding: 6px 8px;
    font-size: 12px;
}

@media (max-width: 900px) {
    .purchase-kalem-form-row {
        grid-template-columns: 44px 1fr 1fr;
    }
    .purchase-kalem-form-row .purchase-kalem-gr--adi {
        grid-column: span 2;
    }
}
.icon{
    display:inline-block;
    width:16px;
    height:16px;
}
.icon-search{
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 4a6 6 0 104.472 10.03l4.249 4.25a1 1 0 001.415-1.415l-4.25-4.249A6 6 0 0010 4zm-4 6a4 4 0 118 0a4 4 0 01-8 0z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 4a6 6 0 104.472 10.03l4.249 4.25a1 1 0 001.415-1.415l-4.25-4.249A6 6 0 0010 4zm-4 6a4 4 0 118 0a4 4 0 01-8 0z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Yeni cari - banka listesi yüksekliği */
.cari-bank-list-wrapper {
    max-height: 220px;
    overflow-y: auto;
    width: 100%;
}

.cari-bank-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 4px; 
}

.cari-bank-list-col {
    flex: 0 0 50%;
    max-width: 50%;
}

.cari-bank-form-col {
    flex: 0 0 50%;
    max-width: 50%;
    min-width: 0;
    padding: 0px 18px 19px;
    border-left: 1px solid #e5e7eb;
}

.cari-bank-layout .filter-bar-group {
    min-width: 0;
}

.cari-bank-delete-box {
    margin-top: 0;
    margin-bottom: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #fee2e2;
    background-color: #fef2f2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
}

.cari-bank-delete-text {
    font-size: 12px;
    color: #7f1d1d;
}

.cari-bank-delete-actions {
    display: flex;
    gap: 6px;
}

@media (max-width: 992px) {
    .cari-bank-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .cari-bank-layout .cari-bank-list-col,
    .cari-bank-layout .cari-bank-form-col {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
    }

    .cari-bank-form-col {
        border-left: none;
        border-top: 1px solid #e5e7eb;
        padding: 14px 0 0;
    }

    .cari-bank-layout .cari-bank-form-col > .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .cari-bank-layout .cari-bank-form-col .form-row > .filter-bar-group {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }

    .cari-bank-layout .cari-bank-form-col .filter-bar-group .form-control,
    .cari-bank-layout .cari-bank-form-col .filter-bar-group .form-select {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    .cari-bank-delete-box {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .cari-bank-delete-actions {
        margin-left: auto;
    }
}

/* Yeni cari - kayıt sonucu uyarı kutusu */
.cari-save-alert {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.cari-save-alert.is-success {
    background-color: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.cari-save-alert.is-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.cari-save-alert.is-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.cari-save-alert strong {
    font-weight: 600;
}

/* Cari detay toolbar */
.cari-detail-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 4px 0 10px;
}

/* Mobil "Daha Fazla" — .btn-dropdown display:inline-flex sonradan geldiği için tek sınıf yetmez */
.cari-detail-toolbar .btn-dropdown.cari-mobile-more-menu {
    display: none;
}

.cari-mobile-more-icon {
    display: inline-block;
    margin-right: 6px;
    font-weight: 800;
    letter-spacing: 1px;
    transform: translateY(-1px);
}

.cari-detail-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 16px;
    align-items: start;
}

.btn-dropdown {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.btn-dropdown-toggle::after {
    content: "▾";
    font-size: 9px;
    margin-left: 6px;
}

.btn-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    max-width: 135px;
    min-width: 135px;
    margin-top: 2px;
    padding: 4px 0;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.16);
    z-index: 20;
    display: none;
}

.btn-dropdown-menu .btn-dropdown-item {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 6px 10px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
}

.btn-dropdown-menu .btn-dropdown-item:hover {
    background-color: #f3f4f6;
}

/* Login sayfası */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background-color: #ffffff;
    border-radius: 24px;
    padding: 32px 28px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #111827;
    position: relative;
    z-index: 1;
}

.login-card-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.login-logo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-logo-img {
    display: block;
    height: 70px;
    filter: invert(1);
}

.login-logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.login-logo-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #111827;
}

.login-logo-subtitle {
    font-size: 11px;
    color: #4b5563;
}

.login-env-tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    color: #6b7280;
}

.login-header-content {
    margin-top: 8px;
}
.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.login-form {
    margin-top: 4px;
}

.login-form .form-field {
    margin-bottom: 10px;
}

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.login-input-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
}
.login-input-with-icon {
    padding-left: 40px !important;
}
.login-form .form-control {
    background-color: #f9fafb;
    border-color: #e5e7eb;
    color: #111827;
    transition: all 0.2s ease;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
}
.login-form .form-control:focus {
    background-color: #ffffff;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.login-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: #9ca3af;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.login-meta span {
    white-space: nowrap;
}

.form-actions {
    margin-top: 20px;
}
.login-submit-btn {
    width: 100%;
    min-width: 100%;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.login-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}
.login-submit-icon {
    width: 18px;
    height: 18px;
}
.login-security-note {
    font-size: 11px;
    color: #6b7280;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}
.login-security-icon {
    width: 16px;
    height: 16px;
    color: #9ca3af;
    flex-shrink: 0;
    margin-top: 2px;
}

.login-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 11px;
    color: #6b7280;
    text-align: center;
}
.login-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.login-footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}
.login-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}
.login-footer span {
    color: #d1d5db;
}

/* KVKK ve Hizmet Sözleşmesi Onay Modal */
.login-onay-content {
    padding: 8px 0;
}
.login-onay-intro {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 20px;
    padding: 12px;
    background-color: #f3f4f6;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}
.login-onay-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}
.login-onay-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.login-onay-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-onay-icon {
    width: 20px;
    height: 20px;
    color: #667eea;
}
.login-onay-text {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 14px;
    padding: 12px;
    background-color: #f9fafb;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}
.login-onay-text p {
    margin-bottom: 10px;
}
.login-onay-text p:last-child {
    margin-bottom: 0;
}
.login-onay-text ul {
    margin: 8px 0 0 20px;
    padding: 0;
}
.login-onay-text li {
    margin-bottom: 6px;
}
.login-onay-text a {
    color: #667eea;
    text-decoration: none;
}
.login-onay-text a:hover {
    text-decoration: underline;
}
.login-onay-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    padding: 10px;
    background-color: #f9fafb;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}
.login-onay-checkbox:hover {
    background-color: #f3f4f6;
}
.login-onay-checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}
.login-onay-checkbox span {
    line-height: 1.5;
}

/* Basit responsive ayarlar */
@media (max-width: 992px) {
    :root {
        --app-header-height: 64px;
    }

    /* 100vw dikey kaydırma çubuğu ile yatay taşma/ kaydırma hatası yapabiliyor; vw kısıtlarını kaldırıyoruz */
    html {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    body.app-shell {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    .app-root {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        align-items: stretch;
        overflow-x: hidden;
    }

    /* Fixed öğeler flex satırından çıkar; sütun düzeni + tek akışta main = tam genişlik (eski WebKit uyumu) */
    .app-layout {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        position: relative;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 0;
        overflow: hidden;
    }

    .app-content {
        flex: 1 1 auto;
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 0;
        box-sizing: border-box;
        padding: 14px 14px 18px;
    }

    .app-header {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        align-self: stretch;
    }

    .app-sidebar {
        position: fixed;
        top: var(--app-header-height);
        left: 0;
        bottom: 0;
        right: auto;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        z-index: 90;
        width: min(320px, 92vw);
        min-width: min(320px, 92vw);
        max-height: calc(100vh - var(--app-header-height));
        max-height: calc(100dvh - var(--app-header-height));
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: #0b1220;
        border-right: 1px solid rgba(148, 163, 184, 0.22);
        box-shadow: 10px 0 30px rgba(2, 6, 23, 0.55);
        backdrop-filter: blur(6px);
    }

    body.sidebar-collapsed .app-sidebar {
        width: min(320px, 92vw);
        min-width: min(320px, 92vw);
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .app-sidebar-mobile-backdrop {
        display: block;
        position: fixed;
        top: var(--app-header-height);
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 85;
        background: rgba(2, 6, 23, 0.42);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.22s ease, visibility 0.22s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .app-sidebar-mobile-backdrop.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .app-sidebar-pin {
        display: none;
    }

    [data-toggle-sidebar] {
        display: inline-flex !important;
    }

    .app-sidebar-body {
        padding: 10px 10px 14px;
    }

    .app-sidebar-nav {
        gap: 8px;
    }

    .app-sidebar-details {
        border: 1px solid rgba(148, 163, 184, 0.24);
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.56);
        overflow: hidden;
    }

    .app-sidebar-summary {
        min-height: 42px;
        padding: 10px 12px;
    }

    .app-sidebar-summary-text {
        color: #cbd5e1;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .02em;
    }

    .app-sidebar-links {
        padding: 6px;
        gap: 4px;
    }

    .app-sidebar-link {
        min-height: 42px;
        border-radius: 10px;
        padding: 10px 10px;
        color: #e2e8f0;
    }

    .app-sidebar-link-icon {
        color: #93c5fd;
    }

    .app-sidebar-link:hover {
        background: rgba(37, 99, 235, 0.2);
        color: #fff;
    }

    .app-sidebar-link.is-active {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(29, 78, 216, 0.42));
        color: #fff;
    }

    .app-sidebar-link.is-active::before {
        background: #60a5fa;
    }

    .app-sidebar-link .app-sidebar-link-text {
        font-size: 13px;
        font-weight: 600;
    }

    .app-sidebar-foot {
        border-top: 1px solid rgba(148, 163, 184, 0.2);
        background: rgba(2, 6, 23, 0.65);
        padding: 10px 10px 12px;
    }

    .app-sidebar-user,
    .app-sidebar-logout {
        min-height: 40px;
        border-radius: 10px;
    }

    .app-sidebar-foot-meta {
        color: #94a3b8;
        font-size: 11px;
    }

    .cari-tabs,
    .stok-tabs,
    .ei-giden-form-tabs {
        margin-bottom: 12px;
    }

    .cari-tabs-nav,
    .stok-tabs-nav,
    .ei-giden-form-tabs-nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 0;
        padding: 2px 2px 8px;
        scroll-snap-type: x proximity;
    }

    .cari-tabs-nav::-webkit-scrollbar,
    .stok-tabs-nav::-webkit-scrollbar,
    .ei-giden-form-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .cari-tab,
    .stok-tab,
    .ei-giden-form-tab {
        flex: 0 0 auto;
        scroll-snap-align: start;
        border: 1px solid #dbe3ee;
        border-radius: 999px;
        border-bottom: 1px solid #dbe3ee;
        padding: 8px 12px;
        font-size: 12px;
        line-height: 1.2;
        font-weight: 700;
        background: #f8fafc;
        color: #475569;
        white-space: nowrap;
        box-shadow: none;
    }

    .cari-tab.is-active,
    .stok-tab.is-active,
    .ei-giden-form-tab.is-active {
        border-color: #2563eb;
        border-bottom-color: #2563eb;
        background: #eff6ff;
        color: #1d4ed8;
        box-shadow: inset 0 -2px 0 rgba(37, 99, 235, 0.28);
    }

    .cari-tabs-content,
    .stok-tabs-content,
    .ei-giden-form-tabs-content {
        margin-top: 0;
        padding-top: 0;
    }

    .cari-tab-pane,
    .stok-tab-pane,
    .ei-giden-form-tab-pane {
        padding-top: 4px;
    }

    .cari-detail-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }

    .cari-detail-toolbar .btn,
    .cari-detail-toolbar button {
        width: 100%;
        justify-content: center;
        min-height: 36px;
    }

    [data-cari-detail-card] .app-page-card-header .app-page-actions {
        display: none;
    }

    .cari-detail-toolbar .cari-secondary-action {
        display: none !important;
    }

    .cari-detail-toolbar .cari-primary-action {
        display: inline-flex !important;
    }

    .cari-detail-toolbar .cari-mobile-more-menu {
        display: inline-flex !important;
    }

    .cari-detail-toolbar .cari-mobile-more-menu .btn {
        width: 100%;
        text-wrap-mode: nowrap;
    }

    .cari-detail-summary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cari-detail-summary-grid .form-field {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 8px 10px;
    }

    .cari-detail-summary-grid .form-label {
        margin-bottom: 2px;
        font-size: 11px;
        color: #64748b;
    }

    .cari-detail-summary-grid .form-hint {
        font-size: 13px;
        color: #111827;
        line-height: 1.35;
        word-break: break-word;
    }

    .app-header {
        min-height: var(--app-header-height);
        height: auto;
        padding: 8px 10px;
        gap: 8px;
    }

    .app-header-brand {
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        /* Masaüstü grid tanımı bazı WebKit sürümlerinde mobilde iz sürüp dar sütun üretmesin */
        grid: none;
        grid-template-columns: none;
    }

    .app-header-logo-box {
        width: auto;
        min-width: 0;
        max-width: 140px;
        max-width: min(140px, 46vw);
        height: 40px;
        flex-shrink: 1;
    }

    .app-header-logo-img {
        height: 40px;
    }

    .app-header-company-welcome {
        display: none;
    }

    .app-header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        margin-left: auto;
        min-width: 0;
    }

    .app-header-actions > * {
        display: none !important;
    }

    .app-header-actions > .app-header-notification-btn.js-app-tour-start {
        display: inline-flex !important;
    }

    .app-header-license-warning,
    .app-header-fiscal-year-label,
    .app-header-user-meta,
    .qa-text,
    .quick-actions,
    .app-header-notifications,
    .app-header-fiscal-year-form,
    .app-header-user {
        display: none;
    }

    .quick-actions-btn {
        padding: 8px;
        min-width: 40px;
        width: 40px;
        justify-content: center;
    }

    .app-header-fiscal-year-form {
        margin-right: 0;
    }

    .app-header-fiscal-year {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .app-header-fiscal-year-select {
        height: 34px;
        min-width: 72px;
        padding: 4px 20px 4px 8px;
    }

    .app-header-user {
        padding: 4px;
        border: 0;
        background: transparent;
        gap: 0;
    }

    .app-header-logout {
        display: none;
    }

    .app-header-notification-btn {
        width: 38px;
        height: 38px;
    }

    .app-page-card-header {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    .app-page-card-header > :first-child {
        flex: 1 1 100%;
        min-width: 0;
    }

    .app-page-card-subtitle {
        margin-top: 2px;
        line-height: 1.4;
    }

    .app-page-card-header .app-page-actions,
    .app-page-card-header > *:has(> .btn):not(.app-page-card-actions-row),
    .app-page-card-header > *:has(> a.btn):not(.app-page-card-actions-row),
    .app-page-card-header > *:has(> button.btn):not(.app-page-card-actions-row) {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        justify-content: stretch;
    }

    .app-page-card-header .app-page-actions .btn,
    .app-page-card-header > *:has(> .btn):not(.app-page-card-actions-row) > .btn,
    .app-page-card-header > *:has(> a.btn):not(.app-page-card-actions-row) > a.btn,
    .app-page-card-header > *:has(> button.btn):not(.app-page-card-actions-row) > button.btn {
        width: 100%;
        min-height: 36px;
        justify-content: center;
    }

    /* Fatura / e-İrsaliye kart başlığı: Yenile + Satış Faturası kesin yan yana (:has/grid yerine) */
    .app-page-card-header .app-page-card-actions-row {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }

    .app-page-card-header .app-page-card-actions-row > .btn {
        flex: 1 1 0;
        min-width: 0;
        width: auto !important;
    }

    .app-page-card-header .app-page-card-actions-row > .btn-dropdown {
        flex: 1 1 0;
        min-width: 0;
        display: flex !important;
    }

    .app-page-card-header .app-page-card-actions-row .btn-dropdown-toggle {
        width: 100%;
        justify-content: center;
    }

    .app-page-card-header .app-page-card-actions-row > .form-hint {
        flex: 1 1 0;
        min-width: 0;
        align-self: center;
        text-align: center;
    }

    /* Alış/Satış fatura sekmesi (openPurchaseTab — [data-purchase-type]) */
    .cari-tab-pane[data-purchase-type] {
        min-width: 0;
    }

    .cari-tab-pane[data-purchase-type] > .app-page-card {
        min-width: 0;
    }

    .cari-tab-pane[data-purchase-type] .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .cari-tab-pane[data-purchase-type] .form-row > .filter-bar-group {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100%;
    }

    .cari-tab-pane[data-purchase-type] .purchase-cari-pick {
        flex-direction: column;
        align-items: stretch;
    }

    .cari-tab-pane[data-purchase-type] .purchase-cari-pick [data-purchase-cari-find-open],
    .cari-tab-pane[data-purchase-type] .purchase-cari-pick .js-cari-find {
        width: 100%;
        justify-content: center;
    }

    .cari-tab-pane[data-purchase-type] .purchase-items-inline-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .cari-tab-pane[data-purchase-type] .purchase-items-inline-actions > .filter-bar-group {
        flex: 1 1 auto !important;
        max-width: none !important;
        width: 100% !important;
    }

    .cari-tab-pane[data-purchase-type] .purchase-items-add-btn {
        width: 100% !important;
        min-height: 40px;
    }

    .cari-tab-pane[data-purchase-type] .app-page-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .cari-tab-pane[data-purchase-type] .app-page-card-header .app-page-card-actions-row {
        width: 100%;
    }

    .cari-tab-pane[data-purchase-type] .app-page-card-header [data-purchase-save] {
        width: 100%;
        min-height: 42px;
        justify-content: center;
    }

    .cari-tab-pane[data-purchase-type] .purchase-installment-head {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .cari-tab-pane[data-purchase-type] .purchase-installment-head > div:last-child {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
        justify-content: flex-start;
    }

    .cari-tab-pane[data-purchase-type] .purchase-installment-head .btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        justify-content: center;
    }

    .cari-tab-pane[data-purchase-type] .purchase-items-bottom-actions {
        flex-wrap: wrap;
    }

    .cari-tab-pane[data-purchase-type] .purchase-items-bottom-actions .btn {
        flex: 1 1 auto;
        min-width: min(100%, 220px);
        justify-content: center;
    }

    .cari-tab-pane[data-purchase-type] .purchase-totals-wrap {
        justify-content: stretch;
    }

    .cari-tab-pane[data-purchase-type] .purchase-totals-panel--modern {
        width: 100%;
        max-width: none;
    }

    .cari-tab-pane[data-purchase-type] .table-wrapper {
        max-width: 100%;
    }

    .purchase-kalem-form-row {
        display: flex !important;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 8px;
    }

    .purchase-kalem-form-row .filter-bar-group {
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 0 !important;
    }

    .purchase-kalem-form-row .filter-bar-group.purchase-kalem-gr--btn {
        flex: 0 0 auto !important;
    }

    #invoiceEditModal [data-invoice-modal-body] {
        min-width: 0;
        width: 100%;
    }

    #invoiceEditModal .app-modal-body {
        max-height: calc(100dvh - 110px);
    }

    .mobile-filter-trigger-row {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        margin: 4px 0 10px;
    }

    .mobile-filter-trigger-row .btn {
        width: 100%;
        justify-content: center;
    }

    .mobile-filter-offcanvas-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(2, 6, 23, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        z-index: 140;
    }

    .mobile-filter-offcanvas-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .js-mobile-filter-offcanvas {
        display: block;
        position: fixed;
        top: var(--app-header-height);
        right: 0;
        width: min(420px, 96vw);
        max-width: 96vw;
        height: calc(100dvh - var(--app-header-height));
        padding: 12px;
        background: #fff;
        overflow-y: auto;
        box-shadow: -12px 0 28px rgba(15, 23, 42, 0.22);
        transform: translateX(104%);
        transition: transform .22s ease;
        z-index: 150;
        margin: 0;
        align-content: flex-start;
    }

    .js-mobile-filter-offcanvas > .filter-bar-group,
    .js-mobile-filter-offcanvas > .d-flex,
    .js-mobile-filter-offcanvas > .cari-group-inline {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
    }

    .js-mobile-filter-offcanvas > .filter-bar-group {
        padding-top: 10px;
        margin-bottom: 15px;
    }

    .js-mobile-filter-offcanvas .filter-bar-group .form-control,
    .js-mobile-filter-offcanvas .filter-bar-group .form-select {
        min-width: 0;
        width: 100%;
    }

    .js-mobile-filter-offcanvas .cari-group-inline {
        flex-wrap: wrap;
    }

    .js-mobile-filter-offcanvas .cari-group-inline .btn {
        width: 100%;
    }

    .js-mobile-filter-offcanvas.is-open {
        transform: translateX(0);
    }

    .js-mobile-filter-offcanvas .mobile-filter-offcanvas-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
        position: sticky;
        top: 0;
        z-index: 2;
        background: #fff;
        padding-bottom: 8px;
        border-bottom: 1px solid #e5e7eb;
    }

    .mobile-filter-offcanvas-title {
        font-size: 14px;
        font-weight: 700;
        color: #111827;
    }

    .app-sidebar-mobile-shortcuts {
        display: block;
        margin: 0 0 8px;
        padding: 0;
        border: 1px solid rgba(148, 163, 184, 0.24);
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.56);
        overflow: hidden;
    }

    .app-sidebar-mobile-shortcuts > .app-sidebar-summary {
        min-height: 42px;
        padding: 10px 12px;
    }

    .app-sidebar-mobile-shortcuts .app-sidebar-summary-text {
        font-size: 11px;
        color: #93c5fd;
        text-transform: uppercase;
        letter-spacing: .04em;
        margin: 0;
    }

    .app-sidebar-mobile-shortcuts .app-sidebar-links {
        display: grid;
        padding: 6px;
        gap: 6px;
    }

    body.mobile-filter-open {
        overflow: hidden;
    }

    table.data-table.js-mobile-card-table thead {
        display: none;
    }

    table.data-table.js-mobile-card-table,
    table.data-table.js-mobile-card-table tbody,
    table.data-table.js-mobile-card-table tr,
    table.data-table.js-mobile-card-table td,
    table.data-table.js-mobile-card-table th {
        display: block;
        width: 100%;
    }

    .table-wrapper:has(> table.data-table.js-mobile-card-table) {
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    table.data-table.js-mobile-card-table {
        border: 0 !important;
        background: transparent !important;
    }

    table.data-table.js-mobile-card-table tbody {
        display: grid;
        gap: 10px;
    }

    table.data-table.js-mobile-card-table tbody tr {
        margin-bottom: 0;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
        overflow: hidden;
        padding: 10px;
    }

    table.data-table.js-mobile-card-table tbody tr td,
    table.data-table.js-mobile-card-table tbody tr th {
        border: 0 !important;
        padding: 7px 2px;
        white-space: normal;
        text-align: left !important;
        background: transparent !important;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }

    table.data-table.js-mobile-card-table tbody tr td:last-child,
    table.data-table.js-mobile-card-table tbody tr th:last-child {
        border-bottom: 0;
    }

    table.data-table.js-mobile-card-table tbody tr.js-mobile-card-has-more.js-mobile-card-collapsed td:nth-child(n+4):not(.mobile-card-more-action),
    table.data-table.js-mobile-card-table tbody tr.js-mobile-card-has-more.js-mobile-card-collapsed th:nth-child(n+4):not(.mobile-card-more-action) {
        display: none;
    }

    table.data-table.js-mobile-card-table tbody tr .mobile-card-more-action {
        display: none;
    }

    table.data-table.js-mobile-card-table tbody tr.js-mobile-card-has-more .mobile-card-more-action {
        display: block !important;
        position: relative;
        padding: 12px 0 2px;
        border-top: 0;
        background: #fff;
        text-align: center !important;
    }

    table.data-table.js-mobile-card-table tbody tr.js-mobile-card-has-more.js-mobile-card-collapsed .mobile-card-more-action::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -18px;
        height: 18px;
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff 85%);
        pointer-events: none;
    }

    table.data-table.js-mobile-card-table tbody tr .mobile-card-more-action .btn {
        width: auto;
        min-width: 132px;
    }

    table.data-table.js-mobile-card-table tbody tr td:not([colspan])::before,
    table.data-table.js-mobile-card-table tbody tr th:not([colspan])::before {
        content: attr(data-label);
        display: inline-block;
        flex: 0 0 44%;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .02em;
        text-transform: uppercase;
        color: #64748b;
        margin: 2px 0 0;
    }

    table.data-table.js-mobile-card-table tbody tr.js-mobile-card-row-single td[colspan] {
        padding: 14px 12px;
        display: block;
    }

    table.data-table.js-mobile-card-table .btn {
        width: 100%;
        justify-content: center;
    }

    table.data-table.js-mobile-card-table tfoot {
        display: block;
        margin-top: 8px;
    }

    table.data-table.js-mobile-card-table tfoot tr {
        display: grid;
        grid-template-columns: 1fr;
        border: 1px dashed #cbd5e1;
        border-radius: 10px;
        background: #f8fafc;
        margin-bottom: 8px;
        padding: 8px 10px;
    }

    table.data-table.js-mobile-card-table tfoot td {
        border: 0;
        padding: 4px 0;
        text-align: left !important;
        white-space: normal;
    }

    /* Yalnızca gerçek pager kökleri — üst kabuğa yanlış sınıf gelirse grid/margin tüm sayfayı bozmasın */
    .table-pager.js-mobile-pagination,
    .table-pagination.js-mobile-pagination,
    .js-mobile-pager-root.js-mobile-pagination {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        align-items: center !important;
        margin-top: 12px !important;
    }

    .table-pager.js-mobile-pagination > .js-mobile-pagination-info,
    .table-pagination.js-mobile-pagination > .js-mobile-pagination-info,
    .js-mobile-pager-root.js-mobile-pagination > .js-mobile-pagination-info {
        grid-column: 1 / -1;
        order: -1;
        font-size: 12px;
        color: #475569;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 7px 10px;
        text-align: center;
    }

    /* Ödeme listesi: düğmeler .pagination-links içinde */
    .table-pagination.js-mobile-pagination > .pagination-links {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        align-items: stretch;
    }

    .table-pagination.js-mobile-pagination .pagination-links a.btn,
    .table-pagination.js-mobile-pagination .pagination-links button.btn {
        width: 100%;
        justify-content: center;
        min-height: 38px;
    }

    /* Kasa hareketleri: Önceki / Sonraki doğrudan pager kökünde */
    .js-mobile-pager-root.js-mobile-pagination > a.btn,
    .js-mobile-pager-root.js-mobile-pagination > button.btn {
        width: 100%;
        justify-content: center;
        min-height: 38px;
    }
}

/* Faturalar + e-İrsaliye (gelen/giden): geniş tablo mobil taşması; sekme etiketi ellipsis */
@media (max-width: 992px) {
    #faturalarModuleTabsWrap {
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    #faturalarModuleTabsWrap .cari-tabs,
    #faturalarModuleTabsWrap .cari-tabs-content,
    #faturalarModuleTabsWrap .cari-tab-pane.is-active {
        min-width: 0;
        max-width: 100%;
    }

    #faturalarModuleTabsWrap .table-wrapper {
        max-width: 100%;
    }

    #faturalarModuleTabsWrap table.data-table.js-mobile-card-table {
        min-width: 0 !important;
    }

    #faturalarModuleTabsWrap .cari-tabs-nav .cari-tab {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #eirsaliyeModuleTabsWrap,
    #eirsaliyeListPage {
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    #eirsaliyeModuleTabsWrap .cari-tabs,
    #eirsaliyeModuleTabsWrap .cari-tabs-content,
    #eirsaliyeModuleTabsWrap .cari-tab-pane.is-active {
        min-width: 0;
        max-width: 100%;
    }

    #eirsaliyeModuleTabsWrap .table-wrapper {
        max-width: 100%;
    }

    #eirsaliyeModuleTabsWrap table.data-table.js-mobile-card-table {
        min-width: 0 !important;
    }

    #eirsaliyeModuleTabsWrap .cari-tabs-nav .cari-tab {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #faturalarModuleTabsWrap .app-page-card-body > .app-page-card,
    #eirsaliyeModuleTabsWrap .app-page-card-body {
        min-width: 0;
        max-width: 100%;
    }

    #eirsaliyeModuleTabsWrap .ei-list-pager {
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    #eirsaliyeModuleTabsWrap .ei-list-pager .btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        min-height: 40px;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .app-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-header-logo-mark {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .login-card {
        padding: 18px 16px 16px;
    }
}

/* Stok — Kuyumcu işçilik alanları */
.stok-kuyumcu-labor-section {
    margin-top: 8px;
}

.stok-kuyumcu-labor-card {
    padding: 14px 16px;
    background: linear-gradient(135deg, #fffbeb 0%, #fefce8 100%);
    border: 1px solid #fde68a;
    border-radius: 10px;
}

.stok-kuyumcu-labor-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px);
    gap: 16px 24px;
    align-items: start;
}

@media (max-width: 720px) {
    .stok-kuyumcu-labor-grid {
        grid-template-columns: 1fr;
    }
}

.stok-kuyumcu-labor-grid__rate.is-disabled {
    opacity: 0.55;
}

.stok-kuyumcu-labor-grid__rate.is-disabled .form-control {
    background: #f3f4f6;
    cursor: not-allowed;
}

.stok-kuyumcu-labor-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
}

.stok-kuyumcu-labor-check__label {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
}

.stok-kuyumcu-labor-check .form-check-input {
    margin-top: 3px;
}

.col-kuyumcu-labor {
    white-space: nowrap;
}

.tag-success {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    background: #dcfce7;
    color: #166534;
}

/* Banka - Hesap Bul: tablo içeriğine göre genişlik (varsayılan 520px yerine) */
#bankAccountFindModal .app-modal-dialog,
#bankAccountFindFilterModal .app-modal-dialog {
    width: fit-content;
    max-width: min(900px, calc(100% - 32px));
    min-width: min(480px, 100%);
}

#bankAccountFindModal .app-modal-body .table-wrapper > table.data-table,
#bankAccountFindFilterModal .app-modal-body .table-wrapper > table.data-table {
    width: max-content;
    min-width: 100%;
}

/* Kuyumcu — faturalandır sekmesi içeriği */
#kuyumcuPageRoot .cari-tabs {
    margin: 0 18px 10px;
}

.kuyumcu-dekont-workspace {
    max-width: 100%;
}

.kuyumcu-dekont-workspace__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.kuyumcu-dekont-workspace__title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.kuyumcu-dekont-workspace__subtitle {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.kuyumcu-dekont-workspace__alert {
    margin: 0 0 12px;
}

.kuyumcu-dekont-workspace__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.kuyumcu-dekont-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 16px;
    margin: 14px 0 16px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f8fafc 100%);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
}

.kuyumcu-dekont-hero__amount {
    flex: 1 1 200px;
    min-width: 0;
}

.kuyumcu-dekont-hero__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #047857;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.kuyumcu-dekont-hero__value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #15803d;
    line-height: 1.15;
}

.kuyumcu-dekont-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: flex-end;
}

.kuyumcu-dekont-meta-item__label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 2px;
}

.kuyumcu-dekont-meta-item__value {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.kuyumcu-dekont-meta-item__value--badge {
    display: inline-block;
    padding: 2px 8px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 6px;
    font-size: 12px;
}

.kuyumcu-dekont-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

@media (max-width: 720px) {
    .kuyumcu-dekont-grid {
        grid-template-columns: 1fr;
    }
}

.kuyumcu-dekont-panel {
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.kuyumcu-dekont-panel--gram {
    background: #fffbeb;
    border-color: #fde68a;
}

.kuyumcu-dekont-panel__title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.kuyumcu-dekont-dl {
    margin: 0;
}

.kuyumcu-dekont-dl__row {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.kuyumcu-dekont-dl__row:last-child {
    margin-bottom: 0;
}

.kuyumcu-dekont-dl__row dt {
    margin: 0;
    color: #6b7280;
    font-weight: 500;
}

.kuyumcu-dekont-dl__row dd {
    margin: 0;
    font-weight: 600;
    color: #111827;
    word-break: break-word;
}

.kuyumcu-dekont-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.45;
}

.kuyumcu-dekont-hint--success {
    color: #15803d;
    margin-top: 8px;
    margin-bottom: 0;
}

.kuyumcu-dekont-hint--warn {
    color: #b45309;
    margin-top: 8px;
    margin-bottom: 0;
}

.kuyumcu-dekont-gram-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.kuyumcu-dekont-gram-input-wrap {
    display: flex;
    align-items: center;
    flex: 1 1 160px;
    min-width: 140px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}

.kuyumcu-dekont-gram-input {
    border: none !important;
    box-shadow: none !important;
    font-size: 16px;
    font-weight: 600;
}

.kuyumcu-dekont-gram-suffix {
    padding: 0 10px;
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    background: #f3f4f6;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.kuyumcu-dekont-split-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .kuyumcu-dekont-split-cards {
        grid-template-columns: 1fr;
    }
}

.kuyumcu-dekont-split-card {
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.kuyumcu-dekont-split-card--labor {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.kuyumcu-dekont-split-card--total {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.kuyumcu-dekont-split-card__label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

.kuyumcu-dekont-split-card__value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.kuyumcu-dekont-split-card__sub {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
}

.kuyumcu-dekont-table-section {
    margin-bottom: 14px;
}

.kuyumcu-dekont-table-wrap {
    margin-top: 8px;
}

.kuyumcu-dekont-table tfoot td {
    font-weight: 700;
    background: #f9fafb;
}

.kuyumcu-dekont-purchase-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.kuyumcu-dekont-purchase-host .purchase-items-input-table {
    font-size: 12px;
    min-width: 100%;
}

.kuyumcu-dekont-purchase-host .purchase-items-input-table .form-control-sm,
.kuyumcu-dekont-purchase-host .purchase-items-input-table .form-select-sm {
    min-height: 30px;
}

.kuyumcu-dekont-purchase-host .js-purchase-item-stock {
    cursor: pointer;
}

.kuyumcu-dekont-purchase-host .js-purchase-item-derived {
    min-width: 6.5rem;
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.kuyumcu-dekont-purchase-host .js-purchase-item-input.js-money {
    min-width: 5.5rem;
    text-align: right !important;
}

.kuyumcu-dekont-purchase-footer {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.kuyumcu-dekont-purchase-footer__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.kuyumcu-dekont-purchase-footer__row--warn {
    margin-top: 6px;
    color: #b45309;
    font-size: 13px;
}

.kuyumcu-dekont-items-empty-hint {
    margin-top: 8px;
    text-align: center;
}

.kuyumcu-dekont-table-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.kuyumcu-dekont-table--editable .form-control-sm {
    min-width: 0;
    font-size: 12px;
    padding: 4px 6px;
}

.kuyumcu-dekont-table--editable .js-kuyumcu-dekont-pick-stock {
    cursor: pointer;
}

.kuyumcu-dekont-table--editable .js-kuyumcu-dekont-pick-stock:hover {
    background: #fffbeb;
}

.kuyumcu-dekont-empty-row td {
    text-align: center;
    padding: 20px 12px !important;
    color: #9ca3af;
}

.kuyumcu-dekont-saved-banner {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.kuyumcu-dekont-saved-banner__main {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: baseline;
    color: #065f46;
}

.kuyumcu-dekont-saved-banner__no {
    font-size: 13px;
    font-weight: 500;
}

.kuyumcu-dekont-post-save-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.kuyumcu-dekont-footer-fields {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 12px;
    padding-top: 4px;
}

@media (max-width: 640px) {
    .kuyumcu-dekont-footer-fields {
        grid-template-columns: 1fr;
    }
}


/* Cari Bul Modal Özel Stilleri */
#cariFindModal .app-modal-dialog {
    max-width: 900px;
}

#cariFindModal #cariFindSearchInput {
    transition: all 0.2s ease;
}

#cariFindModal #cariFindSearchInput:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

#cariFindModal .data-table tbody tr {
    transition: background-color 0.15s ease;
}

#cariFindModal .data-table tbody tr:hover {
    background-color: #f9fafb;
}

#cariFindModal .data-table tbody tr:active {
    background-color: #f3f4f6;
}

#cariFindModal .js-cari-select {
    transition: all 0.15s ease;
    font-weight: 500;
}

#cariFindModal .js-cari-select:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

#cariFindModal .table-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f9fafb;
}

#cariFindModal .table-wrapper::-webkit-scrollbar {
    width: 8px;
}

#cariFindModal .table-wrapper::-webkit-scrollbar-track {
    background: #f9fafb;
}

#cariFindModal .table-wrapper::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 4px;
}

#cariFindModal .table-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

/* iOS Style Switch (Liquid Glass) */
.switch-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    margin-top: 8px;
}

.switch-label {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
}

.switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

.switch-slider {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 19px;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border-radius: 19px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    flex-shrink: 0;
}

.switch-slider::before {
    position: absolute;
    content: "";
    height: 15px;
    width: 15px;
    left: 2px;
    top: 2px;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.15),
        inset 0 -1px 1px rgba(255, 255, 255, 0.5);
}

.switch-input:checked + .switch-slider {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 
        inset 0 2px 4px rgba(16, 185, 129, 0.3),
        0 2px 8px rgba(16, 185, 129, 0.2),
        0 0 0 4px rgba(16, 185, 129, 0.1);
}

.switch-input:checked + .switch-slider::before {
    transform: translateX(19px);
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.15),
        inset 0 -1px 1px rgba(255, 255, 255, 0.6);
}

.switch-input:focus + .switch-slider {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.05),
        0 0 0 3px rgba(37, 99, 235, 0.2);
}

.switch-input:checked:focus + .switch-slider {
    box-shadow: 
        inset 0 2px 4px rgba(16, 185, 129, 0.3),
        0 2px 8px rgba(16, 185, 129, 0.2),
        0 0 0 4px rgba(16, 185, 129, 0.15);
}

.switch-input:disabled + .switch-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.switch-input:active + .switch-slider::before {
    width: 18px;
}

.switch-input:checked:active + .switch-slider::before {
    width: 18px;
    transform: translateX(17px);
}

/* Teklif formu: Verilen / Alınan */
.teklif-form-header {
    margin: -4px 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color, #e5e7eb);
}
.teklif-form-header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #111827);
}
.teklif-form-section {
    margin-bottom: 5px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}
.teklif-form-section:last-of-type {
    border-bottom: none;
}
.teklif-form-section-title {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary, #4b5563);
}
.teklif-cari-box {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    min-height: 44px;
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
}
.teklif-cari-box .btn {
    order: 0;
    flex: 0 0 auto;
}
.teklif-cari-box .form-hint {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
}
/* Ürün Kalemleri formu - sadece düzen, input stiline dokunmuyoruz */
.teklif-kalem-form {
    margin-top: 8px;
}
.teklif-kalem-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
    margin-bottom: 12px;
}
.teklif-kalem-form-row--barkod {
    margin-bottom: 0;
    padding-top: 4px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}
.teklif-kalem-form-row .filter-bar-group.teklif-kalem-gr {
    min-width: 0;
}
.teklif-kalem-gr {
    width: 95px;
    flex: 0 0 95px;
}
.teklif-kalem-gr--adi {
    width: 140px;
    flex: 1 1 140px;
    min-width: 120px;
}
.teklif-kalem-gr--sm {
    width: 72px;
    flex: 0 0 72px;
}
.teklif-kalem-gr--num {
    width: 78px;
    flex: 0 0 78px;
}
.teklif-kalem-gr--btn {
    flex-shrink: 0;
    width: auto;
}
.teklif-kalem-gr--barkod {
    flex: 1 1 100%;
    max-width: 320px;
}

/* ============================================
   ALIŞ - Kalem giriş satırı (teklif benzeri)
   Kullanım: .purchase-kalem-form-row içinde
   ============================================ */
.purchase-kalem-form-row {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 8px;
}

/* Kullanıcının istediği gibi default dar kolon */
.purchase-kalem-form-row .filter-bar-group {
    min-width: 10px !important;
    flex: 0 0 85px !important;
}

/* buton kolonları */
.purchase-kalem-form-row .filter-bar-group.purchase-kalem-gr--btn {
    flex: 0 0 auto !important;
    width: auto;
    min-width: 96px !important;
}

/* Stok adı geniş alan */
.purchase-kalem-form-row .filter-bar-group.purchase-kalem-gr--adi {
    flex: 1 1 240px !important;
    min-width: 200px !important;
}

/* Birim gibi küçük alan */
.purchase-kalem-form-row .filter-bar-group.purchase-kalem-gr--sm {
    flex: 0 0 72px !important;
}

/* Sayısal alanlar */
.purchase-kalem-form-row .filter-bar-group.purchase-kalem-gr--num {
    flex: 0 0 78px !important;
}

/* Bu satırda input/select min-width default 190px kuralını ez */
.purchase-kalem-form-row .form-control,
.purchase-kalem-form-row .form-select {
    min-width: 0 !important;
}

/* Label'lar dar kolonlarda okunabilir olsun */
.purchase-kalem-form-row .filter-bar-label {
    font-size: 11px;
    font-weight: 600;
    color: #111827;
    top: -2px;
    z-index: 2;
    background-color: #fff;
    padding: 0 3px;
    line-height: 1.2;
    white-space: nowrap;
}
.teklif-kalemler-table-wrap {
    margin-top: 12px;
}
.teklif-totals-tables {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 12px;
    align-items: flex-start;
    justify-content: end;
}
.teklif-totals-mini-table {
    border: 1px solid var(--border-color, #e5e7eb);
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 180px;
}
.teklif-totals-mini-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}
.teklif-totals-mini-table tr:last-child td {
    border-bottom: none;
}
.teklif-totals-mini-table .text-end {
    text-align: right;
    white-space: nowrap;
}
.teklif-totals-mini-table--final tr:last-child td {
    font-weight: 600;
}
.siparis-form-card-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.js-siparis-tab-content[data-siparis-tab="verilen"] .app-page-card-header.siparis-form-card-header,
.js-siparis-tab-content[data-siparis-tab="alinan"] .app-page-card-header.siparis-form-card-header {
    margin-top: 0;
}

.teklif-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    justify-content: end;
}
.teklif-verilen-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.teklif-verilen-actions + .btn {
    margin-left: 8px;
}

.filter-bar-group > input{
    min-width: 0 !important;
}

.filter-bar-group > button{
    padding: 8px 12px;
    width: 100%;
}

/* Personel Fotoğraf Yükleme */
.personel-foto-upload-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.personel-foto-preview {
    min-height: 200px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
}
.personel-foto-preview:hover {
    border-color: #667eea;
    background-color: #f3f4f6;
}
.personel-foto-placeholder {
    text-align: center;
    padding: 24px;
    color: #9ca3af;
}
.personel-foto-placeholder p {
    margin-top: 12px;
    font-size: 13px;
}
.personel-foto-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.stock-photo-upload-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.stock-photo-preview {
    width: 100%;
    min-height: 240px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .12s ease;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.stock-photo-preview:hover,
.stock-photo-preview.is-dragover {
    border-color: #2563eb;
    background: linear-gradient(135deg, #eff6ff 0%, #e0ecff 100%);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

.stock-photo-placeholder {
    text-align: center;
    color: #6b7280;
    padding: 14px;
}

.stock-photo-placeholder p {
    margin: 8px 0 4px;
    font-size: 13px;
    font-weight: 600;
}

.stock-photo-placeholder small {
    font-size: 11px;
}

.stock-photo-preview img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    display: block;
    background: #f8fafc;
}

.stock-photo-thumbnails {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.stock-photo-thumb-item {
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.stock-photo-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stock-photo-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.64);
    opacity: 0;
    transition: opacity .16s ease;
}

.stock-photo-thumb-item:hover .stock-photo-thumb-overlay {
    opacity: 1;
}

.stock-photo-thumb-btn {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(37, 99, 235, 0.95);
    font-size: 13px;
    line-height: 1;
}

.stock-photo-thumb-btn.stock-photo-thumb-btn-delete {
    background: rgba(220, 38, 38, 0.95);
}

.stock-photo-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.stock-photo-actions .btn {
    width: auto !important;
    min-width: 132px;
    padding: 7px 12px !important;
}

@media (max-width: 640px) {
    .stock-photo-preview {
        min-height: 190px;
    }

    .stock-photo-thumb-item {
        width: 64px;
        height: 64px;
    }

    .stock-photo-actions .btn {
        min-width: 0;
    }
}

/* Personel Detay Sayfası */
.personel-detail-foto {
    margin-bottom: 16px;
}
.personel-detail-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}
.personel-detail-section:last-child {
    border-bottom: none;
}
.personel-detail-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}
.personel-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}
.personel-detail-grid > div {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}
.personel-detail-grid strong {
    color: #111827;
    display: inline-block;
    min-width: 140px;
}

.text-wrap{
    text-wrap: wrap !important;
}
.text-wrap-nowrap{
    text-wrap: nowrap !important;
}

/* Genel yardımcı: sağa yaslama */
.text-end {
    text-align: right !important;
}

/* Data table'da metin sardırma (örn: ünvan) */
table.data-table td.text-wrap,
table.data-table th.text-wrap {
    white-space: normal !important;
    /* word-break: break-word; */
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #C4E2FC;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader img {
    max-width: 400px;
    max-height: 300px;
    width: auto;
    height: auto;
}

/* Fatura görüntüleme modalı — iframe üstü yükleniyor katmanı */
.fatura-gor-frame-wrap {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.fatura-gor-frame-loader {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.fatura-gor-frame-loader.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fatura-gor-frame-loader__text {
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
}

.fatura-gor-frame-loader__spin {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    animation: faturaGorLoaderSpin 0.75s linear infinite;
}

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

/* Toast (kısa bildirim) */
.app-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.app-toast {
    pointer-events: auto;
    min-width: 260px;
    max-width: 420px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    background: #ffffff;
    color: #111827;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

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

.app-toast__icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-top: 2px;
    flex: 0 0 18px;
}

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

.app-toast__title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}

.app-toast__message {
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
}

.app-toast__close {
    appearance: none;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 16px;
    line-height: 1;
    padding: 0 0 0 8px;
    cursor: pointer;
}

.app-toast--success {
    border-color: #bbf7d0;
}
.app-toast--success .app-toast__icon {
    background: #22c55e;
}

.app-toast--error {
    border-color: #fecaca;
}
.app-toast--error .app-toast__icon {
    background: #ef4444;
}

.app-toast--info {
    border-color: #bfdbfe;
}
.app-toast--info .app-toast__icon {
    background: #3b82f6;
}

.cash-movement-detail-cell .table-wrapper,
.bank-movement-detail-cell .table-wrapper {
    border-radius: 0px !important;
} 
.cash-movement-detail-cell,
.bank-movement-detail-cell {
    padding:0 0 10px 0 !important;
}
.cash-movement-loading-state{
    padding: 10px 0 2px;
}
.cash-movement-loading-title{
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 8px 2px;
}
.cash-movement-skeleton-table tbody td{
    vertical-align: middle;
}
.cash-movement-skeleton-line{
    display: inline-block;
    height: 11px;
    border-radius: 6px;
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: cashMovementSkeletonShimmer 1.2s ease-in-out infinite;
}
.cash-movement-skeleton-line.w-xs{ width: 42px; }
.cash-movement-skeleton-line.w-sm{ width: 74px; }
.cash-movement-skeleton-line.w-md{ width: 110px; }
.cash-movement-skeleton-line.w-lg{ width: 160px; }
@keyframes cashMovementSkeletonShimmer{
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Sipariş / teklif / fatura kalemleri: mobilde tablo içi “Düzenle” sütunu */
.siparis-kalem-mobile-actions,
.teklif-kalem-mobile-actions,
.purchase-items-input-table .purchase-line-mobile-actions {
    display: none;
}
@media (max-width: 992px) {
    .siparis-kalem-mobile-actions,
    .teklif-kalem-mobile-actions,
    .purchase-items-input-table .purchase-line-mobile-actions {
        display: table-cell !important;
        width: 1%;
        white-space: nowrap;
        vertical-align: middle;
    }
    .siparis-kalem-mobile-actions .btn,
    .teklif-kalem-mobile-actions .btn,
    .purchase-items-input-table .purchase-line-mobile-actions .btn {
        padding-left: 8px;
        padding-right: 8px;
    }
}


.quick-actions-btn{
    text-wrap-mode: nowrap;
}

/* Yönetimden yayınlanan tenant duyuru şeridi (main layout, header üstü) */
.app-tenant-duyuru {
    flex-shrink: 0;
    width: 100%;
    padding: 10px 22px;
    font-size: 13px;
    line-height: 1.45;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}
.app-tenant-duyuru__inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
}
.app-tenant-duyuru__title {
    font-weight: 700;
}
.app-tenant-duyuru__body {
    color: inherit;
    opacity: 0.95;
}
.app-tenant-duyuru--bilgi {
    background: linear-gradient(90deg, #eff6ff, #dbeafe);
    color: #1e3a8a;
}
.app-tenant-duyuru--uyari {
    background: linear-gradient(90deg, #fffbeb, #fef3c7);
    color: #92400e;
}
.app-tenant-duyuru--kritik {
    background: linear-gradient(90deg, #fef2f2, #fecaca);
    color: #991b1b;
}

/* MySoft: hesap eşleştirme modalı (filter-bar-label position:absolute burada kullanılmaz) */
#bankMysoftMatchModal .bank-mysoft-match-body {
    padding-top: 4px;
}

#bankMysoftMatchModal .bank-mysoft-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 6px;
    position: static;
    background: none;
    padding: 0;
    left: auto;
    top: auto;
}

#bankMysoftMatchModal .bank-mysoft-suggestions {
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

#bankMysoftMatchModal .bank-mysoft-suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
    max-height: 120px;
    overflow: auto;
}

#bankMysoftMatchModal .bank-mysoft-sug-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

#bankMysoftMatchModal .bank-mysoft-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

@media (max-width: 720px) {
    #bankMysoftMatchModal .bank-mysoft-columns {
        grid-template-columns: 1fr;
    }
}

#bankMysoftMatchModal .bank-mysoft-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(42vh, 380px);
    overflow: auto;
    padding-right: 2px;
}

#bankMysoftMatchModal .bank-mysoft-acct-card strong {
    font-size: 14px;
}

#bankMysoftMatchModal .bank-mysoft-acct-card--remote {
    align-items: flex-start;
    text-align: left;
}

#bankMysoftMatchModal .bank-mysoft-remote-lines {
    font-size: 12px;
    line-height: 1.45;
    color: #334155;
    width: 100%;
    white-space: normal;
    word-break: break-word;
}

#bankMysoftMatchModal .bank-mysoft-queue {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

#bankMysoftMatchModal .bank-mysoft-pair-queue-rows {
    min-height: 28px;
    margin-bottom: 8px;
}

#bankMysoftMatchModal .bank-mysoft-queue-empty {
    margin: 0;
}

#bankMysoftMatchModal .bank-mysoft-queue-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

#bankMysoftMatchModal .bank-mysoft-queue-hint {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

#bankMysoftMatchModal .bank-mysoft-pair-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

#bankMysoftMatchModal .bank-mysoft-pair-row-text {
    color: #334155;
    word-break: break-word;
}

.btn-dropdown-menu .btn-dropdown-item:not(:last-child) {
    border-bottom: 1px solid #cacaca;
}

/* Faro AI — sidebar: çerçeve hattında dönen renkli border (içerik sabit) */
@property --hm-ai-border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes hmAiBorderAngleSpin {
    to {
        --hm-ai-border-angle: 360deg;
    }
}

.app-header-hmai-btn {
    --hm-ai-border-angle: 0deg;
    --hm-ai-btn-fill: var(--sb-bg-panel, #1e293b);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    margin: 6px 0 2px;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    box-sizing: border-box;
    background:
        linear-gradient(var(--hm-ai-btn-fill), var(--hm-ai-btn-fill)) padding-box,
        conic-gradient(
            from var(--hm-ai-border-angle),
            #1e3a8a 0deg,
            #2563eb 50deg,
            #22d3ee 100deg,
            #60a5fa 150deg,
            #a78bfa 200deg,
            #6366f1 250deg,
            #3b82f6 300deg,
            #1d4ed8 330deg,
            #1e3a8a 360deg
        ) border-box;
    animation: hmAiBorderAngleSpin 2.4s linear infinite;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.45);
    transition: transform .15s ease, box-shadow .2s ease, filter .15s ease;
}

.app-header-hmai-btn__inner {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: flex-start;
    padding: 6px 10px 6px 8px;
    min-height: 38px;
    box-sizing: border-box;
    border-radius: 4px;
    background: transparent;
}

.app-header-hmai-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.32);
    filter: brightness(1.05);
    animation-duration: 1.6s;
}

.app-header-hmai-btn:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

.app-header-hmai-btn.is-open {
    --hm-ai-btn-fill: #243447;
    box-shadow: 0 0 0 1px var(--sb-primary-ring, rgba(37, 99, 235, 0.35)), 0 4px 16px rgba(37, 99, 235, 0.38);
}

@supports not (background: conic-gradient(from 0deg, red, blue)) {
    .app-header-hmai-btn {
        border: 2px solid #2563eb;
        background: var(--hm-ai-btn-fill);
        animation: none;
    }
}

.app-header-hmai-avatar-wrap {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    /* background: var(--sb-bg, #0f172a);
    box-shadow: 0 0 0 1px var(--sb-border-soft, rgba(148, 163, 184, 0.22)); */
}

.app-header-hmai-avatar-wrap.is-fallback {
    background: linear-gradient(145deg, #1d4ed8, #2563eb);
}

.app-header-hmai-avatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.app-header-hmai-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: var(--sb-text, #f1f5f9);
    -webkit-text-fill-color: currentColor;
    background: none;
}

.app-header-hmai-btn:hover .app-header-hmai-label,
.app-header-hmai-btn.is-open .app-header-hmai-label {
    color: #bfdbfe;
}

body.sidebar-collapsed .app-header-hmai-btn {
    margin-top: 6px;
}

body.sidebar-collapsed .app-header-hmai-label {
    display: none;
}

body.sidebar-collapsed .app-header-hmai-btn__inner {
    justify-content: center;
    padding: 6px 4px;
    min-height: 40px;
}

@media (prefers-reduced-motion: reduce) {
    .app-header-hmai-btn {
        animation: none;
        background:
            linear-gradient(var(--hm-ai-btn-fill), var(--hm-ai-btn-fill)) padding-box,
            conic-gradient(from 120deg, #1e40af, #2563eb, #60a5fa, #2563eb, #1e40af) border-box;
    }
}

/* Gelen faturalar — Faro AI otomatik eşleştir butonu */
.btn-hm-ai-gelen-eslestir {
    --hm-ai-gelen-fill: #fff;
    position: relative;
    border: 2px solid transparent !important;
    background:
        linear-gradient(var(--hm-ai-gelen-fill), var(--hm-ai-gelen-fill)) padding-box,
        conic-gradient(from var(--hm-ai-border-angle, 0deg), #1e40af, #2563eb, #60a5fa, #7c3aed, #2563eb, #1e40af) border-box !important;
    color: #1e40af;
    font-weight: 600;
    padding: 4px 10px 4px 6px;
    animation: hmAiBorderAngleSpin 2.4s linear infinite;
}

.btn-hm-ai-gelen-eslestir:hover:not(:disabled) {
    color: #1d4ed8;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn-hm-ai-gelen-eslestir:disabled {
    animation: none;
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-hm-ai-gelen-eslestir__inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-hm-ai-gelen-eslestir__avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Gelen fatura eşleştir modalı — Faro AI skeleton */
.hm-ai-gelen-skeleton {
    padding: 4px 2px 8px;
}

.hm-ai-gelen-skeleton__status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
    color: #1e40af;
}

.hm-ai-gelen-skeleton--ai .hm-ai-gelen-skeleton__status {
    background: linear-gradient(90deg, #1e40af, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hm-ai-gelen-skeleton__avatar-wrap {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    padding: 2px;
    background: conic-gradient(from 0deg, #1e40af, #2563eb, #60a5fa, #7c3aed, #2563eb, #1e40af);
    animation: hmAiBorderAngleSpin 2.4s linear infinite;
}

.hm-ai-gelen-skeleton__avatar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}

.hm-ai-gelen-skeleton__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-bottom: 12px;
}

.hm-ai-gelen-skeleton__field {
    flex: 1 1 200px;
    min-width: 0;
}

.hm-ai-gelen-skeleton__field--sm {
    flex: 0 1 140px;
}

.hm-ai-gelen-skeleton__label,
.hm-ai-gelen-skeleton__line,
.hm-ai-gelen-skeleton__th {
    display: block;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.hm-ai-gelen-skeleton__label {
    height: 10px;
    width: 72px;
    margin-bottom: 8px;
}

.hm-ai-gelen-skeleton__line {
    height: 14px;
    width: 100%;
    max-width: 100%;
}

.hm-ai-gelen-skeleton__line--xs { width: 48px; max-width: 48px; margin-left: auto; }
.hm-ai-gelen-skeleton__line--sm { width: 72px; max-width: 72px; }
.hm-ai-gelen-skeleton__line--md { width: 110px; max-width: 110px; }
.hm-ai-gelen-skeleton__line--lg { width: 88%; max-width: 320px; }
.hm-ai-gelen-skeleton__line--xl { width: 55%; max-width: 420px; height: 12px; }

.hm-ai-gelen-skeleton__th {
    height: 11px;
    width: 80px;
}

.hm-ai-gelen-skeleton__th--xs { width: 44px; }
.hm-ai-gelen-skeleton__th--md { width: 100px; }

.hm-ai-gelen-skeleton__label,
.hm-ai-gelen-skeleton__line,
.hm-ai-gelen-skeleton__th {
    background: linear-gradient(
        90deg,
        rgba(219, 234, 254, 0.85) 0%,
        rgba(191, 219, 254, 0.95) 25%,
        rgba(224, 231, 255, 1) 50%,
        rgba(196, 181, 253, 0.9) 75%,
        rgba(219, 234, 254, 0.85) 100%
    );
    background-size: 200% 100%;
    animation: hmAiGelenSkeletonShimmer 1.35s ease-in-out infinite;
}

.hm-ai-gelen-skeleton--plain .hm-ai-gelen-skeleton__label,
.hm-ai-gelen-skeleton--plain .hm-ai-gelen-skeleton__line,
.hm-ai-gelen-skeleton--plain .hm-ai-gelen-skeleton__th {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
}

.hm-ai-gelen-skeleton--ai .hm-ai-gelen-skeleton__table-wrap {
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.06);
}

.hm-ai-gelen-skeleton__table tbody td {
    padding-top: 10px;
    padding-bottom: 10px;
    vertical-align: middle;
}

.hm-ai-gelen-skeleton__table tbody tr:nth-child(odd) .hm-ai-gelen-skeleton__line {
    animation-delay: 0.12s;
}

.hm-ai-gelen-skeleton__table tbody tr:nth-child(3n) .hm-ai-gelen-skeleton__line {
    animation-delay: 0.24s;
}

@keyframes hmAiGelenSkeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hm-ai-gelen-skeleton__label,
    .hm-ai-gelen-skeleton__line,
    .hm-ai-gelen-skeleton__th,
    .hm-ai-gelen-skeleton__avatar-wrap {
        animation: none;
    }
}

body.hm-ai-open {
    overflow: hidden;
}

.hm-ai-root {
    position: fixed;
    inset: 0;
    z-index: 12050;
    pointer-events: none;
    visibility: hidden;
}

.hm-ai-root.is-open {
    pointer-events: auto;
    visibility: visible;
}

.hm-ai-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity .2s ease;
}

.hm-ai-root.is-open .hm-ai-backdrop {
    opacity: 1;
}

.hm-ai-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100%;
    background: #fff;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .25s ease;
}

.hm-ai-root.is-open .hm-ai-panel {
    transform: translateX(0);
}

.hm-ai-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.hm-ai-panel-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.hm-ai-panel-avatar {
    border-radius: 10px;
    object-fit: cover;
    /* box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2); */
}

.hm-ai-panel-title {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}

.hm-ai-panel-subtitle {
    font-size: 12px;
    color: #6b7280;
}

.hm-ai-panel-close {
    border: none;
    background: #f3f4f6;
    color: #374151;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.hm-ai-panel-close:hover {
    background: #e5e7eb;
}

.hm-ai-panel-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.hm-ai-panel-clear {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.hm-ai-panel-clear:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.hm-ai-inline-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hm-ai-inline-link:hover {
    color: #1d4ed8;
}

.hm-ai-msg--user .hm-ai-inline-link {
    color: #dbeafe;
}

.hm-ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e5e7eb;
}

.hm-ai-action-btn {
    border: 1px solid #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.hm-ai-action-btn:hover {
    background: #dbeafe;
    border-color: #2563eb;
}

.hm-ai-action-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.hm-ai-confirm {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.hm-ai-confirm-text {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #334155;
}

.hm-ai-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hm-ai-confirm-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease;
}

.hm-ai-confirm-btn--yes {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.hm-ai-confirm-btn--yes:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.hm-ai-confirm-btn--no {
    background: #fff;
    color: #475569;
    border-color: #cbd5e1;
}

.hm-ai-runtime-preview {
    border-left: 3px solid #6366f1;
    background: linear-gradient(135deg, #fafbff 0%, #f8fafc 100%);
}

.hm-ai-runtime-preview-dl {
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(100px, 38%) 1fr;
    gap: 4px 12px;
    font-size: 12px;
}

.hm-ai-runtime-preview-dl dt {
    margin: 0;
    font-weight: 700;
    color: #64748b;
}

.hm-ai-runtime-preview-dl dd {
    margin: 0;
    color: #0f172a;
    word-break: break-word;
}

.hm-ai-runtime-warning {
    margin: 8px 0 0;
    font-size: 12px;
    color: #b45309;
}

.hm-ai-runtime-badge {
    margin: 10px 0 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6366f1;
}

.hm-ai-confirm-btn--no:hover {
    background: #f1f5f9;
}

.hm-ai-support-form .hm-ai-form-label {
    display: block;
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
}

.hm-ai-form-input,
.hm-ai-form-textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 7px 9px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    box-sizing: border-box;
}

.hm-ai-form-textarea {
    resize: vertical;
    min-height: 72px;
}

.hm-ai-form-input:focus,
.hm-ai-form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.hm-ai-msg--notice .hm-ai-msg-body {
    font-size: 12px;
}

.hm-ai-msg--notice-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.hm-ai-msg--notice-error {
    background: #fef2f2;
    border-color: #fecaca;
}

.hm-ai-msg--confirm-prompt {
    background: #f8fafc;
}

.hm-ai-panel-status {
    padding: 8px 14px;
    font-size: 12px;
    background: #eff6ff;
    color: #1e40af;
    border-bottom: 1px solid #dbeafe;
}

.hm-ai-panel-status.is-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.hm-ai-panel-status.is-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.hm-ai-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f9fafb;
}

.hm-ai-welcome {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

.hm-ai-welcome-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #6b7280;
}

.hm-ai-msg {
    max-width: 92%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hm-ai-msg--user {
    align-self: flex-end;
    align-items: flex-end;
}

.hm-ai-msg--assistant {
    align-self: flex-start;
}

.hm-ai-msg-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
}

.hm-ai-msg-body {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.hm-ai-msg--user .hm-ai-msg-body {
    background: #2563eb;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.hm-ai-msg--assistant .hm-ai-msg-body {
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.hm-ai-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.hm-ai-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9ca3af;
    animation: hmAiDot 1s infinite ease-in-out;
}

.hm-ai-dots span:nth-child(2) { animation-delay: .15s; }
.hm-ai-dots span:nth-child(3) { animation-delay: .3s; }

@keyframes hmAiDot {
    0%, 80%, 100% { opacity: .35; transform: scale(.85); }
    40% { opacity: 1; transform: scale(1); }
}

.hm-ai-composer {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding: 12px 14px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.hm-ai-input {
    flex: 1 1 auto;
    resize: none;
    min-height: 44px;
    max-height: 140px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
}

.hm-ai-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.hm-ai-send-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

/* Faro AI — Analizler */
.faro-analytics {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1440px;
}

.faro-analytics-banner {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}

.faro-analytics-banner p {
    margin: 0;
}

.faro-analytics-banner p + p {
    margin-top: 6px;
}

.faro-analytics-banner--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.faro-analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.faro-analytics-kpi {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
}

.faro-analytics-kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e5e7eb, #e5e7eb);
    opacity: 0.9;
}

.faro-analytics-kpi--primary::before {
    background: linear-gradient(90deg, #2563eb, #10b981);
}

.faro-analytics-kpi__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
}

.faro-analytics-kpi__value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.faro-analytics-kpi__meta {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.35;
}

.faro-analytics-kpi__value.is-positive,
.faro-analytics-metric__value.is-positive,
.faro-analytics-rank-item__val.is-positive {
    color: #047857;
}

.faro-analytics-kpi__value.is-negative,
.faro-analytics-metric__value.is-negative,
.faro-analytics-rank-item__val.is-negative {
    color: #be123c;
}

.faro-analytics-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

@media (max-width: 1100px) {
    .faro-analytics-layout {
        grid-template-columns: 1fr;
    }
}

.faro-analytics-sidebar {
    min-width: 0;
}

.faro-analytics-card {
    margin: 0;
    height: 100%;
}

.faro-analytics-card__header {
    align-items: flex-start;
}

.faro-analytics-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.faro-analytics-panel {
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.faro-analytics-panel:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.faro-analytics-panel--warn {
    margin-top: 4px;
    padding: 12px 14px;
    border: 1px solid #fde68a;
    border-radius: 10px;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
}

.faro-analytics-panel__title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.faro-analytics-panel__text {
    margin: 0;
    font-size: 13px;
    color: #78350f;
    line-height: 1.45;
}

.faro-analytics-metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.faro-analytics-metric {
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 10px;
}

.faro-analytics-metric__label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

.faro-analytics-metric__value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #111827;
}

.faro-analytics-metric__meta {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: #9ca3af;
}

.faro-analytics-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.faro-analytics-rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.faro-analytics-rank-item:last-child {
    border-bottom: 0;
}

.faro-analytics-rank-item__pos {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #4f46e5;
    background: #eef2ff;
    border-radius: 6px;
}

.faro-analytics-rank-item__main {
    flex: 1;
    min-width: 0;
}

.faro-analytics-rank-item__name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.faro-analytics-rank-item__code {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 1px;
}

.faro-analytics-rank-item__val {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.faro-analytics-tag-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    color: #92400e;
    line-height: 1.5;
}

.faro-analytics-tag-list li + li {
    margin-top: 4px;
}

.faro-analytics-tag-list em {
    font-style: normal;
    color: #b45309;
}

/* Studio (AI panel) */
.faro-analytics-studio {
    min-width: 0;
}

.faro-analytics-card--studio {
    display: flex;
    flex-direction: column;
    min-height: 520px;
}

.faro-analytics-studio__header {
    align-items: center;
}

.faro-analytics-studio__brand {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.faro-analytics-studio__badge {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.faro-analytics-studio__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 0;
    padding-top: 0 !important;
}

.faro-analytics-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 0 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.faro-analytics-topic {
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.faro-analytics-topic:hover {
    border-color: #c7d2fe;
    color: #4338ca;
}

.faro-analytics-topic.is-active {
    color: #fff;
    background: #4f46e5;
    border-color: #4f46e5;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.faro-analytics-report {
    flex: 1;
    min-height: 220px;
    max-height: min(50vh, 560px);
    overflow-y: auto;
    padding: 4px 2px 16px;
    margin-bottom: 4px;
}

.faro-analytics-report__loading,
.faro-analytics-report__empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 28px 12px;
    color: #64748b;
    font-size: 14px;
}

.faro-analytics-report__meta {
    font-size: 11px;
    color: #94a3b8;
    margin: 0 0 12px;
}

.faro-analytics-report__sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faro-analytics-report__section {
    padding: 16px 18px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.faro-analytics-report__section-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.faro-analytics-report__section-body {
    font-size: 13px;
    line-height: 1.6;
    color: #334155;
}

.faro-analytics-report__section-body strong {
    color: #0f172a;
}

.faro-analytics-prompts {
    padding: 14px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.faro-analytics-prompts__lead {
    margin: 0 0 12px;
    font-size: 12px;
    color: #64748b;
}

.faro-analytics-prompt-group {
    margin-bottom: 12px;
}

.faro-analytics-prompt-group:last-child {
    margin-bottom: 0;
}

.faro-analytics-prompt-group__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.faro-analytics-prompt-group__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.faro-analytics-chip {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    cursor: pointer;
    line-height: 1.35;
    text-align: left;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.faro-analytics-chip:hover {
    border-color: #a5b4fc;
    background: #eef2ff;
    color: #3730a3;
}

.faro-analytics-chat {
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.faro-analytics-chat__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.faro-analytics-chat__title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.faro-analytics-chat__hint {
    font-size: 11px;
    color: #9ca3af;
}

.faro-analytics-chat__messages {
    min-height: 120px;
    max-height: min(32vh, 320px);
    overflow-y: auto;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.faro-analytics-composer {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.faro-analytics-composer__input {
    flex: 1;
    min-height: 44px;
    max-height: 140px;
    resize: none;
    border: 0;
    background: transparent;
    padding: 6px 4px;
    font-size: 14px;
    line-height: 1.45;
    color: #111827;
}

.faro-analytics-composer__input:focus {
    outline: none;
}

.faro-analytics-composer__send {
    flex-shrink: 0;
    border-radius: 10px;
    font-weight: 600;
    padding-left: 18px;
    padding-right: 18px;
}

.faro-analytics-status.hm-ai-panel-status {
    margin-top: 8px;
    border-radius: 8px;
    font-size: 12px;
}

/* Legacy aliases (eski sınıf adları) */
.faro-analytics-page {
    margin: 0;
}

.faro-analytics-split {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 20px;
}

@media (max-width: 1100px) {
    .faro-analytics-split {
        grid-template-columns: 1fr;
    }
}


/* —— Analizler performans panosu —— */
.analytics-hub {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
}

.analytics-hub__alert {
    padding: 12px 16px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
}

.analytics-hub__hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 48%, #312e81 100%);
    color: #f8fafc;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
}

.analytics-hub__eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.analytics-hub__hero-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.analytics-hub__hero-desc {
    margin: 0;
    max-width: 52ch;
    font-size: 14px;
    line-height: 1.55;
    color: #cbd5e1;
}

.analytics-hub__hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.analytics-hub__hero .btn-ghost {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.25);
}

.analytics-hub__hero .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.analytics-hub__section-head {
    margin-bottom: 12px;
}

.analytics-hub__section-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.analytics-hub__section-desc {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.analytics-hub__grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.analytics-hub__grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1100px) {
    .analytics-hub__grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .analytics-hub__grid-2 {
        grid-template-columns: 1fr;
    }
}

.analytics-stat-grid {
    display: grid;
    gap: 12px;
}

.analytics-stat-grid--hero {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 1280px) {
    .analytics-stat-grid--hero {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .analytics-stat-grid--hero {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.analytics-stat {
    position: relative;
    padding: 16px 18px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.analytics-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #e2e8f0;
}

.analytics-stat--accent::before {
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
}

.analytics-stat__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    line-height: 1.3;
}

.analytics-stat__value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.analytics-stat__meta {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
}

.analytics-stat__value.is-positive,
.analytics-mini-metrics__row strong.is-positive {
    color: #059669;
}

.analytics-stat__value.is-negative,
.analytics-mini-metrics__row strong.is-negative {
    color: #dc2626;
}

.analytics-chart-card .app-page-card-body {
    padding-top: 12px;
}

.analytics-chart-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #64748b;
}

.analytics-chart-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.analytics-chart-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
}

.analytics-chart-legend__dot--sales {
    background: #4f46e5;
}

.analytics-chart-legend__dot--purchase {
    background: #f59e0b;
}

.analytics-bar-chart {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 6px;
    align-items: end;
    min-height: 200px;
    padding: 8px 4px 0;
}

.analytics-bar-chart__col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.analytics-bar-chart__bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    width: 100%;
    height: 160px;
}

.analytics-bar-chart__bar {
    width: 42%;
    max-width: 14px;
    min-height: 4px;
    border-radius: 4px 4px 2px 2px;
    transition: height 0.2s ease;
}

.analytics-bar-chart__bar--sales {
    background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
}

.analytics-bar-chart__bar--purchase {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
}

.analytics-bar-chart__label {
    margin-top: 8px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
}

.analytics-mini-metrics {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.analytics-mini-metrics__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    font-size: 13px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.analytics-mini-metrics__row:last-child {
    border-bottom: 0;
}

.analytics-mini-metrics__row strong {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}

.analytics-mini-metrics__row--total {
    padding-top: 12px;
    font-weight: 600;
}

.analytics-mini-metrics__row--total span {
    color: #0f172a;
}

.analytics-mini-metrics__divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

.analytics-due-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
}

.analytics-due-list li {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid #f1f5f9;
}

.analytics-due-list__type {
    font-weight: 700;
    color: #4f46e5;
}

.analytics-due-list__date {
    color: #64748b;
}

.analytics-due-list__amt {
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}

.analytics-empty-hint {
    margin: 12px 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.analytics-table {
    font-size: 13px;
}

.analytics-table-product {
    font-weight: 600;
    color: #0f172a;
}

.analytics-table-product__code {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    margin-top: 2px;
}

.analytics-hub__ai .analytics-ai-card {
    border-color: #c7d2fe;
    box-shadow: 0 4px 24px rgba(79, 70, 229, 0.08);
}

.analytics-ai-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.analytics-ai-topic {
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.analytics-ai-topic:hover {
    border-color: #c7d2fe;
    color: #4338ca;
}

.analytics-ai-topic.is-active {
    color: #fff;
    background: #4f46e5;
    border-color: #4f46e5;
}

.analytics-ai-report {
    min-height: 200px;
    max-height: min(48vh, 520px);
    overflow-y: auto;
    margin-bottom: 8px;
}

.analytics-ai-report__loading,
.analytics-ai-report__empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 12px;
    color: #64748b;
    font-size: 14px;
}

.analytics-ai-report__meta {
    font-size: 11px;
    color: #94a3b8;
    margin: 0 0 12px;
}

.analytics-ai-report__sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analytics-ai-report__section {
    padding: 16px 18px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.analytics-ai-report__section-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.analytics-ai-report__section-body {
    font-size: 13px;
    line-height: 1.6;
    color: #334155;
}

.analytics-ai-prompts {
    padding: 14px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.analytics-ai-prompts__lead {
    margin: 0 0 12px;
    font-size: 12px;
    color: #64748b;
}

.analytics-ai-prompts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}

.analytics-ai-chip {
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    cursor: pointer;
    line-height: 1.35;
    text-align: left;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.analytics-ai-chip:hover {
    border-color: #a5b4fc;
    background: #eef2ff;
    color: #3730a3;
}

.analytics-ai-chat {
    padding-top: 14px;
}

.analytics-ai-chat__messages {
    min-height: 120px;
    max-height: min(32vh, 300px);
    overflow-y: auto;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.analytics-ai-composer {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.analytics-ai-composer__input {
    flex: 1;
    min-height: 44px;
    max-height: 140px;
    resize: none;
    border: 0;
    background: transparent;
    padding: 6px 4px;
    font-size: 14px;
    line-height: 1.45;
    color: #111827;
}

.analytics-ai-composer__input:focus {
    outline: none;
}

.analytics-ai-status.hm-ai-panel-status {
    margin-top: 8px;
    font-size: 12px;
}

/* İstatistikler — filtre hizası */
.stats-filter-bar {
    align-items: flex-end;
    gap: 12px 16px;
    margin-bottom: 0;
}

.stats-filter-bar .filter-bar-group {
    flex: 0 1 auto;
    min-width: 0;
}

.stats-filter-bar .filter-bar-group--date {
    flex: 1 1 340px;
    max-width: 440px;
}

.stats-filter-bar .filter-bar-group--select {
    flex: 0 1 240px;
    min-width: 200px;
    max-width: 280px;
}

.stats-filter-bar .filter-bar-group--narrow {
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 200px;
}

.stats-filter-bar .filter-bar-group--year {
    flex: 0 0 auto;
    min-width: 100px;
    max-width: 120px;
}

.stats-filter-bar .filter-bar-group--year .form-control {
    min-width: 0;
    width: 100%;
}

.stats-filter-bar .filter-bar-group--checks {
    flex: 0 1 auto;
    min-width: 220px;
    max-width: 320px;
}

.stats-filter-bar .filter-bar-group .form-control,
.stats-filter-bar .filter-bar-group .form-select {
    width: 100%;
    min-width: 0;
}

.stats-filter-bar .filter-bar-group--narrow .form-select,
.stats-filter-bar .filter-bar-group--select .form-select {
    min-width: 0;
}

.stats-filter-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding-bottom: 0;
}

.stats-filter-actions .btn {
    height: 35px;
    min-height: 35px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.stats-filter-bar--actions-end .stats-filter-actions {
    margin-left: auto;
}

.stats-page-tabs {
    margin-bottom: 10px;
}

.stats-fatura-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-fatura-form {
    margin: 0;
}

.stats-fatura-block .stats-filter-bar--compact {
    margin-bottom: 0;
}

.stats-filter-bar--compact {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 0;
}

.stats-filter-bar--compact .filter-bar-group--narrow {
    min-width: 200px;
    max-width: 220px;
}

.stats-filter-bar--compact .filter-bar-group--year {
    min-width: 110px;
    max-width: 110px;
}

.stats-filter-bar--compact .stats-filter-actions {
    margin-left: 0;
}

.stats-invoice-chart-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 12px 10px;
}

.stats-invoice-chart-canvas-wrap {
    position: relative;
    width: 100%;
    height: 200px;
    min-height: 0;
}

.stats-invoice-chart-canvas-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.stats-fatura-table {
    margin-top: 12px;
}

.stats-filter-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 14px;
    padding-left: 2px;
}

.stats-filter-sep {
    flex: 0 0 auto;
    align-self: center;
    line-height: 1;
    color: #9ca3af;
    font-size: 14px;
    padding: 0 2px;
    user-select: none;
}

.stats-filter-checks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    min-height: 35px;
}

.stats-filter-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .stats-filter-bar {
        align-items: stretch;
    }

    .stats-filter-actions,
    .stats-filter-bar--actions-end .stats-filter-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        padding-top: 4px;
    }

    .stats-filter-bar--compact {
        width: 100%;
    }

    .stats-filter-bar .filter-bar-group--date {
        flex: 1 1 100%;
        max-width: none;
    }
}

/* Mali yıl devir */
.devir-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 960px) {
    .devir-layout {
        grid-template-columns: 1fr;
    }
}

.devir-panel {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fafafa;
}

.devir-panel__title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.devir-hint {
    margin: 12px 0 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.devir-hint code {
    font-size: 11px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

.devir-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.devir-preview-item {
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.devir-preview-item__label {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px;
}

.devir-preview-item__value {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.devir-preview-empty {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
    grid-column: 1 / -1;
}

.devir-alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 13px;
}

.devir-alert--warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.devir-status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    background: #f1f5f9;
    color: #334155;
}

.devir-status.is-error {
    background: #fef2f2;
    color: #b91c1c;
}

.devir-status.is-ok {
    background: #ecfdf5;
    color: #047857;
}
