body.team { background: #eef2f8; }
.badge-navy { background: var(--navy); }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(160deg, var(--navy), var(--navy-d)); }
.login:not([hidden]) { display: flex; }
.login-box { background: #fff; border-radius: var(--r); padding: 30px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login-box h1 { font-size: 30px; }
.login-box label { display: block; font-weight: 500; margin: 16px 0 6px; }
.login-box input { display: block; width: 100%; margin-top: 5px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; }
.login-box input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px #d5e0f5; }

.tbar { background: var(--navy-d); color: #fff; position: sticky; top: 0; z-index: 10; }
.tbar-in { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.tlogo { font-family: "Permanent Marker", cursive; font-weight: 400; font-size: 20px; letter-spacing: .02em; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.tabs button { border: 0; background: transparent; color: #cfd9ef; font: 500 15px "Jost", sans-serif; padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.tabs button:hover { background: rgba(255,255,255,.1); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--navy-d); font-weight: 600; }
.link { border: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.link.danger { color: var(--red); font-size: 14px; }
.tmain { padding-top: 24px; padding-bottom: 60px; }
.tmain section { padding: 8px 0 24px; }
.tmain h3 { margin: 22px 0 8px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi b { font-size: 30px; line-height: 1.15; color: var(--navy); }
.kpi b small { font-size: 16px; color: var(--muted); font-weight: 500; }
.kpi em { font-style: normal; font-size: 13px; color: var(--muted); }
.kpi-green b { color: var(--green); }
.kpi-goal { grid-column: span 2; }
.small-kpis { grid-template-columns: repeat(3, 1fr); }
.small-kpis .kpi b { font-size: 22px; }
.goal-bar.dark { background: #dde5f3; margin: 6px 0; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=search] { flex: 1; min-width: 200px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 999px; font: inherit; }
.btn-light-b { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }

.table-wrap { overflow-x: auto; background: #fff; border-radius: 14px; box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { background: var(--navy-d); color: #fff; text-align: left; padding: 10px 12px; font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:nth-child(even) { background: #f7f9fc; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl th.num { text-align: right; }
.tbl .items div + div { margin-top: 3px; }
.tbl .note { color: var(--muted); font-style: italic; }
.tbl .empty { text-align: center; color: var(--muted); padding: 30px; }
.tbl.compact td, .tbl.compact th { padding: 6px 10px; }
.tbl tr.sum td { background: #eaf0fb; font-weight: 600; }
.tbl tr.hl td { background: #fff6d6 !important; }
.tbl tfoot td { background: #eaf0fb; font-weight: 700; padding: 12px; }
.tbl tr.group td { background: #fdf0eb; color: var(--red-d); font-weight: 600; }
.tbl.xls td { white-space: nowrap; }
.tbl.notes th { background: #eaf0fb; color: var(--navy-d); width: 220px; white-space: normal; }
.tbl.notes td { white-space: normal; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.in { width: 84px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; text-align: right; }
.calc select { min-width: 180px; max-width: 260px; font-size: 14px; }
.check.inline { display: flex; gap: 9px; align-items: center; margin: 8px 0 14px; }
.check.inline input { width: 19px; height: 19px; accent-color: var(--navy); }

.chip { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.chip.ok { background: #dff3e6; color: var(--green); }
.chip.ko { background: #fde4e0; color: var(--red-d); }
.sup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin: 14px 0 20px; }
.sup-card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.sup-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.sup-head h3 { margin: 0; }

.scen-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 20px; }
.pill { border: 1.5px solid var(--navy); background: #fff; color: var(--navy); border-radius: 999px; padding: 8px 18px; font: 600 15px "Jost", sans-serif; cursor: pointer; }
.pill.on { background: var(--navy); color: #fff; }
.pill.custom { display: inline-flex; align-items: center; gap: 8px; cursor: default; }
.pill.custom input { width: 90px; border: 0; border-bottom: 1.5px solid var(--navy); font: inherit; padding: 2px 4px; background: transparent; }
.prev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: #fff; border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.panel h3 { margin-top: 0; }
.field { display: block; margin: 10px 0; font-weight: 500; font-size: 15px; }
.field input[type=range] { display: block; width: 100%; accent-color: var(--navy); }
.field input[type=number] { display: block; margin-top: 4px; padding: 8px 10px; width: 160px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; }
.field output { float: right; font-weight: 600; color: var(--navy); }
.warn { background: #fff3d6; border-left: 4px solid #e0a100; padding: 8px 12px; border-radius: 6px; margin: 10px 0 0; font-size: 14px; }
.chart { margin: 18px 0; background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.crow { display: grid; grid-template-columns: 60px 1fr 90px; gap: 10px; align-items: center; padding: 4px 0; }
.crow.hl .clab { font-weight: 700; }
.ctrack { background: #eaf0fb; border-radius: 6px; height: 20px; overflow: hidden; }
.cbar { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.cbar.dim { background: #9aa8c4; }
.cval { text-align: right; font-weight: 600; }

@media (max-width: 760px) { .prev-grid { grid-template-columns: 1fr; } .kpi-goal { grid-column: auto; } .small-kpis { grid-template-columns: 1fr; } }
@media print { .tbar, .toolbar, .btn { display: none !important; } body.team { background: #fff; } }

/* manual orders */
.mano-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.mano-grid .field input:not([type=checkbox]):not([type=range]), .mano-grid .field select, .mano-grid .field textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); font: inherit; }
.mano-grid .field input:focus, .mano-grid .field select:focus, .mano-grid .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px #d5e0f5; }
.m-foto, .m-submit { grid-column: 1 / -1; }
.m-opt { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.m-opt fieldset { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.m-opt legend { font-size: 14px; font-weight: 600; padding: 0 4px; }
.m-opt select { flex: 1 1 140px; margin: 0 !important; }
.m-add-row { display: flex; gap: 12px; align-items: flex-end; }
.m-add-row .qta { width: 110px; margin: 0; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 26px 16px; border: 2px dashed var(--navy); border-radius: 14px; background: #f3f7fd; cursor: pointer; color: var(--navy); }
.dropzone:hover { background: #e8f0fc; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { outline: 3px solid #9bb6ea; }
.thumbs-up { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.thumbs-up figure { position: relative; margin: 0; }
.thumbs-up img { height: 120px; width: auto; border-radius: 10px; border: 1px solid var(--line); display: block; }
.thumbs-up button { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--red); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; }
.ok-msg { color: var(--green); font-weight: 600; min-height: 1em; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: #eaf0fb; color: var(--navy); margin-top: 3px; }
.tag.warn-tag { background: #fff3d6; color: #8a5a00; }
.row-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.row-photos img { height: 54px; width: auto; border-radius: 6px; border: 1px solid var(--line); display: block; }
@media (max-width: 760px) { .mano-grid { grid-template-columns: 1fr; } }

/* Excel view: full width, no scrollbars, looks like a spreadsheet */
section[data-panel="netto"]:not([hidden]), section[data-panel="excel"]:not([hidden]) { width: min(1700px, calc(100vw - 24px)); margin-left: 50%; transform: translateX(-50%); }
.xl { border: 1px solid #b7b7b7; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); font-family: "Segoe UI", Calibri, Arial, sans-serif; }
.xl-bar { display: flex; align-items: center; gap: 10px; background: #f3f3f3; border-bottom: 1px solid #c9c9c9; padding: 5px 8px; font-size: 13px; }
.xl-ref { background: #fff; border: 1px solid #c9c9c9; min-width: 64px; text-align: center; padding: 2px 8px; }
.xl-fx { color: #217346; font-style: italic; font-weight: 700; }
.xl-val { flex: 1; background: #fff; border: 1px solid #c9c9c9; padding: 2px 8px; min-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xl-grid { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; line-height: 1.3; }
.xl-grid th, .xl-grid td { border: 1px solid #d4d4d4; padding: 3px 5px; overflow-wrap: anywhere; vertical-align: bottom; }
.xl-grid .colh, .xl-grid .rowh, .xl-grid .corner { background: #e6e6e6; color: #444; font-weight: 400; text-align: center; vertical-align: middle; font-size: 11px; }
.xl-grid .rowh { padding: 3px 0; }
.xl-grid td { color: #000; cursor: cell; }
.xl-grid td.xl-num { text-align: right; }
.xl-grid td.xl-title { font-size: 16px; font-weight: 700; color: var(--navy-d); border-color: #fff; border-bottom-color: #d4d4d4; }
.xl-grid td.xl-sub { font-style: italic; color: #555; }
.xl-grid td.xl-head { background: #17324d; color: #fff; font-weight: 700; text-align: center; vertical-align: middle; }
.xl-grid td.xl-label { font-weight: 700; background: #f2f6fa; }
.xl-grid tr.band td:not(.xl-head) { background: #f2f6fa; }
.xl-grid td.sel { outline: 2px solid #217346; outline-offset: -2px; position: relative; }
.xl-tabs { display: flex; gap: 2px; background: #f3f3f3; border-top: 1px solid #c9c9c9; padding: 4px 8px 0; }
.xl-tabs button { border: 1px solid #c9c9c9; border-top: 0; background: #e6e6e6; color: #333; font: 13px "Segoe UI", Calibri, Arial, sans-serif; padding: 5px 16px; cursor: pointer; border-radius: 0 0 6px 6px; }
.xl-tabs button[aria-selected="true"] { background: #fff; color: #217346; font-weight: 700; border-bottom: 3px solid #217346; margin-top: -1px; }
.xl-grid td.edit { background: #fffbe0; }
.xl-grid td.edit input.in { width: 100%; border: 0; background: transparent; padding: 0; text-align: right; font: inherit; }
.xl-grid td.edit input.in:focus { outline: none; }
.xl-grid td select { width: 100%; font: 11px "Segoe UI", Calibri, Arial, sans-serif; padding: 2px 2px; border: 1px solid #c9c9c9; border-radius: 3px; background: #fff; text-overflow: ellipsis; min-width: 0; }
.xl-grid .xl-note { font-size: 10.5px; color: #666; margin-top: 1px; }
.xl-grid tr.group td { background: #fdf0eb; color: var(--red-d); font-weight: 600; }
.xl-grid tr.total td { background: #eaf0fb; font-weight: 700; border-top: 2px solid #17324d; }
.xl-grid td.pos { color: #1a7a43; } .xl-grid td.neg { color: #c0392b; }
@media (max-width: 700px) { .xl-grid { font-size: 10px; } .xl-grid th, .xl-grid td { padding: 2px 3px; } }

/* forecasts: one tool per item + chart */
.pi-group { margin: 26px 0 10px; font-size: 20px; color: var(--navy); }
.pi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: start; }
.pi { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 18px; border-top: 5px solid var(--navy); }
.pi-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.pi-head img { height: 74px; width: 110px; object-fit: cover; border-radius: 10px; background: var(--cream); flex-shrink: 0; }
.pi-emoji { display: flex; align-items: center; justify-content: center; height: 74px; width: 110px; font-size: 40px; border-radius: 10px; background: #fdf0eb; flex-shrink: 0; }
.pi-kicker { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.pi-head h3 { margin: 0; font-size: 24px; line-height: 1.15; color: var(--navy-d); }
.pi-line { margin: 4px 0 0; font-size: 14px; }
.pi-controls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.pi-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pi-pills .pill { padding: 6px 13px; font-size: 14px; }
.pi-opts { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.pi-opts .field { margin: 0; flex: 1 1 200px; }
.pi-table th, .pi-table td { padding: 5px 8px; }
.pi .kpis { grid-template-columns: repeat(3, 1fr); margin: 0 0 10px; }
.pi .kpi span { font-size: 11px; line-height: 1.25; }
.pi .kpi b { font-size: 21px; }
.prev-chart-h { margin-top: 34px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .gl { stroke: #e3e8f1; stroke-width: 1; }
.chart .gl.zero { stroke: #7a869f; stroke-width: 1.3; }
.chart .ax { font: 11px "Jost", sans-serif; fill: #55607a; }
.chart .vl { font: 600 9px "Jost", sans-serif; fill: #14213d; }
.chart .vl.negv { fill: #c0392b; }
.chart .xl-lab { font: 600 12.5px "Jost", sans-serif; fill: #14213d; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin-top: 8px; font-size: 14px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
#prev-matrix { margin-top: 14px; }
@media (max-width: 900px) { .pi-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .pi .kpis { grid-template-columns: 1fr; } .pi-head h3 { font-size: 20px; } }
