* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: #f3f5f7; color: #222; }
.topbar { background: #1e293b; color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; height: 56px; }
.topbar a { color: #cbd5e1; text-decoration: none; margin-left: 16px; }
.topbar a:hover { color: #fff; }
.topbar .brand a { margin: 0; font-weight: 700; font-size: 17px; color: #fff; }
.topbar .logout { color: #f87171; }
.container { max-width: 960px; margin: 28px auto; padding: 0 16px; }
h1 { font-size: 22px; margin: 0 0 18px; }
h2 { font-size: 16px; margin: 0 0 14px; }
.login-card { background: #fff; max-width: 380px; margin: 60px auto; padding: 28px; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.card { background: #fff; padding: 22px; border-radius: 10px; box-shadow: 0 1px 6px rgba(0,0,0,.06); margin-bottom: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.form label, .login-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 12px; color: #475569; }
input[type=text], input[type=password], input[type=email], select {
  display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px;
}
input:focus, select:focus { outline: 2px solid #3b82f6; border-color: #3b82f6; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .check { align-self: end; }
.btn { border: 0; border-radius: 6px; padding: 9px 18px; font-size: 14px; cursor: pointer; background: #e2e8f0; }
.btn-primary { background: #2563eb; color: #fff; width: 100%; padding: 11px; font-weight: 600; }
.btn-primary:hover { background: #1d4ed8; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-danger:hover { background: #fecaca; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #e2e8f0; }
.table th { background: #f8fafc; font-size: 12px; text-transform: uppercase; color: #64748b; }
.actions .inline { display: inline; }
.badge { padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge.ok { background: #dcfce7; color: #15803d; }
.badge.off { background: #fee2e2; color: #b91c1c; }
.flash { padding: 11px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.flash-ok { background: #dcfce7; color: #15803d; }
.flash-err { background: #fee2e2; color: #b91c1c; }
.info-table { width: 100%; margin-bottom: 18px; font-size: 14px; }
.info-table th { text-align: left; color: #64748b; font-weight: 600; padding: 5px 10px 5px 0; width: 130px; }
.hint { font-size: 12px; color: #64748b; margin-top: 12px; }
code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; }
.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; }
.filter-bar input { flex: 1; }
.filter-bar select { width: auto; }
.pager { margin-top: 14px; }
.pg { display: inline-block; padding: 5px 11px; border: 1px solid #cbd5e1; border-radius: 6px; margin-right: 4px; text-decoration: none; color: #334155; font-size: 13px; }
.pg.cur { background: #2563eb; color: #fff; border-color: #2563eb; }
.addr { font-family: inherit; font-size: 14px; white-space: pre-line; margin: 0 0 14px; }
.empty { color: #64748b; text-align: center; }
.total-row td { border-bottom: 0; font-size: 13px; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.btn-add { background: #16a34a; color: #fff; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: none; border-radius: 10px; cursor: pointer; font-size: 14px; }
.btn-add:hover { background: #15803d; color: #fff; }
.btn-add .plus { font-size: 18px; line-height: 1; font-weight: 700; }
#items input { width: 100%; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; }
#add-row { margin-top: 10px; }
.pencil { border: 0; background: none; font-size: 17px; cursor: pointer; color: #94a3b8; padding: 2px 6px; }
.pencil:hover { color: #2563eb; }
.pencil.has { color: #f59e0b; }
.note-row { display: none; }
.note-row.open { display: table-row; }
.note-row td { background: #f8fafc; padding: 14px 18px; }
.note-panel textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; font-family: inherit; resize: vertical; }
.img-area h3 { font-size: 13px; text-transform: uppercase; color: #64748b; margin: 18px 0 10px; }
.img-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.img-item { position: relative; width: 90px; height: 90px; }
.img-item img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid #e2e8f0; display: block; }
.img-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #dc2626; color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.img-upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.img-upload input[type=file] { font-size: 13px; }
.pnote { color: #b45309; font-size: 12px; }
.price-input[readonly] { background: #f8fafc; color: #475569; cursor: default; }
.price-input.editing { outline: 2px solid #f59e0b; border-color: #f59e0b; background: #fffbeb; }
.ord-row { cursor: pointer; }
.ord-row:hover td { background: #f1f5f9; }
.order-summary { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.order-summary h3 { font-size: 13px; text-transform: uppercase; color: #64748b; margin: 0 0 8px; }
.sum-col .table { font-size: 13px; }
@media (max-width: 900px) { .order-summary { grid-template-columns: 1fr; } }
.prod-thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid #e2e8f0; vertical-align: middle; margin-right: 8px; }
.prod-link { color: #2563eb; text-decoration: none; }
.prod-link:hover { text-decoration: underline; }
.steps { display: flex; list-style: none; padding: 0; margin: 0 0 18px; gap: 6px; }
.step-ind { flex: 1; background: #e2e8f0; color: #64748b; padding: 9px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; text-align: center; }
.step-ind b { display: inline-block; width: 20px; height: 20px; line-height: 20px; border-radius: 50%; background: #94a3b8; color: #fff; margin-right: 6px; font-size: 12px; }
.step-ind.active { background: #dbeafe; color: #1d4ed8; }
.step-ind.active b { background: #2563eb; }
.step { display: none; }
.step.on { display: block; }
.step-nav { display: flex; justify-content: space-between; margin: 4px 0 24px; }
.step-nav .btn { min-width: 130px; }
.btn-big { padding: 13px; font-size: 15px; }
#order-review { margin-bottom: 14px; }
@media (max-width: 640px) { .steps { flex-direction: column; } .step-ind { text-align: left; } }
.step-warn { background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.field-err { border-color: #dc2626 !important; background: #fef2f2 !important; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.06); text-align: center; border-top: 3px solid #2563eb; }
.stat.warn { border-top-color: #f59e0b; }
.stat-num { display: block; font-size: 20px; font-weight: 800; color: #0f172a; }
.stat-lbl { font-size: 11px; text-transform: uppercase; color: #64748b; letter-spacing: .5px; }
.group-head td { background: #e0e7ff; color: #3730a3; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; padding: 7px 10px; }
.istatus select { width: auto; padding: 4px 7px; font-size: 12px; display: inline-block; }
.istatus .imeta { color: #64748b; display: inline-block; margin-left: 6px; }
.istatus .inline { display: inline; margin-left: 6px; }
.istatus .badge.ok { margin-left: 6px; }

/* ===== MOBİL ===== */
.card { overflow-x: auto; }
/* Hamburger butonu: sadece mobilde */
.nav-toggle {
  display: none; background: none; border: none; color: #fff;
  font-size: 24px; line-height: 1; padding: 8px 10px; cursor: pointer;
  border-radius: 8px;
}
.nav-toggle:active { background: rgba(255,255,255,.12); }

@media (max-width: 768px) {
  .topbar { position: relative; height: 56px; padding: 0 14px; }
  .nav-toggle { display: block; }
  .topbar nav {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: #1e293b; flex-direction: column;
    border-top: 1px solid #334155; z-index: 200;
    box-shadow: 0 10px 20px rgba(0,0,0,.35);
    border-radius: 0 0 12px 12px;
  }
  .topbar nav.open { display: flex; }
  .topbar nav a {
    margin: 0; padding: 13px 18px; font-size: 15px;
    border-bottom: 1px solid #293548; white-space: nowrap;
  }
  .topbar nav a:last-child { border-bottom: none; }
  .topbar nav a:hover { background: #334155; }
  .container { margin: 14px auto; padding: 0 10px; }
  h1 { font-size: 19px; }
  .card { padding: 14px; border-radius: 8px; margin-bottom: 14px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 12px 8px; }
  .stat-num { font-size: 17px; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar select, .filter-bar .btn { width: 100%; }
  .page-head { flex-wrap: wrap; gap: 10px; }
  .page-head h1 { font-size: 19px; }
  .table { min-width: 600px; font-size: 13px; }
  .table th, .table td { padding: 7px 8px; }
  .order-summary { grid-template-columns: 1fr; gap: 14px; }
  .order-summary .table { min-width: 0; }
  .step-nav { gap: 8px; }
  .step-nav .btn { min-width: 0; flex: 1; }
  .login-card { margin: 24px auto; padding: 20px; }
  .img-item, .img-item img { width: 70px; height: 70px; }
  .istatus select { display: block; width: 100%; margin-bottom: 4px; }
  .istatus .imeta, .istatus .inline { margin-left: 0; display: inline-block; margin-top: 4px; }
  .note-row td { padding: 10px; }
  .prod-thumb { width: 34px; height: 34px; }
}
@media (max-width: 480px) {
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .btn-add { font-size: 13px; padding: 8px 12px; }
}

/* Sipariş kartları (mobil) */
.order-cards { display: none; }
@media (max-width: 768px) {
  .desktop-table { display: none; }
  .order-cards { display: block; }
  .ghead { padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin: 14px 0 8px; }
  .o-card { background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
  .o-top { display: flex; align-items: center; gap: 10px; cursor: pointer; }
  .o-id { font-weight: 800; font-size: 16px; }
  .o-date { color: #64748b; font-size: 12px; flex: 1; }
  .o-cust { margin: 6px 0; cursor: pointer; }
  .o-cust b { font-size: 15px; display: block; }
  .o-cust small { color: #64748b; font-size: 12px; }
  .o-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f1f5f9; }
  .o-total { font-weight: 800; font-size: 16px; color: #0f172a; }
  .o-actions { display: flex; align-items: center; gap: 8px; }
  .o-owner { color: #64748b; }
  .o-detail { display: none; margin-top: 10px; border-top: 1px dashed #e2e8f0; padding-top: 10px; }
  .o-detail.open { display: block; }
}
@media (max-width: 768px) {
  .o-card { overflow: hidden; }
  .o-detail { overflow-x: auto; }
  .o-detail .table, .sum-col .table { min-width: 0; width: 100%; table-layout: auto; }
  .sum-col { min-width: 0; overflow: hidden; }
  .table td, .table th { word-break: break-word; }
  .prod-link { word-break: break-word; }
  .prod-cell { min-width: 120px; }
  .img-upload { flex-direction: column; align-items: stretch; }
  .img-upload input[type=file] { width: 100%; }
  .o-cust small { word-break: break-all; }
  .istatus select { max-width: 100%; }
  .note-panel textarea { min-width: 0; }
}

/* Sipariş popup (bottom sheet) */
.omodal { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 1000; }
.omodal.open { display: flex; align-items: flex-end; }
.omodal-box { background: #fff; width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.omodal-head { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-bottom: 1px solid #e2e8f0; font-weight: 700; font-size: 15px; position: sticky; top: 0; background: #fff; border-radius: 16px 16px 0 0; }
.omodal-head::before { content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 36px; height: 4px; border-radius: 4px; background: #cbd5e1; }
.omodal-close { border: 0; background: #f1f5f9; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; line-height: 1; }
.omodal-body { overflow-y: auto; padding: 14px; -webkit-overflow-scrolling: touch; }
.omodal-body .o-detail { display: block; margin: 0; border: 0; padding: 0; }
.omodal-body .table, .omodal-body .sum-col .table { min-width: 0; width: 100%; }
.omodal-body td, .omodal-body th { word-break: break-word; }
.omodal-body .img-upload input[type=file] { width: 100%; }
@media (min-width: 769px) { .omodal-box { max-width: 640px; margin: 0 auto 6vh; border-radius: 16px; } .omodal.open { align-items: flex-start; padding-top: 8vh; } .omodal-head { border-radius: 16px 16px 0 0; } }

/* Ürün satır blokları */
.sitem { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.s-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.s-name .prod-thumb { margin-right: 0; }
.s-name .prod-link { flex: 1; word-break: break-word; }
.s-print { flex-shrink: 0; }
.s-mid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 7px; font-size: 13px; color: #334155; }
.s-mid .istatus { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.s-mid .istatus select { padding: 4px 7px; font-size: 12px; width: auto; }
.s-note { margin-top: 7px; font-size: 12px; color: #b45309; border-top: 1px dashed #f1f5f9; padding-top: 6px; word-break: break-word; }
.s-totals { margin-top: 10px; border-top: 2px solid #0f172a; padding-top: 6px; }
.s-trow { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.s-trow:last-child { font-size: 15px; font-weight: 800; }
@media (max-width: 768px) {
  .print-btn, .s-print { display: none !important; }
}

/* müşteri takip linki */
.track-link{margin-top:14px;border-top:1px solid #e5e7eb;padding-top:12px}
.track-link .tl-row{display:flex;gap:8px}
.track-link input{flex:1;min-width:0;font-size:12px;padding:7px 10px;border:1px solid #d1d5db;border-radius:8px;color:#334155;background:#f8fafc}

/* müşteri mesajları */
.msg-area{margin-top:14px;border-top:1px solid #e5e7eb;padding-top:12px}
.msg-area h3 .pstars{color:#f59e0b;font-size:14px;letter-spacing:1px}
.msg-thread{max-height:260px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;margin-bottom:10px}
.msg{border-radius:10px;padding:8px 12px;font-size:13px;max-width:92%}
.msg-cust{background:#eff6ff;align-self:flex-start}
.msg-staff{background:#f1f5f9;align-self:flex-end;text-align:left}
.msg-req{background:#fef3c7;border:1px solid #f59e0b}
.msg-sys{background:#fff;border:1px dashed #cbd5e1;color:#64748b;font-size:12px;align-self:center;text-align:center;max-width:100%}
.msg-meta{display:flex;gap:8px;align-items:center;font-size:11px;color:#64748b;margin-bottom:3px}
.req-flag{color:#b45309;font-size:11px}
.msg-form{display:flex;gap:8px;align-items:flex-end}
.msg-form textarea{flex:1;min-width:0;font-size:13px;padding:7px 10px;border:1px solid #d1d5db;border-radius:8px;font-family:inherit}

/* okunmamış mesaj rozeti + dashboard uyarısı */
.mbadge{display:inline-block;background:#ef4444;color:#fff;border-radius:99px;font-size:10px;font-weight:700;padding:2px 7px;margin-left:6px;vertical-align:middle}
.mbadge.req{background:#f59e0b}
.msg-warn{border-left:4px solid #f59e0b;background:#fffbeb;margin-bottom:20px}
.msg-warn h2{margin:0 0 10px;font-size:15px;color:#92400e}
.msg-warn-row{display:flex;gap:10px;align-items:center;padding:8px 10px;border-radius:8px;text-decoration:none;color:#334155;font-size:13px}
.msg-warn-row:hover{background:#fef3c7}
.msg-warn-row .mwr-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.msg-warn-row .mwr-count{color:#b45309;font-weight:600}
.msg-warn-row small{color:#94a3b8}
.msg-warn-row .mwr-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#64748b;font-style:italic}
.wa-btn{background:#25d366;color:#fff!important;white-space:nowrap}
.wa-btn:hover{background:#1ebe5d}

/* Tum urunleri hazir olan siparisler */
.rbadge { display: inline-block; background: #16a34a; color: #fff; border-radius: 99px; font-size: 10px; font-weight: 700; padding: 2px 7px; margin-left: 6px; vertical-align: middle; white-space: nowrap; }

/* Tab: aktif / teslim edilen */
.otabs { display: flex; gap: 8px; margin-bottom: 14px; }
.otabs a { padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; background: #f1f5f9; color: #475569; text-decoration: none; }
.otabs a.on { background: #1d4ed8; color: #fff; }

/* Urunler: buyuk tam genislik arama */
.big-search { margin-bottom: 16px; }
.big-search input {
  width: 100%; box-sizing: border-box;
  font-size: 20px; font-weight: 600;
  padding: 18px 22px;
  border: 2px solid #cbd5e1; border-radius: 14px;
  background: #fff; color: #0f172a;
  box-shadow: 0 4px 18px rgba(15,23,42,.08);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.big-search input:focus { border-color: #1d4ed8; box-shadow: 0 4px 22px rgba(29,78,216,.18); }
@media (max-width: 768px) { .big-search input { font-size: 16px; padding: 14px 16px; } }

/* Urunler: alis fiyati inline edit */
.cost-cell { white-space: nowrap; }
.cost-cell.editable { cursor: pointer; }
.cost-cell.editable:hover { background: #fef9c3; }
.cost-cell.saved { background: #dcfce7; transition: background .3s; }
.cost-input {
  width: 100%; min-width: 130px; font-size: 16px; font-weight: 600;
  padding: 5px 8px; border: 2px solid #1d4ed8; border-radius: 8px;
  outline: none; text-align: right;
}

/* Urunler: marka gruplari pastel renkler */
tr.pg0 td { background: #fef3c7; }
tr.pg1 td { background: #dbeafe; }
tr.pg2 td { background: #dcfce7; }
tr.pg3 td { background: #fce7f3; }
tr.pg4 td { background: #ede9fe; }
tr.pg5 td { background: #cffafe; }
tr.pg6 td { background: #ffedd5; }
tr.pg7 td { background: #f1f5f9; }
tr.mfr-head td {
  font-size: 14px; text-transform: uppercase; letter-spacing: .4px;
  border-top: 2px solid #94a3b8 !important;
  filter: brightness(.94);
}

.prod-sub { font-size: 10px; color: #64748b; line-height: 1.2; }

/* Urunler: satir ici duzenleme */
.editable { cursor: pointer; border-radius: 4px; }
.editable:hover { background: #fde68a; }
.editable.saved { background: #86efac; transition: background .3s; }
.text-input {
  width: 100%; min-width: 140px; font-size: 14px; font-weight: 600;
  padding: 5px 8px; border: 2px solid #1d4ed8; border-radius: 8px;
  outline: none;
}

/* Urunler: mobilde yatay kaydirmali tablo */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Urunler: mobil kart gorunumu */
.prod-cards { display: none; }
@media (max-width: 768px) {
  .prod-cards { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
  .table-wrap.pcards-hide { display: none; }
}
@media (max-width: 560px) {
  .prod-cards { grid-template-columns: 1fr; }
}
.pcard {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 8px; overflow: hidden;
  display: flex; gap: 8px; align-items: flex-start;
}
.pc-img { flex: 0 0 52px; }
.pc-img img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; display: block; }
.pc-body { flex: 1; min-width: 0; }
.pc-model { font-weight: 700; font-size: 13px; word-break: break-word; }
.pc-name { font-size: 10px; color: #64748b; line-height: 1.25; }
.pc-cats { font-size: 9px; color: #94a3b8; margin-top: 3px; line-height: 1.2; }
.pc-prices { margin-top: 6px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.pc-price { font-weight: 700; }
.pc-cost { color: #b45309; font-weight: 700; }
.net-lbl { font-size: 11px; color: #15803d; font-weight: 600; margin-top: 2px; }
.net-eur { font-size: 10px; color: #475569; font-weight: 500; }
.rec-lbl { font-size: 11px; color: #b45309; font-weight: 600; margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.rec-btn { background: none; border: 1px solid #d97706; color: #b45309; border-radius: 4px; font-size: 11px; padding: 0 5px; cursor: pointer; line-height: 16px; }
.rec-btn:hover { background: #fef3c7; }
.disc-badge { display: inline-block; font-size: 11px; font-weight: 700; color: #15803d; background: #dcfce7; border-radius: 4px; padding: 1px 6px; margin-left: 4px; }
.rate-badge { font-size: 12px; font-weight: 600; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; padding: 3px 10px; margin-left: 8px; cursor: default; }
.mfr-head-card {
  grid-column: 1 / -1; padding: 6px 10px; border-radius: 8px;
  border-top: 2px solid #94a3b8; font-size: 13px; text-transform: uppercase; letter-spacing: .4px;
  filter: brightness(.96);
}
div.pg0 { background: #fef3c7; }
div.pg1 { background: #dbeafe; }
div.pg2 { background: #dcfce7; }
div.pg3 { background: #fce7f3; }
div.pg4 { background: #ede9fe; }
div.pg5 { background: #cffafe; }
div.pg6 { background: #ffedd5; }
div.pg7 { background: #f1f5f9; }

/* Urunler: mobil filtre ikonu */
.filter-toggle { display: none; }
@media (max-width: 768px) {
  .filter-toggle {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 11px 14px; margin-bottom: 0;
    border: 1px solid #cbd5e1; border-radius: 10px;
    background: #f8fafc; color: #334155;
    font-size: 14px; font-weight: 700; cursor: pointer;
  }
  .filter-toggle.on { background: #e0e7ff; border-color: #6366f1; color: #3730a3; }
  .filter-bar { display: none; margin-top: 10px; }
  .filter-bar.open { display: flex; }
}

/* Hizli urun ekleme formu */
.frow { margin-bottom: 12px; }
.frow label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 5px; }
.frow input, .frow select {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; font-size: 14px;
  border: 1px solid #cbd5e1; border-radius: 8px;
  background: #fff;
}
.frow input:focus, .frow select:focus { border-color: #1d4ed8; outline: none; }
.frow-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .frow-2col { grid-template-columns: 1fr; } }

/* Isim cevirisi butonu */
.tr-btn {
  background: none; border: 0; padding: 0 2px;
  font-size: 11px; cursor: pointer; opacity: .55;
  vertical-align: middle; line-height: 1;
}
.tr-btn:hover { opacity: 1; transform: scale(1.2); }
.tr-btn:disabled { cursor: wait; }
.del-btn { color: #dc2626; }
.del-btn:hover { opacity: 1; transform: scale(1.2); }
.del-ord { color: #dc2626; }
.del-cell { text-align: right; white-space: nowrap; }
.pc-del { margin-left: auto; align-self: center; font-size: 14px; }
.mfr-link { cursor: pointer; }
.mfr-link:hover td, .mfr-link.mfr-head-card:hover { filter: brightness(.96); }

/* Option alt satirlari */
.opt-sub td { background: #f8fafc; font-size: 12px; padding-top: 3px !important; padding-bottom: 3px !important; }
.opt-sub .opt-name { padding-left: 16px; color: #475569; }
.pc-opt { font-size: 11px; color: #64748b; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.pc-opt .editable { font-size: 11px; }
.opt-tog {
  display: inline-block; width: 16px; height: 16px; line-height: 14px;
  margin-right: 4px; padding: 0; border: 1px solid #cbd5e1; border-radius: 4px;
  background: #fff; color: #334155; font-size: 12px; font-weight: 700;
  cursor: pointer; text-align: center; vertical-align: middle;
}
.opt-tog:hover { background: #e2e8f0; }

/* Markalar sayfasi */
.mfr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 900px) { .mfr-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mfr-grid { grid-template-columns: 1fr; } }
.mfr-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 10px 12px; position: relative; cursor: pointer;
  transition: box-shadow .2s;
}
.mfr-card:hover { box-shadow: 0 4px 14px rgba(15,23,42,.1); }
.mfr-logo {
  width: 56px; height: 56px; flex: 0 0 56px; border-radius: 10px;
  background: #f1f5f9; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.mfr-logo img { width: 100%; height: 100%; object-fit: contain; }
.mfr-nologo { font-size: 18px; font-weight: 700; color: #94a3b8; }
.mfr-body { flex: 1; min-width: 0; }
.mfr-name { font-weight: 700; font-size: 14px; color: #0f172a; }
.mfr-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: 11px; color: #64748b; }
.mfr-meta .mfr-disc { color: #15803d; font-weight: 700; }
.mfr-tel { font-size: 12px; color: #475569; margin-top: 3px; }
.mfr-view {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px;
  background: #f1f5f9; color: #334155; display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-weight: 700;
}
.mfr-view:hover { background: #1d4ed8; color: #fff; }

/* Marka detay modali */
.mi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 14px; }
@media (max-width: 560px) { .mi-grid { grid-template-columns: 1fr; } }
.mi-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #e2e8f0; font-size: 12px; }
.mi-row span { color: #64748b; flex: 0 0 auto; }
.mi-row b { color: #0f172a; font-weight: 600; text-align: right; word-break: break-word; }
.mi-files { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 560px) { .mi-files { grid-template-columns: repeat(2, 1fr); } }
.mi-file {
  position: relative;
  border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-decoration: none; color: #334155; font-size: 11px; text-align: center;
}
.mi-file:hover { border-color: #1d4ed8; }
.mi-file img { width: 100%; height: 60px; object-fit: cover; border-radius: 6px; }
.mi-file-ico { font-size: 26px; }
.mi-file span:last-child { word-break: break-word; }
.mi-file-date {
  position: absolute; bottom: 0; transform: translateY(50%);
  background: #fff; padding: 0 6px;
  border: 1px solid #e2e8f0; border-radius: 10px;
  font-size: 10px; color: #94a3b8;
  transition: font-size .15s, color .15s;
}
.mi-file:hover .mi-file-date { font-size: 12px; color: #475569; }

/* Ana sayfa hizli erisim */
.quick-links {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
  margin: 14px 0 18px;
}
@media (max-width: 900px) { .quick-links { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .quick-links { grid-template-columns: repeat(2, 1fr); } }
.qlink {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border-radius: 12px; text-decoration: none;
  font-weight: 700; font-size: 13px; color: #fff;
  box-shadow: 0 2px 8px rgba(15,23,42,.12);
  transition: transform .15s, box-shadow .15s;
}
.qlink:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15,23,42,.2); }
.ql-ico { font-size: 22px; }
.ql-green  { background: linear-gradient(135deg, #16a34a, #15803d); }
.ql-blue   { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.ql-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.ql-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.ql-teal   { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.ql-gray   { background: linear-gradient(135deg, #64748b, #475569); }

/* Markalar: excel + duzenleme */
.btn-excel { background: #0e7c41; }
.btn-excel:hover { background: #0a6334; }
.imp-hint { font-size: 12px; color: #475569; margin: 0 0 12px; line-height: 1.5; }
.imp-hint code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 11px; }
.mfr-edit {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px;
  background: #f1f5f9; color: #334155; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; margin-right: 6px;
}
.mfr-edit:hover { background: #f59e0b; color: #fff; }
.frow-3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 480px) { .frow-3col { grid-template-columns: 1fr; } }
.frow textarea { width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; }

/* Urunler: magaza stok checkbox */
.mag-chk { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #334155; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; cursor: pointer; white-space: nowrap; }
.mag-chk input { flex: none; margin: 0; width: auto; }
.mag-chk:has(input:checked) { background: #dcfce7; border-color: #16a34a; color: #166534; }

/* ===== Sözleşme / Договор modal ===== */
.soz-modal { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 1100; align-items: center; justify-content: center; padding: 16px; }
.soz-modal.open { display: flex; }
.soz-modal-box { background: #fff; border-radius: 12px; width: 100%; max-width: 860px; height: 90vh; display: flex; flex-direction: column; box-shadow: 0 8px 40px rgba(0,0,0,.22); animation: sheet-up .2s ease-out; }
.soz-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; gap: 10px; flex-wrap: wrap; }
.soz-modal-head span { font-weight: 700; font-size: 14px; }
.soz-modal-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.soz-modal-actions a, .soz-modal-actions button { padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; border: 1px solid #cbd5e1; background: #f8fafc; color: #1e293b; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.soz-modal-actions .btn-print-soz { background: #1e293b; color: #fff; border-color: #1e293b; }
.soz-modal-close { border: 0; background: #f1f5f9; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; line-height: 1; flex-shrink: 0; }
.soz-modal iframe { flex: 1; border: 0; width: 100%; border-radius: 0 0 12px 12px; }

