:root {
  --navy: #172033;
  --navy-2: #202b42;
  --accent: #5b6cff;
  --soft: #f4f6fb;
  --text: #20263a;
  --muted: #7c8498;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--soft); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 255px; background: linear-gradient(180deg, var(--navy), #101725); color: #fff; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; overflow: hidden; z-index: 1030; transition: transform .25s ease; }
.brand { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; padding: 24px 20px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-close { position:absolute; top:14px; right:12px; width:38px; height:38px; border:1px solid rgba(255,255,255,.16); border-radius:10px; background:rgba(255,255,255,.08); color:#fff; display:grid; place-items:center; z-index:2; }
.sidebar-close:hover, .sidebar-close:focus { background:rgba(255,255,255,.16); color:#fff; outline:none; }
.sidebar-backdrop { display:none; position:fixed; inset:0; padding:0; border:0; background:rgba(10,15,27,.58); z-index:1029; opacity:0; transition:opacity .25s ease; }

.brand-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--accent); font-size: 21px; }
.brand strong, .brand small { display: block; }
.brand small { color: #aeb6ca; font-size: 12px; }
.sidebar-nav { flex: 1 1 auto; min-height: 0; padding: 18px 12px; display: grid; align-content: start; gap: 6px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.24) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 7px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 999px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.32); }
.sidebar-nav a { color: #b8c0d2; text-decoration: none; display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.sidebar-nav a:hover, .sidebar-nav a.active { color: #fff; background: rgba(91,108,255,.22); }
.sidebar-user { flex: 0 0 auto; padding: 18px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 11px; color:#fff; text-decoration:none; background: rgba(10,15,27,.16); }
.sidebar-user:hover { background:rgba(255,255,255,.04); color:#fff; }
.sidebar-user .avatar { width: 38px; height: 38px; flex:0 0 38px; border-radius: 50%; overflow:hidden; background: #fff; color: var(--navy); display: grid; place-items: center; font-weight: 800; }
.sidebar-user .avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-user small { color: #9ea8bd; font-size: 12px; }
.main-content { margin-left: 255px; width: calc(100% - 255px); min-height: 100vh; }
.topbar { min-height: 88px; background: #fff; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e8ebf3; position: sticky; top: 0; z-index: 1020; }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 800; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; gap: 8px; }
.content-area { padding: 26px 28px 50px; }
.card { border: 0; border-radius: 16px; box-shadow: 0 8px 28px rgba(31,42,68,.07); }
.card-header { background: transparent; border-bottom: 1px solid #edf0f6; padding: 18px 20px; }
.card-body { padding: 20px; }
.stat-card { padding: 20px; min-height: 126px; }
.stat-card .icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: #eef0ff; color: var(--accent); font-size: 21px; }
.stat-card .value { font-size: 29px; font-weight: 800; margin-top: 14px; }
.stat-card .label { color: var(--muted); font-size: 13px; }

.dashboard-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.dashboard-stat-card { min-height: 170px; padding: 20px; color: var(--text); text-decoration: none; position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; border: 1px solid transparent; }
.dashboard-stat-card::after { content: ""; position: absolute; width: 115px; height: 115px; border-radius: 50%; right: -48px; bottom: -58px; background: rgba(91,108,255,.07); pointer-events: none; }
.dashboard-stat-card[href]:hover { color: var(--text); transform: translateY(-4px); border-color: rgba(91,108,255,.22); box-shadow: 0 14px 34px rgba(31,42,68,.12); }
.dashboard-stat-card-static { cursor: default; }
.dashboard-stat-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.dashboard-stat-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; background: #eef0ff; color: var(--accent); font-size: 22px; }
.dashboard-stat-arrow { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #f5f6fa; color: #8a92a5; font-size: 14px; transition: background .2s ease, color .2s ease; }
.dashboard-stat-card[href]:hover .dashboard-stat-arrow { background: var(--accent); color: #fff; }
.dashboard-stat-value { margin-top: 22px; font-size: 32px; line-height: 1; font-weight: 900; letter-spacing: -.03em; }
.dashboard-stat-label { margin-top: 9px; color: var(--muted); font-size: 14px; font-weight: 700; }
@media (max-width: 575.98px) { .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .dashboard-stat-card { min-height: 146px; padding: 16px; } .dashboard-stat-icon { width: 44px; height: 44px; font-size: 19px; } .dashboard-stat-value { margin-top: 18px; font-size: 27px; } .dashboard-stat-label { font-size: 12px; } }

.table { margin: 0; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #737c90; font-weight: 800; background: #f8f9fc; white-space: nowrap; }
.table td { vertical-align: middle; }
.form-label { font-weight: 700; font-size: 13px; }
.form-control, .form-select { border-color: #dfe3ec; border-radius: 10px; min-height: 44px; }
textarea.form-control { min-height: 95px; }
.btn { border-radius: 10px; font-weight: 700; }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.badge { padding: .48em .7em; border-radius: 8px; }
.logo-preview { width: 74px; height: 54px; object-fit: contain; background: #fff; border: 1px solid #e6e9f0; border-radius: 10px; padding: 5px; }
.item-row { border: 1px solid #e7eaf1; border-radius: 14px; padding: 16px; margin-bottom: 14px; background: #fbfcff; }
.item-image-preview { width: 82px; height: 64px; object-fit: contain; border: 1px solid #e2e6ef; border-radius: 8px; background: #fff; }
.action-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.login-page { min-height: 100vh; background: radial-gradient(circle at top right, #6172ff 0, #26324d 38%, #111827 100%); display: grid; place-items: center; padding: 20px; }
.login-card { width: min(440px, 100%); background: rgba(255,255,255,.98); border-radius: 22px; padding: 32px; box-shadow: 0 30px 80px rgba(0,0,0,.32); }
.login-logo { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px; background: var(--accent); color: #fff; font-size: 28px; margin-bottom: 18px; }
.proforma-paper { background: #fff; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 13mm; box-shadow: 0 12px 50px rgba(0,0,0,.12); color: #1c2434; }
.proforma-logo { max-width: 180px; max-height: 70px; object-fit: contain; }
.bank-logo { max-width: 120px; max-height: 45px; object-fit: contain; }
.stamp-image { max-width: 180px; max-height: 120px; object-fit: contain; }
.product-image-list { text-align:center; line-height:0; }
.product-thumb { object-fit: contain; display:inline-block; vertical-align:middle; margin:2px; }
.product-thumb-single { width: 200px; height: 120px; }
.product-thumb-multi {
    width: 100%;
    height: auto;
    max-width: 80px;
}

.bank-account-row { border: 1px solid #e3e7f0; border-radius: 14px; padding: 16px; margin-bottom: 14px; background: #fbfcff; }
.company-bank-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 6px; }
.company-bank-line:last-child { margin-bottom: 0; }
.bank-choice { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; border: 1px solid #dfe3ec; border-radius: 11px; padding: 11px 12px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.bank-choice:hover { border-color: #aeb7ff; background: #fafaff; }
.bank-choice-matching { box-shadow: inset 3px 0 0 var(--accent); }
.bank-choice input { width: 18px; height: 18px; }
.bank-choice-code { display: inline-grid; place-items: center; min-width: 42px; padding: 4px 7px; border-radius: 8px; background: #eef0ff; color: #3949ab; font-weight: 800; font-size: 12px; }
.bank-choice strong, .bank-choice small { display: block; }
.bank-choice small { color: var(--muted); margin-top: 2px; word-break: break-all; }
.rich-editor { border: 1px solid #dfe3ec; border-radius: 10px; background: #fff; overflow: hidden; }
.rich-editor:focus-within { border-color: #9ba6ff; box-shadow: 0 0 0 .2rem rgba(91,108,255,.12); }
.rich-editor-toolbar { display: flex; align-items: center; gap: 5px; padding: 7px 8px; border-bottom: 1px solid #e5e8ef; background: #f8f9fc; }
.rich-editor-toolbar button, .rich-editor-toolbar label { width: 32px; height: 30px; border: 1px solid #d9deea; border-radius: 7px; display: grid; place-items: center; background: #fff; color: #273149; cursor: pointer; margin: 0; }
.rich-editor-toolbar button:hover, .rich-editor-toolbar label:hover { border-color: #9ba6ff; color: var(--accent); }
.rich-editor-toolbar input[type="color"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rich-editor-area { min-height: 116px; padding: 11px 12px; outline: 0; line-height: 1.5; overflow-wrap: anywhere; }
.rich-editor-area:empty::before { content: "Ürün açıklamasını yazın..."; color: #9aa2b3; }
.rich-text-output p, .rich-text-output div { margin: 0 0 4px; }
.rich-text-output p:last-child, .rich-text-output div:last-child { margin-bottom: 0; }
.rich-text-output ul, .rich-text-output ol { margin: 3px 0; padding-inline-start: 18px; }


.topbar .profile-action { display:inline-flex; align-items:center; gap:7px; padding:4px 10px 4px 5px; }
.topbar-avatar { width:29px; height:29px; border-radius:50%; overflow:hidden; background:#eef0ff; color:var(--accent); display:grid; place-items:center; font-size:12px; font-weight:900; }
.topbar-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.profile-photo-section { display:flex; align-items:center; gap:20px; padding:18px; border:1px solid #e5e8f0; border-radius:15px; background:#fafbff; }
.profile-photo-preview { width:112px; height:112px; flex:0 0 112px; border-radius:50%; overflow:hidden; display:grid; place-items:center; background:#eef0ff; color:var(--accent); border:4px solid #fff; box-shadow:0 7px 22px rgba(31,42,68,.13); font-size:40px; font-weight:900; }
.profile-photo-preview img { width:100%; height:100%; object-fit:cover; display:block; }
.user-table-identity { display:flex; align-items:center; gap:10px; min-width:180px; }
.user-table-avatar { width:38px; height:38px; flex:0 0 38px; border-radius:50%; overflow:hidden; display:grid; place-items:center; background:#eef0ff; color:var(--accent); font-weight:900; }
.user-table-avatar img,.user-form-avatar { width:100%; height:100%; object-fit:cover; display:block; }
.user-form-avatar { width:64px; height:64px; border-radius:50%; flex:0 0 64px; }
@media(max-width:575.98px){.profile-photo-section{align-items:flex-start;flex-direction:column}.profile-photo-preview{width:92px;height:92px;flex-basis:92px}.profile-action-text{display:none}}

@media (max-width: 991.98px) {
  body.sidebar-open { overflow: hidden; touch-action: none; }
  .sidebar { transform: translateX(-100%); box-shadow: 14px 0 38px rgba(0,0,0,.24); }
  .sidebar.open { transform: translateX(0); }
  .sidebar .brand { padding-right: 62px; }
  .sidebar-backdrop { display:block; pointer-events:none; }
  .sidebar-backdrop.open { opacity:1; pointer-events:auto; }
  .main-content { margin-left: 0; width: 100%; }
  .topbar { padding: 14px 16px; }
  .content-area { padding: 18px 14px 40px; }
  .topbar-actions .btn { font-size: 0; }
  .topbar-actions .btn i { font-size: 16px; }
}
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .proforma-paper { box-shadow: none; margin: 0; width: 210mm; min-height: 297mm; padding: 13mm; box-sizing: border-box; }
  @page { size: A4 portrait; margin: 0; }
}

.translation-panel { padding-top: 4px; }
.translation-panel .rich-editor { border-color: #b9d9c8; background: #fbfffd; }
.translation-panel .rich-editor-toolbar { background: #f1faf5; }
.translation-editor-area:empty::before { content: "Çeviri burada görünecek..."; color: #9aa2b3; }
.translation-status { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: #eef1f6; color: #687287; font-size: 11px; font-weight: 700; }
.translation-status.is-ready { background: #e8f7ef; color: #16754a; }
.translation-status.is-stale { background: #fff3cd; color: #8a6400; }

.sidebar-section-label { color:#74809a; font-size:10px; font-weight:900; letter-spacing:.14em; text-transform:uppercase; padding:14px 13px 5px; }
.calc-binding-card { border:1px solid #dfe3ec; border-radius:16px; background:linear-gradient(135deg,#f8f9ff,#fff); padding:18px; margin-bottom:18px; }
.calc-binding-grid { display:grid; grid-template-columns:minmax(240px,1.4fr) repeat(3,minmax(160px,1fr)); gap:12px; align-items:end; }
.calc-binding-value { min-height:44px; display:flex; align-items:center; padding:10px 12px; border:1px solid #dfe3ec; border-radius:10px; background:#fff; font-weight:700; }
.calc-save-status { min-height:22px; font-size:13px; font-weight:700; }
.calc-module-toolbar { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.calc-module-toolbar .ms-auto { margin-left:auto!important; }
.pagination .page-link { color:var(--accent); }
.pagination .page-item.active .page-link { background:var(--accent); border-color:var(--accent); }
@media(max-width:1100px){.calc-binding-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:650px){.calc-binding-grid{grid-template-columns:1fr}.calc-module-toolbar .ms-auto{margin-left:0!important}}
@media print{
  .sidebar,.topbar,.calc-binding-card,.calc-module-toolbar,.no-print,.toast{display:none!important}
  .main-content{margin:0!important;width:100%!important}
  .content-area{padding:0!important}
  .card{box-shadow:none!important}
}

.permission-check{padding:.7rem .8rem .7rem 2.25rem;border:1px solid var(--bs-border-color);border-radius:.65rem;background:#fff;height:100%}.permission-check .form-check-input{margin-top:.2rem}.permission-check .form-check-label{font-weight:600;cursor:pointer}
