/* Brain ERP v2 - Özel Stiller */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Navbar — dark gradient (same as login header) */
.brain-navbar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.brain-navbar .dropdown-menu {
    background-color: #16213e;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.brain-navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
}

.brain-navbar .dropdown-item:hover,
.brain-navbar .dropdown-item:focus {
    background-color: #0f3460;
    color: #fff;
}

.brain-navbar .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

.brain-navbar .nav-link.active {
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
}

/* Modül kartları hover efekti */
.module-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Flash mesaj animasyonu */
.alert {
    animation: fadeIn 0.3s ease-in;
}

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

/* ── Login Page ──────────────────────────────────── */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 2.5rem 0 3.5rem;
    text-align: center;
}

.login-header .brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 0.25rem;
}

.login-header .brand-title sup {
    font-size: 0.5em;
    vertical-align: super;
}

.login-header .brand-subtitle {
    font-size: 0.85rem;
    opacity: 0.6;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.login-content {
    flex: 1;
}

.login-card {
    max-width: 420px;
    margin: -2rem auto 0;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.login-card .card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.login-card .card-body {
    padding: 2rem;
}

.login-card .card-title {
    color: #16213e;
    font-weight: 600;
}

.login-card .btn-primary {
    padding: 0.6rem;
    font-weight: 600;
    background-color: #16213e;
    border-color: #16213e;
}

.login-card .btn-primary:hover {
    background-color: #0f3460;
    border-color: #0f3460;
}

.login-card .input-group-text {
    background-color: #f8f9fa;
    border-right: none;
}

.login-card .input-group .form-control {
    border-left: none;
}

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

.login-card .input-group:focus-within .input-group-text {
    border-color: #86b7fe;
}

.login-card .input-group:focus-within .form-control {
    border-color: #86b7fe;
}

.login-footer {
    text-align: center;
    padding: 1rem 0;
    color: #6c757d;
    font-size: 0.8rem;
}

/* ── Finance Module ─────────────────────────────── */

.balance-display {
    font-size: 2rem;
    font-weight: 700;
    color: #198754;
}

.balance-display.negative {
    color: #dc3545;
}

.balance-display.zero {
    color: #6c757d;
}

.badge-giris {
    background-color: #198754;
    color: #fff;
}

.badge-cikis {
    background-color: #dc3545;
    color: #fff;
}

/* ── Dashboard ─────────────────────────────────── */

/* KPI Cards */
.kpi-card { border-left: 4px solid; transition: all 0.2s ease; }
.kpi-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important; }
.kpi-value { font-size: 1.85rem; font-weight: 800; color: #1a1a2e; letter-spacing: -0.02em; line-height: 1.2; }
.kpi-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #6c757d; }
.kpi-icon { opacity: 0.15; }
.kpi-icon i { font-size: 2rem; }
@media (max-width: 767.98px) {
    .kpi-icon { display: none; }
}

/* Pipeline */
.pipeline-count { font-size: 1.5rem; font-weight: 700; }
.pipeline-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: #6c757d; }

/* Margin badges in tables */
.badge-margin-high { background-color: #198754; color: #fff; }
.badge-margin-mid { background-color: #ffc107; color: #000; }
.badge-margin-low { background-color: #dc3545; color: #fff; }

/* Reliability dots */
.dot-reliable { color: #198754; font-size: 1.1em; }
.dot-approximate { color: #ffc107; font-size: 1.1em; }
.dot-unreliable { color: #dc3545; font-size: 1.1em; }

/* Chart containers */
.chart-container { position: relative; }

/* DataTables search box */
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
    text-align: right;
}
.dataTables_wrapper .dataTables_filter input {
    width: 220px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
    background-color: #f8f9fa;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
    background-color: #fff;
}
.dataTables_wrapper .dataTables_filter input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}
.dataTables_wrapper .dataTable thead th {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
    color: #6c757d; font-weight: 600; border-bottom: 2px solid #dee2e6; white-space: nowrap;
}
.dataTables_wrapper .dataTable tbody td {
    font-size: 0.85rem; vertical-align: middle;
}

/* ── Price List ────────────────────────────────── */

.fallback-icon { color: #fd7e14; font-size: 0.85rem; margin-left: 4px; cursor: help; }
.diff-positive { background-color: #198754; color: #fff; }
.diff-negative { background-color: #dc3545; color: #fff; }
.diff-na { background-color: #6c757d; color: #fff; }
.status-badge { font-size: 0.72rem; }

/* Price detail page */
.card.info-card { border-left: 4px solid #0d6efd !important; border-radius: 4px 0 0 4px !important; }
.card.config-card { border-left: 4px solid #198754 !important; border-radius: 4px 0 0 4px !important; }
.card.preview-card { border-left: 4px solid #fd7e14 !important; border-radius: 4px 0 0 4px !important; background-color: rgba(253, 126, 14, 0.03); }
.card.history-card { border-left: 4px solid #6c757d !important; border-radius: 4px 0 0 4px !important; }
.card.prisync-card { border-left: 4px solid #fd7e14 !important; border-radius: 4px 0 0 4px !important; }
.prisync-card .table td { font-size: 0.85rem; vertical-align: middle; }
.prisync-card .competitor-row:hover td { background-color: rgba(0, 0, 0, 0.04); }

.info-label { font-size: 0.8rem; color: #6c757d; font-weight: 600; text-transform: uppercase; }
.info-value { font-size: 1rem; font-weight: 500; }

.card-header-styled {
    font-size: 1rem; font-weight: 600; margin-bottom: 1rem;
    padding-bottom: 0.75rem; border-bottom: 1px solid #dee2e6; color: #212529;
}
.card-header-styled i { margin-right: 6px; opacity: 0.7; }

.config-card label,
.config-card .form-label {
    font-size: 0.8rem; color: #6c757d; font-weight: 600;
    text-transform: uppercase; margin-bottom: 0.25rem;
}
.config-card .section-label {
    font-size: 0.75rem; color: #6c757d; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-top: 1rem; margin-bottom: 0.5rem;
    padding-top: 0.75rem; border-top: 1px solid #dee2e6;
}

.breadcrumb-custom { font-size: 0.85rem; color: #6c757d; margin-bottom: 1.25rem; }
.breadcrumb-custom a { color: #0d6efd; text-decoration: none; }
.breadcrumb-custom a:hover { text-decoration: underline; }

/* Price list row tints — high specificity to override DataTables */
table#priceTable tbody tr[data-status="1"] td { background-color: rgba(25, 135, 84, 0.05) !important; }
table#priceTable tbody tr[data-status="2"] td { background-color: rgba(220, 53, 69, 0.05) !important; }
table#priceTable tbody tr[data-status="3"] td,
table#priceTable tbody tr[data-status="4"] td,
table#priceTable tbody tr[data-status="6"] td,
table#priceTable tbody tr[data-status="7"] td,
table#priceTable tbody tr[data-status="8"] td,
table#priceTable tbody tr[data-status="9"] td { background-color: rgba(255, 193, 7, 0.04) !important; }
table#priceTable tbody tr[data-status="0"] td { background-color: rgba(108, 117, 125, 0.05) !important; }
table#priceTable tbody tr:hover td { background-color: rgba(0, 0, 0, 0.07) !important; }

/* Price table headers */
#priceTable thead th {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

/* Price list search box expand */
#priceTable_filter {
    margin-top: 1.1rem;
}
#priceTable_filter input {
    min-width: 250px;
    transition: width 0.3s ease;
    font-style: italic;
}
#priceTable_filter input:focus {
    width: 350px;
    font-style: normal;
}

/* Material name — single line with ellipsis */
#priceTable tbody td:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 350px;
}

/* Search box + page length vertical alignment */
#priceTable_wrapper .d-flex.justify-content-between {
    align-items: flex-end;
}

/* Shimmer skeleton loading */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    will-change: background-position;
    transform: translateZ(0);
}
.shimmer-text {
    height: 14px;
    display: inline-block;
}
.shimmer-badge {
    height: 22px;
    width: 70px;
    display: inline-block;
    border-radius: 10px;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
#tableShimmer th {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

/* ===== Report Styles (Step 11) ===== */

.margin-badge-green { background-color: #198754; color: #fff; }
.margin-badge-yellow { background-color: #ffc107; color: #000; }
.margin-badge-red { background-color: #dc3545; color: #fff; }

.row-risk-high { background-color: rgba(220, 53, 69, 0.05) !important; }
.row-risk-medium { background-color: rgba(255, 193, 7, 0.05) !important; }

.supplier-changed { font-weight: 600; }

.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

/* Row click styles */
.clickable-row { cursor: pointer; transition: background-color 0.15s; }
.clickable-row:hover { background-color: rgba(13, 110, 253, 0.04) !important; }

/* Ellipsis columns for DataTables */
.col-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Material action modal */
#materialActionModal .btn { text-align: left; }
#materialActionModal .btn small { font-size: 0.75rem; opacity: 0.7; }

/* Reliability dots */
.reliability-dot { font-size: 10px; letter-spacing: 1px; }
.reliability-dot .dot-green { color: #28a745; }
.reliability-dot .dot-gray { color: #dee2e6; }
.reliability-dot .dot-red { color: #dc3545; }
.reliability-single { font-size: 11px; color: #6c757d; cursor: help; }

/* Activity status dots */
.status-dot-active, .status-dot-declining, .status-dot-quiet, .status-dot-risk {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle;
}
.status-dot-active { background-color: #28a745; }
.status-dot-declining { background-color: #ffc107; }
.status-dot-quiet { background-color: #fd7e14; }
.status-dot-risk { background-color: #dc3545; }

/* Contact links (customer detail) */
.contact-link { color: #495057; text-decoration: none; transition: color 0.15s; }
.contact-link:hover { color: #0d6efd; }

/* Activity badge large */
.activity-badge-lg { font-size: 0.85rem; padding: 0.4rem 0.8rem; }

/* Category badges */
.category-badge { display: inline-block; padding: 0.2em 0.5em; font-size: 0.7rem; font-weight: 500; border-radius: 0.35rem; color: #fff; white-space: nowrap; }
.category-badge:hover { opacity: 0.85; }
.category-makine { background-color: #0d6efd; }
.category-yedek_parca { background-color: #fd7e14; }
.category-sarf_malzeme { background-color: #20c997; }
.category-deterjan { background-color: #6f42c1; }
.category-temizlik_kagidi { background-color: #d63384; }
.category-gida_urunleri { background-color: #795548; }
.category-diger { background-color: #6c757d; }
.category-none { background-color: #adb5bd; }

/* Proposal age indicators */
.proposal-age-warning { color: #fd7e14; font-weight: 600; }
.proposal-age-critical { color: #dc3545; font-weight: 600; }

/* Proposal notes timeline */
.note-item { transition: background-color 0.2s; }
.note-item:hover { background-color: rgba(0,0,0,0.02); }

/* Proposal takip gerekli badge (matches warning filter button) */
.proposal-badge-takip { background-color: #ffc107; color: #000; }

/* DataTables search expand on focus */
.dataTables_wrapper .dataTables_filter input { transition: width 0.3s ease; }
.dataTables_wrapper .dataTables_filter input:focus { width: 280px; }

/* CRM Timeline */
.timeline-entry { transition: background-color 0.2s; }
.timeline-entry:hover { background-color: rgba(0,0,0,0.015); }
#activityTimeline { scrollbar-width: thin; }

/* Ficheno display — force inherit font, no monospace */
.ficheno-display { font-family: inherit !important; font-weight: 400 !important; letter-spacing: normal !important; font-variant-numeric: normal !important; }
.ficheno-display strong { font-weight: 700 !important; }

/* ─── Bank Statement Detail (Step 16D) ─── */
.bank-kpi-card { transition: transform 0.1s; }
.bank-kpi-card:hover { transform: translateY(-2px); }
.bank-kpi-card.active { border-width: 2px !important; }

.bank-txn-green { background-color: rgba(25, 135, 84, 0.04); }
.bank-txn-yellow { background-color: rgba(255, 193, 7, 0.06); }
.bank-txn-red { background-color: rgba(220, 53, 69, 0.04); }
.bank-txn-virman { background-color: rgba(13, 202, 240, 0.06); }
.bank-txn-skipped { background-color: rgba(108, 117, 125, 0.04); opacity: 0.7; }
.bank-txn-exported { background-color: rgba(13, 110, 253, 0.05); }
.table tbody tr.row-exported > td { background-color: rgba(25, 135, 84, 0.15) !important; }
.table tbody tr.row-exported:hover > td { background-color: rgba(25, 135, 84, 0.22) !important; }

.arp-results { position: absolute; z-index: 1050; max-height: 250px; overflow-y: auto; width: 350px; }
.arp-results .dropdown-item { font-size: 0.85rem; padding: 0.35rem 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arp-results .dropdown-item:hover { background-color: #e9ecef; }

/* Statement detail — full description visibility */
#txnTable td.desc-cell { word-break: break-word; white-space: normal; min-width: 250px; }

/* Teach modal */
#teachRuleModal .modal-body hr { margin: 1rem 0; border-color: #e9ecef; }
#teachPreview { font-size: 0.9rem; }
#teachPreviewList table td { padding: 0.15rem 0.4rem; }

.gl-display { cursor: pointer; text-decoration: underline dotted; color: #6c757d; font-size: 0.85rem; }
.gl-display:hover { color: #0d6efd; }

#txnTable td.cell-actions { white-space: nowrap; }

.voucher-badge.admin-editable { cursor: pointer; }
.voucher-badge.admin-editable:hover { opacity: 0.8; }

/* Bank settings tables (Step 16F) */
.rule-auto-learned { font-style: italic; }
.rule-catch-all { background-color: rgba(255, 193, 7, 0.1); }
.rule-inactive { opacity: 0.5; text-decoration: line-through; }
.account-inactive { opacity: 0.5; }
.priority-badge { font-size: 0.75rem; padding: 0.15rem 0.4rem; }

