:root {
    color-scheme: light;
    --navy-950:#0f2237;
    --navy-900:#173e67;
    --navy-800:#20517f;
    --navy-100:#e8f0f8;
    --ink:#172033;
    --muted:#64748b;
    --line:#d8e1ec;
    --surface:#ffffff;
    --canvas:#f4f7fb;
    --success:#087443;
    --success-soft:#e9f8f0;
    --danger:#b42318;
    --danger-soft:#fff0ee;
    --warning:#8a5b00;
    --warning-soft:#fff7df;
    --accent:#f1b84b;
    --shadow:0 16px 45px rgba(23,62,103,.10);
    --radius:18px;
}

* { box-sizing:border-box; }
html { min-height:100%; background:var(--canvas); }
body {
    min-height:100vh;
    margin:0;
    background:var(--canvas);
    color:var(--ink);
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    -webkit-font-smoothing:antialiased;
}
button,input,select,textarea { font:inherit; }
button { -webkit-tap-highlight-color:transparent; }
a { color:inherit; }

.loading-screen,.center-shell {
    min-height:100vh;
    display:grid;
    place-items:center;
    align-content:center;
    padding:28px;
    text-align:center;
}
.loading-screen h1 { margin:18px 0 6px; font-size:32px; letter-spacing:-.03em; }
.loading-screen p { margin:0; color:var(--muted); }
.loading-bar { width:190px; height:5px; margin-top:22px; overflow:hidden; background:#dce5ef; border-radius:999px; }
.loading-bar span { display:block; width:45%; height:100%; background:var(--navy-900); border-radius:inherit; animation:loading 1.2s ease-in-out infinite alternate; }
@keyframes loading { from{transform:translateX(-30%)} to{transform:translateX(150%)} }

.brand-mark {
    width:52px;
    height:52px;
    display:grid;
    place-items:center;
    border-radius:15px;
    background:var(--navy-900);
    color:#fff;
    font-size:26px;
    font-weight:850;
    box-shadow:0 10px 24px rgba(23,62,103,.22);
}

.app-shell { min-height:100vh; display:grid; grid-template-columns:250px minmax(0,1fr); }
.sidebar {
    position:sticky;
    top:0;
    height:100vh;
    padding:24px 18px;
    background:var(--navy-950);
    color:#fff;
    display:flex;
    flex-direction:column;
}
.sidebar-brand { display:flex; gap:12px; align-items:center; padding:0 8px 24px; }
.sidebar-brand .brand-mark { width:42px; height:42px; border-radius:12px; background:#fff; color:var(--navy-900); box-shadow:none; }
.sidebar-brand strong { display:block; font-size:18px; }
.sidebar-brand span { display:block; margin-top:3px; color:#aebfd1; font-size:12px; }
.nav-list { display:grid; gap:6px; }
.nav-item {
    width:100%;
    min-height:46px;
    border:0;
    border-radius:12px;
    padding:0 13px;
    background:transparent;
    color:#bfcddd;
    text-align:left;
    cursor:pointer;
}
.nav-item.active { background:rgba(255,255,255,.11); color:#fff; font-weight:750; }
.nav-item:disabled { cursor:not-allowed; opacity:.46; }
.sidebar-foot { margin-top:auto; padding:16px 8px 4px; border-top:1px solid rgba(255,255,255,.11); }
.sidebar-foot small { color:#91a7bd; }
.user-mini { margin-top:10px; color:#fff; font-weight:700; }

.content { min-width:0; padding:28px clamp(20px,4vw,52px) 52px; }
.topbar { display:flex; justify-content:space-between; gap:20px; align-items:center; margin-bottom:28px; }
.topbar h1 { margin:0; font-size:clamp(26px,3vw,38px); letter-spacing:-.035em; }
.topbar p { margin:7px 0 0; color:var(--muted); }
.top-actions { display:flex; gap:10px; align-items:center; }
.connection-pill { display:flex; align-items:center; gap:8px; padding:9px 12px; border:1px solid var(--line); background:var(--surface); border-radius:999px; color:var(--muted); font-size:13px; }
.connection-pill::before { content:""; width:9px; height:9px; border-radius:50%; background:var(--danger); }
.connection-pill.online::before { background:var(--success); }

.panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.compact-panel { width:min(520px,100%); padding:30px; text-align:left; }
.compact-panel .brand-mark { margin-bottom:22px; }
.compact-panel h1 { margin:4px 0 10px; font-size:30px; letter-spacing:-.03em; }
.compact-panel > .button { width:100%; margin-top:20px; }
.eyebrow { margin:0; color:var(--navy-800); text-transform:uppercase; letter-spacing:.09em; font-size:12px; font-weight:800; }
.muted { color:var(--muted); line-height:1.55; }

.setup-layout { min-height:100vh; display:grid; grid-template-columns:minmax(300px,.86fr) minmax(460px,1.14fr); }
.setup-aside { padding:clamp(32px,6vw,76px); background:linear-gradient(145deg,var(--navy-950),var(--navy-800)); color:#fff; display:flex; flex-direction:column; justify-content:center; }
.setup-aside .brand-mark { background:#fff; color:var(--navy-900); box-shadow:none; }
.setup-aside h1 { margin:26px 0 14px; max-width:600px; font-size:clamp(34px,5vw,58px); line-height:1.02; letter-spacing:-.045em; }
.setup-aside p { max-width:570px; color:#c3d2e2; font-size:17px; line-height:1.65; }
.feature-list { display:grid; gap:12px; margin-top:26px; }
.feature { display:flex; gap:11px; align-items:flex-start; color:#dce7f2; }
.feature::before { content:"✓"; display:grid; place-items:center; width:24px; height:24px; flex:0 0 auto; border-radius:50%; background:rgba(255,255,255,.13); color:var(--accent); font-weight:900; }
.setup-main { display:grid; place-items:center; padding:32px; }
.form-panel { width:min(560px,100%); padding:32px; }
.form-panel h2 { margin:0 0 8px; font-size:28px; letter-spacing:-.03em; }
.form-panel > p { margin:0 0 24px; }
.form-grid { display:grid; gap:17px; }
.field { display:grid; gap:7px; }
.field label { font-size:14px; font-weight:750; }
.field input,.field select,.field textarea {
    width:100%;
    border:1px solid #cbd7e5;
    border-radius:12px;
    padding:0 14px;
    background:#fff;
    color:var(--ink);
    outline:none;
}
.field input,.field select { height:48px; }
.field textarea { min-height:70px; padding-top:12px; resize:vertical; }
.field input:focus,.field select:focus,.field textarea:focus { border-color:var(--navy-800); box-shadow:0 0 0 4px rgba(32,81,127,.10); }
.field small { color:var(--muted); line-height:1.4; }
.password-row { position:relative; }
.password-row input { padding-right:75px; }
.text-button { position:absolute; right:9px; top:8px; height:32px; border:0; background:transparent; color:var(--navy-800); font-size:13px; font-weight:750; cursor:pointer; }

.button {
    min-height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid transparent;
    border-radius:12px;
    padding:0 17px;
    font-weight:760;
    cursor:pointer;
    transition:transform .15s ease,box-shadow .15s ease,background .15s ease;
    text-decoration:none;
}
.button:active { transform:translateY(1px); }
.button:disabled { cursor:not-allowed; opacity:.55; }
.button.primary { background:var(--navy-900); color:#fff; box-shadow:0 9px 20px rgba(23,62,103,.18); }
.button.secondary { background:#fff; color:var(--navy-900); border-color:var(--line); }
.button.danger { background:#fff; color:var(--danger); border-color:#f1c0bb; }
.form-actions { display:flex; justify-content:flex-end; margin-top:8px; }

.notice { border-radius:12px; padding:13px 15px; font-size:14px; line-height:1.5; }
.notice.error { background:var(--danger-soft); color:var(--danger); border:1px solid #f1bbb5; }
.notice.success { background:var(--success-soft); color:var(--success); border:1px solid #addcc5; }
.notice.warning { background:var(--warning-soft); color:var(--warning); border:1px solid #ead79f; }
.ack-row { color:var(--muted); }
.ack-row input { margin:4px 0 0; }
.hidden { display:none !important; }

.metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.metric { min-height:142px; padding:20px; background:var(--surface); border:1px solid var(--line); border-radius:16px; }
.metric-head { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.metric-icon { width:36px; height:36px; display:grid; place-items:center; border-radius:11px; background:var(--navy-100); color:var(--navy-900); font-weight:900; }
.metric-label { color:var(--muted); font-size:13px; font-weight:700; }
.metric-value { margin-top:17px; font-size:23px; font-weight:850; letter-spacing:-.025em; }
.metric-detail { margin-top:5px; color:var(--muted); font-size:12px; line-height:1.4; }
.status-dot { width:11px; height:11px; border-radius:50%; background:var(--danger); }
.status-dot.ok { background:var(--success); }
.status-dot.warn { background:var(--warning); }

.two-column { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr); gap:18px; margin-top:18px; }
.section-card { padding:23px; }
.section-card > #install-app { width:100%; margin-top:16px; }
.section-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:18px; }
.section-head h2 { margin:0; font-size:19px; }
.section-head p { margin:5px 0 0; color:var(--muted); font-size:13px; line-height:1.45; }
.check-list { display:grid; gap:10px; }
.check-row { display:flex; justify-content:space-between; gap:15px; align-items:center; padding:13px 0; border-top:1px solid #edf1f6; }
.check-row:first-child { border-top:0; }
.check-row strong { display:block; font-size:14px; }
.check-row span { display:block; margin-top:3px; color:var(--muted); font-size:12px; }
.tag { flex:0 0 auto; padding:6px 9px; border-radius:999px; background:var(--success-soft); color:var(--success); font-size:11px; font-weight:800; }
.tag.wait { background:var(--warning-soft); color:var(--warning); }
.action-stack { display:grid; gap:10px; }
.action-stack .button { width:100%; }
.help-text { margin:14px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }

.empty-state { border:1px dashed #c8d4e1; border-radius:14px; padding:28px; text-align:center; color:var(--muted); }
.empty-state strong { display:block; color:var(--ink); margin-bottom:7px; }
.toast-region { position:fixed; z-index:100; right:18px; bottom:18px; display:grid; gap:9px; width:min(390px,calc(100% - 36px)); }
.toast { padding:14px 16px; border-radius:13px; background:var(--navy-950); color:#fff; box-shadow:0 15px 35px rgba(15,34,55,.24); animation:toast-in .22s ease-out; }
.toast.error { background:#7f1d1d; }
@keyframes toast-in { from{opacity:0; transform:translateY(10px)} }

.update-card {
    position:fixed;
    z-index:120;
    top:18px;
    right:18px;
    width:min(410px,calc(100% - 36px));
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    padding:13px;
    border:1px solid #c7d5e4;
    border-radius:15px;
    background:rgba(255,255,255,.98);
    color:var(--ink);
    box-shadow:0 18px 48px rgba(15,34,55,.22);
    animation:update-card-in .24s ease-out;
}
.update-card-icon,.update-dialog-icon {
    display:grid;
    place-items:center;
    border-radius:12px;
    background:var(--navy-100);
    color:var(--navy-900);
    font-weight:900;
}
.update-card-icon { width:38px; height:38px; font-size:20px; }
.update-card-copy { min-width:0; }
.update-card-copy strong,.update-card-copy span { display:block; }
.update-card-copy strong { font-size:14px; }
.update-card-copy span { margin-top:3px; color:var(--muted); font-size:12px; line-height:1.35; }
.update-card-button { min-height:38px; padding:0 13px; background:var(--navy-900); color:#fff; font-size:12px; }
@keyframes update-card-in { from{opacity:0; transform:translateY(-10px)} }

.dialog-backdrop {
    position:fixed;
    z-index:140;
    inset:0;
    display:grid;
    place-items:center;
    padding:22px;
    background:rgba(15,34,55,.48);
    backdrop-filter:blur(3px);
}
.update-dialog { width:min(470px,100%); padding:28px; }
.update-dialog-icon { width:46px; height:46px; margin-bottom:18px; font-size:23px; }
.update-dialog h2 { margin:5px 0 9px; font-size:26px; letter-spacing:-.03em; }
.update-dialog > p:not(.eyebrow) { margin:0; color:var(--muted); line-height:1.6; }
.dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; }

.page-notice { margin-bottom:16px; }
.compact-metrics .metric { min-height:124px; }
.catalog-panel { margin-top:18px; overflow:hidden; }
.catalog-toolbar { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:18px; border-bottom:1px solid var(--line); }
.catalog-filters,.toolbar-actions,.row-actions { display:flex; gap:9px; align-items:center; }
.catalog-filters { flex:1; }
.search-input,.select-input,.category-add input,.category-row input {
    height:44px;
    border:1px solid #cbd7e5;
    border-radius:11px;
    padding:0 13px;
    background:#fff;
    color:var(--ink);
    outline:none;
}
.search-input { width:min(340px,100%); }
.select-input { min-width:180px; }
.search-input:focus,.select-input:focus,.category-add input:focus,.category-row input:focus { border-color:var(--navy-800); box-shadow:0 0 0 3px rgba(32,81,127,.09); }
.table-wrap { width:100%; overflow:auto; }
.data-table { width:100%; border-collapse:collapse; min-width:920px; }
.data-table th,.data-table td { padding:15px 16px; border-bottom:1px solid #e9eef4; text-align:left; vertical-align:middle; }
.data-table th { background:#f7f9fc; color:var(--muted); font-size:12px; font-weight:800; white-space:nowrap; }
.data-table td { font-size:13px; }
.data-table tbody tr:last-child td { border-bottom:0; }
.table-sub { display:block; margin-top:4px; color:var(--muted); font-size:11px; white-space:nowrap; }
.subtle { color:var(--muted); }
.mono { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px !important; }
.status-badge { display:inline-flex; padding:6px 9px; border-radius:999px; background:var(--success-soft); color:var(--success); font-size:11px; font-weight:800; }
.status-badge.danger { background:var(--danger-soft); color:var(--danger); }
.status-badge.neutral { background:#eef2f6; color:#5d6978; }
.table-button { min-height:34px; border:1px solid var(--line); border-radius:9px; padding:0 10px; background:#fff; color:var(--navy-900); font-size:12px; font-weight:750; cursor:pointer; }
.positive { color:var(--success); font-weight:800; }
.negative { color:var(--danger); font-weight:800; }
.movement-panel { margin-top:18px; }
.import-preview { margin-top:18px; }
.import-steps { display:flex; flex-wrap:wrap; gap:8px; }
.import-steps span { padding:8px 11px; border-radius:10px; background:var(--navy-100); color:var(--navy-900); font-size:12px; font-weight:700; }

.management-backdrop { align-items:start; overflow:auto; padding:28px; }
.management-dialog { width:min(920px,100%); margin:auto; padding:27px; }
.management-dialog.category-dialog,.management-dialog.stock-dialog { width:min(720px,100%); }
.dialog-header { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; margin-bottom:22px; }
.dialog-header h2 { margin:5px 0 0; font-size:27px; letter-spacing:-.03em; }
.dialog-header p:not(.eyebrow) { margin:6px 0 0; color:var(--muted); }
.icon-button { width:40px; height:40px; flex:0 0 auto; border:1px solid var(--line); border-radius:11px; background:#fff; color:var(--ink); font-size:25px; line-height:1; cursor:pointer; }
.form-section { padding:21px 0; border-top:1px solid var(--line); }
.form-section:first-of-type { border-top:0; padding-top:0; }
.form-section h3 { margin:0 0 14px; font-size:16px; }
.two-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
.price-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.full-field { grid-column:1 / -1; }
.input-suffix { position:relative; }
.input-suffix input { padding-right:48px; }
.input-suffix span { position:absolute; right:14px; top:14px; color:var(--muted); font-size:13px; font-weight:700; }
.price-result { display:flex; justify-content:space-between; gap:18px; align-items:center; padding:18px; border:1px solid #c9d9e8; border-radius:14px; background:var(--navy-100); }
.price-result span,.price-result small { display:block; }
.price-result span { color:var(--navy-800); font-size:12px; font-weight:750; }
.price-result strong { display:block; margin:4px 0; color:var(--navy-950); font-size:28px; }
.price-result small { color:var(--muted); }
.readonly-value { min-height:48px; display:flex; align-items:center; padding:0 14px; border:1px solid var(--line); border-radius:12px; background:#f7f9fc; font-weight:800; }
.check-field { min-height:48px; display:flex; align-items:center; gap:10px; padding:11px 13px; border:1px solid var(--line); border-radius:12px; color:var(--ink); font-size:14px; font-weight:700; }
.check-field input { width:18px; height:18px; }
.category-add { display:grid; grid-template-columns:minmax(0,1fr) 100px auto; gap:9px; margin-bottom:16px; }
.category-list { display:grid; gap:8px; max-height:55vh; overflow:auto; }
.category-row { display:grid; grid-template-columns:minmax(0,1fr) 90px 80px auto; gap:9px; align-items:center; padding:10px; border:1px solid var(--line); border-radius:12px; }
.order-input { width:100% !important; }
.mini-check { font-size:13px; white-space:nowrap; }

.remember-help { display:block; margin-top:-8px; color:var(--muted); }
.import-dialog { width:min(1500px,calc(100vw - 32px)); max-height:calc(100vh - 32px); overflow:auto; }
.import-drop-zone { border:2px dashed #aec3d7; border-radius:18px; padding:34px 24px; text-align:center; background:#f7fafc; }
.import-drop-zone h3 { margin:10px 0 6px; }
.import-drop-zone p,.import-drop-zone small { color:var(--muted); }
.import-drop-zone .row-actions { justify-content:center; margin:20px 0 14px; }
.import-file-icon { width:50px; height:50px; margin:0 auto; display:grid; place-items:center; border-radius:15px; background:#e4eef7; color:var(--primary); font-size:28px; font-weight:800; }
.import-progress { margin-top:18px; padding:13px 14px; border:1px solid var(--line); border-radius:14px; background:#f8fafc; transition:border-color .2s ease,background .2s ease; }
.import-progress.is-active { border-color:#9ebbd5; background:#f3f8fc; }
.import-progress.is-error { border-color:#f3b4ab; background:#fff7f5; }
.import-progress.is-success { border-color:#a7d8be; background:#f4fbf7; }
.import-progress-head { display:grid; grid-template-columns:22px minmax(0,1fr) auto; gap:10px; align-items:center; margin-bottom:10px; }
.import-progress-head strong,.import-progress-head small { display:block; }
.import-progress-head strong { color:var(--ink); font-size:13px; }
.import-progress-head small { margin-top:2px; color:var(--muted); font-size:12px; }
.progress-elapsed { color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.progress-spinner { width:18px; height:18px; border:2px solid #cbd9e6; border-top-color:var(--primary); border-radius:50%; opacity:.35; }
.import-progress.is-active .progress-spinner { opacity:1; animation:import-spin .8s linear infinite; }
.import-progress.is-error .progress-spinner { border-color:#d9402f; opacity:1; }
.progress-track { height:9px; border-radius:999px; background:#e1eaf2; overflow:hidden; }
.progress-track span { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(110deg,var(--primary) 0%,var(--primary) 35%,#5e9fd2 50%,var(--primary) 65%,var(--primary) 100%); background-size:42px 100%; transition:width .25s ease; }
.import-progress.is-active .progress-track span { animation:import-stripes .75s linear infinite; }
.import-progress.is-indeterminate .progress-track span { width:32%; animation:import-indeterminate 1.25s ease-in-out infinite; }
@keyframes import-spin { to { transform:rotate(360deg); } }
@keyframes import-stripes { to { background-position:42px 0; } }
@keyframes import-indeterminate { 0% { transform:translateX(-110%); } 50% { transform:translateX(110%); } 100% { transform:translateX(320%); } }
@media (prefers-reduced-motion:reduce) { .import-progress.is-active .progress-spinner,.import-progress.is-active .progress-track span { animation-duration:2.2s; } }
.import-summary { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; margin-bottom:14px; }
.import-summary > div:first-child { display:grid; gap:3px; }
.import-summary span { color:var(--muted); font-size:13px; }
.import-table-wrap { max-height:55vh; border:1px solid var(--line); border-radius:14px; }
.import-table { min-width:1320px; }
.import-table th { position:sticky; top:0; z-index:2; }
.import-table td { vertical-align:top; min-width:145px; }
.import-table td:first-child { min-width:50px; width:50px; text-align:center; }
.import-table td:nth-child(2) { min-width:250px; }
.import-table input,.import-table select { width:100%; margin-bottom:7px; padding:8px 9px; border:1px solid #c8d5e1; border-radius:8px; background:#fff; font:inherit; }
.import-table input[type="checkbox"] { width:18px; height:18px; }
.import-table small { display:block; color:var(--muted); line-height:1.35; }
.import-table .inline-pair { display:flex; align-items:center; gap:5px; }
.row-muted { opacity:.48; }
.import-confirmation { margin-top:16px; padding:18px; border:1px solid #b7cce0; border-radius:14px; background:#eef5fb; }
.import-confirmation p { margin:7px 0; }

@media (max-width:1050px) {
    .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .two-column { grid-template-columns:1fr; }
    .catalog-toolbar { align-items:stretch; flex-direction:column; }
    .catalog-filters,.toolbar-actions { flex-wrap:wrap; }
    .price-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:820px) {
    .setup-layout { grid-template-columns:1fr; }
    .setup-aside { min-height:auto; padding:34px 24px; }
    .setup-aside h1 { font-size:36px; }
    .setup-aside p,.feature-list { display:none; }
    .setup-main { padding:24px 16px 40px; align-items:start; }
    .app-shell { grid-template-columns:1fr; padding-bottom:72px; }
    .sidebar { position:fixed; z-index:50; top:auto; bottom:0; left:0; right:0; width:100%; height:68px; padding:8px 10px; flex-direction:row; align-items:center; box-shadow:0 -8px 24px rgba(15,34,55,.16); }
    .sidebar-brand,.sidebar-foot { display:none; }
    .nav-list { width:100%; grid-template-columns:repeat(3,1fr); gap:5px; }
    .nav-item { text-align:center; min-height:50px; padding:0 5px; font-size:12px; }
    .nav-item:nth-child(n+4) { display:none; }
    .content { padding:22px 16px 32px; }
    .topbar { align-items:flex-start; }
    .top-actions .button { display:none; }
}
@media (max-width:560px) {
    .form-panel { padding:23px 18px; }
    .metric-grid { grid-template-columns:1fr; }
    .metric { min-height:122px; }
    .topbar { display:block; }
    .top-actions { margin-top:14px; }
    .connection-pill { width:100%; justify-content:center; }
    .update-card { top:12px; right:12px; width:calc(100% - 24px); grid-template-columns:auto minmax(0,1fr); }
    .update-card-button { grid-column:1 / -1; width:100%; }
    .update-dialog { padding:24px 20px; }
    .dialog-actions { display:grid; grid-template-columns:1fr 1fr; }
    .management-backdrop { padding:10px; }
    .management-dialog { padding:20px 16px; }
    .two-fields,.price-grid { grid-template-columns:1fr; }
    .full-field { grid-column:auto; }
    .price-result { display:block; }
    .price-result .button { width:100%; margin-top:14px; }
    .catalog-filters,.toolbar-actions { display:grid; grid-template-columns:1fr; }
    .search-input,.select-input,.toolbar-actions .button { width:100%; }
    .category-add,.category-row { grid-template-columns:1fr 82px; }
    .category-add .button,.category-row .mini-check,.category-row .button { grid-column:1 / -1; }
    .import-dialog { width:calc(100vw - 16px); max-height:calc(100vh - 16px); }
    .import-drop-zone { padding:24px 14px; }
}


/* Şahin Kantin v0.2.3 — Otoiz UI/UX standardı uyarlamaları */
:root {
    --brand-red:#bd1231;
    --brand-red-dark:#961025;
    --brand-charcoal:#3b3b39;
    --brand-charcoal-dark:#252525;
    --brand-soft:#f7f7f7;
    --navy-950:#252525;
    --navy-900:#bd1231;
    --navy-800:#9e1028;
    --navy-100:#f7eef1;
    --ink:#242426;
    --muted:#6b6b70;
    --line:#dfdfdf;
    --surface:#ffffff;
    --canvas:#f7f7f7;
    --accent:#bd1231;
    --primary:#bd1231;
    --shadow:0 16px 45px rgba(59,59,57,.10);
}

.loading-bar span { background:var(--brand-red); }
.brand-mark {
    background:#fff url('/assets/sahin-mark.png') center/78% no-repeat;
    color:transparent;
    text-indent:-999px;
    overflow:hidden;
    border:1px solid rgba(59,59,57,.10);
    box-shadow:0 10px 24px rgba(59,59,57,.16);
}
.loading-screen .brand-mark,.compact-panel .brand-mark { width:70px; height:70px; border-radius:20px; }
.sidebar { background:var(--brand-charcoal-dark); }
.sidebar-brand .brand-mark,.setup-aside .brand-mark { background:#fff url('/assets/sahin-mark.png') center/78% no-repeat; }
.sidebar-brand strong { letter-spacing:-.015em; }
.sidebar-brand span { color:#d5d5d5; }
.sidebar-foot small { color:#c6c6c6; }
.setup-aside { background:linear-gradient(145deg,var(--brand-charcoal-dark),var(--brand-red)); }
.feature::before { color:#fff; background:rgba(255,255,255,.16); }
.field input:focus,.field select:focus,.field textarea:focus { border-color:var(--brand-red); box-shadow:0 0 0 4px rgba(189,18,49,.10); }
.text-button { color:var(--brand-red); }
.button.primary { background:var(--brand-red); color:#fff; box-shadow:0 9px 20px rgba(189,18,49,.18); }
.button.primary:hover { background:var(--brand-red-dark); }
.button.secondary { color:var(--brand-charcoal); }
.button.danger,.button.primary.danger { background:var(--danger); border-color:var(--danger); color:#fff; box-shadow:0 9px 20px rgba(180,35,24,.16); }
.metric-icon { background:var(--navy-100); color:var(--brand-red); }
.price-result { border-color:#ead0d6; background:#fbf2f4; }
.price-result span { color:var(--brand-red-dark); }
.price-result strong { color:var(--brand-charcoal-dark); }
.import-file-icon { color:var(--brand-red); background:#f6e7eb; }
.progress-spinner { border-top-color:var(--brand-red); }
.progress-track span { background:linear-gradient(110deg,var(--brand-red) 0%,var(--brand-red) 35%,#d34c64 50%,var(--brand-red) 65%,var(--brand-red) 100%); background-size:42px 100%; }
.import-confirmation { border-color:#e5bdc6; background:#fbf0f2; }
.status-badge { border-color:#e5bdc6; background:#fbf0f2; color:var(--brand-red-dark); }

/* Modal standardı: sabit başlık + sabit aksiyon + kayar içerik */
.dialog-backdrop {
    position:fixed;
    inset:0;
    z-index:90;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:16px;
    overflow:hidden;
    background:rgba(15,15,15,.42);
}
.management-backdrop { z-index:95; }
.confirm-backdrop { z-index:130; background:rgba(15,15,15,.50); }
.management-dialog {
    width:min(920px,100%);
    max-height:calc(100vh - 32px);
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}
.management-dialog.category-dialog,.management-dialog.stock-dialog { width:min(720px,100%); }
.import-dialog { width:min(1500px,calc(100vw - 32px)); max-height:calc(100vh - 32px); overflow:hidden; }
.management-dialog > .dialog-header {
    flex:0 0 auto;
    margin:0;
    padding:24px 27px 18px;
    border-bottom:1px solid var(--line);
    background:var(--surface);
}
.management-dialog > form {
    flex:1 1 auto;
    min-height:0;
    overflow:auto;
    padding:0 27px;
    scrollbar-gutter:stable;
}
.management-dialog > form > #dialog-notice { margin-top:18px; }
.management-dialog > #dialog-notice,
.management-dialog > #import-notice {
    flex:0 0 auto;
    margin:18px 27px 0;
}
.management-dialog > #import-stage,
.management-dialog > .table-wrap,
.management-dialog > .category-list {
    flex:1 1 auto;
    min-height:0;
    overflow:auto;
    margin:0;
    padding:20px 27px;
    scrollbar-gutter:stable;
}
.management-dialog > .category-add {
    flex:0 0 auto;
    margin:18px 27px 12px;
}
.management-dialog > .dialog-actions,
.management-dialog > form > .dialog-actions,
#import-stage > .dialog-actions {
    flex:0 0 auto;
    position:sticky;
    bottom:0;
    z-index:6;
    margin:20px -27px 0;
    padding:16px 27px;
    border-top:1px solid var(--line);
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(10px);
}
.management-dialog > .dialog-actions {
    position:relative;
    margin:0;
}
.dialog-header h2 { color:var(--brand-charcoal-dark); }
.icon-button:hover { border-color:#e0b2bb; color:var(--brand-red); }
.confirm-dialog { width:min(460px,100%); padding:26px; }
.confirm-dialog h2 { margin:5px 0 9px; font-size:25px; letter-spacing:-.03em; }
.confirm-dialog p:not(.eyebrow) { margin:0; color:var(--muted); line-height:1.6; }
.confirm-dialog .dialog-actions { margin-top:22px; }

@media (prefers-reduced-motion:reduce) {
    *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
@media (max-width:560px) {
    .management-backdrop { padding:8px; }
    .management-dialog { max-height:calc(100vh - 16px); padding:0; }
    .management-dialog > .dialog-header { padding:20px 16px 14px; }
    .management-dialog > form,
    .management-dialog > #import-stage,
    .management-dialog > .table-wrap,
    .management-dialog > .category-list { padding-left:16px; padding-right:16px; }
    .management-dialog > #dialog-notice,
    .management-dialog > #import-notice,
    .management-dialog > .category-add { margin-left:16px; margin-right:16px; }
    .management-dialog > .dialog-actions,
    .management-dialog > form > .dialog-actions,
    #import-stage > .dialog-actions { margin-left:-16px; margin-right:-16px; padding:14px 16px; }
    .import-dialog { width:calc(100vw - 16px); max-height:calc(100vh - 16px); }
    .confirm-dialog { padding:22px 18px; }
}

/* Şahin Kantin v0.2.4 — Otoiz ürün disiplinine göre köklü arayüz revizyonu */
:root {
    --brand-red:#bd1231;
    --brand-red-700:#9d1028;
    --brand-red-50:#fff1f4;
    --brand-charcoal:#3b3b39;
    --brand-ink:#202022;
    --surface-2:#fafafa;
    --surface-3:#f3f4f6;
    --line:#e3e4e8;
    --canvas:#f4f5f7;
    --ink:#202124;
    --muted:#6f7279;
    --success:#087443;
    --success-soft:#e8f6ef;
    --warning:#9a5b00;
    --warning-soft:#fff6db;
    --danger:#b42318;
    --danger-soft:#fff0ee;
    --info:#175cd3;
    --info-soft:#edf4ff;
    --shadow:0 10px 28px rgba(16,24,40,.07);
    --shadow-strong:0 24px 70px rgba(16,24,40,.18);
    --radius:20px;
}

html,body { background:var(--canvas); }
body { letter-spacing:-.005em; }
.app-shell { grid-template-columns:268px minmax(0,1fr); background:var(--canvas); }
.sidebar {
    background:rgba(255,255,255,.94) !important;
    color:var(--ink);
    border-right:1px solid var(--line);
    box-shadow:8px 0 30px rgba(16,24,40,.04);
    backdrop-filter:blur(18px);
}
.sidebar-brand { padding:0 8px 28px; }
.sidebar-brand .brand-mark { width:46px; height:46px; border-radius:15px; box-shadow:none; border:1px solid var(--line); }
.sidebar-brand strong { color:var(--ink); font-size:17px; }
.sidebar-brand span { color:var(--muted); }
.nav-list { gap:7px; }
.nav-item {
    min-height:48px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    color:var(--muted);
    border:1px solid transparent;
    background:transparent;
    font-weight:720;
}
.nav-item span { min-width:0; }
.nav-item small {
    padding:4px 7px;
    border-radius:999px;
    background:var(--surface-3);
    color:#8a8e96;
    font-size:10px;
    font-weight:800;
    letter-spacing:.02em;
}
.nav-item:not(:disabled):hover { background:var(--surface-3); color:var(--ink); }
.nav-item.active { background:var(--brand-ink); color:#fff; box-shadow:0 10px 22px rgba(32,32,34,.13); }
.nav-item.active small { background:rgba(255,255,255,.14); color:#fff; }
.nav-item:disabled { opacity:.72; }
.profile-button {
    width:100%;
    min-height:70px;
    display:flex;
    align-items:center;
    gap:12px;
    text-align:left;
    border:1px solid var(--line);
    border-radius:16px;
    background:var(--surface-2);
    color:var(--ink);
    cursor:pointer;
}
.profile-button:disabled { cursor:default; opacity:1; }
.profile-button small,.profile-button strong { display:block; }
.profile-button small { color:var(--muted); margin-bottom:3px; }
.profile-button strong { color:var(--ink); font-size:13px; line-height:1.25; }
.profile-avatar {
    width:38px;
    height:38px;
    flex:0 0 auto;
    display:grid;
    place-items:center;
    border-radius:13px;
    background:var(--brand-red-50);
    color:var(--brand-red);
    font-weight:900;
    font-size:13px;
    border:1px solid #f0ccd4;
}
.profile-avatar.large { width:64px; height:64px; border-radius:20px; font-size:20px; }
.content { padding:30px clamp(22px,3vw,44px) 44px; }
.topbar {
    position:sticky;
    top:0;
    z-index:12;
    min-height:82px;
    padding:8px 0 18px;
    margin-bottom:16px;
    background:linear-gradient(180deg,var(--canvas) 70%,rgba(244,245,247,.72));
    backdrop-filter:blur(14px);
}
.topbar h1 { font-size:clamp(27px,2.8vw,40px); color:var(--ink); }
.topbar p { color:var(--muted); }
.eyebrow { color:var(--brand-red); font-size:11px; letter-spacing:.12em; }
.panel { border-color:var(--line); box-shadow:var(--shadow); }
.button { min-height:44px; border-radius:12px; }
.button.primary { background:var(--brand-red); box-shadow:0 10px 22px rgba(189,18,49,.18); }
.button.primary:hover { background:var(--brand-red-700); }
.button.secondary { background:#fff; color:var(--brand-ink); border-color:var(--line); }
.button.secondary:hover,.table-button:hover { border-color:#cfd2d8; background:#fafafa; }
.button.wide { width:100%; margin-top:16px; }
.connection-pill { background:#fff; color:var(--muted); }
.metric-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.metric {
    min-height:116px;
    padding:18px;
    border-radius:18px;
    background:linear-gradient(180deg,#fff,#fdfdfd);
    border:1px solid var(--line);
    box-shadow:none;
}
.metric-icon {
    width:32px;
    height:32px;
    border-radius:11px;
    background:var(--brand-red-50);
    color:var(--brand-red);
    font-size:13px;
}
.metric-label { color:var(--muted); }
.metric-value { margin-top:14px; font-size:26px; }
.metric-detail { color:var(--muted); }
.hero-card {
    padding:24px;
    border-radius:24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    overflow:hidden;
    position:relative;
}
.hero-card::after {
    content:"";
    position:absolute;
    right:-90px;
    top:-120px;
    width:260px;
    height:260px;
    border-radius:50%;
    background:radial-gradient(circle,rgba(189,18,49,.10),transparent 65%);
}
.hero-title { position:relative; z-index:1; font-size:24px; line-height:1.18; font-weight:860; letter-spacing:-.035em; }
.hero-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.pill { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--surface-2); color:var(--muted); border-radius:999px; padding:7px 10px; font-size:12px; font-weight:780; }
.hero-actions { position:relative; z-index:1; display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.workspace-grid,.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr); gap:16px; margin-top:16px; }
.quick-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.quick-action {
    min-height:96px;
    padding:17px;
    border:1px solid var(--line);
    border-radius:17px;
    background:var(--surface-2);
    color:var(--ink);
    text-align:left;
}
.quick-action:hover { background:#fff; border-color:#d0d3da; box-shadow:0 10px 22px rgba(16,24,40,.06); }
.quick-action strong,.quick-action span { display:block; }
.quick-action strong { font-size:15px; }
.quick-action span { margin-top:6px; color:var(--muted); font-size:12px; line-height:1.45; }

/* Ürünler sayfası: uzun sayfa yerine çalışma alanı */
.products-content { padding-bottom:28px; }
.command-panel {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:18px;
    padding:20px;
    border-radius:22px;
    margin-bottom:14px;
}
.command-copy h2 { margin:4px 0 5px; font-size:22px; letter-spacing:-.03em; }
.command-copy p:not(.eyebrow) { margin:0; color:var(--muted); }
.command-actions { display:flex; align-items:center; justify-content:flex-end; gap:9px; flex-wrap:wrap; }
.product-workspace {
    display:grid;
    grid-template-columns:minmax(0,1fr) 360px;
    gap:16px;
    margin-top:14px;
    align-items:start;
}
.catalog-board { overflow:hidden; min-height:540px; }
.catalog-toolbar {
    padding:15px 16px;
    background:rgba(255,255,255,.96);
}
.sticky-toolbar { position:sticky; top:0; z-index:5; }
.catalog-toolbar h2 { margin:0; font-size:20px; letter-spacing:-.025em; }
.catalog-toolbar p { margin:5px 0 0; color:var(--muted); font-size:13px; }
.catalog-filters { min-width:0; }
.search-input { width:min(430px,100%); }
.search-input,.select-input,.category-add input,.category-row input {
    height:45px;
    border-radius:12px;
    background:#fff;
    border-color:#d8dbe2;
}
.category-chip-row {
    display:flex;
    gap:8px;
    overflow:auto;
    padding:12px 16px;
    border-bottom:1px solid var(--line);
    scrollbar-gutter:stable;
}
.category-chip {
    flex:0 0 auto;
    min-height:36px;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:0 12px;
    border:1px solid var(--line);
    border-radius:999px;
    background:var(--surface-2);
    color:var(--muted);
    font-weight:800;
    font-size:12px;
}
.category-chip b { color:inherit; font-size:11px; }
.category-chip.active { background:var(--brand-ink); color:#fff; border-color:var(--brand-ink); }
.product-scroll {
    max-height:calc(100vh - 382px);
    min-height:430px;
    overflow:auto;
    padding:16px;
    scrollbar-gutter:stable;
}
.category-section { margin-bottom:18px; }
.category-section:last-child { margin-bottom:0; }
.category-section > header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin:0 0 10px;
}
.category-section h3 { margin:0; font-size:16px; letter-spacing:-.02em; }
.category-section p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.product-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.product-card {
    border:1px solid var(--line);
    border-radius:16px;
    background:#fff;
    padding:14px;
    box-shadow:0 1px 0 rgba(16,24,40,.02);
}
.product-card.is-critical { border-color:#f0b9b3; background:#fffafa; }
.product-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.product-card-title { min-width:0; }
.product-card-title strong {
    display:block;
    font-size:13px;
    line-height:1.35;
    letter-spacing:.01em;
    text-transform:uppercase;
    overflow:hidden;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
}
.product-card-title span { display:block; margin-top:5px; color:var(--muted); font-size:11px; }
.product-card-stats {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    margin-top:13px;
}
.product-card-stats span {
    min-width:0;
    border:1px solid var(--line);
    background:var(--surface-2);
    border-radius:12px;
    padding:9px;
}
.product-card-stats small,.product-card-stats em { display:block; color:var(--muted); font-size:10px; font-style:normal; }
.product-card-stats strong { display:block; margin-top:3px; font-size:14px; }
.product-card-actions { display:flex; justify-content:flex-end; gap:7px; margin-top:12px; padding-top:10px; border-top:1px solid var(--line); }
.status-badge {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:26px;
    padding:5px 9px;
    border-radius:999px;
    font-size:11px;
    font-weight:850;
    border:1px solid transparent;
    white-space:nowrap;
}
.status-badge.ok { background:var(--success-soft); color:var(--success); border-color:#bee5d0; }
.status-badge.danger { background:var(--danger-soft); color:var(--danger); border-color:#f1bbb5; }
.status-badge.neutral { background:#eef0f3; color:#59606b; border-color:#dadde3; }
.tag { background:var(--success-soft); color:var(--success); }
.tag.wait { background:var(--warning-soft); color:var(--warning); }
.side-rail { display:grid; gap:16px; position:sticky; top:116px; }
.compact-card { padding:19px; }
.compact-card .section-head { margin-bottom:14px; }
.import-steps { gap:7px; }
.import-steps span { background:var(--brand-red-50); color:var(--brand-red); border:1px solid #f0cbd4; }
.movement-card { max-height:calc(100vh - 285px); overflow:hidden; display:flex; flex-direction:column; }
.movement-list { overflow:auto; display:grid; gap:8px; padding-right:2px; scrollbar-gutter:stable; }
.movement-item {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    padding:11px 0;
    border-bottom:1px solid var(--line);
}
.movement-item:last-child { border-bottom:0; }
.movement-item strong,.movement-item span { display:block; }
.movement-item strong { font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.movement-item span { margin-top:4px; color:var(--muted); font-size:11px; }
.movement-item b { font-size:12px; white-space:nowrap; }
.table-button {
    min-height:34px;
    border-radius:10px;
    color:var(--brand-ink);
    border-color:var(--line);
}
.positive { color:var(--success); }
.negative { color:var(--danger); }

/* Yönetim merkezi */
.admin-grid {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(340px,.72fr);
    gap:16px;
    margin-bottom:16px;
}
.profile-card-large { padding:24px; display:flex; justify-content:space-between; align-items:center; gap:18px; }
.profile-hero { display:flex; align-items:center; gap:16px; min-width:0; }
.profile-hero h2 { margin:4px 0 4px; font-size:25px; letter-spacing:-.03em; }
.profile-hero p:not(.eyebrow) { margin:0; color:var(--muted); }
.profile-actions { display:flex; gap:9px; flex-wrap:wrap; justify-content:flex-end; }
.security-roadmap { padding:22px; }
.users-panel { overflow:hidden; }
.users-list { max-height:calc(100vh - 360px); min-height:280px; overflow:auto; padding:14px; display:grid; gap:10px; scrollbar-gutter:stable; }
.user-card {
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto auto;
    align-items:center;
    gap:12px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:16px;
    background:#fff;
}
.user-card-main { min-width:0; }
.user-card-main strong,.user-card-main span,.user-card-main small { display:block; }
.user-card-main strong { font-size:14px; }
.user-card-main span { margin-top:4px; color:var(--muted); font-size:12px; }
.user-card-main small { margin-top:4px; color:#8b8f98; font-size:11px; }

/* Modal düzenini biraz daha oturt */
.dialog-backdrop { backdrop-filter:blur(7px); background:rgba(17,24,39,.46); }
.management-dialog { border-radius:24px; box-shadow:var(--shadow-strong); }
.management-dialog > .dialog-header { padding:24px 28px 17px; }
.management-dialog > form { padding:0 28px; }
.dialog-header h2 { font-size:28px; }
.dialog-actions { gap:10px; }
.icon-button { border-radius:13px; }
.notice { border-radius:14px; }

@media (max-width:1280px) {
    .product-workspace { grid-template-columns:1fr; }
    .side-rail { position:static; grid-template-columns:1fr 1fr; }
    .movement-card { max-height:380px; }
    .product-scroll { max-height:560px; }
}
@media (max-width:1050px) {
    .app-shell { grid-template-columns:230px minmax(0,1fr); }
    .product-card-grid { grid-template-columns:1fr; }
    .command-panel { grid-template-columns:1fr; }
    .command-actions { justify-content:flex-start; }
    .admin-grid,.workspace-grid,.dashboard-grid { grid-template-columns:1fr; }
}
@media (max-width:820px) {
    .app-shell { grid-template-columns:1fr; padding-bottom:78px; }
    .sidebar { background:rgba(255,255,255,.92) !important; }
    .nav-list { grid-template-columns:repeat(4,1fr); }
    .nav-item { justify-content:center; display:grid; text-align:center; gap:2px; }
    .nav-item small { display:none; }
    .nav-item:nth-child(2),.nav-item:nth-child(4),.nav-item:nth-child(5) { display:none; }
    .content { padding:18px 14px 28px; }
    .topbar { position:relative; display:block; min-height:auto; padding-bottom:12px; }
    .top-actions { margin-top:12px; }
    .command-actions,.catalog-filters,.toolbar-actions { display:grid; grid-template-columns:1fr; width:100%; }
    .search-input,.select-input,.toolbar-actions .button,.command-actions .button { width:100%; }
    .side-rail { grid-template-columns:1fr; }
    .product-scroll { max-height:none; min-height:260px; }
    .profile-card-large,.user-card { grid-template-columns:1fr; align-items:start; }
    .profile-card-large { display:grid; }
    .profile-actions { justify-content:flex-start; }
}
@media (max-width:560px) {
    .metric-grid { grid-template-columns:1fr; }
    .product-card-stats { grid-template-columns:1fr; }
    .quick-grid { grid-template-columns:1fr; }
    .hero-card { display:grid; }
    .hero-actions { justify-content:flex-start; }
    .catalog-toolbar { display:grid; }
    .category-chip-row { padding:10px 12px; }
}

/* v0.2.4 status base düzeltmesi */
.status-badge { background:#eef0f3; color:#59606b; border-color:#dadde3; }
.status-badge.ok { background:var(--success-soft); color:var(--success); border-color:#bee5d0; }
.status-badge.danger { background:var(--danger-soft); color:var(--danger); border-color:#f1bbb5; }
.status-badge.neutral { background:#eef0f3; color:#59606b; border-color:#dadde3; }

/* Şahin Kantin v0.2.5 — Otoiz mekanik standardı, sade sayfa dili ve ürün görseli */
:root {
    --ui-bg:#f5f6f8;
    --ui-surface:#ffffff;
    --ui-surface-2:#f9fafb;
    --ui-text:#1f2328;
    --ui-muted:#6b7280;
    --ui-line:#e5e7eb;
    --ui-primary:#242426;
    --ui-brand:#bd1231;
    --ui-brand-700:#981127;
    --ui-focus:rgba(189,18,49,.11);
    --ui-shadow:0 8px 24px rgba(16,24,40,.06);
    --ui-shadow-hover:0 14px 34px rgba(16,24,40,.10);
}
body { background:var(--ui-bg); color:var(--ui-text); }
.panel,.metric,.product-card,.quick-action,.category-chip,.setting-row,.stock-current-card,.action-strip {
    transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.button,.table-button,.icon-button,.nav-item,.category-chip,.quick-action { transition:transform .14s ease,box-shadow .14s ease,background .14s ease,border-color .14s ease,color .14s ease; }
.button:hover:not(:disabled),.table-button:hover:not(:disabled),.icon-button:hover:not(:disabled),.quick-action:hover,.category-chip:hover { transform:translateY(-1px); box-shadow:var(--ui-shadow-hover); }
.button:active:not(:disabled),.table-button:active:not(:disabled),.icon-button:active:not(:disabled),.quick-action:active,.category-chip:active { transform:translateY(0); box-shadow:none; }
.topbar p:not(.eyebrow),.command-copy,.metric-detail,.section-head p { display:none !important; }
.products-content .compact-metrics { display:none !important; }
.sidebar-brand span { font-size:11px; }
.profile-button.active { border-color:#f0ccd4; background:var(--brand-red-50); }
.profile-button.active .profile-avatar { background:#fff; }
.nav-item:not(:disabled):focus-visible,.button:focus-visible,.table-button:focus-visible,.icon-button:focus-visible,.category-chip:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
    outline:none;
    box-shadow:0 0 0 4px var(--ui-focus);
}
.action-strip {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:14px;
    padding:14px;
    border-radius:22px;
    margin-bottom:14px;
    background:rgba(255,255,255,.94);
}
.action-summary { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.action-summary span {
    display:inline-flex;
    align-items:center;
    min-height:34px;
    padding:0 11px;
    border:1px solid var(--ui-line);
    border-radius:999px;
    background:var(--ui-surface-2);
    color:var(--ui-muted);
    font-size:12px;
    font-weight:750;
}
.action-summary .success-text { color:var(--success); background:var(--success-soft); border-color:#bee5d0; }
.action-summary .danger-text { color:var(--danger); background:var(--danger-soft); border-color:#f1bbb5; }
.refined-workspace {
    grid-template-columns:210px minmax(0,1fr) 330px;
    gap:14px;
    min-height:calc(100vh - 176px);
    margin-top:0;
}
.category-rail {
    position:sticky;
    top:104px;
    max-height:calc(100vh - 132px);
    overflow:hidden;
    padding:12px;
    display:flex;
    flex-direction:column;
    box-shadow:none;
}
.rail-title { padding:7px 8px 11px; color:var(--ui-muted); font-size:12px; letter-spacing:.08em; text-transform:uppercase; }
.category-chip-column { display:grid; gap:7px; overflow:auto; padding-right:2px; scrollbar-gutter:stable; }
.category-chip-column .category-chip {
    width:100%;
    justify-content:space-between;
    border-radius:12px;
    background:#fff;
    color:var(--ui-text);
}
.category-chip-column .category-chip.active { background:var(--ui-primary); color:#fff; border-color:var(--ui-primary); }
.catalog-board { min-height:calc(100vh - 176px); display:flex; flex-direction:column; box-shadow:none; }
.catalog-board .catalog-toolbar { flex:0 0 auto; border-bottom:1px solid var(--ui-line); padding:12px; }
.catalog-board .product-scroll {
    flex:1 1 auto;
    min-height:0;
    max-height:none;
    overflow:auto;
    padding:14px;
}
.category-section {
    border:1px solid var(--ui-line);
    border-radius:18px;
    background:#fff;
    margin-bottom:12px;
    overflow:hidden;
}
.category-section > summary {
    list-style:none;
    cursor:pointer;
    padding:13px 15px;
    border-bottom:1px solid var(--ui-line);
    background:linear-gradient(180deg,#fff,var(--ui-surface-2));
}
.category-section > summary::-webkit-details-marker { display:none; }
.category-section > summary div { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.category-section h3 { font-size:15px; }
.category-section summary span { color:var(--ui-muted); font-size:12px; font-weight:750; }
.category-section .product-card-grid { padding:12px; }
.product-card-grid { grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); }
.product-card {
    display:grid;
    grid-template-columns:74px minmax(0,1fr);
    gap:12px;
    padding:12px;
    border-radius:16px;
    box-shadow:none;
}
.product-card:hover { border-color:#d3d6dc; box-shadow:var(--ui-shadow-hover); transform:translateY(-1px); }
.product-thumb {
    width:74px;
    height:74px;
    margin:0;
    border-radius:16px;
    border:1px solid var(--ui-line);
    background:var(--ui-surface-2);
    overflow:hidden;
    display:grid;
    place-items:center;
    align-self:start;
}
.product-thumb.small { width:56px; height:56px; border-radius:14px; }
.product-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.product-thumb.fallback span {
    color:var(--ui-brand);
    font-size:18px;
    font-weight:900;
    letter-spacing:-.05em;
}
.product-card-title strong { text-transform:none; font-size:13px; }
.product-card-stats { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.product-card-stats span { padding:8px; }
.product-card-actions { border-top:0; padding-top:4px; }
.side-rail-card { position:sticky; top:104px; max-height:calc(100vh - 132px); padding:16px; box-shadow:none; }
.side-rail-card .section-head { margin-bottom:10px; }
.side-rail-card .movement-list { max-height:calc(100vh - 188px); }
.import-steps { display:none; }
.status-badge.ok { background:var(--success-soft)!important; color:var(--success)!important; border-color:#bee5d0!important; }
.status-badge.danger { background:var(--danger-soft)!important; color:var(--danger)!important; border-color:#f1bbb5!important; }
.status-badge.neutral { background:#eef0f3!important; color:#59606b!important; border-color:#dadde3!important; }
.management-dialog {
    background:rgba(255,255,255,.98);
    border:1px solid rgba(255,255,255,.6);
    box-shadow:0 24px 70px rgba(16,24,40,.22);
}
@supports ((backdrop-filter:blur(18px))) {
    .management-dialog { background:rgba(255,255,255,.92); backdrop-filter:blur(18px) saturate(122%); }
}
.management-dialog > .dialog-header { background:rgba(255,255,255,.92); backdrop-filter:blur(14px); }
.product-dialog { width:min(1120px,100%); }
.product-form-layout { display:grid; grid-template-columns:220px minmax(0,1fr); gap:22px; padding-top:22px; }
.product-form-media { position:sticky; top:22px; align-self:start; display:grid; gap:12px; }
.product-image-preview {
    aspect-ratio:1/1;
    width:100%;
    border:1px solid var(--ui-line);
    border-radius:24px;
    background:linear-gradient(180deg,#fff,var(--ui-surface-2));
    display:grid;
    place-items:center;
    overflow:hidden;
}
.product-image-preview img { width:100%; height:100%; object-fit:cover; }
.product-image-preview span { color:var(--ui-brand); font-size:46px; font-weight:900; letter-spacing:-.06em; }
.media-actions { display:grid; gap:8px; }
.barcode-editor { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:start; }
.barcode-actions { display:grid; gap:8px; min-width:150px; }
.price-result small span { display:inline; }
.stock-current-card {
    display:flex;
    align-items:center;
    gap:12px;
    padding:13px;
    border:1px solid var(--ui-line);
    border-radius:16px;
    background:var(--ui-surface-2);
    margin:18px 0;
}
.stock-current-card span,.stock-current-card strong { display:block; }
.stock-current-card span { color:var(--ui-muted); font-size:12px; font-weight:750; }
.stock-current-card strong { font-size:22px; letter-spacing:-.03em; }
.stock-impact {
    margin-top:16px;
    padding:12px 14px;
    border-radius:14px;
    border:1px solid var(--ui-line);
    background:var(--ui-surface-2);
    font-weight:800;
}
.stock-impact.ok { color:var(--success); background:var(--success-soft); border-color:#bee5d0; }
.stock-impact.danger { color:var(--danger); background:var(--danger-soft); border-color:#f1bbb5; }
.profile-page-grid,.admin-page-grid { display:grid; gap:16px; }
.profile-page-grid { grid-template-columns:minmax(0,1fr) 380px; }
.admin-page-grid { grid-template-columns:360px minmax(0,1fr); align-items:start; }
.admin-settings-card,.account-card { padding:22px; }
.info-list,.settings-list { display:grid; gap:10px; }
.info-list div,.setting-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:13px 0;
    border-bottom:1px solid var(--ui-line);
}
.info-list div:last-child,.setting-row:last-child { border-bottom:0; }
.info-list span,.setting-row span { display:block; color:var(--ui-muted); font-size:12px; margin-top:3px; }
.info-list strong,.setting-row strong { color:var(--ui-text); }
.compact-toolbar { padding:14px 16px; }
.scanner-backdrop { z-index:170; }
.scanner-dialog { width:min(560px,100%); padding:0; overflow:hidden; }
.scanner-dialog .dialog-header { padding:18px 20px 14px; margin:0; border-bottom:1px solid var(--ui-line); }
.scanner-body { position:relative; background:#111; min-height:340px; display:grid; place-items:center; overflow:hidden; }
.scanner-body video { width:100%; height:100%; min-height:340px; object-fit:cover; }
.scanner-frame { position:absolute; inset:82px 48px; border:2px solid rgba(255,255,255,.84); border-radius:22px; box-shadow:0 0 0 999px rgba(0,0,0,.22); }
.scanner-body p { position:absolute; left:18px; right:18px; bottom:14px; margin:0; color:#fff; text-align:center; font-size:13px; font-weight:750; text-shadow:0 1px 7px rgba(0,0,0,.6); }
.scanner-dialog .dialog-actions { margin:0; padding:14px 18px; background:#fff; }
@media (max-width:1280px) {
    .refined-workspace { grid-template-columns:190px minmax(0,1fr); }
    .side-rail-card { position:relative; top:auto; grid-column:1 / -1; max-height:340px; }
}
@media (max-width:960px) {
    .refined-workspace { grid-template-columns:1fr; }
    .category-rail { position:relative; top:auto; max-height:none; }
    .category-chip-column { display:flex; overflow:auto; }
    .category-chip-column .category-chip { width:auto; }
    .action-strip { grid-template-columns:1fr; }
    .command-actions { justify-content:flex-start; }
    .profile-page-grid,.admin-page-grid,.product-form-layout { grid-template-columns:1fr; }
    .product-form-media { position:relative; top:auto; grid-template-columns:180px minmax(0,1fr); align-items:center; }
    .product-image-preview { width:180px; }
}
@media (max-width:620px) {
    .product-card { grid-template-columns:58px minmax(0,1fr); }
    .product-thumb { width:58px; height:58px; border-radius:14px; }
    .product-card-stats { grid-template-columns:1fr; }
    .barcode-editor { grid-template-columns:1fr; }
    .barcode-actions,.media-actions { grid-template-columns:1fr; }
    .product-form-media { grid-template-columns:1fr; }
    .product-image-preview { width:100%; max-width:240px; }
}

/* v0.3.0.1 — satış, hesap ve kart çıktısı */
.sale-grid { display:grid; grid-template-columns:minmax(260px,320px) minmax(360px,1fr) minmax(320px,380px); gap:14px; align-items:stretch; }
.sale-account-panel,.sale-products-panel,.sale-cart-panel,.accounts-panel,.sales-panel { min-height:0; }
.sale-account-list,.sale-product-grid,.sale-cart-list,.accounts-list,.sales-list { display:grid; gap:9px; overflow:auto; scrollbar-gutter:stable; }
.sale-account-list { max-height:34vh; margin-top:10px; }
.sale-product-grid { grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); max-height:calc(100vh - 238px); padding:2px; }
.sale-cart-list { max-height:calc(100vh - 390px); min-height:220px; }
.sale-account-card,.sale-product-button,.sale-cart-row,.account-card,.sale-history-row { border:1px solid var(--line); background:#fff; border-radius:16px; display:grid; align-items:center; gap:10px; }
.sale-account-card { grid-template-columns:auto minmax(0,1fr) auto; padding:10px; text-align:left; width:100%; color:var(--ink); }
.sale-account-card strong,.sale-product-button strong,.account-card strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sale-account-card small,.sale-product-button small,.account-card small,.sale-history-row span { display:block; color:var(--muted); font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sale-account-card.active { border-color:var(--brand-red); box-shadow:0 0 0 3px rgba(189,18,49,.08); }
.sale-account-card.is-test,.sale-product-button.is-test,.sale-cart-row.is-test,.account-card.is-test,.sale-history-row.is-test { background:#fbfbfc; border-style:dashed; }
.sale-product-button { grid-template-columns:auto minmax(0,1fr) auto; padding:11px; text-align:left; color:var(--ink); min-height:76px; }
.sale-product-button.is-critical { border-color:#efc1ba; background:#fffafa; }
.selected-account-summary,.muted-box { margin-top:12px; border:1px solid var(--line); border-radius:16px; padding:12px; background:var(--surface-2); display:grid; gap:4px; }
.selected-account-summary span,.selected-account-summary em { color:var(--muted); font-size:12px; font-style:normal; }
.selected-account-summary b { font-size:22px; }
.sale-test-mode { margin-top:12px; }
.sale-cart-row { grid-template-columns:minmax(0,1fr) auto auto auto; padding:10px; }
.cart-qty { display:flex; align-items:center; gap:6px; }
.cart-qty b { min-width:70px; text-align:center; font-size:12px; }
.sale-total-card { margin-top:auto; border-radius:18px; border:1px solid var(--line); background:var(--surface-2); padding:14px; display:grid; gap:8px; }
.sale-total-card span,.sale-total-card strong { display:flex; justify-content:space-between; gap:10px; }
.sale-total-card strong { font-size:20px; border-top:1px solid var(--line); padding-top:10px; }
.sale-total-card em { color:var(--muted); font-style:normal; font-size:12px; }
.accounts-list { max-height:calc(100vh - 330px); min-height:340px; padding:12px; }
.account-card { grid-template-columns:auto minmax(0,1fr) auto auto; padding:12px; }
.account-card-balance { display:grid; gap:6px; justify-items:end; }
.free-product-list { max-height:180px; overflow:auto; display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:7px; border:1px solid var(--line); border-radius:14px; padding:10px; background:#fff; }
.compact-check { min-height:38px; padding:8px 10px; }
.sales-list { max-height:calc(100vh - 310px); padding:12px; }
.sale-history-row { grid-template-columns:minmax(0,1fr) auto; padding:13px; }
.cards-dialog { width:min(1040px,100%); }
.cards-print-area { padding:20px 28px; overflow:auto; display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px; scrollbar-gutter:stable; }
.print-card { background:#fff; border:1px solid #d8dbe1; border-radius:18px; padding:14px; min-height:190px; display:grid; gap:8px; break-inside:avoid; position:relative; }
.print-card-head { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.print-card-head img { max-height:34px; max-width:150px; object-fit:contain; }
.print-card h3 { margin:4px 0 0; font-size:20px; letter-spacing:-.02em; }
.print-card p { margin:0; color:#555; min-height:18px; }
.print-card-codes { display:grid; grid-template-columns:88px 1fr; gap:10px; align-items:center; }
.print-card .qr-code { width:82px; height:82px; }
.print-card .code128 { width:100%; height:76px; }
.print-card > strong { letter-spacing:.12em; font-size:13px; }
.print-card > em { position:absolute; right:12px; bottom:10px; font-style:normal; color:#a1a1aa; font-weight:800; letter-spacing:.18em; }
.test-check span { color:var(--muted); }
@media (max-width:1180px) { .sale-grid { grid-template-columns:1fr; } .sale-product-grid,.sale-cart-list,.sale-account-list { max-height:none; } }
@media (max-width:760px) { .account-card { grid-template-columns:auto minmax(0,1fr); } .account-card-balance,.account-card .row-actions { grid-column:1 / -1; justify-items:start; } .cards-print-area { grid-template-columns:1fr; padding:16px; } }
@media print {
    body * { visibility:hidden !important; }
    .cards-print-area,.cards-print-area * { visibility:visible !important; }
    .dialog-backdrop { position:static !important; background:#fff !important; padding:0 !important; }
    .management-dialog { box-shadow:none !important; border:0 !important; width:100% !important; max-height:none !important; }
    .management-dialog > .dialog-header,.management-dialog > .dialog-actions { display:none !important; }
    .cards-print-area { position:absolute; left:0; top:0; display:grid; grid-template-columns:repeat(2, 1fr); gap:10mm; padding:0 !important; overflow:visible !important; }
    .print-card { border:1px solid #000; border-radius:4mm; page-break-inside:avoid; }
}
@media (max-width:760px) {
    .nav-list { grid-template-columns:repeat(6,1fr); }
    .nav-item:nth-child(n) { display:grid; }
    .nav-item { min-height:52px; }
}
