: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; z-index: 1030; transition: transform .25s ease; }
.brand { display: flex; align-items: center; gap: 12px; padding: 24px 20px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.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 { padding: 18px 12px; display: grid; gap: 6px; }
.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 { margin-top: auto; padding: 18px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 11px; }
.sidebar-user .avatar { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; font-weight: 800; }
.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; }
.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-thumb { width: 62px; height: 48px; object-fit: contain; }

.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; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .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: auto; min-height: auto; padding: 8mm; }
  @page { size: A4; 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; }
