/* Inter yazi tipi: yerel dosyalar (harici baglanti yok) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300; font-display: swap; src: url("../../morvin/fonts/inter-light.woff2") format("woff2"), url("../../morvin/fonts/inter-light.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../../morvin/fonts/inter-regular.woff2") format("woff2"), url("../../morvin/fonts/inter-regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../../morvin/fonts/inter-medium.woff2") format("woff2"), url("../../morvin/fonts/inter-medium.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("../../morvin/fonts/inter-bold.woff2") format("woff2"), url("../../morvin/fonts/inter-bold.woff") format("woff"); }
/* Alys CRM - MORVIN uzerine ince ayarlar, dokunmatik uyum */
:root { --touch: 48px; }
html { -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
button, a, select, input, label, .btn { touch-action: manipulation; }
.btn-icon { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
/* Marka: MORVIN'in kendi logo kutusu icinde duz yazi */
.brand-lg { font-size: 22px; font-weight: 600; color: #343a40; letter-spacing: .3px; line-height: 70px; }
.brand-sm { font-size: 22px; font-weight: 700; color: #556ee6; line-height: 70px; }
.login-brand { font-size: 26px; font-weight: 600; color: #556ee6; line-height: 1.2; }
.badge-yes { background: #34c38f; color: #fff; }
.badge-no { background: #f46a6a; color: #fff; }
.badge-soft-primary { background: rgba(85,110,230,.15); color: #556ee6; }
.card-title { font-size: 14px; letter-spacing: .5px; }
.form-actions { padding: 8px 0 24px; }
.filter-card .card-header { cursor: pointer; }
table.dataTable td, table.dataTable th { vertical-align: middle; }

/* tablo basliklari */
.table th {
    font-weight: 500;
    font-size: 13px;
}
.dataTables_wrapper .dataTables_filter input { min-height: 38px; }
.row-actions .btn { min-width: 30px; }

/* resim yukleme (dropify benzeri) */
.img-drop-box { position: relative; border: 2px dashed #ced4da; border-radius: 8px; min-height: 160px; display: flex; align-items: center; justify-content: center; background: #fafbfc; overflow: hidden; cursor: pointer; }
.img-drop.drag .img-drop-box { border-color: #556ee6; background: #f0f3ff; }
.img-drop-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.img-drop-msg { text-align: center; color: #74788d; padding: 16px; }
.img-drop-msg i { font-size: 40px; display: block; }
.img-drop.has-img .img-drop-msg { display: none; }
.img-drop-preview { max-width: 100%; max-height: 220px; object-fit: contain; }
.img-drop-clear { position: absolute; top: 8px; right: 8px; z-index: 3; }

/* yetki matrisi */
.perm-table th { white-space: nowrap; }
.perm-section td { background: #eef1f6; font-weight: 600; }
.perm-check { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0; cursor: pointer; }
.perm-check .form-check-input { width: 16px; height: 16px; margin: 0; cursor: pointer; }
.perm-sel { min-width: 140px; min-height: 40px; }
.perm-sel.perm-allow { border-color: #34c38f; background-color: #eafaf3; }
.perm-sel.perm-deny { border-color: #f46a6a; background-color: #fdeeee; }
.perm-table .select2-container { min-width: 140px; }
.perm-table .select2-selection.perm-allow { border-color: #34c38f; background-color: #eafaf3; }
.perm-table .select2-selection.perm-deny { border-color: #f46a6a; background-color: #fdeeee; }
.phone-group .phone-cc { max-width: 130px; flex: 0 0 auto; }

@media (max-width: 767.98px) {
    .page-title-box .float-end { float: none !important; margin-top: 10px; }
    .page-title-box .btn { flex: 1 1 auto; }
    .form-actions .btn { width: 100%; margin: 0 0 8px !important; }
    .card-body { padding: 14px; }
    .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { text-align: left; }
}

/* zorunlu alan / dogrulama */
.form-label .text-danger, label .text-danger { color: #f46a6a !important; font-weight: 700; }
.is-invalid + .select2-container .select2-selection, .select2-container.is-invalid .select2-selection { border-color: #f46a6a !important; }
.invalid-feedback.js-fb { font-size: 12px; }
.btn .spinner-border { vertical-align: -2px; }

/* Select2: MORVIN gorunumu (kare cerceve, her zaman arama kutusu, mavi secili satir) */
.select2-container--default .select2-selection--single { border: 1px solid #ced4da; border-radius: 0; background: #fff; }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: #74788d; padding: 0 1.75rem 0 .75rem; font-size: .875rem; line-height: calc(2.8525rem); }
.select2-container--default.select2-container--focus .select2-selection--single, .select2-container--default.select2-container--open .select2-selection--single { border-color: #ced4da; }
.select2-dropdown { border: 1px solid #ced4da; border-radius: 0; box-shadow: none; }
.select2-search--dropdown { padding: 6px; }
.select2-container--default .select2-search--dropdown .select2-search__field { border: 1px solid #ced4da; border-radius: 0; height: calc(2.2525rem + 2px); padding: .47rem .75rem; font-size: .875rem; outline: 0; }
.select2-container--default .select2-selection--single { height: calc(2.2525rem + 8px); }
.select2-container--default .select2-selection--single .select2-selection__arrow { top: 0; height: 100%; }
.select2-results__option { padding: .47rem .75rem; font-size: .875rem; color: #495057; }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--default .select2-results__option[aria-selected=true], .select2-container--default .select2-results__option--selected { background-color: #3b5de7 !important; color: #fff !important; }
.select2-container--default .select2-results__option--highlighted[aria-selected]:not([aria-selected=true]) { background-color: #f1f3f9 !important; color: #495057 !important; }
.select2-results > .select2-results__options { padding: 0 6px 6px; }

/* intl-tel-input: yalnizca tema uyumu (kutuphanenin kendi dolgu/ikon duzenine dokunulmaz) */
.iti { display: block; width: 100%; }
.iti__search-input { font-size: .875rem; color: #495057; }
.iti__country-list { font-size: .875rem; color: #495057; }
.iti__country-selector { border: 1px solid #ced4da; border-radius: 0; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.iti--detached-country-selector, .iti--inline-country-selector .iti__country-selector { z-index: 2100; }
/* Header ok ikonu: acilinca doner (sol menudeki gibi) */
.header-arrow { display: inline-block; transition: transform .2s ease; }
.header-item[aria-expanded="true"] .header-arrow { transform: rotate(180deg); }

/* Dropify (logo alani) */
.dropify-wrapper { width: 100%; height: 220px; margin: 0; border: 2px solid #e5e5e5; border-radius: 0; background: #fff; font-family: inherit; color: #777; box-sizing: border-box; }
.dropify-wrapper .dropify-message span.file-icon { font-size: 48px; color: #ccc; }
.dropify-wrapper .dropify-message p { margin: 5px 0 0; font-size: 16px; color: #777; text-align: center; }
.dropify-wrapper .dropify-preview { background: #fff; }
.dropify-wrapper .dropify-preview .dropify-render img { max-height: 190px; width: auto; object-fit: contain; }
.dropify-wrapper:hover { background-image: none; }
.dropify-wrapper .dropify-clear { font-family: inherit; }
/* Dropify ikon fontu yerine satir ici SVG (font dosyasi gerekmez) */
.dropify-wrapper .dropify-message span.file-icon { display: block; font-size: 0; line-height: 0; }
.dropify-wrapper .dropify-message span.file-icon:before { content: '' !important; display: block !important; width: 76px !important; height: 56px !important; margin: 0 auto 14px !important; font-size: 0 !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 56' fill='none' stroke='%23c8c8c8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 46h-2a14 14 0 0 1-2-27.9A20 20 0 0 1 54 14a17 17 0 0 1 4 32h-2'/%3E%3Cpath d='M38 48V26M30 33l8-8 8 8'/%3E%3C/svg%3E") center / contain no-repeat; }

.badge.bg-purple{background-color:#564ab1!important;color:#fff}

/* uretimler: son kullanma uyarilari */
.prod-note { display: inline-block; padding: 0 4px; font-size: 13px; border-radius: 0; animation: prod-blink 1.2s ease-in-out infinite; }
.prod-note.ok { color: #1d7a3a; background: #c8f0d2; }
.prod-note.warn { color: #8a5a00; background: #ffe7b3; }
.prod-note.bad { color: #fff; background: #dc3545; }
@keyframes prod-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---- DataTables ust kisim: sayfa uzunlugu + baslik + siralama ikonlari ---- */
.dataTables_wrapper .dataTables_length { font-size: 13px; color: #495057; margin-bottom: 14px; }
.dataTables_wrapper .dataTables_length label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.dataTables_wrapper .dataTables_length select.custom-select,
.dataTables_wrapper .dataTables_length select {
    height: 43px; padding: 0 34px 0 14px; margin: 0 4px; font-size: 13px; color: #495057;
    border: 1px solid #e3e6ec; border-radius: 0; background-color: #fff; box-shadow: none;
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='16' viewBox='0 0 12 16'%3E%3Cpath fill='%23212529' d='M6 0l5 6H1zM6 16L1 10h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 14px;
}
table.dataTable.table { border-collapse: collapse !important; }
table.dataTable thead th, table.dataTable thead td {
    background: #fff; color: #343a40; font-size: 13px; font-weight: 500; padding: 16px 38px 16px 18px;
    border: 1px solid #eef0f4; border-bottom: 2px solid #eef0f4; vertical-align: middle;
}
table.dataTable thead th.sorting_disabled { padding-right: 18px; }
table.dataTable thead .sorting, table.dataTable thead .sorting_asc, table.dataTable thead .sorting_desc { background-image: none; }
table.dataTable thead .sorting:before, table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before, table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before, table.dataTable thead .sorting_desc:after {
    bottom: auto; top: 50%; margin-top: -9px; font-size: 13px; line-height: 18px; color: #6c757d; opacity: .35;
}
table.dataTable thead .sorting:before, table.dataTable thead .sorting_asc:before, table.dataTable thead .sorting_desc:before { right: 20px; }
table.dataTable thead .sorting:after, table.dataTable thead .sorting_asc:after, table.dataTable thead .sorting_desc:after { right: 9px; }
table.dataTable thead .sorting_asc:before, table.dataTable thead .sorting_desc:after { opacity: .95; color: #212529; }
table.dataTable tbody td { padding-left: 18px; padding-right: 18px; }

/* select2: kapali = asagi ok, acik = yukari ok; boyut/renk/konum ayni */
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #888 transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
    margin-left: -4px; margin-top: -2.5px;
}
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #888 transparent !important;
    border-width: 0 4px 5px 4px !important;
    margin-left: -4px; margin-top: -2.5px;
}

/* ---- Raporlar > Log Kayitlari ---- */
.log-filter .card-header { background: #fff; padding: 1rem 1.25rem; }
.log-filter .log-filter-title { font-size: 15px; color: #495057; }
.log-filter .log-filter-title .mdi { color: #2a3042; font-size: 20px; vertical-align: -2px; }
.log-filter .card-header .mdi-chevron-up, .log-filter .card-header .mdi-chevron-down { font-size: 20px; color: #2a3042; }
.log-filter .form-control { height: calc(2.2525rem + 12px); font-size: 14px; }
.log-filter .btn { height: calc(2.2525rem + 12px); padding: 0 1.1rem; font-size: 14px; border-radius: 0; }
#log-years .log-year { text-align: left; font-size: 15px; padding: .7rem 1.35rem; border-radius: 0; }
#log-years .log-year.btn-light { background: #f1f3f9; border-color: #f1f3f9; color: #495057; }
#log-pane.is-loading, #log-list.is-loading { opacity: .5; pointer-events: none; transition: opacity .15s; }
.log-year-title { color: #2a3042; font-weight: 500; }
.log-month { font-size: 16px; font-weight: 400; color: #2a3042; padding-bottom: .9rem; margin-bottom: 0 !important; border-bottom: 1px solid #eef0f4; }
.log-table th { font-weight: 400; font-size: 14px; color: #495057; padding: 1.1rem 1.35rem; border-bottom: 2px solid #eef0f4; }
.log-table td { padding: 1.15rem 1.35rem; color: #5b626b; vertical-align: middle; }
.log-table .badge { padding: .3em .55em; font-weight: 600; border-radius: 4px; }
button.log-open { border: 0; cursor: pointer; line-height: 1.2; }
button.log-open:hover { filter: brightness(.92); }

.log-dialog .modal-header { padding: 1.25rem 1.5rem; }
.log-dialog .modal-title { font-size: 18px; color: #2a3042; }
.log-dialog .form-label { color: #74788d; }
.log-dialog #log-q { height: calc(2.2525rem + 12px); font-size: 14px; }
.log-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.log-chip { font-size: 12px; padding: 2px 10px; color: #fff; }
.log-chip.log-create { background: #34c38f; } .log-chip.log-update { background: #556ee6; } .log-chip.log-delete { background: #f46a6a; }
.log-count { font-size: 12px; color: #74788d; margin: .9rem 0 1.1rem; }
.log-entry { border-left: 4px solid #a6b0cf; padding: .15rem 0 .15rem 2rem; margin-bottom: 1.5rem; }
.log-entry.log-create { border-left-color: #34c38f; }
.log-entry.log-update { border-left-color: #556ee6; }
.log-entry.log-delete { border-left-color: #f46a6a; }
.log-entry .log-name { font-size: 15px; color: #2a3042; line-height: 1.3; margin-bottom: .35rem; }
.log-entry .log-meta { font-size: 13px; color: #74788d; margin-bottom: .3rem; }
.log-entry .log-date { color: #ff6a4d; }
.log-entry.log-create .log-ev { color: #1f9d6f; font-weight: 500; }
.log-entry.log-update .log-ev { color: #3f55c4; font-weight: 500; }
.log-entry.log-delete .log-ev { color: #d94848; font-weight: 500; }
.log-entry .log-msg { font-size: 13px; color: #74788d; margin-bottom: .3rem; word-break: break-word; }
.log-entry .log-diff { font-size: 13px; color: #74788d; margin-bottom: .15rem; word-break: break-word; }
.log-entry .log-diff del { color: #d94848; text-decoration: line-through; opacity: .85; }
.log-entry .log-diff ins { color: #1f9d6f; text-decoration: none; }
.log-entry .log-ua { font-size: 13px; color: #8f98b8; word-break: break-word; }

/* ---- Liste sayfalari: baslik + Yeni Kayit Ekle + filtre akordeonu ---- */
.crud-card .crud-title { font-size: 16px; font-weight: 600; color: #495057; letter-spacing: .2px; }
.crud-card .crud-sep { margin: 1.25rem 0 1.4rem; border-top: 1px solid #eef0f4; opacity: 1; }
.crud-filter { border: 1px solid #e3e6ec; }
.crud-filter-head { background: #eef0f8; color: #3b4a9e; font-size: 14px; padding: .65rem 1rem; cursor: pointer; user-select: none; }
.crud-filter-head .mdi-filter { font-size: 19px; color: #2a3a8a; vertical-align: -2px; }
.crud-filter-head .crud-chevron { font-size: 22px; color: #2a3a8a; }
.crud-filter-body { padding: 1.35rem 1.35rem 1.2rem; background: #fff; border-top: 1px solid #e3e6ec; }
.crud-filter-body .form-label { font-size: 14px; color: #495057; margin-bottom: .6rem; }

/* DataTables bilgi satiri */
div.dataTables_wrapper div.dataTables_info { font-size: 12px; }

/* sifre goster/gizle goz ikonlari bir tik buyuk (tablo ikon butonlari haric) */
.btn:not(.btn-icon) .mdi-eye-outline, .btn:not(.btn-icon) .mdi-eye-off-outline { font-size: 1.15em; }

/* Dashboard kart basliklari */
.dash-title {
    font-size: 15px;
}

/* cevrimici gostergesi: hafif nabiz animasyonu */
.avatar-online {
    animation: online-pulse 2s ease-out infinite;
}
@keyframes online-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 195, 143, .7); }
    70%  { box-shadow: 0 0 0 8px rgba(52, 195, 143, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 195, 143, 0); }
}
@media (prefers-reduced-motion: reduce) { .avatar-online { animation: none; } }

/* cok dilli alan (dil secimi + deger satirlari) */
.ml-row .ml-lang {
    flex: 0 0 auto; width: 96px; max-width: 96px; padding-right: 2rem;
    background-color: #74808d; border-color: #74808d; color: #fff; font-weight: 600; cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}
.ml-row .ml-lang option { background: #fff; color: #495057; }
.ml-row .ml-lang option:disabled { color: #b8bcc6; }
.ml-row + .ml-row { margin-top: 8px; }
.ml-row .ml-input { min-width: 0; }
.ml-row .ml-remove { color: #74788d; }
.ml-add { text-decoration: none; }

/* Takvim (Siparisler) dugmeleri: yumusak, tek tonlu */
.fc-toolbar .btn-primary { background: #eef0fd; border-color: #dfe3f8; color: #525ce5; box-shadow: none; }
.fc-toolbar .btn-primary:hover { background: #e2e5fa; border-color: #d3d8f5; color: #3f49c9; }
.fc-toolbar .btn-primary:focus, .fc-toolbar .btn-primary:active { box-shadow: none; }
.fc-toolbar .btn-primary.active, .fc-toolbar .btn-primary:not(:disabled):active { background: #d6daf8; border-color: #c7cdf3; color: #2f3ab0; }
.fc-toolbar .btn-primary:disabled, .fc-toolbar .btn-primary.disabled { background: #f5f6fd; border-color: #e8eaf9; color: #a9aee8; opacity: 1; }

/* Dashboard tablolari: kolonlar tek satirda, okunakli */
.dash-tbl { font-size: 13.5px; }
.dash-tbl thead th { white-space: nowrap; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #74788d; background: #f8f9fa; border-bottom: 1px solid #e9ecef; padding: .6rem .7rem; }
.dash-tbl td { white-space: nowrap; padding: .7rem .7rem; vertical-align: middle; border-color: #f1f3f5; }
.dash-tbl td.wrap { white-space: normal; min-width: 11rem; }
.dash-tbl tbody tr:hover > td { background: #fafbfe; }
.dash-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.dash-tbl .prod-note { padding: 2px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.dash-time { display: inline-block; margin-left: .25rem; padding: 0 .4rem; border-radius: 5px; background: #eef0fd; color: #525ce5; font-weight: 600; font-size: 11px; }
.dash-chip { display: inline-block; margin: 0 .3rem .25rem 0; padding: .05rem .5rem; border: 1px solid #e9ecef; border-radius: 6px; background: #f8f9fb; font-size: 12.5px; }
.dash-sum { display: flex; justify-content: flex-end; align-items: baseline; gap: .6rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px dashed #e0e4ea; color: #74788d; font-size: 13px; }
.dash-sum b { color: #e5484d; font-size: 1.05rem; }

/* Siparis kaynagi rozeti (Manuel / Web) */
.src-badge { display: inline-block; vertical-align: middle; margin-left: .35rem; padding: .05rem .5rem; border-radius: 10px; font-size: 11px; font-weight: 600; line-height: 1.5; }
.src-badge.src-manual { background: #eef0fd; color: #525ce5; }
.src-badge.src-web { background: #e3f6ee; color: #1b8a5a; }
.fc-event.ev-web, .fc-event.ev-web .fc-content { background-color: #e3f6ee; border-color: #b9e6d3; color: #1b8a5a; }
.fc-event.ev-manual, .fc-event.ev-manual .fc-content { background-color: #eef0fd; border-color: #dfe3f8; color: #525ce5; }

/* Filtre basligi ok ikonu: acilip kapanirken doner (header dil ikonu gibi) */
.crud-chevron, #log-filter-chevron { display: inline-block; transition: transform .2s ease; }
.crud-filter-head[aria-expanded="true"] .crud-chevron, .log-filter .card-header[aria-expanded="true"] #log-filter-chevron { transform: rotate(180deg); }

/* Hata durumunda input-group (sifre + goz butonu) tek parca kirmizi cerceve */
.input-group:has(.form-control.is-invalid) > .btn { border-color: #f46a6a !important; }
.input-group:has(.form-control.is-invalid) > .form-control.is-invalid { border-right-color: #f46a6a; }

/* Cok dilli alan dil secimi: ok ikonu ustte, liste acilinca doner (filtre basligi gibi) */
.ml-row { position: relative; }
.ml-row .ml-lang { background-image: none; }
.ml-row .ml-arrow { position: absolute; left: 70px; top: 50%; margin-top: -9px; width: 18px; height: 18px; line-height: 18px; font-size: 18px; color: #fff; pointer-events: none; z-index: 4; transition: transform .2s ease; }
.ml-row .ml-lang.is-open ~ .ml-arrow { transform: rotate(180deg); }
