:root {
    --bg: #f3f6f9;
    --panel: #ffffff;
    --text: #111827;
    --muted: #667085;
    --line: #e5e9ef;
    --primary: #0b8f70;
    --primary-dark: #066a57;
    --primary-soft: #e7f8f2;
    --sidebar: #062d2c;
    --sidebar-muted: #8fb7ae;
    --danger: #b42318;
    --danger-soft: #fff0ee;
    --success: #087a5b;
    --shadow: 0 18px 50px rgba(16, 24, 40, .09);
    --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; }
button, input { font: inherit; }

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--primary); color: white; font-weight: 800; letter-spacing: -.04em; box-shadow: 0 7px 18px rgba(23,107,91,.18); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }

.auth-body { min-height: 100vh; background: radial-gradient(circle at 15% 20%, rgba(23,107,91,.10), transparent 30%), #f7f9fb; }
.auth-shell { min-height: 100vh; width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 20px; display: flex; flex-direction: column; }
.auth-brand-wrap { margin-bottom: 24px; }
.auth-grid { flex: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 68px; align-items: center; padding: 20px 0 54px; }
.auth-hero { max-width: 590px; }
.eyebrow { color: var(--primary); font-weight: 800; letter-spacing: .14em; font-size: 11px; }
.auth-hero h1, .register-intro h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.04; letter-spacing: -.052em; margin: 14px 0 22px; }
.auth-hero > p, .register-intro > p { color: var(--muted); font-size: 17px; line-height: 1.75; max-width: 560px; }
.hero-points { display: grid; gap: 12px; margin-top: 32px; }
.hero-points > div { display: grid; grid-template-columns: 40px 1fr; gap: 0 13px; align-items: center; padding: 11px 0; }
.hero-points span { grid-row: span 2; color: var(--primary); font-size: 12px; font-weight: 800; border: 1px solid #cfe1dc; background: white; border-radius: 10px; width: 40px; height: 40px; display: grid; place-items: center; }
.hero-points strong { font-size: 14px; }
.hero-points small { color: var(--muted); margin-top: 3px; }

.auth-card, .register-card { background: rgba(255,255,255,.96); border: 1px solid rgba(221,226,232,.9); border-radius: 24px; box-shadow: var(--shadow); padding: 34px; }
.auth-card-wrap { width: 100%; max-width: 490px; justify-self: end; }
.card-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.card-icon { width: 43px; height: 43px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 20px; font-weight: 800; }
.card-heading h2 { margin: 0 0 5px; font-size: 24px; letter-spacing: -.025em; }
.card-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: flex; justify-content: space-between; gap: 10px; color: #344054; font-weight: 650; font-size: 12px; margin-bottom: 7px; }
.field em { color: #98a2b3; font-style: normal; font-weight: 500; }
.field input { width: 100%; height: 48px; border: 1px solid #d7dde5; border-radius: 11px; padding: 0 14px; background: #fff; color: var(--text); outline: none; transition: .15s ease; }
.field input:focus { border-color: #82b5aa; box-shadow: 0 0 0 4px rgba(23,107,91,.08); }
.check-row { display: flex; gap: 9px; align-items: flex-start; color: #475467; font-size: 12px; line-height: 1.5; margin: 5px 0 18px; }
.check-row input { margin-top: 2px; accent-color: var(--primary); }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 9px; border: 0; border-radius: 11px; min-height: 46px; padding: 0 18px; text-decoration: none; font-weight: 700; cursor: pointer; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 8px 20px rgba(23,107,91,.16); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-block { width: 100%; }
.btn-ghost { background: #f7f8fa; color: #344054; border: 1px solid #e4e7ec; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 12px; }
.auth-switch { text-align: center; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.auth-switch a { color: var(--primary); font-weight: 700; text-decoration: none; }
.error-box { background: var(--danger-soft); color: var(--danger); border: 1px solid #ffd2cc; border-radius: 11px; padding: 12px 14px; margin-bottom: 18px; font-size: 12px; line-height: 1.6; }
.flash { border-radius: 12px; padding: 12px 15px; margin: 0 0 16px; font-size: 13px; }
.flash-success { color: #05603a; background: #e9f8f1; border: 1px solid #b7ebd3; }
.flash-error { color: var(--danger); background: var(--danger-soft); border: 1px solid #ffd2cc; }
.auth-footer { text-align: center; color: #98a2b3; font-size: 11px; padding-top: 8px; }

.register-shell { flex: 1; display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: start; padding: 20px 0 48px; }
.register-intro { padding-top: 55px; }
.register-intro h1 { font-size: clamp(38px, 4.4vw, 56px); }
.setup-steps { margin-top: 34px; display: grid; gap: 14px; }
.setup-step { display: flex; gap: 12px; align-items: center; color: #98a2b3; }
.setup-step > span { width: 34px; height: 34px; border-radius: 10px; background: #eef1f4; display: grid; place-items: center; font-weight: 800; font-size: 11px; }
.setup-step strong, .setup-step small { display: block; }
.setup-step strong { font-size: 13px; }
.setup-step small { font-size: 11px; margin-top: 2px; }
.setup-step.active { color: var(--text); }
.setup-step.active > span { background: var(--primary); color: white; }
.register-card { max-width: 650px; justify-self: end; width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.span-2 { grid-column: span 2; }
.form-section-title { margin: 25px 0 13px; color: #344054; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.form-section-title:first-of-type { margin-top: 0; }
.password-hint { color: #7c8798; font-size: 11px; margin: -5px 0 15px; line-height: 1.5; }
.terms { margin-top: 4px; }

.app-body { background: #f4f6f8; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--sidebar); color: white; padding: 22px 16px; display: flex; flex-direction: column; z-index: 30; }
.brand-sidebar { color: white; padding: 0 7px 20px; }
.brand-sidebar small { color: var(--sidebar-muted); }
.nav-list { display: grid; gap: 4px; margin-top: 14px; }
.nav-item { min-height: 43px; padding: 0 11px; border-radius: 10px; display: flex; align-items: center; gap: 11px; text-decoration: none; color: #cbd8da; font-size: 13px; font-weight: 600; }
.nav-item span { width: 18px; text-align: center; color: #91aaa9; }
.nav-item em { margin-left: auto; font-style: normal; font-size: 8px; text-transform: uppercase; color: #668084; }
.nav-item.active { background: rgba(255,255,255,.09); color: white; }
.nav-item.active span { color: #90dfca; }
.nav-item.disabled { cursor: default; }
.nav-caption { color: #668084; text-transform: uppercase; font-size: 9px; font-weight: 800; letter-spacing: .13em; padding: 20px 11px 6px; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 15px; }
.org-pill { display: flex; gap: 10px; align-items: center; padding: 8px; }
.avatar, .user-avatar { display: grid; place-items: center; border-radius: 10px; font-weight: 800; }
.avatar { width: 34px; height: 34px; background: rgba(144,223,202,.13); color: #90dfca; }
.org-pill strong, .org-pill small { display: block; }
.org-pill strong { max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.org-pill small { color: var(--sidebar-muted); font-size: 9px; margin-top: 3px; text-transform: uppercase; }
.main-content { min-width: 0; }
.topbar { height: 72px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 30px; position: sticky; top: 0; z-index: 20; }
.topbar-spacer { flex: 1; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 36px; height: 36px; background: var(--primary-soft); color: var(--primary); font-size: 11px; }
.user-meta strong, .user-meta small { display: block; }
.user-meta strong { font-size: 11px; }
.user-meta small { color: #98a2b3; font-size: 9px; margin-top: 2px; }
.mobile-menu { display: none; border: 0; background: #f2f4f7; width: 38px; height: 38px; border-radius: 9px; }
.page-content { padding: 34px 34px 45px; max-width: 1500px; width: 100%; margin: 0 auto; }
.page-content > .flash { margin-bottom: 22px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 27px; }
.page-head h1 { font-size: 30px; margin: 8px 0 7px; letter-spacing: -.035em; }
.page-head p { color: var(--muted); margin: 0; font-size: 13px; }
.trial-badge { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 11px 15px; min-width: 160px; }
.trial-badge span, .trial-badge strong, .trial-badge small { display: block; }
.trial-badge span { color: #98a2b3; font-size: 9px; text-transform: uppercase; }
.trial-badge strong { font-size: 13px; margin-top: 3px; text-transform: capitalize; }
.trial-badge small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; }
.stat-card, .panel { background: white; border: 1px solid var(--line); border-radius: 15px; }
.stat-card { padding: 19px; min-height: 126px; }
.stat-label { display: block; color: #98a2b3; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat-card strong { display: block; font-size: 22px; letter-spacing: -.03em; margin: 19px 0 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.stat-card small { color: var(--muted); font-size: 10px; }
.content-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 15px; margin-top: 15px; }
.panel { padding: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 18px; }
.panel-head h2 { font-size: 18px; margin: 7px 0 0; letter-spacing: -.02em; }
.status-dot { background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 6px 9px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.module-list { display: grid; }
.module-row { min-height: 70px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; border-top: 1px solid #edf0f3; color: #667085; }
.module-row:first-child { border-top: 0; }
.module-number { color: #98a2b3; font-size: 10px; font-weight: 800; }
.module-row strong, .module-row small { display: block; }
.module-row strong { font-size: 12px; color: #344054; }
.module-row small { font-size: 10px; margin-top: 4px; }
.module-row b { font-size: 9px; color: #98a2b3; }
.module-row.done b { color: var(--success); font-size: 16px; }
.module-row.next { background: linear-gradient(90deg, rgba(234,246,242,.6), transparent); }
.module-row.next b { color: var(--primary); }
.permission-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.permission-cloud span { background: #f6f8fa; color: #475467; border: 1px solid #e7ebef; padding: 6px 8px; border-radius: 7px; font-size: 9px; }
.app-footer { color: #98a2b3; font-size: 10px; padding: 0 34px 22px; }

@media (max-width: 980px) {
    .auth-grid, .register-shell { grid-template-columns: 1fr; gap: 34px; }
    .auth-hero, .register-intro { max-width: 720px; padding-top: 10px; }
    .auth-card-wrap, .register-card { max-width: 720px; justify-self: stretch; }
    .auth-hero h1, .register-intro h1 { font-size: 44px; }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: -275px; width: 260px; transition: left .2s ease; box-shadow: 12px 0 30px rgba(0,0,0,.18); }
    .sidebar-open .sidebar { left: 0; }
    .mobile-menu { display: block; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .auth-shell { width: min(100% - 24px, 1220px); padding-top: 18px; }
    .auth-brand-wrap { margin-bottom: 10px; }
    .auth-grid, .register-shell { padding-top: 8px; }
    .auth-hero h1, .register-intro h1 { font-size: 36px; }
    .auth-hero > p, .register-intro > p { font-size: 14px; }
    .auth-card, .register-card { padding: 22px; border-radius: 18px; }
    .grid-2 { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .topbar { padding: 0 14px; }
    .user-meta { display: none; }
    .page-content { padding: 24px 14px 38px; }
    .page-head { align-items: flex-start; flex-direction: column; }
    .trial-badge { width: 100%; }
    .stats-grid { grid-template-columns: 1fr; }
    .panel { padding: 17px; }
    .module-row { grid-template-columns: 32px 1fr; padding: 10px 0; }
    .module-row b { grid-column: 2; }
}

/* ===== Modul 02: echipă, roluri, organizație ===== */
button, input, select, textarea { font: inherit; }
select, textarea { color: var(--text); }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #f4c5c0; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-secondary { background: #eef6f3; color: var(--primary); border: 1px solid #cde3dc; }
.btn-secondary:hover { background: #e3f1ec; }
.btn-icon { min-width: 38px; min-height: 36px; padding: 0 10px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.field select, .field textarea {
    width: 100%; border: 1px solid #d7dde5; border-radius: 11px; padding: 0 14px; background: #fff; outline: none; transition: .15s ease;
}
.field select { height: 48px; }
.field textarea { min-height: 102px; padding-top: 12px; resize: vertical; }
.field select:focus, .field textarea:focus { border-color: #82b5aa; box-shadow: 0 0 0 4px rgba(23,107,91,.08); }
.help-text { margin: -7px 0 16px; color: #7c8798; font-size: 11px; line-height: 1.55; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

.table-panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.table-toolbar { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.table-toolbar h2 { margin: 0; font-size: 17px; }
.table-toolbar p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th { padding: 12px 18px; background: #fafbfc; border-bottom: 1px solid var(--line); text-align: left; color: #7c8798; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.data-table td { padding: 15px 18px; border-bottom: 1px solid #edf0f3; vertical-align: middle; font-size: 12px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfd; }
.cell-user { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.mini-avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.cell-user strong, .cell-user small { display: block; }
.cell-user strong { font-size: 12px; }
.cell-user small { color: #98a2b3; margin-top: 3px; font-size: 10px; }
.table-actions { display: flex; justify-content: flex-end; gap: 7px; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 8px; font-size: 9px; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.badge-success { color: #05603a; background: #e9f8f1; }
.badge-muted { color: #667085; background: #f1f3f5; }
.badge-warning { color: #8a4b08; background: #fff4dc; }
.badge-danger { color: #b42318; background: var(--danger-soft); }
.role-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.role-tag { background: #f5f7f9; border: 1px solid #e5e9ef; color: #475467; border-radius: 7px; padding: 4px 7px; font-size: 9px; white-space: nowrap; }
.empty-state { padding: 46px 20px; text-align: center; }
.empty-state strong { display: block; font-size: 16px; margin-bottom: 7px; }
.empty-state p { color: var(--muted); font-size: 12px; margin: 0 auto 17px; max-width: 420px; }
.section-gap { margin-top: 16px; }

.form-panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 22px; }
.form-panel h2 { margin: 0 0 5px; font-size: 18px; }
.form-panel > p, .form-intro { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.form-columns { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(260px,.6fr); gap: 16px; align-items: start; }
.side-panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 20px; }
.side-panel h3 { margin: 0 0 8px; font-size: 14px; }
.side-panel p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; }
.info-list { display: grid; gap: 11px; margin-top: 17px; }
.info-line { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid #edf0f3; padding-top: 11px; font-size: 11px; }
.info-line span { color: var(--muted); }
.info-line strong { text-align: right; }

.role-selector { display: grid; gap: 9px; }
.role-option { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid #e4e7ec; border-radius: 11px; cursor: pointer; }
.role-option:hover { border-color: #bbd6cf; background: #fbfdfc; }
.role-option input { margin-top: 2px; accent-color: var(--primary); }
.role-option strong, .role-option small { display: block; }
.role-option strong { font-size: 12px; }
.role-option small { color: var(--muted); font-size: 10px; line-height: 1.45; margin-top: 3px; }

.permission-matrix { display: grid; gap: 12px; margin-top: 18px; }
.permission-group { border: 1px solid #e4e7ec; border-radius: 12px; overflow: hidden; }
.permission-group-head { padding: 11px 13px; background: #f8fafb; border-bottom: 1px solid #e8ecf0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.permission-group-head strong { font-size: 11px; text-transform: capitalize; }
.permission-items { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
.permission-item { display: flex; align-items: flex-start; gap: 9px; padding: 12px 13px; border-bottom: 1px solid #edf0f3; }
.permission-item:nth-child(odd) { border-right: 1px solid #edf0f3; }
.permission-item input { margin-top: 2px; accent-color: var(--primary); }
.permission-item strong, .permission-item small { display: block; }
.permission-item strong { font-size: 11px; }
.permission-item small { color: #98a2b3; font-size: 9px; margin-top: 3px; line-height: 1.45; }

.invite-link-box { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 14px 0; }
.invite-link-box input { min-width: 0; height: 44px; border: 1px solid #d7dde5; border-radius: 10px; padding: 0 12px; background: #f9fafb; font-size: 11px; }
.callout { border-radius: 12px; padding: 14px 16px; font-size: 11px; line-height: 1.6; }
.callout-info { background: #f0f7ff; border: 1px solid #cfe4fb; color: #315b7d; }
.callout-warning { background: #fff8e7; border: 1px solid #f3dfad; color: #795516; }

.roles-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.role-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 18px; display: flex; flex-direction: column; min-height: 205px; }
.role-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.role-card h3 { margin: 0; font-size: 15px; }
.role-card p { color: var(--muted); font-size: 10px; line-height: 1.55; margin: 8px 0 18px; }
.role-card-stats { display: flex; gap: 20px; margin-top: auto; border-top: 1px solid #edf0f3; padding-top: 13px; }
.role-card-stats span, .role-card-stats strong { display: block; }
.role-card-stats span { color: #98a2b3; font-size: 9px; text-transform: uppercase; }
.role-card-stats strong { font-size: 14px; margin-top: 3px; }
.role-card-actions { display: flex; gap: 7px; margin-top: 13px; }

@media (max-width: 1100px) {
    .roles-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .form-columns { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .roles-grid { grid-template-columns: 1fr; }
    .permission-items { grid-template-columns: 1fr; }
    .permission-item:nth-child(odd) { border-right: 0; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .form-actions { align-items: stretch; flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .invite-link-box { grid-template-columns: 1fr; }
}

/* ===== Modul 03: gestiuni / magazine / depozite ===== */
.location-toolbar { align-items: flex-start; }
.location-filters { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.location-filters input,
.location-filters select { height: 36px; border: 1px solid #d7dde5; border-radius: 9px; background: #fff; padding: 0 10px; color: var(--text); outline: none; font-size: 11px; }
.location-filters input { width: 220px; }
.location-filters select { min-width: 135px; }
.location-filters input:focus,
.location-filters select:focus { border-color: #82b5aa; box-shadow: 0 0 0 3px rgba(23,107,91,.07); }

.location-cell { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.location-cell strong, .location-cell small { display: block; }
.location-cell strong { font-size: 12px; }
.location-cell small { color: #98a2b3; font-size: 10px; margin-top: 3px; }
.location-icon { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; font-size: 10px; font-weight: 900; }
.location-icon.store { background: #eaf6f2; color: #176b5b; }
.location-icon.warehouse { background: #edf3ff; color: #375b9a; }
.location-icon.large { width: 46px; height: 46px; border-radius: 13px; font-size: 12px; }
.type-tag { display: inline-flex; border-radius: 8px; padding: 5px 8px; font-size: 9px; font-weight: 800; }
.type-tag.store { background: #eaf6f2; color: #176b5b; }
.type-tag.warehouse { background: #edf3ff; color: #375b9a; }
.table-main-text { display: block; font-size: 11px; }
.table-sub-text { display: block; color: #98a2b3; margin-top: 4px; font-size: 9px; max-width: 290px; white-space: normal; line-height: 1.35; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); font-size: 22px; }
.location-summary-head { display: flex; align-items: center; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.location-summary-head h3 { margin: 0 0 3px; }
.location-summary-head p { margin: 0; }
.location-status-action { display: grid; gap: 11px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.location-status-action form { margin: 0; }

.quick-actions-list { display: grid; gap: 9px; }
.quick-action { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; text-decoration: none; padding: 11px; border: 1px solid #e5e9ef; border-radius: 12px; background: #fff; transition: .15s ease; }
.quick-action:hover { border-color: #bfd8d1; background: #fbfdfc; transform: translateY(-1px); }
.quick-action > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-weight: 900; }
.quick-action strong, .quick-action small { display: block; }
.quick-action strong { font-size: 12px; }
.quick-action small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.quick-action b { color: #98a2b3; }

@media (max-width: 980px) {
    .location-toolbar { flex-direction: column; }
    .location-filters { width: 100%; justify-content: flex-start; }
}
@media (max-width: 620px) {
    .location-filters { display: grid; grid-template-columns: 1fr 1fr; }
    .location-filters input { width: 100%; grid-column: span 2; }
    .location-filters select { min-width: 0; width: 100%; }
    .location-filters .btn { width: 100%; }
}

/* ===== Modul 04: produse / categorii / producători ===== */
.catalog-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; width: fit-content; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.catalog-tab { text-decoration: none; padding: 9px 14px; border-radius: 8px; color: #667085; font-size: 11px; font-weight: 750; white-space: nowrap; }
.catalog-tab:hover { background: #f7f9fa; color: #344054; }
.catalog-tab.active { background: var(--primary-soft); color: var(--primary); }
.catalog-toolbar { align-items: flex-start; }
.product-filters { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; max-width: 850px; }
.product-filters input,
.product-filters select { height: 36px; border: 1px solid #d7dde5; border-radius: 9px; background: #fff; padding: 0 10px; color: var(--text); outline: none; font-size: 11px; }
.product-filters input { width: 210px; }
.product-filters select { min-width: 145px; max-width: 220px; }
.product-filters input:focus,
.product-filters select:focus { border-color: #82b5aa; box-shadow: 0 0 0 3px rgba(23,107,91,.07); }

.product-cell { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.product-cell strong, .product-cell small { display: block; }
.product-cell strong { font-size: 12px; }
.product-cell small { color: #98a2b3; font-size: 10px; margin-top: 3px; }
.product-icon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #f1f4ff; color: #4c5fa8; font-size: 10px; font-weight: 900; }
.product-icon.large { width: 46px; height: 46px; border-radius: 13px; font-size: 12px; }
.mono-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; color: #475467; white-space: nowrap; }
.package-qty { display: inline-flex; padding: 5px 8px; border-radius: 8px; background: #f5f7f9; font-size: 10px; white-space: nowrap; }
.product-summary-head { display: flex; align-items: center; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.product-summary-head h3 { margin: 0 0 3px; font-size: 14px; }
.product-summary-head p { margin: 0; color: var(--muted); font-size: 10px; }

.category-tree-cell { min-width: 300px; display: flex; align-items: center; gap: 9px; padding-left: calc(var(--depth) * 20px); }
.category-tree-cell .category-node { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--primary-soft); color: var(--primary); font-weight: 900; }
.category-tree-cell strong, .category-tree-cell small { display: block; }
.category-tree-cell strong { font-size: 12px; }
.category-tree-cell small { color: #98a2b3; font-size: 9px; margin-top: 3px; max-width: 500px; white-space: normal; }
.level-badge { display: inline-flex; border-radius: 7px; padding: 4px 7px; background: #f5f7f9; color: #667085; font-size: 9px; font-weight: 700; white-space: nowrap; }
.catalog-example-tree { display: grid; gap: 8px; padding: 14px; background: #f8fafb; border: 1px solid #e7ebef; border-radius: 12px; font-size: 11px; }
.catalog-example-tree strong { color: #344054; }
.catalog-example-tree span { padding-left: 14px; color: #667085; }
.catalog-example-tree .indent-2 { padding-left: 32px; }

.manufacturer-cell { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.manufacturer-cell > span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fff4e7; color: #9a5a18; font-weight: 900; font-size: 10px; }
.manufacturer-cell strong { font-size: 12px; }

.input-with-suffix { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: stretch; }
.input-with-suffix input { border-radius: 11px 0 0 11px; }
.input-with-suffix > span { display: grid; place-items: center; min-width: 62px; padding: 0 13px; border: 1px solid #d7dde5; border-left: 0; border-radius: 0 11px 11px 0; background: #f7f8fa; color: #667085; font-size: 11px; font-weight: 700; }
.form-section-title > span { color: #98a2b3; font-weight: 600; letter-spacing: 0; text-transform: none; }
.inline-manage-links { display: flex; flex-wrap: wrap; gap: 12px; margin: -6px 0 18px; }
.inline-manage-links a { color: var(--primary); font-size: 10px; font-weight: 750; text-decoration: none; }
.inline-manage-links a:hover { text-decoration: underline; }

@media (max-width: 1100px) {
    .catalog-toolbar { flex-direction: column; }
    .product-filters { width: 100%; justify-content: flex-start; }
}
@media (max-width: 700px) {
    .catalog-tabs { width: 100%; }
    .catalog-tab { flex: 1; text-align: center; }
    .product-filters { display: grid; grid-template-columns: 1fr 1fr; }
    .product-filters input { width: 100%; grid-column: span 2; }
    .product-filters select { min-width: 0; max-width: none; width: 100%; }
    .product-filters .btn { width: 100%; }
    .category-tree-cell { min-width: 260px; }
}

/* ===== Patch 04.2: CSV, ID API & listări modernizate ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 14px; }
.span-3 { grid-column: span 3; }

.btn-svg { width: 16px; height: 16px; flex: 0 0 auto; }
.nav-item span svg { width: 17px; height: 17px; display: block; margin: 0 auto; }
.empty-icon svg { width: 24px; height: 24px; }

.table-panel { box-shadow: 0 8px 26px rgba(16, 24, 40, .035); }
.data-table th { font-size: 9px; letter-spacing: .065em; font-weight: 800; color: #8490a3; }
.data-table td { padding-top: 14px; padding-bottom: 14px; }
.data-table tbody tr { transition: background .15s ease, box-shadow .15s ease; }
.data-table tbody tr:hover { background: #f9fbfb; box-shadow: inset 3px 0 0 rgba(23,107,91,.28); }
.table-actions { display: flex; justify-content: flex-end; gap: 7px; }

.entity-cell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.entity-cell strong, .entity-cell small { display: block; }
.entity-cell strong { font-size: 12px; letter-spacing: -.01em; }
.entity-cell small { margin-top: 4px; color: #98a2b3; font-size: 9px; }
.entity-icon { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; border: 1px solid transparent; }
.entity-icon svg { width: 20px; height: 20px; }
.entity-icon.large { width: 48px; height: 48px; border-radius: 14px; }
.entity-icon.large svg { width: 23px; height: 23px; }
.entity-icon.product { background: #f0f3ff; border-color: #e1e6fb; color: #4d60a8; }
.entity-icon.store { background: #eaf6f2; border-color: #d8ece6; color: #176b5b; }
.entity-icon.warehouse { background: #edf3ff; border-color: #dce6f8; color: #375b9a; }
.entity-icon.manufacturer { background: #fff5e9; border-color: #f4e4cd; color: #9a5a18; }
.entity-icon.upload { background: #eef8f5; border-color: #d6ece6; color: var(--primary); }

.entity-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; color: #98a2b3; font-size: 9px; }
.entity-meta > span:first-child { white-space: nowrap; }
.api-chip { display: inline-flex !important; align-items: center; gap: 4px; max-width: 180px; padding: 3px 6px; border-radius: 6px; background: #f4f6f8; color: #667085; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.api-chip svg { width: 11px; height: 11px; flex: 0 0 auto; }

.location-cell, .product-cell { gap: 12px; }
.manufacturer-cell { min-width: 220px; }
.manufacturer-cell > div strong, .manufacturer-cell > div small { display: block; }
.manufacturer-cell > div small { color: #98a2b3; font-size: 9px; margin-top: 4px; }

.category-tree-cell { position: relative; gap: 10px; min-height: 38px; padding-left: calc(var(--depth) * 24px); }
.category-tree-cell .category-node { width: 34px; height: 34px; border-radius: 10px; background: #eef8f5; border: 1px solid #dceee8; color: var(--primary); }
.category-tree-cell .category-node svg { width: 17px; height: 17px; }
.category-tree-cell::before { content: ''; position: absolute; left: calc(var(--depth) * 24px - 12px); top: -16px; bottom: -16px; width: 1px; background: #edf0f3; opacity: 0; }
.category-tree-cell.has-parent::before { opacity: 1; }

.import-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); gap: 18px; align-items: start; }
.import-panel { min-width: 0; }
.import-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.import-panel-head h2 { margin: 0 0 4px; }
.import-panel-head p { margin: 0; }
.csv-dropzone { min-height: 230px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border: 1.5px dashed #cbd5df; border-radius: 16px; background: linear-gradient(180deg, #fbfcfd, #f7faf9); padding: 30px; cursor: pointer; transition: .15s ease; }
.csv-dropzone:hover { border-color: #86b9ad; background: #f6fbf9; }
.csv-dropzone input { width: min(420px, 100%); margin: 16px 0 12px; border: 1px solid #d7dde5; border-radius: 10px; padding: 9px; background: #fff; color: #475467; }
.csv-dropzone strong { font-size: 14px; }
.csv-dropzone small { margin-top: 5px; color: #98a2b3; font-size: 10px; }
.csv-drop-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: var(--primary-soft); color: var(--primary); }
.csv-drop-icon svg { width: 25px; height: 25px; }

.import-help h3 { margin-bottom: 17px; }
.import-step { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid #edf0f3; }
.import-step:last-of-type { border-bottom: 0; }
.import-step > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 850; }
.import-step strong, .import-step small { display: block; }
.import-step strong { font-size: 11px; }
.import-step small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }

.import-summary { display: flex; align-items: center; gap: 13px; padding: 17px 19px; border: 1px solid #cde8df; border-radius: 14px; background: #f4fbf8; }
.import-summary-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: #e2f5ee; color: var(--primary); }
.import-summary-icon svg { width: 22px; height: 22px; }
.import-summary h2 { margin: 0 0 4px; font-size: 15px; }
.import-summary p { margin: 0; color: var(--muted); font-size: 11px; }
.import-errors { margin-top: 12px; padding: 15px 17px; border: 1px solid #f1d0cc; background: #fff8f7; border-radius: 13px; color: #7a271a; }
.import-errors > strong { display: block; margin-bottom: 9px; font-size: 11px; }
.import-error-list { max-height: 250px; overflow: auto; display: grid; gap: 5px; font-size: 10px; line-height: 1.45; }

@media (max-width: 980px) {
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .span-3 { grid-column: span 2; }
    .import-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .grid-3 { grid-template-columns: 1fr; }
    .span-3 { grid-column: span 1; }
    .csv-dropzone { min-height: 200px; padding: 22px 16px; }
    .entity-meta { align-items: flex-start; flex-direction: column; }
}
.manufacturer-cell > .entity-icon { width: 40px; height: 40px; border-radius: 12px; font-size: inherit; font-weight: normal; }

/* ===== Patch 04.3: resetare sigură date ===== */
.danger-zone-card {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    align-items: center;
    gap: 15px;
    background: #fff;
    border: 1px solid #f0d3cf;
    border-radius: 15px;
    padding: 18px 20px;
}
.danger-zone-icon,
.danger-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--danger-soft);
    color: var(--danger);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}
.danger-zone-icon svg,
.danger-icon svg { width: 21px; height: 21px; }
.danger-zone-copy h3 { margin: 3px 0 5px; font-size: 14px; }
.danger-zone-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; max-width: 760px; }

.reset-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(250px,.55fr); gap: 16px; align-items: start; }
.danger-panel { border-color: #f0d3cf; }
.danger-panel-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 20px; }
.danger-panel-head h2 { margin: 3px 0 5px; }
.danger-panel-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.reset-options { display: grid; gap: 10px; }
.reset-option {
    position: relative;
    display: grid;
    grid-template-columns: 20px 40px minmax(0,1fr) auto;
    align-items: center;
    gap: 11px;
    border: 1px solid #e3e7ec;
    border-radius: 13px;
    padding: 14px;
    cursor: pointer;
    transition: .15s ease;
}
.reset-option:hover { border-color: #e2b6b0; background: #fffdfd; }
.reset-option:has(input:checked) { border-color: #d99b94; background: #fff8f7; box-shadow: 0 0 0 3px rgba(180,35,24,.04); }
.reset-option input { width: 17px; height: 17px; accent-color: var(--danger); }
.reset-option-icon { width: 40px; height: 40px; border-radius: 11px; background: #f5f7f9; color: #667085; display: grid; place-items: center; }
.reset-option-icon svg { width: 20px; height: 20px; }
.reset-option-copy strong, .reset-option-copy small { display: block; }
.reset-option-copy strong { font-size: 12px; }
.reset-option-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.reset-count { min-width: 34px; text-align: center; padding: 5px 8px; border-radius: 999px; background: #f3f5f7; color: #475467; font-size: 10px; font-weight: 800; }
.reset-warning { margin-top: 14px; }
.reset-confirm-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.field-note { display: block; margin-top: 6px; color: #8a94a3; font-size: 9px; line-height: 1.45; }
.btn-danger-solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger-solid:hover { background: #962016; color: #fff; }
.reset-summary { position: sticky; top: 86px; }

@media (max-width: 900px) {
    .reset-layout { grid-template-columns: 1fr; }
    .reset-summary { position: static; }
}
@media (max-width: 700px) {
    .danger-zone-card { grid-template-columns: 42px 1fr; }
    .danger-zone-card .btn { grid-column: 1 / -1; width: 100%; }
    .reset-confirm-grid { grid-template-columns: 1fr; }
    .reset-option { grid-template-columns: 20px 36px minmax(0,1fr); }
    .reset-count { grid-column: 3; justify-self: start; }
}

/* Patch 04.6 - import rows with errors */
.import-failed-panel {
    margin-top: 14px;
    border: 1px solid #f0cbc6;
    border-radius: 15px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(122, 39, 26, .035);
}
.import-failed-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: #fff8f7;
    border-bottom: 1px solid #f4d9d5;
}
.import-failed-head strong,
.import-failed-head span { display: block; }
.import-failed-head strong { color: #7a271a; font-size: 12px; }
.import-failed-head > div > span { margin-top: 4px; color: #9b4a3d; font-size: 10px; line-height: 1.45; }
.import-failed-count {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fee9e6;
    color: #b42318;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}
.import-failed-scroll { max-height: 430px; overflow: auto; }
.import-failed-table { min-width: 1080px; }
.import-failed-table th { position: sticky; top: 0; z-index: 1; }
.import-failed-table td { font-size: 10px; padding-top: 11px; padding-bottom: 11px; }
.row-number-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 4px 7px;
    border-radius: 7px;
    background: #f2f4f7;
    color: #475467;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9px;
    font-weight: 800;
}
.import-reason {
    display: inline-block;
    min-width: 210px;
    max-width: 360px;
    color: #b42318;
    font-weight: 700;
    line-height: 1.4;
    white-space: normal;
}
.import-failed-more {
    padding: 10px 18px;
    border-top: 1px solid #edf0f3;
    background: #fafbfc;
    color: #667085;
    font-size: 10px;
}
@media (max-width: 720px) {
    .import-failed-head { align-items: flex-start; flex-direction: column; }
}
.import-failed-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.import-failed-actions .btn { white-space: nowrap; }
@media (max-width: 720px) {
    .import-failed-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
}

/* ===== Modul 05: Stocuri ===== */
.stock-location-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}
.stock-location-card {
    display: grid;
    grid-template-columns: 46px minmax(0,1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 104px;
    padding: 17px;
    border: 1px solid #e3e8ec;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: .16s ease;
}
.stock-location-card:hover { border-color: #a9cfc5; box-shadow: 0 12px 30px rgba(26, 73, 62, .07); transform: translateY(-1px); }
.stock-location-card.inactive { opacity: .62; }
.stock-location-copy { min-width: 0; }
.stock-location-copy > strong, .stock-location-copy > small { display: block; }
.stock-location-copy > strong { margin-top: 7px; font-size: 12px; }
.stock-location-copy > small { margin-top: 4px; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stock-location-metric { min-width: 92px; text-align: right; }
.stock-location-metric strong, .stock-location-metric small, .stock-location-metric span { display: block; }
.stock-location-metric strong { font-size: 18px; line-height: 1; letter-spacing: -.03em; }
.stock-location-metric small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.stock-location-metric span { margin-top: 7px; color: #667085; font-size: 9px; font-weight: 750; }

.stock-context-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 13px 15px;
    border: 1px solid #dfe7e4;
    border-radius: 15px;
    background: linear-gradient(180deg, #fff, #fafcfb);
}
.stock-context-bar .entity-cell > div > small,
.stock-context-bar .entity-cell > div > strong,
.stock-context-bar .entity-cell > div > span { display: block; }
.stock-context-bar .entity-cell > div > small { color: #98a2b3; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.stock-context-bar .entity-cell > div > strong { margin-top: 3px; font-size: 12px; }
.stock-context-bar .entity-cell > div > span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.stock-location-switcher { min-width: min(360px, 44vw); }
.stock-location-switcher select { width: 100%; }
.stock-stats { margin-top: 14px; }
.stat-card.stat-alert { border-color: #efc8c2; background: #fff9f8; }
.stat-card.stat-alert strong { color: #b42318; }

.stock-toolbar { align-items: flex-start; }
.stock-filters { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.stock-filters input[type="search"] { width: 220px; }
.stock-filters select { min-width: 150px; }
.movements-filters input[type="search"] { width: 235px; }
.stock-table { min-width: 1080px; }
.stock-row-alert { background: #fffaf9; }
.stock-row-alert:hover { background: #fff6f4 !important; }
.stock-row-negative { background: #fff8f7; }
.stock-qty { display: inline-flex; align-items: baseline; gap: 4px; min-width: 72px; }
.stock-qty strong { font-size: 15px; letter-spacing: -.03em; }
.stock-qty span { color: #98a2b3; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.stock-qty.positive strong { color: #136c55; }
.stock-qty.zero strong { color: #667085; }
.stock-qty.negative strong { color: #b42318; }
.stock-breakdown { display: inline-flex; padding: 5px 8px; border-radius: 8px; background: #f5f7f8; color: #475467; font-size: 9px; font-weight: 750; white-space: nowrap; }
.stock-number-main { font-size: 12px; }
.badge-danger { background: #fee9e6; color: #b42318; }

.stock-adjust-entity {
    display: grid;
    grid-template-columns: 48px minmax(0,1fr) auto;
    gap: 13px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid #edf0f3;
}
.stock-adjust-entity h2 { margin: 3px 0 4px; }
.stock-adjust-entity p { margin: 0; color: var(--muted); font-size: 10px; }
.stock-current-pill { min-width: 125px; padding: 11px 13px; border-radius: 12px; background: #f3f8f6; text-align: right; }
.stock-current-pill span, .stock-current-pill strong, .stock-current-pill small { display: block; }
.stock-current-pill span { color: #667085; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.stock-current-pill strong { margin-top: 4px; color: var(--primary); font-size: 20px; line-height: 1; }
.stock-current-pill small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.stock-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.stock-mode-option { position: relative; display: grid; grid-template-columns: 18px 36px minmax(0,1fr); align-items: center; gap: 9px; padding: 12px; border: 1px solid #e2e7eb; border-radius: 13px; cursor: pointer; transition: .15s ease; }
.stock-mode-option:hover { border-color: #b8d5ce; }
.stock-mode-option:has(input:checked) { border-color: #8abeb1; background: #f5fbf9; box-shadow: 0 0 0 3px rgba(27, 112, 91, .04); }
.stock-mode-option input { accent-color: var(--primary); }
.stock-mode-icon { width: 36px; height: 36px; border-radius: 10px; background: #f3f6f5; color: var(--primary); display: grid; place-items: center; }
.stock-mode-icon svg { width: 18px; height: 18px; }
.stock-mode-option strong, .stock-mode-option small { display: block; }
.stock-mode-option strong { font-size: 10px; }
.stock-mode-option small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }

.entity-cell.compact { gap: 9px; min-width: 170px; }
.entity-cell.compact .entity-icon { width: 34px; height: 34px; border-radius: 10px; }
.entity-cell.compact .entity-icon svg { width: 17px; height: 17px; }
.entity-cell.compact strong, .entity-cell.compact small { display: block; }
.entity-cell.compact strong { font-size: 10px; }
.entity-cell.compact small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.movement-table { min-width: 1160px; }
.movement-type-tag { display: inline-flex; padding: 5px 8px; border-radius: 8px; background: #f4f6f8; color: #475467; font-size: 9px; font-weight: 800; white-space: nowrap; }
.movement-delta { display: inline-flex; min-width: 86px; justify-content: flex-end; padding: 5px 8px; border-radius: 8px; font-size: 10px; font-weight: 850; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.movement-delta.positive { color: #087443; background: #ecf8f2; }
.movement-delta.negative { color: #b42318; background: #fff1ef; }
.movement-delta.neutral { color: #667085; background: #f4f6f8; }

.transfer-items { display: grid; gap: 8px; }
.transfer-item-row { display: grid; grid-template-columns: 28px minmax(0,1fr) 180px 34px; align-items: end; gap: 9px; padding: 10px; border: 1px solid #e5e9ed; border-radius: 12px; background: #fcfdfd; }
.transfer-item-row .field { margin: 0; }
.transfer-row-no { align-self: center; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: #eef5f3; color: var(--primary); font-size: 9px; font-weight: 850; }
.transfer-qty { min-width: 0; }
.transfer-remove { margin-bottom: 2px; color: #98a2b3; }
.transfer-remove:hover { color: #b42318; background: #fff0ee; }
.transfer-table { min-width: 980px; }

.transfer-route { display: grid; grid-template-columns: minmax(0,1fr) 50px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 17px; border: 1px solid #e1e7e5; border-radius: 16px; background: linear-gradient(180deg,#fff,#fafcfb); }
.transfer-location { display: flex; align-items: center; gap: 11px; min-width: 0; }
.transfer-location > div > span, .transfer-location > div > strong, .transfer-location > div > small { display: block; }
.transfer-location > div > span { color: #98a2b3; font-size: 8px; font-weight: 850; letter-spacing: .08em; }
.transfer-location > div > strong { margin-top: 4px; font-size: 12px; }
.transfer-location > div > small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.transfer-route-arrow { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.transfer-route-arrow svg { width: 21px; height: 21px; }
.transfer-total { min-width: 110px; padding-left: 17px; border-left: 1px solid #e5e9ed; text-align: right; }
.transfer-total span, .transfer-total strong, .transfer-total small { display: block; }
.transfer-total span { color: #98a2b3; font-size: 8px; text-transform: uppercase; font-weight: 800; }
.transfer-total strong { margin-top: 4px; font-size: 18px; }
.transfer-total small { margin-top: 4px; color: var(--muted); font-size: 9px; }

.quick-action svg { width: 17px; height: 17px; }

@media (max-width: 1050px) {
    .stock-location-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .stock-mode-grid { grid-template-columns: 1fr; }
    .transfer-route { grid-template-columns: 1fr 44px 1fr; }
    .transfer-total { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #e5e9ed; padding: 12px 0 0; text-align: left; }
}
@media (max-width: 760px) {
    .stock-location-grid { grid-template-columns: 1fr; }
    .stock-context-bar { align-items: stretch; flex-direction: column; }
    .stock-location-switcher { min-width: 0; width: 100%; }
    .stock-filters { justify-content: stretch; width: 100%; }
    .stock-filters input[type="search"], .stock-filters select { width: 100%; min-width: 0; }
    .stock-adjust-entity { grid-template-columns: 42px 1fr; }
    .stock-current-pill { grid-column: 1 / -1; text-align: left; }
    .transfer-item-row { grid-template-columns: 28px 1fr 34px; }
    .transfer-item-row .transfer-qty { grid-column: 2; }
    .transfer-remove { grid-column: 3; grid-row: 1; align-self: center; }
    .transfer-route { grid-template-columns: 1fr; }
    .transfer-route-arrow { transform: rotate(90deg); justify-self: center; }
}
.section-title-row { display:flex; align-items:end; justify-content:space-between; gap:12px; margin-bottom:12px; }
.section-title-row h2 { margin:3px 0 0; }
.icon-button { width:34px; height:34px; display:grid; place-items:center; border:1px solid #e3e7ec; border-radius:10px; background:#fff; color:#667085; cursor:pointer; font-size:18px; line-height:1; transition:.15s ease; }
.icon-button:hover { border-color:#d0d5dd; background:#f8fafb; }

/* ===== Modul 05.1: Softech PlusERP / stoc curent ===== */
.flash-warning { color:#8a4b08; background:#fff8e8; border:1px solid #f4d99a; }
.callout-success { color:#166a52; background:#eff9f5; border:1px solid #c8e7dc; }
.inline-form { display:inline-flex; margin:0; }
.full-width { width:100%; }
.link-button { border:0; background:transparent; color:var(--primary); padding:0; font-size:10px; font-weight:800; cursor:pointer; }
.mini-link { color:var(--primary); font-size:9px; font-weight:750; text-decoration:none; white-space:nowrap; }
.muted-note { color:var(--muted)!important; font-size:10px!important; }
.integration-provider-banner { display:flex; align-items:center; gap:16px; padding:20px; border:1px solid #dfe9e6; border-radius:17px; background:linear-gradient(135deg,#fff 0%,#f4faf8 100%); }
.integration-provider-logo { flex:0 0 52px; width:52px; height:52px; display:grid; place-items:center; border-radius:15px; background:var(--primary-soft); color:var(--primary); }
.integration-provider-logo svg { width:25px; height:25px; }
.integration-provider-banner h2 { margin:4px 0 5px; font-size:18px; }
.integration-provider-banner p { margin:0; color:var(--muted); font-size:11px; }
.integration-card-list { display:grid; gap:11px; }
.integration-card { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:17px 18px; background:#fff; border:1px solid #e2e7eb; border-radius:16px; transition:.15s ease; }
.integration-card:hover { border-color:#bfd5cf; box-shadow:0 10px 28px rgba(26,73,62,.05); }
.integration-card-main { display:flex; align-items:center; gap:13px; min-width:0; }
.integration-card-icon { flex:0 0 42px; width:42px; height:42px; display:grid; place-items:center; border-radius:12px; background:#edf7f4; color:var(--primary); }
.integration-card-icon svg { width:20px; height:20px; }
.integration-card-copy { min-width:0; }
.integration-title-line { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.integration-title-line h3 { margin:0; font-size:13px; }
.integration-card-copy>p { margin:5px 0 0; color:var(--muted); font-size:10px; }
.integration-meta-row { display:flex; flex-wrap:wrap; gap:12px; margin-top:9px; color:#667085; font-size:9px; }
.integration-meta-row span { display:inline-flex; align-items:center; gap:5px; }
.integration-meta-row svg { width:13px; height:13px; }
.integration-attention { color:#9a5a0d; font-weight:750; }
.integration-card-actions { display:flex; flex-wrap:wrap; gap:7px; }
.integration-location-title { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.integration-location-picker { display:grid; gap:7px; max-height:470px; overflow:auto; padding-right:3px; }
.integration-location-row { display:grid; grid-template-columns:20px 38px minmax(0,1fr) auto; align-items:center; gap:9px; padding:10px 11px; border:1px solid #e4e8ec; border-radius:12px; background:#fff; cursor:pointer; }
.integration-location-row:hover { border-color:#bfd5cf; background:#fbfdfc; }
.integration-location-row input { accent-color:var(--primary); }
.integration-location-row.missing-api { background:#fffdf8; }
.integration-location-row.assigned-other { opacity:.62; cursor:default; }
.integration-location-copy { min-width:0; }
.integration-location-copy strong,.integration-location-copy small { display:block; }
.integration-location-copy strong { font-size:10px; }
.integration-location-copy small { margin-top:3px; color:var(--muted); font-size:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.modern-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:11px; }
.modern-icon.store { background:#edf7f4; color:#176b5b; }
.modern-icon.warehouse { background:#f0f3f8; color:#475467; }
.modern-icon svg { width:18px; height:18px; }
.integration-side-panel { position:sticky; top:90px; }
.side-action-block { margin-top:20px; padding-top:17px; border-top:1px solid var(--line); }
.side-action-block h4 { margin:0 0 5px; font-size:12px; }
.side-action-block>p { margin:0 0 13px; }
.switch-row { display:grid; grid-template-columns:38px 1fr; align-items:center; gap:10px; padding:11px 12px; border:1px solid #e4e7ec; border-radius:12px; margin:12px 0; cursor:pointer; }
.switch-row>input { position:absolute; opacity:0; pointer-events:none; }
.switch-ui { width:38px; height:22px; border-radius:999px; background:#d0d5dd; position:relative; transition:.15s ease; }
.switch-ui::after { content:''; position:absolute; width:16px; height:16px; left:3px; top:3px; background:#fff; border-radius:50%; box-shadow:0 1px 3px rgba(0,0,0,.18); transition:.15s ease; }
.switch-row>input:checked + .switch-ui { background:var(--primary); }
.switch-row>input:checked + .switch-ui::after { transform:translateX(16px); }
.switch-row strong,.switch-row small { display:block; }
.switch-row strong { font-size:10px; }
.switch-row small { margin-top:3px; color:var(--muted); font-size:9px; }
.stock-context-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.api-pull-form .btn { min-width:190px; }
.api-stock-status { display:flex; align-items:center; gap:12px; margin-top:12px; padding:12px 14px; border:1px solid #cfe4de; border-radius:13px; background:#f5fbf9; }
.api-stock-status.warning { border-color:#ecd6a6; background:#fffaf0; }
.api-stock-status.inactive { border-color:#e4e7ec; background:#f8f9fa; }
.api-stock-status-icon { flex:0 0 36px; width:36px; height:36px; display:grid; place-items:center; border-radius:10px; background:#fff; color:var(--primary); border:1px solid rgba(0,0,0,.04); }
.api-stock-status-icon svg { width:18px; height:18px; }
.api-stock-status>div { flex:1; min-width:0; }
.api-stock-status strong { display:block; font-size:10px; }
.api-stock-status p { margin:3px 0 0; color:var(--muted); font-size:9px; line-height:1.45; }
.api-source-chip { display:inline-flex; align-items:center; gap:4px; width:max-content; margin-top:7px; padding:4px 7px; border-radius:999px; background:#edf7f4; color:#176b5b; font-size:8px; font-weight:800; }
.api-source-chip svg { width:11px; height:11px; }
.api-issues-panel .panel-head { padding:18px 18px 0; }

@media (max-width:960px){
  .integration-side-panel{position:static;}
  .stock-context-actions{width:100%;justify-content:stretch;}
  .stock-context-actions .stock-location-switcher,.stock-context-actions .api-pull-form,.stock-context-actions .btn{width:100%;}
}
@media (max-width:700px){
  .integration-card{align-items:flex-start;flex-direction:column;}
  .integration-location-row{grid-template-columns:20px 38px minmax(0,1fr);}
  .integration-location-row .mini-link{grid-column:3;}
  .api-stock-status{align-items:flex-start;flex-wrap:wrap;}
  .api-stock-status>.btn{width:100%;}
}

/* ===== Modul 05.2: sincronizare API globală + filtre stoc ===== */
.sync-count-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 3px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    font-size: 9px;
    font-weight: 850;
}
.stock-overview-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) minmax(150px, .7fr) minmax(165px, .8fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 11px;
    border: 1px solid #e3e8ec;
    border-radius: 14px;
    background: #fff;
}
.stock-overview-filters input,
.stock-overview-filters select { width: 100%; }
.stock-filters-expanded {
    display: grid;
    grid-template-columns: minmax(230px, 1.35fr) repeat(5, minmax(145px, .85fr)) auto auto;
    width: 100%;
    margin-top: 11px;
}
.stock-filters-expanded input[type="search"],
.stock-filters-expanded select { width: 100%; min-width: 0; }
.stock-toolbar { flex-wrap: wrap; }
.stock-toolbar > div:first-child { flex: 1 1 280px; }
.stock-toolbar .stock-filters-expanded { flex: 1 0 100%; }

.stock-sync-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
}
.stock-sync-modal.is-open { display: flex; }
.stock-sync-backdrop { position: absolute; inset: 0; background: rgba(16,24,40,.58); backdrop-filter: blur(3px); }
.stock-sync-dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 44px));
    overflow: auto;
    padding: 24px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(16,24,40,.25);
}
.stock-sync-head { display: flex; align-items: center; gap: 14px; }
.stock-sync-head h2 { margin: 3px 0 4px; font-size: 20px; }
.stock-sync-head p { margin: 0; color: var(--muted); font-size: 10px; }
.stock-sync-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
}
.stock-sync-icon svg { width: 23px; height: 23px; }
.stock-sync-progress { height: 9px; margin-top: 22px; overflow: hidden; border-radius: 999px; background: #edf1f2; }
.stock-sync-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--primary); transition: width .22s ease; }
.stock-sync-progress-meta { display: flex; justify-content: space-between; margin-top: 7px; color: #667085; font-size: 9px; }
.stock-sync-progress-meta strong { color: #344054; }
.stock-sync-current { margin-top: 14px; padding: 11px 12px; border: 1px solid #e4e9ec; border-radius: 12px; background: #fafcfc; color: #475467; font-size: 10px; font-weight: 700; }
.stock-sync-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-top: 14px; }
.stock-sync-summary > div { padding: 11px; border: 1px solid #e6eaed; border-radius: 12px; background: #fff; }
.stock-sync-summary span, .stock-sync-summary strong { display: block; }
.stock-sync-summary span { color: #98a2b3; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.stock-sync-summary strong { margin-top: 4px; font-size: 17px; }
.stock-sync-log { display: grid; gap: 7px; max-height: 245px; overflow: auto; margin-top: 14px; padding-right: 2px; }
.stock-sync-log-row { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 9px; align-items: center; padding: 9px 10px; border: 1px solid #e8ebee; border-radius: 11px; }
.stock-sync-log-marker { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: #eef7f4; color: #176b5b; font-weight: 900; }
.stock-sync-log-row.warning .stock-sync-log-marker { background: #fff6e7; color: #9a5a0d; }
.stock-sync-log-row.error .stock-sync-log-marker { background: #fff0ee; color: #b42318; }
.stock-sync-log-row strong, .stock-sync-log-row small { display: block; }
.stock-sync-log-row strong { font-size: 10px; }
.stock-sync-log-row small { margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.stock-sync-actions { display: flex; justify-content: flex-end; margin-top: 18px; padding-top: 15px; border-top: 1px solid #edf0f2; }
body.modal-open { overflow: hidden; }

@media (max-width: 1180px) {
    .stock-filters-expanded { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .stock-overview-filters { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 760px) {
    .stock-overview-filters,
    .stock-filters-expanded { grid-template-columns: 1fr; }
    .stock-sync-dialog { padding: 18px; }
    .stock-sync-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .stock-sync-actions .btn { width: 100%; }
}

/* ===== Modul 05.3: gestiuni active, rezultate API clare, UI filtre unificat ===== */
/* Filtrele din Stocuri folosesc aceeași limbă vizuală ca filtrele din Gestiuni. */
.stock-overview-filters,
.stock-filters-expanded {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.stock-overview-filters input,
.stock-overview-filters select,
.stock-filters-expanded input,
.stock-filters-expanded select {
    height: 36px;
    border: 1px solid #d7dde5;
    border-radius: 9px;
    background: #fff;
    padding: 0 10px;
    color: var(--text);
    outline: none;
    font-size: 11px;
}
.stock-overview-filters input[type="search"],
.stock-filters-expanded input[type="search"] { width: 220px; }
.stock-overview-filters select,
.stock-filters-expanded select { width: auto; min-width: 135px; max-width: 220px; }
.stock-overview-filters input:focus,
.stock-overview-filters select:focus,
.stock-filters-expanded input:focus,
.stock-filters-expanded select:focus {
    border-color: #82b5aa;
    box-shadow: 0 0 0 3px rgba(23,107,91,.07);
}
.stock-toolbar { flex-wrap: wrap; }
.stock-toolbar > div:first-child { flex: 1 1 280px; }
.stock-toolbar .stock-filters-expanded {
    flex: 1 0 100%;
    justify-content: flex-end;
    margin-top: 11px;
}

/* Rezultatele sincronizării: verde pentru poziții ignorate, galben doar pentru ambiguități reale. */
.stock-sync-summary { grid-template-columns: repeat(5, minmax(0,1fr)); }
.stock-sync-log-copy { min-width: 0; }
.stock-sync-details {
    margin-top: 7px;
    border-top: 1px solid #edf0f2;
    padding-top: 7px;
}
.stock-sync-details > summary {
    cursor: pointer;
    list-style: none;
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    user-select: none;
}
.stock-sync-details > summary::-webkit-details-marker { display: none; }
.stock-sync-details > summary::after { content: ' +'; }
.stock-sync-details[open] > summary::after { content: ' −'; }
.stock-sync-details-list { display: grid; gap: 5px; margin-top: 7px; }
.stock-sync-detail-item {
    padding: 7px 8px;
    border: 1px solid #e8ecef;
    border-radius: 8px;
    background: #fafcfc;
}
.stock-sync-detail-item.warning { border-color: #f0d7aa; background: #fffaf1; }
.stock-sync-detail-item.error { border-color: #f3c3bd; background: #fff7f6; }
.stock-sync-detail-item.info { border-color: #cde5de; background: #f5fbf9; }
.stock-sync-detail-item strong,
.stock-sync-detail-item small { display: block; }
.stock-sync-detail-item strong { font-size: 9px; }
.stock-sync-detail-item small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.stock-sync-details-more { display: block; padding: 4px 2px; color: var(--muted); font-size: 8px; }

.api-issues-warning { border-color: #f0d7aa; }
.api-issues-info { border-color: #cde5de; }
.api-ignored-details { border-top: 1px solid #edf0f2; }
.api-ignored-details > summary {
    cursor: pointer;
    padding: 13px 18px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    list-style: none;
}
.api-ignored-details > summary::-webkit-details-marker { display: none; }
.api-ignored-details > summary::after { content: ' +'; }
.api-ignored-details[open] > summary::after { content: ' −'; }
.badge-svg { width: 12px; height: 12px; vertical-align: -2px; margin-right: 3px; }

@media (max-width: 1180px) {
    .stock-sync-summary { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .stock-overview-filters,
    .stock-filters-expanded {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        justify-content: stretch;
    }
    .stock-overview-filters input[type="search"],
    .stock-filters-expanded input[type="search"] {
        width: 100%;
        grid-column: span 2;
    }
    .stock-overview-filters select,
    .stock-filters-expanded select {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    .stock-overview-filters .btn,
    .stock-filters-expanded .btn { width: 100%; }
    .stock-sync-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 480px) {
    .stock-overview-filters,
    .stock-filters-expanded { grid-template-columns: 1fr; }
    .stock-overview-filters input[type="search"],
    .stock-filters-expanded input[type="search"] { grid-column: auto; }
    .stock-sync-summary { grid-template-columns: 1fr 1fr; }
}
.integration-location-row.inactive-location { opacity: .56; background: #f8fafb; }
.integration-location-row.inactive-location .integration-location-copy small { color: #98a2b3; }

/* ===== Patch 05.4: selector gestiune uniformizat cu designul aplicației ===== */
.stock-location-switcher {
    min-width: min(360px, 44vw);
    position: relative;
}
.stock-location-switcher select {
    width: 100%;
    height: 36px;
    border: 1px solid #d7dde5;
    border-radius: 9px;
    background-color: #fff;
    color: var(--text);
    padding: 0 38px 0 11px;
    outline: none;
    font-size: 11px;
    font-weight: 600;
    line-height: 36px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 14px 14px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.stock-location-switcher select:hover {
    border-color: #c7d0d7;
    background-color: #fcfdfd;
}
.stock-location-switcher select:focus {
    border-color: #82b5aa;
    box-shadow: 0 0 0 3px rgba(23,107,91,.07);
}
.stock-location-switcher select:disabled {
    cursor: not-allowed;
    opacity: .65;
    background-color: #f6f7f8;
}

@media (max-width: 760px) {
    .stock-location-switcher {
        min-width: 0;
        width: 100%;
    }
    .stock-location-switcher select {
        width: 100%;
    }
}

/* ===== Modul 06: Vânzări ===== */
.sales-qty { display:flex; align-items:baseline; gap:4px; white-space:nowrap; }
.sales-qty strong { font-size:14px; color:#25323a; }
.sales-qty span { font-size:9px; color:var(--muted); font-weight:700; }
.sales-qty-primary strong { color:var(--primary); font-size:15px; }
.sales-date { white-space:nowrap; font-size:10px; color:#344054; }
.sales-location-card { margin-top:2px; }
.sales-toolbar { flex-wrap:wrap; }
.sales-toolbar > div:first-child { flex:1 1 280px; }
.sales-toolbar .sales-filters { flex:1 0 100%; margin-top:11px; }
.sales-filters {
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    align-items:center;
    justify-content:flex-end;
}
.sales-filters input,
.sales-filters select,
.sales-import-form select {
    height:36px;
    border:1px solid #d7dde5;
    border-radius:9px;
    background:#fff;
    padding:0 10px;
    color:var(--text);
    outline:none;
    font-size:11px;
}
.sales-filters input[type="search"] { width:220px; }
.sales-filters input[type="date"] { width:142px; }
.sales-filters select { min-width:145px; max-width:220px; }
.sales-filters input:focus,
.sales-filters select:focus,
.sales-import-form select:focus {
    border-color:#82b5aa;
    box-shadow:0 0 0 3px rgba(23,107,91,.07);
}
.sales-import-mode { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:14px 0; }
.choice-card {
    display:flex;
    gap:10px;
    align-items:flex-start;
    border:1px solid #dfe5e8;
    border-radius:12px;
    padding:13px;
    background:#fff;
    cursor:pointer;
}
.choice-card:has(input:checked) { border-color:#8fc1b5; background:#f7fbfa; box-shadow:0 0 0 3px rgba(23,107,91,.05); }
.choice-card input { margin-top:2px; accent-color:var(--primary); }
.choice-card strong,.choice-card small { display:block; }
.choice-card strong { font-size:10px; }
.choice-card small { margin-top:4px; color:var(--muted); font-size:9px; line-height:1.45; }
.sales-locations-table .table-actions { flex-wrap:nowrap; }
.sales-table td:first-child { width:92px; }

@media (max-width: 980px) {
    .sales-filters { justify-content:stretch; }
    .sales-filters input[type="search"] { width:100%; flex:1 0 100%; }
    .sales-filters input[type="date"], .sales-filters select { flex:1 1 160px; width:auto; max-width:none; }
}
@media (max-width: 760px) {
    .sales-filters { display:grid; grid-template-columns:1fr 1fr; width:100%; }
    .sales-filters input[type="search"] { grid-column:span 2; width:100%; }
    .sales-filters input[type="date"], .sales-filters select, .sales-filters .btn { width:100%; min-width:0; max-width:none; }
    .sales-import-mode { grid-template-columns:1fr; }
}
@media (max-width: 480px) {
    .sales-filters { grid-template-columns:1fr; }
    .sales-filters input[type="search"] { grid-column:auto; }
}

/* ===== Patch 06.3: Vânzări · asociere Softech + ștergere interval + UI gestiune ===== */
.sales-context-bar { margin-top: 2px; }
.sales-destructive-actions {
    flex: 1 0 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 9px;
    margin-top: 2px;
    border-top: 1px solid #edf0f2;
}
.sales-destructive-actions small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}
.sales-destructive-actions form { margin: 0; }

.softech-mapping-panel {
    border: 1px solid #dfe7e4;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}
.softech-mapping-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid #edf0f2;
    background: linear-gradient(180deg, #ffffff, #fbfdfc);
}
.softech-mapping-head h2 { margin: 4px 0 5px; font-size: 15px; }
.softech-mapping-head p { margin: 0; max-width: 850px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.softech-mapping-total {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef8f5;
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}
.softech-mapping-list { display: grid; }
.softech-mapping-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(440px, 1.45fr);
    gap: 18px;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #edf0f2;
}
.softech-mapping-row:last-child { border-bottom: 0; }
.softech-mapping-source { min-width: 0; }
.softech-mapping-source > strong {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    line-height: 1.35;
    word-break: break-word;
}
.softech-mapping-form {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) auto;
    gap: 8px;
    align-items: center;
}
.softech-mapping-form select {
    width: 100%;
    min-width: 0;
    height: 36px;
    border: 1px solid #d7dde5;
    border-radius: 9px;
    background-color: #fff;
    color: var(--text);
    padding: 0 36px 0 10px;
    outline: none;
    font-size: 10px;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 14px;
}
.softech-mapping-form select:focus {
    border-color: #82b5aa;
    box-shadow: 0 0 0 3px rgba(23,107,91,.07);
}
.softech-mapping-form .btn { white-space: nowrap; }

@media (max-width: 980px) {
    .softech-mapping-row { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 760px) {
    .sales-destructive-actions { align-items: stretch; flex-direction: column; }
    .sales-destructive-actions form, .sales-destructive-actions .btn { width: 100%; }
    .softech-mapping-head { flex-direction: column; }
    .softech-mapping-form { grid-template-columns: 1fr; }
    .softech-mapping-form .btn { width: 100%; }
}


/* ===== Patch 06.4: ștergere globală vânzări ===== */
.sales-global-delete-panel {
    display:flex; align-items:center; justify-content:space-between; gap:18px;
    padding:15px 18px; border:1px solid #f0d9d6; border-radius:14px; background:#fffafa;
}
.sales-global-delete-copy { display:flex; align-items:center; gap:11px; min-width:0; }
.sales-global-delete-copy strong, .sales-global-delete-copy small { display:block; }
.sales-global-delete-copy strong { font-size:12px; color:#7f1d1d; }
.sales-global-delete-copy small { margin-top:3px; font-size:9px; line-height:1.4; color:var(--muted); }
.sales-global-delete-icon { width:38px; height:38px; flex:0 0 auto; display:grid; place-items:center; border-radius:10px; background:#fff0ee; color:#b42318; }
.sales-global-delete-form { display:flex; align-items:flex-end; justify-content:flex-end; gap:7px; flex-wrap:wrap; margin:0; }
.sales-global-delete-form label { display:grid; gap:4px; color:var(--muted); font-size:9px; font-weight:700; }
.sales-global-delete-form input[type="date"] { height:36px; width:142px; border:1px solid #d7dde5; border-radius:9px; background:#fff; padding:0 10px; color:var(--text); outline:none; font-size:11px; }
.sales-global-delete-form input[type="date"]:focus { border-color:#82b5aa; box-shadow:0 0 0 3px rgba(23,107,91,.07); }
@media (max-width:900px) { .sales-global-delete-panel { align-items:stretch; flex-direction:column; } .sales-global-delete-form { justify-content:flex-start; } }
@media (max-width:560px) { .sales-global-delete-form { display:grid; grid-template-columns:1fr 1fr; } .sales-global-delete-form input[type="date"] { width:100%; } .sales-global-delete-form .btn { grid-column:1 / -1; width:100%; } }

/* Module 06.5 - sales import status + administrative sales cleanup */
.sales-page-actions { align-items: stretch; }
.sales-last-import {
    min-width: 220px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    display: grid;
    align-content: center;
    gap: 2px;
}
.sales-last-import span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.sales-last-import strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.25;
}
.sales-last-import small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}
.sales-settings-panel { max-width: none; }
.sales-settings-delete-form {
    display: grid;
    grid-template-columns: minmax(160px, .7fr) minmax(160px, .7fr) minmax(220px, 1fr) minmax(260px, 1.25fr);
    gap: 12px;
    align-items: end;
}
.sales-settings-delete-form .field { margin: 0; }
.sales-settings-delete-action { display: grid; gap: 6px; align-self: end; }
.sales-settings-delete-action .btn { width: 100%; }
.sales-settings-delete-action small { color: var(--muted); font-size: 9px; line-height: 1.35; }
@media (max-width: 1050px) {
    .sales-settings-delete-form { grid-template-columns: 1fr 1fr; }
    .sales-settings-delete-action { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .sales-page-actions { width: 100%; }
    .sales-last-import { width: 100%; min-width: 0; }
    .sales-settings-delete-form { grid-template-columns: 1fr; }
    .sales-settings-delete-action { grid-column: auto; }
}

/* ===== Patch 06.7: produse Softech ignorate ===== */
.softech-mapping-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}
.softech-ignore-form { margin: 0; }
.softech-ignore-form .btn { white-space: nowrap; }

.softech-ignored-panel {
    border: 1px solid #dfe7e4;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}
.softech-ignored-panel > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: linear-gradient(180deg, #ffffff, #fbfdfc);
}
.softech-ignored-panel > summary::-webkit-details-marker { display: none; }
.softech-ignored-panel > summary span:first-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.softech-ignored-panel > summary strong { font-size: 11px; }
.softech-ignored-panel > summary small {
    color: var(--muted);
    font-size: 9px;
}
.softech-ignored-list { border-top: 1px solid #edf0f2; }
.softech-ignored-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid #edf0f2;
}
.softech-ignored-row:last-child { border-bottom: 0; }
.softech-ignored-row > div { min-width: 0; }
.softech-ignored-row > div > strong {
    display: block;
    font-size: 10px;
    margin-bottom: 5px;
    word-break: break-word;
}
.softech-ignored-row form { margin: 0; flex: 0 0 auto; }

@media (max-width: 760px) {
    .softech-mapping-actions { grid-template-columns: 1fr; }
    .softech-ignore-form .btn { width: 100%; }
    .softech-ignored-row { align-items: stretch; flex-direction: column; }
    .softech-ignored-row form, .softech-ignored-row .btn { width: 100%; }
}

/* ===== Patch 06.8: zile de vizită / aprovizionare gestiuni ===== */
.visit-days-section {
    margin: 18px 0 4px;
    padding: 16px;
    border: 1px solid #dfe7e4;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #fbfdfc);
    transition: opacity .18s ease, border-color .18s ease, background .18s ease;
}
.visit-days-section .form-section-title { margin-top: 0; }
.visit-days-section.is-disabled {
    opacity: .58;
    background: #f7f9f8;
}
.weekday-selector {
    display: grid;
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.weekday-option {
    position: relative;
    display: block;
    cursor: pointer;
}
.weekday-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.weekday-option span {
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid #d8e2df;
    border-radius: 12px;
    background: #fff;
    color: #33413d;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.weekday-option span strong { font-size: 12px; line-height: 1; }
.weekday-option span small { color: var(--muted); font-size: 9px; line-height: 1; }
.weekday-option:hover span {
    border-color: #a9cfc4;
    transform: translateY(-1px);
}
.weekday-option input:focus-visible + span {
    outline: 3px solid rgba(31, 138, 112, .16);
    outline-offset: 2px;
}
.weekday-option input:checked + span {
    border-color: #6fb6a5;
    background: #edf8f4;
    color: #0d6b55;
    box-shadow: inset 0 0 0 1px rgba(31, 138, 112, .08);
}
.weekday-option input:disabled + span {
    cursor: not-allowed;
    background: #f4f6f5;
    color: #89938f;
}
.visit-day-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 120px;
}
.visit-day-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 26px;
    padding: 0 7px;
    border-radius: 8px;
    border: 1px solid #cfe5de;
    background: #f0f9f6;
    color: #126c57;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .01em;
}
@media (max-width: 980px) {
    .weekday-selector { grid-template-columns: repeat(4, minmax(72px, 1fr)); }
}
@media (max-width: 620px) {
    .weekday-selector { grid-template-columns: repeat(2, minmax(72px, 1fr)); }
}

/* ===== Modul 07: Comenzi magazine ===== */
.orders-page-header { display:flex; justify-content:space-between; align-items:flex-end; gap:22px; margin-bottom:16px; }
.orders-page-header h1, .order-detail-header h1 { margin:7px 0 6px; font-size:30px; letter-spacing:-.035em; }
.orders-page-header p, .order-detail-header p { margin:0; color:var(--muted); font-size:13px; line-height:1.6; max-width:900px; }
.orders-date-strip { display:grid; grid-template-columns:auto 34px auto minmax(260px,1fr); gap:12px; align-items:stretch; background:#fff; border:1px solid var(--line); border-radius:16px; padding:14px; }
.orders-date-item, .orders-formula-pill { border:1px solid #e7ebef; border-radius:12px; padding:12px 14px; background:#fafbfc; }
.orders-date-item span, .orders-formula-pill span { display:block; color:#98a2b3; font-size:9px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; margin-bottom:5px; }
.orders-date-item strong, .orders-formula-pill strong { display:block; font-size:12px; }
.orders-date-item.accent { background:var(--primary-soft); border-color:#cfe5de; }
.orders-date-item.accent strong { color:var(--primary-dark); }
.orders-date-arrow { display:grid; place-items:center; color:#98a2b3; font-size:20px; }
.orders-formula-pill { justify-self:stretch; background:#fff; }
.orders-formula-pill small { display:block; color:var(--muted); font-size:9px; margin-top:4px; }
.orders-toolbar { align-items:flex-end; }
.orders-quick-search input, .manual-order-controls input, .order-items-actions input { height:42px; border:1px solid #d7dde5; border-radius:10px; padding:0 13px; background:#fff; outline:none; min-width:260px; }
.orders-quick-search input:focus, .manual-order-controls input:focus, .order-items-actions input:focus { border-color:#82b5aa; box-shadow:0 0 0 4px rgba(23,107,91,.08); }
.orders-store-table { min-width:980px; }
.order-data-state { display:block; margin-top:4px; font-size:9px; font-weight:700; }
.order-data-state.ok { color:var(--success); }
.order-data-state.warn { color:#b36a0a; }
.status-chip { display:inline-flex; align-items:center; border-radius:999px; padding:5px 8px; font-size:8px; font-weight:850; letter-spacing:.05em; text-transform:uppercase; white-space:nowrap; }
.status-chip.active { color:#05603a; background:#e9f8f1; }
.status-chip.neutral { color:#667085; background:#f1f3f5; }
.order-saved-meta { margin-top:6px; }
.order-saved-meta strong, .order-saved-meta span { display:block; }
.order-saved-meta strong { font-size:10px; }
.order-saved-meta span { color:var(--muted); font-size:9px; margin-top:2px; }
.manual-order-panel { background:#fff; border:1px solid var(--line); border-radius:15px; overflow:hidden; }
.manual-order-panel > summary { list-style:none; cursor:pointer; display:grid; grid-template-columns:42px 1fr auto; gap:12px; align-items:center; padding:17px 20px; }
.manual-order-panel > summary::-webkit-details-marker { display:none; }
.manual-order-panel[open] > summary { border-bottom:1px solid var(--line); }
.manual-order-icon { width:38px; height:38px; border-radius:11px; display:grid; place-items:center; background:var(--primary-soft); color:var(--primary); }
.manual-order-icon svg { width:18px; height:18px; }
.manual-order-panel summary strong, .manual-order-panel summary small { display:block; }
.manual-order-panel summary strong { font-size:13px; }
.manual-order-panel summary small { color:var(--muted); font-size:10px; margin-top:4px; }
.manual-order-chevron { color:#98a2b3; font-size:18px; }
.manual-order-content { padding:18px 20px 20px; }
.manual-order-controls { display:flex; justify-content:flex-end; margin-bottom:14px; }
.manual-store-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.manual-store-card { border:1px solid #e7ebef; border-radius:13px; padding:13px; display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:14px; align-items:center; }
.manual-store-visit span, .manual-store-visit strong { display:block; }
.manual-store-visit span { color:#98a2b3; font-size:8px; text-transform:uppercase; font-weight:800; letter-spacing:.05em; }
.manual-store-visit strong { font-size:10px; margin-top:4px; white-space:nowrap; }
.empty-state.compact { padding:18px; }
.page-back-link { display:inline-flex; color:var(--primary); font-size:11px; font-weight:700; text-decoration:none; margin-bottom:3px; }
.order-detail-header { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:16px; }
.order-context-card { background:#fff; border:1px solid var(--line); border-radius:16px; padding:14px; display:grid; grid-template-columns:minmax(220px,1.2fr) repeat(4,minmax(140px,.8fr)); gap:10px; }
.order-context-location, .order-context-item { min-height:72px; border:1px solid #e8ecf0; border-radius:12px; padding:11px 12px; }
.order-context-location { display:flex; gap:11px; align-items:center; }
.order-context-location strong, .order-context-location small { display:block; }
.order-context-location strong { font-size:12px; margin-top:3px; }
.order-context-location small { color:var(--muted); font-size:9px; margin-top:3px; }
.order-context-item { display:flex; flex-direction:column; justify-content:center; }
.order-context-item > span { color:#98a2b3; font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.order-context-item strong { font-size:11px; margin-top:6px; line-height:1.35; }
.order-context-item small { color:var(--muted); font-size:9px; margin-top:3px; }
.order-context-item.formula { background:var(--primary-soft); border-color:#cfe5de; }
.order-context-item.formula strong { color:var(--primary-dark); font-size:18px; }
.order-warning { display:flex; gap:12px; align-items:flex-start; border:1px solid #f3d6a6; background:#fff8e9; border-radius:13px; padding:13px 15px; color:#8a4b08; }
.order-warning > span { flex:0 0 auto; width:28px; height:28px; }
.order-warning svg { width:23px; height:23px; }
.order-warning strong { display:block; font-size:11px; }
.order-warning p { margin:4px 0 0; font-size:10px; line-height:1.5; color:#9c651f; }
.formula-explainer { display:flex; align-items:center; flex-wrap:wrap; gap:8px; background:#fff; border:1px solid var(--line); border-radius:13px; padding:11px 13px; }
.formula-explainer strong { font-size:10px; margin-right:4px; }
.formula-explainer span { font-size:9px; color:#475467; background:#f6f8fa; border:1px solid #e7ebef; border-radius:999px; padding:5px 8px; }
.order-items-toolbar { align-items:flex-end; }
.order-items-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.order-products-table { min-width:1240px; }
.order-products-table tr.order-not-needed { opacity:.72; }
.order-number-cell strong, .order-number-cell span { display:block; }
.order-number-cell strong { font-size:12px; }
.order-number-cell span { color:var(--muted); font-size:9px; margin-top:2px; }
.order-number-cell.negative strong { color:var(--danger); }
.package-chip, .shelf-chip { display:inline-flex; align-items:center; border-radius:8px; white-space:nowrap; font-size:9px; font-weight:800; }
.package-chip { padding:5px 7px; background:#f5f7f9; color:#475467; }
.shelf-chip { padding:3px 5px; background:#e9f8f1; color:#05603a; }
.order-recommendation strong, .order-recommendation span { display:block; }
.order-recommendation strong { color:var(--primary); font-size:12px; }
.order-recommendation span { color:var(--muted); font-size:9px; margin-top:2px; }
.order-package-input { display:grid; grid-template-columns:72px auto; grid-template-rows:auto auto; gap:2px 6px; align-items:center; }
.order-package-input input { width:72px; height:38px; border:1px solid #cfd7df; border-radius:9px; padding:0 8px; text-align:right; outline:none; font-weight:800; color:var(--text); background:#fff; }
.order-package-input input:focus { border-color:#82b5aa; box-shadow:0 0 0 3px rgba(23,107,91,.08); }
.order-package-input > span { font-size:9px; color:#667085; }
.order-package-input small { grid-column:1 / -1; color:#98a2b3; font-size:8px; }
.order-save-bar { position:sticky; bottom:12px; z-index:8; margin:14px; border:1px solid #cfe1dc; background:rgba(255,255,255,.96); backdrop-filter:blur(10px); box-shadow:0 12px 34px rgba(16,24,40,.12); border-radius:13px; padding:11px 12px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.order-save-bar > div span, .order-save-bar > div strong, .order-save-bar > div small { display:block; }
.order-save-bar > div span { color:#98a2b3; font-size:8px; text-transform:uppercase; font-weight:800; letter-spacing:.06em; }
.order-save-bar > div strong { font-size:13px; margin-top:2px; }
.order-save-bar > div small { color:var(--muted); font-size:9px; margin-top:2px; }
.order-delete-form { display:flex; justify-content:flex-end; padding:0 14px 14px; }
.btn-danger-ghost { background:#fff; color:var(--danger); border:1px solid #f1c8c3; }
.btn-danger-ghost:hover { background:var(--danger-soft); }

@media (max-width: 1100px) {
    .orders-date-strip { grid-template-columns:1fr 24px 1fr; }
    .orders-formula-pill { grid-column:1 / -1; }
    .order-context-card { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .order-context-location { grid-column:1 / -1; }
    .manual-store-grid { grid-template-columns:1fr; }
}

@media (max-width: 720px) {
    .orders-page-header, .order-detail-header, .table-toolbar.orders-toolbar, .table-toolbar.order-items-toolbar { align-items:flex-start; flex-direction:column; }
    .orders-date-strip { grid-template-columns:1fr; }
    .orders-date-arrow { transform:rotate(90deg); height:18px; }
    .orders-formula-pill { grid-column:auto; }
    .orders-quick-search, .orders-quick-search input, .manual-order-controls, .manual-order-controls input, .order-items-actions, .order-items-actions input { width:100%; min-width:0; }
    .manual-store-card { grid-template-columns:1fr; align-items:start; }
    .order-context-card { grid-template-columns:1fr; }
    .order-context-location { grid-column:auto; }
    .order-save-bar { position:static; flex-direction:column; align-items:stretch; }
    .order-save-bar .btn { width:100%; }
}

/* Stock Flow 07.1 - Setări comenzi */
.nav-sub-item { min-height: 37px; margin-left: 18px; padding-left: 14px; font-size: 12px; color: #aebfc1; border-left: 1px solid rgba(255,255,255,.09); border-radius: 0 9px 9px 0; }
.nav-sub-item span { width: 16px; }
.nav-settings-parent + .nav-sub-item { margin-top: -2px; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.settings-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; grid-template-columns: 46px 1fr auto; gap: 15px; align-items: center; text-decoration: none; transition: .15s ease; }
.settings-card:hover { border-color: #bfd8d1; box-shadow: 0 10px 28px rgba(16,24,40,.06); transform: translateY(-1px); }
.settings-card-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.settings-card-icon svg { width: 21px; height: 21px; }
.settings-card-copy strong, .settings-card-copy small { display: block; }
.settings-card-copy strong { font-size: 15px; margin-bottom: 5px; }
.settings-card-copy small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.settings-card-arrow { color: #98a2b3; font-size: 20px; }
.order-settings-layout { grid-template-columns: minmax(0,1.2fr) minmax(300px,.8fr); }
.input-with-suffix { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: stretch; }
.input-with-suffix input { border-radius: 11px 0 0 11px; }
.input-with-suffix > span { min-width: 64px; display: grid; place-items: center; margin: 0; padding: 0 14px; border: 1px solid #d7dde5; border-left: 0; border-radius: 0 11px 11px 0; background: #f8fafb; color: #667085; font-size: 11px; font-weight: 750; }
.order-settings-preview h3 { margin: 8px 0 18px; }
.settings-formula-box { display: grid; grid-template-columns: 30px 1fr; gap: 11px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.settings-formula-box > span { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 800; }
.settings-formula-box strong, .settings-formula-box small { display: block; }
.settings-formula-box strong { font-size: 12px; }
.settings-formula-box small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.settings-formula-note { margin: 16px 0 0; padding: 12px; border-radius: 11px; background: #f7f9fa; color: #667085; font-size: 10px; line-height: 1.55; }
@media (max-width: 980px) {
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .order-settings-layout { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .settings-grid { grid-template-columns: 1fr; }
}

/* Stock Flow 07.4 - Necesar furnizor */
.supplier-context-card {
    display:flex; align-items:flex-end; justify-content:space-between; gap:18px;
    padding:18px 20px; background:#fff; border:1px solid var(--line); border-radius:16px;
    box-shadow:var(--shadow-sm);
}
.supplier-context-main { display:flex; align-items:center; gap:13px; min-width:260px; }
.supplier-context-main > div { display:flex; flex-direction:column; gap:2px; }
.supplier-context-main small, .supplier-context-controls label > span { color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.supplier-context-main strong { font-size:16px; }
.supplier-context-main > div > span { color:var(--muted); font-size:12px; }
.supplier-context-controls { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px; justify-content:flex-end; }
.supplier-context-controls label { display:flex; flex-direction:column; gap:5px; }
.supplier-context-controls select, .supplier-context-controls input,
.supplier-filters input, .supplier-filters select {
    height:38px; border:1px solid #d7dde5; border-radius:9px; background:#fff; padding:0 11px;
    color:var(--text); outline:none; font-size:12px;
}
.supplier-context-controls select { min-width:250px; }
.supplier-context-controls input[type="date"] { min-width:145px; }
.supplier-context-controls select:focus, .supplier-context-controls input:focus,
.supplier-filters input:focus, .supplier-filters select:focus { border-color:#82b5aa; box-shadow:0 0 0 3px rgba(23,107,91,.07); }
.supplier-toolbar { align-items:flex-start; }
.supplier-toolbar > div:first-child { max-width:650px; }
.supplier-toolbar p { margin-top:4px; }
.supplier-filters { display:flex; flex-wrap:wrap; gap:7px; justify-content:flex-end; align-items:center; }
.supplier-filters input[type="search"] { width:235px; }
.supplier-filters select { min-width:210px; }
.supplier-needs-table th:nth-child(n+2), .supplier-needs-table td:nth-child(n+2) { white-space:nowrap; }
.supplier-row-needed { background:linear-gradient(90deg, rgba(255,248,235,.62), rgba(255,255,255,0) 44%); }
.supplier-number { display:block; font-size:15px; color:var(--text); }
.supplier-number.success { color:#176b5b; }
.supplier-number.danger { color:#b54747; }
.supplier-number.muted { color:var(--muted); }
.supplier-need-badge { display:inline-flex; flex-direction:column; gap:2px; padding:8px 10px; border-radius:10px; background:#fff4df; border:1px solid #f0d39c; color:#7b5112; }
.supplier-need-badge strong { font-size:14px; }
.supplier-need-badge small { font-size:10px; font-weight:700; }
.supplier-breakdown { margin-top:5px; }
.supplier-breakdown summary { cursor:pointer; color:#176b5b; font-size:11px; font-weight:700; list-style:none; }
.supplier-breakdown summary::-webkit-details-marker { display:none; }
.supplier-breakdown > div { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; max-width:460px; }
.supplier-breakdown > div span { font-size:10px; border:1px solid #dbe4e1; border-radius:999px; padding:3px 7px; background:#f7faf9; color:#52625f; }
.supplier-note { display:flex; align-items:flex-start; gap:12px; border:1px solid #d9e7e3; background:#f5faf8; border-radius:14px; padding:14px 16px; }
.supplier-note > span { width:22px; color:#176b5b; flex:0 0 auto; }
.supplier-note svg { width:20px; height:20px; }
.supplier-note strong { display:block; margin-bottom:2px; }
.supplier-note p { margin:0; color:var(--muted); font-size:12px; }
@media (max-width:900px) {
    .supplier-context-card { align-items:stretch; flex-direction:column; }
    .supplier-context-controls { justify-content:stretch; display:grid; grid-template-columns:1fr 1fr; }
    .supplier-context-controls label:first-child { grid-column:span 2; }
    .supplier-context-controls select, .supplier-context-controls input, .supplier-context-controls .btn { width:100%; min-width:0; }
    .supplier-filters { width:100%; justify-content:stretch; display:grid; grid-template-columns:1fr 1fr; }
    .supplier-filters input[type="search"] { width:100%; grid-column:span 2; }
    .supplier-filters select, .supplier-filters .btn { width:100%; min-width:0; }
}
@media (max-width:560px) {
    .supplier-context-controls, .supplier-filters { grid-template-columns:1fr; }
    .supplier-context-controls label:first-child, .supplier-filters input[type="search"] { grid-column:auto; }
}


/* 07.5 - Setări colapsabile + dialoguri de confirmare Stock Flow */
.nav-collapse { display: grid; gap: 2px; }
.nav-collapse-toggle {
    width: 100%; border: 0; background: transparent; font-family: inherit; cursor: pointer;
    position: relative; text-align: left;
}
.nav-collapse-toggle:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-collapse-label { width: auto !important; flex: 1; text-align: left !important; color: inherit !important; }
.nav-collapse-arrow {
    width: 8px; height: 8px; margin-left: auto; margin-right: 4px;
    border-right: 1.5px solid #7f9699; border-bottom: 1.5px solid #7f9699;
    transform: rotate(45deg) translateY(-2px); transition: transform .18s ease, border-color .18s ease;
}
.nav-collapse.open .nav-collapse-arrow { transform: rotate(225deg) translate(-1px,-1px); border-color: #90dfca; }
.nav-submenu {
    display: grid; gap: 2px; overflow: hidden; max-height: 0; opacity: 0;
    transform: translateY(-4px); transition: max-height .22s ease, opacity .18s ease, transform .18s ease;
}
.nav-collapse.open .nav-submenu { max-height: 130px; opacity: 1; transform: translateY(0); }
.nav-collapse .nav-sub-item { margin-left: 18px; }

.sf-modal-open { overflow: hidden; }
.sf-confirm-overlay {
    position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center;
    padding: 20px; background: rgba(15,31,34,.48); backdrop-filter: blur(5px);
    opacity: 0; transition: opacity .15s ease;
}
.sf-confirm-overlay[hidden] { display: none !important; }
.sf-confirm-overlay.visible { opacity: 1; }
.sf-confirm-dialog {
    width: min(470px, 100%); background: #fff; border: 1px solid rgba(16,24,40,.08);
    border-radius: 18px; padding: 24px; box-shadow: 0 28px 70px rgba(15,31,34,.22);
    position: relative; display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 16px;
    transform: translateY(8px) scale(.985); transition: transform .15s ease;
}
.sf-confirm-overlay.visible .sf-confirm-dialog { transform: translateY(0) scale(1); }
.sf-confirm-close {
    position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0;
    border-radius: 9px; background: #f5f7f8; color: #667085; font-size: 20px; cursor: pointer;
}
.sf-confirm-close:hover { background: #eef1f3; color: #344054; }
.sf-confirm-icon {
    width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
    background: #fff1f0; color: #d92d20;
}
.sf-confirm-icon.is-primary { background: var(--primary-soft); color: var(--primary); }
.sf-confirm-icon svg { width: 22px; height: 22px; }
.sf-confirm-copy { padding-right: 22px; }
.sf-confirm-copy .eyebrow { display: block; margin: 2px 0 7px; }
.sf-confirm-copy h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.sf-confirm-copy p { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.sf-confirm-actions {
    grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px;
    padding-top: 5px; border-top: 1px solid var(--line); margin-top: 2px; padding-top: 16px;
}
.sf-confirm-actions .btn { min-width: 105px; }
@media (max-width: 560px) {
    .sf-confirm-overlay { padding: 14px; align-items: end; }
    .sf-confirm-dialog { grid-template-columns: 42px minmax(0,1fr); padding: 20px; border-radius: 17px; }
    .sf-confirm-icon { width: 42px; height: 42px; border-radius: 12px; }
    .sf-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .sf-confirm-actions .btn { width: 100%; min-width: 0; }
}

/* SOWA 07.8 - branding + sidebar navigation polish */
.brand-sidebar-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    object-fit: contain;
    border-radius: 13px;
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
}
.brand-sidebar-copy { min-width: 0; }
.brand-sidebar-copy strong { font-size: 18px; letter-spacing: .025em; }
.brand-sidebar-copy small {
    margin-top: 3px;
    font-size: 8px;
    letter-spacing: .12em;
    color: #8fb7ae;
}
.brand-auth { display: inline-flex; }
.brand-auth-logo {
    display: block;
    width: min(330px, 78vw);
    height: auto;
    object-fit: contain;
}
.auth-brand-wrap { margin-bottom: 22px; }

/* Meniul poate conține mai multe secțiuni fără să ascundă ultimele opțiuni. */
.sidebar { overflow: hidden; }
.nav-list {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(144,223,202,.35) transparent;
}
.nav-list::-webkit-scrollbar { width: 5px; }
.nav-list::-webkit-scrollbar-track { background: transparent; }
.nav-list::-webkit-scrollbar-thumb { background: rgba(144,223,202,.28); border-radius: 999px; }
.nav-collapse.open .nav-submenu { max-height: 260px; }

@media (max-width: 760px) {
    .brand-auth-logo { width: min(280px, 76vw); }
}


/* SOWA 07.9 - full logo in sidebar */
.brand-sidebar-full {
    display: block;
    padding: 0 3px 18px;
    width: 100%;
}
.brand-sidebar-full-logo {
    display: block;
    width: 100%;
    max-width: 216px;
    height: auto;
    box-sizing: border-box;
    object-fit: contain;
    padding: 8px 9px;
    margin: 0 auto;
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(0,0,0,.16);
}
@media (max-width: 760px) {
    .brand-sidebar-full-logo {
        max-width: 214px;
    }
}
