@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=Inter:wght@400;500;600&display=swap');

:root {
    --bg: #f5f4f1;
    --surface: #fff;
    --ink: #141414;
    --ink-2: #3b3b3b;
    --muted: #7b7973;
    --line: #e6e3dd;
    --soft: #f0eee9;
    --gold: #a8875a;
    --ok: #1f7a46; --ok-bg: #e6f4eb;
    --warn: #966710; --warn-bg: #fbf0d9;
    --info: #24548f; --info-bg: #e5edf8;
    --violet: #5b2ca0; --violet-bg: #efe7fb;
    --danger: #b3261e; --danger-bg: #fbe8e6;
    --wa: #25d366; --wa-dark: #075e54; --wa-bg: #efeae2; --wa-out: #d9fdd3;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 6px 20px rgba(20, 20, 20, .05);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --display: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
img { max-width: 100%; }

.display { font-family: var(--display); font-weight: 500; }
h1.display { font-size: 32px; line-height: 1.1; margin: 0; }
h2.display { font-size: 24px; margin: 0 0 12px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mono { font-family: ui-monospace, Menlo, monospace; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; font-size: 14px; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.light { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.ok { background: var(--ok); border-color: var(--ok); }
.btn.wa { background: var(--wa-dark); border-color: var(--wa-dark); }
.btn.sm { min-height: 30px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.loading { pointer-events: none; opacity: .7; }
.btn.loading::after { content: ''; width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.icon-btn svg { width: 17px; height: 17px; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: inherit; }
@keyframes spin { to { transform: rotate(360deg); } }

/* forms */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }
.input { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; outline: none; }
textarea.input { min-height: 80px; resize: vertical; }
select.input { -webkit-appearance: none; appearance: none; padding-right: 32px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23777' stroke-width='1.6'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 20, 20, .06); }
.field.has-error .input { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; display: block; }
.form-error { background: var(--danger-bg); color: var(--danger); padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; margin: 4px 0 12px; }
.check input { width: 17px; height: 17px; accent-color: var(--ink); margin: 0; }
.notice { padding: 10px 14px; border-radius: 10px; font-size: 13px; background: var(--warn-bg); color: var(--warn); }
.notice.info { background: var(--info-bg); color: var(--info); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }

/* cards, tables */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 14px; }
.card-title { font-weight: 600; font-size: 14px; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.table-wrap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfbf9; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; } .table tr.clickable:hover td { background: #fbfaf7; }
.table .num { text-align: right; white-space: nowrap; }
.thumb-sm { width: 40px; height: 40px; border-radius: 8px; background: #faf9f6; object-fit: contain; display: block; }
.price-input { width: 110px !important; min-height: 32px !important; padding: 5px 9px !important; text-align: right; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.page-loader { display: flex; justify-content: center; padding: 60px 0; }
.page-loader::after { content: ''; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink); border-right-color: transparent; animation: spin .7s linear infinite; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); font-size: 13px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.received, .badge.pending { background: var(--warn-bg); color: var(--warn); }
.badge.confirmed, .badge.preparing { background: var(--info-bg); color: var(--info); }
.badge.shipped, .badge.human { background: var(--violet-bg); color: var(--violet); }
.badge.delivered, .badge.approved, .badge.bot { background: var(--ok-bg); color: var(--ok); }
.badge.cancelled, .badge.blocked, .badge.failed { background: var(--danger-bg); color: var(--danger); }
.badge.plain::before { display: none; }
.src { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--soft); color: var(--ink-2); }
.src.whatsapp { background: #dcf8e6; color: #0b6b3a; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs .n { margin-left: 4px; opacity: .7; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { width: auto; min-height: 36px; }
.toolbar .search { flex: 1; min-width: 220px; }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 22px; cursor: pointer; transition: .15s; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(16px); }

/* shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #fff; padding: 22px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side .logo { height: 28px; margin: 2px 12px 4px; width: auto; align-self: flex-start; }
.side .tag { color: var(--gold); font-size: 11px; letter-spacing: .3em; margin: 0 12px 24px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: rgba(255, 255, 255, .7); text-decoration: none; margin-bottom: 2px; }
.nav a svg { width: 18px; height: 18px; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .13); color: #fff; }
.nav .count { margin-left: auto; background: var(--gold); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 600; }
.nav .sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 12px 8px; }
.side .me { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: rgba(255, 255, 255, .65); }
.side .me button { background: none; border: 0; color: #fff; padding: 0; text-decoration: underline; cursor: pointer; font-size: 13px; margin-top: 4px; }
.wa-state { margin: 0 12px 14px; font-size: 12px; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .75); display: flex; align-items: center; gap: 8px; }
.wa-state i { width: 8px; height: 8px; border-radius: 50%; background: #e0a43a; }
.wa-state.live i { background: var(--wa); }
.main { padding: 26px 30px 60px; min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.mobilebar { display: none; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; text-decoration: none; display: block; }
.stat .v { font-family: var(--display); font-size: 34px; line-height: 1.05; margin-top: 6px; }
.stat .s { font-size: 12px; color: var(--muted); }
.stat.alert .v { color: var(--gold); }
.cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.cols-detail { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.timeline li::after { content: ''; position: absolute; left: 7.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }

/* toast & modal */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 2000; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); max-width: 380px; animation: tIn .2s ease-out; }
.toast.error { background: var(--danger); }
@keyframes tIn { from { opacity: 0; transform: translateY(8px); } }
.modal-bg { position: fixed; inset: 0; background: rgba(20, 20, 20, .45); z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.modal-head h3 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 500; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* inbox */
.inbox { display: grid; grid-template-columns: 320px 1fr 300px; height: calc(100vh - 110px); min-height: 520px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.inbox.no-side { grid-template-columns: 320px 1fr; }
.conv-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.conv-list .top { padding: 12px; border-bottom: 1px solid var(--line); }
.conv-items { overflow-y: auto; flex: 1; }
.conv { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; position: relative; }
.conv:hover { background: #fbfaf7; }
.conv.active { background: var(--soft); }
.conv .n { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .p { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv .t { font-size: 11px; color: var(--muted); white-space: nowrap; }
.conv .unread { background: var(--wa); color: #fff; font-size: 11px; font-weight: 600; border-radius: 999px; min-width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.conv.attention::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); }
.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; font-size: 14px; }
.chat-body { flex: 1; overflow-y: auto; background: var(--wa-bg); padding: 16px 6%; }
.chat-foot { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; gap: 10px; align-items: flex-end; background: #f7f7f5; }
.chat-foot textarea { flex: 1; min-height: 42px; max-height: 140px; resize: none; border-radius: 20px; padding: 10px 16px; }
.chat-side { border-left: 1px solid var(--line); overflow-y: auto; padding: 16px; }
.window-note { font-size: 12px; text-align: center; color: var(--muted); padding: 6px; }

/* WhatsApp bubbles */
.msg { display: flex; margin: 3px 0; }
.msg.mine { justify-content: flex-end; }
.bubble { max-width: min(78%, 480px); background: #fff; border-radius: 10px; padding: 7px 10px 6px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); font-size: 14px; position: relative; word-wrap: break-word; }
.msg.mine .bubble { background: var(--wa-out); }
.bubble .who { font-size: 11.5px; font-weight: 600; color: var(--wa-dark); margin-bottom: 2px; }
.bubble .who.staff { color: var(--violet); }
.bubble .who.system { color: var(--gold); }
.bubble .meta { font-size: 10.5px; color: #667781; text-align: right; margin-top: 2px; white-space: nowrap; }
.bubble .meta .st-failed { color: var(--danger); }
.bubble img.hdr { width: 100%; max-height: 260px; object-fit: contain; background: #fafafa; border-radius: 7px; margin-bottom: 6px; display: block; }
.bubble .footer { font-size: 12px; color: #8696a0; margin-top: 4px; }
.bubble .btns { display: flex; flex-direction: column; margin: 8px -10px -6px; border-top: 1px solid #e9edef; }
.bubble .btns button { border: 0; border-top: 1px solid #e9edef; background: none; color: #027eb5; padding: 9px; font-size: 14px; cursor: default; }
.bubble .btns button:first-child { border-top: 0; }
.bubble.interactive .btns button { cursor: pointer; }
.bubble.interactive .btns button:hover { background: #f5f6f6; }
.bubble .tpl { font-size: 11px; color: var(--gold); font-weight: 600; margin-bottom: 3px; }
.bubble .cart-in { font-size: 13px; }
.day-sep { text-align: center; margin: 10px 0; }
.day-sep span { background: #fff; color: #54656f; font-size: 12px; padding: 4px 10px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.sys-note { text-align: center; margin: 8px 0; }
.sys-note span { background: #fff8db; color: #6b5a1e; font-size: 12px; padding: 4px 10px; border-radius: 8px; }

/* simulator */
.sim { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.phone { width: 380px; height: 760px; border-radius: 44px; background: #111; padding: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.phone .screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; display: flex; flex-direction: column; background: var(--wa-bg); position: relative; }
.phone .wa-top { background: var(--wa-dark); color: #fff; padding: 30px 14px 10px; display: flex; align-items: center; gap: 10px; }
.phone .wa-top .avatar { background: #fff; color: var(--ink); width: 36px; height: 36px; font-family: var(--display); font-size: 18px; }
.phone .wa-top .nm { font-weight: 600; font-size: 15px; }
.phone .wa-top .st { font-size: 12px; opacity: .8; }
.phone .chat-body { padding: 12px 10px; }
.phone .bubble { max-width: 86%; font-size: 13.5px; }
.phone .compose { display: flex; gap: 6px; padding: 8px; background: transparent; align-items: center; }
.phone .compose input { flex: 1; border-radius: 22px; border: 0; padding: 11px 16px; font-size: 14px; outline: none; }
.phone .compose button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--wa-dark); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.phone .compose button svg { width: 18px; height: 18px; }
.phone .compose .cat { background: #fff; color: var(--wa-dark); }
.list-btn { display: block; width: calc(100% + 20px); margin: 8px -10px -6px; border: 0; border-top: 1px solid #e9edef; background: none; color: #027eb5; padding: 9px; font-size: 14px; cursor: pointer; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 18px 18px 0 0; max-height: 75%; overflow-y: auto; box-shadow: 0 -8px 30px rgba(0, 0, 0, .2); z-index: 10; animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }
.sheet .sh { padding: 14px 16px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; font-weight: 600; position: sticky; top: 0; background: #fff; }
.sheet .sec { padding: 10px 16px 4px; font-size: 12px; color: #008069; font-weight: 600; }
.sheet .opt { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 16px; border-bottom: 1px solid #f2f2f2; cursor: pointer; }
.sheet .opt:hover { background: #f7f7f7; }
.sheet .opt .d { font-size: 12px; color: #667781; margin-top: 1px; }
.sheet .pick { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid #f2f2f2; }
.sheet .pick img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: #fafafa; }
.sheet .pick input[type=number] { width: 56px; min-height: 32px; padding: 4px 6px; text-align: center; }
.cat-strip { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.cat-strip img { width: 44px; height: 44px; object-fit: contain; background: #fafafa; border-radius: 6px; border: 1px solid #eee; }
.cat-strip span { font-size: 12px; color: #667781; margin-left: 4px; }
.sheet .cart-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #eee; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
/* WhatsApp Flows penceresi (simülatör) */
.sheet.flow-win { top: 18px; max-height: none; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.fw-top { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; border-bottom: 1px solid #eee; }
.fw-ico { width: 32px; height: 32px; border: 0; background: none; font-size: 22px; cursor: pointer; color: #54656f; line-height: 1; }
.fw-title { flex: 1; text-align: center; font-weight: 600; font-size: 16px; }
.fw-body { flex: 1; overflow-y: auto; padding: 14px 16px; transition: opacity .15s; }
.fw-foot { padding: 10px 16px 6px; }
.fw-btn { width: 100%; border: 0; border-radius: 24px; background: #008069; color: #fff; padding: 12px; font-size: 15px; font-weight: 600; cursor: pointer; }
.fw-brand { text-align: center; font-size: 10.5px; color: #8696a0; padding: 0 0 10px; }
.fw-label { font-size: 13px; color: #54656f; margin: 14px 0 6px; font-weight: 600; }
.fw-sub { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.fw-head { font-weight: 700; font-size: 20px; margin: 10px 0; }
.fw-group { border: 1px solid #e9edef; border-radius: 12px; overflow: hidden; }
.fw-opt { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-bottom: 1px solid #f0f2f5; cursor: pointer; }
.fw-opt:last-child { border-bottom: 0; }
.fw-opt input { width: 20px; height: 20px; accent-color: #008069; flex-shrink: 0; margin: 0; order: 2; }
.fw-opt span { flex: 1; font-size: 14px; }
.fw-opt small { display: block; color: #667781; font-size: 12px; margin-top: 2px; }
.fw-select, .fw-input { width: 100%; border: 1px solid #d1d7db; border-radius: 10px; padding: 10px 12px; font-size: 14px; background: #fff; outline: none; }
.fw-input:focus, .fw-select:focus { border-color: #008069; }
.fw-cap { font-size: 12.5px; color: #667781; margin-top: 12px; }
.fw-text { font-size: 14px; margin-top: 12px; line-height: 1.5; }
.fw-note { background: #e7f8ef; color: #0b6b3a; border-radius: 10px; padding: 9px 12px; font-size: 13px; margin-bottom: 6px; }
.fw-note.err { background: #fbe8e6; color: var(--danger); }
.fw-link { background: none; border: 0; color: #027eb5; padding: 8px 0 0; font-size: 14px; cursor: pointer; font-weight: 500; }
.sim-help { line-height: 1.6; }
.sim-help li { margin-bottom: 6px; }

/* order entry */
.picker-list { max-height: 360px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.picker-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.picker-row:last-child { border-bottom: 0; }
.qty { width: 64px !important; min-height: 32px !important; padding: 4px 8px !important; text-align: center; }
.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 20; max-height: 260px; overflow-y: auto; }
.suggest-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--soft); }
.suggest-list button:hover { background: var(--soft); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); height: 34px; flex-shrink: 0; }
.stepper button { width: 32px; height: 32px; border: 0; background: none; cursor: pointer; font-size: 17px; line-height: 1; color: var(--ink); border-radius: 50%; }
.stepper button:hover:not(:disabled) { background: var(--soft); }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper input { width: 36px; border: 0; background: none; text-align: center; font-weight: 600; font-size: 14px; outline: none; padding: 0; }
.stepper.has { border-color: var(--ink); }
.stepper.off { opacity: .5; }

.tier-btn { border: 1px dashed var(--line); background: none; border-radius: 8px; padding: 5px 9px; font-size: 12px; color: var(--muted); cursor: pointer; display: inline-flex; gap: 4px; flex-wrap: wrap; text-align: left; }
.tier-btn.has { border-style: solid; border-color: #cfe9d9; background: var(--ok-bg); color: var(--ok); }
.tier-btn span { white-space: nowrap; font-weight: 600; }
.tier-btn span + span::before { content: '· '; font-weight: 400; }
.tier-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tier-row .input { width: 90px; min-height: 36px; }
.disc { color: var(--ok); font-size: 12px; }

/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--ink); }
.login .card { width: 100%; max-width: 380px; padding: 30px; }
.login img { height: 44px; margin: 0 auto 6px; display: block; }
.login .tag { text-align: center; color: var(--gold); letter-spacing: .3em; font-size: 11px; margin-bottom: 24px; }

@media (max-width: 1200px) {
    .inbox { grid-template-columns: 290px 1fr; }
    .inbox .chat-side { display: none; }
}
@media (max-width: 1000px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .cols, .cols-detail, .sim { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
    .shell { grid-template-columns: 1fr; }
    .side { position: fixed; inset: 0 25% 0 0; z-index: 900; transform: translateX(-100%); transition: transform .2s; height: auto; }
    .side.open { transform: none; box-shadow: 0 0 0 100vw rgba(0, 0, 0, .4); }
    .mobilebar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--ink); position: sticky; top: 0; z-index: 50; }
    .mobilebar img { height: 22px; }
    .mobilebar .icon-btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
    .main { padding: 16px 12px 50px; }
    .inbox { grid-template-columns: 1fr; height: auto; }
    .inbox .conv-list { max-height: 260px; }
    .inbox .chat { height: 70vh; }
    .phone { width: 100%; max-width: 380px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
