:root { --navy:#1b2a4a; --ink:#1b2430; --muted:#6b7686; --line:#e3e8ef; --bg:#f3f5f8; --acc:#1c7c3a; --post:#b7791f; --rej:#c0392b; --blue:#1b6ac9; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:"Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif; font-size:14.5px; line-height:1.5; -webkit-font-smoothing:antialiased; }
body.center { display:grid; place-items:center; min-height:100vh; padding:16px; }
a { color:var(--blue); }
.wrap { max-width:1180px; margin:0 auto; padding:0 16px; }
.muted { color:var(--muted); } .small { font-size:12.5px; } .bad { color:var(--rej); } .mono { font-family:Consolas,monospace; word-break:break-all; }
.nav { background:var(--navy); color:#fff; }
.nav .wrap { display:flex; align-items:center; justify-content:space-between; height:54px; }
.nav nav { display:flex; gap:4px; align-items:center; }
.nav nav a, .nav nav .link { color:#dbe3f0; text-decoration:none; padding:8px 12px; border-radius:6px; font-weight:600; font-size:14px; }
.nav nav a:hover { background:rgba(255,255,255,.1); }
.nav nav a.on { background:rgba(255,255,255,.16); color:#fff; }
.brand { color:#fff; text-decoration:none; font-weight:800; font-size:18px; display:flex; gap:10px; align-items:center; }
.brand.big { color:var(--navy); font-size:22px; margin-bottom:14px; }
.logo { width:34px; height:34px; border-radius:8px; background:#fff; color:var(--navy); display:grid; place-items:center; font-weight:900; font-size:14px; }
.brand.big .logo { background:var(--navy); color:#fff; }
main { padding:18px 0 40px; }
.foot { text-align:center; padding:20px; font-size:12.5px; }
h1 { font-size:24px; margin:8px 0 14px; color:var(--navy); } h2 { font-size:18px; margin:18px 0 10px; color:var(--navy); } h3 { font-size:15px; margin:0 0 10px; color:var(--navy); }
.card { background:#fff; border:1px solid var(--line); border-radius:12px; padding:18px; margin-bottom:16px; box-shadow:0 1px 2px rgba(16,24,40,.04); }
.card.auth { width:100%; max-width:400px; }
.flash { padding:10px 14px; border-radius:8px; margin-bottom:14px; background:#fff3cd; color:#7a5a00; }
.flash.ok { background:#e8f6ec; color:#14532d; } .flash.bad { background:#fdf1ef; color:#7a1f16; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; } .row.between { justify-content:space-between; } .grow { flex:1; min-width:140px; } .line { padding:6px 0; border-bottom:1px solid var(--line); }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; } .grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; align-items:start; }
label { display:block; font-size:13px; font-weight:600; margin:8px 0; }
label input, label select, label textarea, .row > input, .row > select { display:block; width:100%; padding:8px 10px; border:1px solid var(--line); border-radius:8px; font:inherit; font-size:14px; margin-top:3px; font-weight:400; background:#fff; }
.row > input, .row > select { width:auto; margin:0; }
label.chk { display:flex; gap:8px; align-items:center; font-weight:500; } label.chk input { width:auto; margin:0; }
.btn { display:inline-flex; align-items:center; gap:6px; background:#eef2f7; color:var(--navy); border:1px solid var(--line); border-radius:8px; padding:9px 14px; font-weight:600; cursor:pointer; text-decoration:none; font-size:14px; font-family:inherit; }
.btn.sm { padding:6px 10px; font-size:13px; } .btn.primary { background:var(--navy); color:#fff; border-color:var(--navy); } .btn.w { width:100%; justify-content:center; margin-top:10px; } .btn.danger { background:var(--rej); color:#fff; border-color:var(--rej); }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.link { background:none; border:0; color:var(--blue); cursor:pointer; font:inherit; padding:0; text-decoration:underline; } .link.bad { color:var(--rej); }
.inline { display:inline; }
.chips { display:flex; gap:6px; flex-wrap:wrap; margin:10px 0 14px; }
.chip { background:#fff; border:1px solid var(--line); border-radius:20px; padding:4px 12px; text-decoration:none; color:var(--ink); font-size:13px; } .chip.on { background:var(--navy); color:#fff; border-color:var(--navy); } .chip.on .muted { color:#cbd5e1; }
.table-wrap { padding:0; overflow:auto; }
.tbl { width:100%; border-collapse:collapse; } .tbl th { text-align:left; font-size:12.5px; color:var(--muted); padding:10px 12px; border-bottom:1px solid var(--line); } .tbl td { padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; }
.tbl tr.click { cursor:pointer; } .tbl tr.click:hover { background:#f7f9fb; }
.st { display:inline-block; font-size:12px; padding:2px 9px; border-radius:10px; background:#e3e8ef; color:#3c4756; font-weight:600; }
.st-sent, .st-viewed { background:#e1ecfb; color:#1b4f8f; } .st-accepted, .st-paid { background:#e8f6ec; color:#14532d; } .st-partial { background:#fbf0d2; color:#7a5a00; } .st-rejected, .st-expired, .st-unpaid { background:#fdf1ef; color:#7a1f16; }
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin:14px 0; flex-wrap:wrap; }
.tabs a { padding:8px 14px; text-decoration:none; color:var(--muted); font-weight:600; border-bottom:2px solid transparent; }
.tabs a.on { color:var(--navy); border-bottom-color:var(--navy); }
.item-card { border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-bottom:10px; }
.item-card.locked { background:#f5f7fa; } .item-card.bundle-head { background:#fbf6e8; border-style:dashed; }
.item-card summary { cursor:pointer; font-weight:700; display:flex; justify-content:space-between; gap:10px; }
.dec { font-size:12px; font-weight:600; padding:2px 8px; border-radius:10px; } .dec-accepted { background:#e8f6ec; color:#14532d; } .dec-postponed { background:#fbf0d2; color:#7a5a00; } .dec-rejected { background:#fdf1ef; color:#7a1f16; } .dec-pending { background:#e3e8ef; color:#3c4756; }
.evt { font-size:13px; } .evt td { padding:5px 8px; }
.mailrow summary { cursor:pointer; } .mailbody { border:1px solid var(--line); border-radius:8px; margin-top:8px; max-height:420px; overflow:auto; background:#f7f9fb; }
.comment { background:#f5f7fa; border-radius:8px; padding:8px 12px; margin-bottom:8px; } .comment.admin { background:#eef5fd; border-left:3px solid var(--blue); } .comment .who { font-weight:600; font-size:13px; }
.kv td { padding:5px 10px; vertical-align:top; } .kv td:first-child { color:var(--muted); white-space:nowrap; }
@media (max-width:860px) { .grid2, .grid3 { grid-template-columns:1fr; } .nav nav a, .nav nav .link { padding:8px 8px; font-size:13px; } }
.ic { vertical-align:-3px; flex-shrink:0; }

/* ---- page head ---- */
.page-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; margin:6px 0 14px; }
.ph-main h1 { margin:2px 0 4px; }
.ph-crumb { font-size:12.5px; color:var(--muted); } .ph-crumb a { color:var(--muted); text-decoration:none; } .ph-crumb a:hover { text-decoration:underline; }
.ph-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.new-offer select, .new-offer input { padding:9px 10px; border:1px solid var(--line); border-radius:8px; font:inherit; background:#fff; } .new-offer input { min-width:220px; }
/* dropdown */
.dd { position:relative; } .dd > summary { list-style:none; } .dd > summary::-webkit-details-marker { display:none; }
.dd[open] > summary { background:var(--navy); color:#fff; border-color:var(--navy); }
.dd-menu { position:absolute; right:0; top:calc(100% + 6px); z-index:20; background:#fff; border:1px solid var(--line); border-radius:10px; padding:12px; min-width:280px; box-shadow:0 12px 32px rgba(16,24,40,.14); }
.dd-menu label { margin:0 0 10px; }
/* stepper */
.stepper-wrap { background:#fff; border:1px solid var(--line); border-radius:12px; margin-bottom:14px; }
.stepper-wrap > summary { cursor:pointer; padding:10px 16px; font-weight:600; color:var(--navy); list-style:none; display:flex; gap:8px; align-items:center; }
.stepper-wrap > summary::-webkit-details-marker { display:none; }
.stepper { list-style:none; margin:0; padding:4px 12px 14px; display:grid; grid-template-columns:repeat(6, 1fr); gap:6px; counter-reset:s; }
.stepper li a { display:flex; flex-direction:column; align-items:center; text-align:center; gap:4px; text-decoration:none; color:var(--ink); padding:8px 6px; border-radius:10px; position:relative; }
.stepper li a:hover { background:#f5f7fa; }
.stepper li:not(:last-child) a::after { content:''; position:absolute; top:22px; left:calc(50% + 16px); width:calc(100% - 32px); height:2px; background:var(--line); }
.stepper li.done:not(:last-child) a::after { background:var(--acc); }
.stepper .dot { width:28px; height:28px; border-radius:50%; border:2px solid var(--line); background:#fff; display:grid; place-items:center; font-weight:700; font-size:12.5px; color:var(--muted); position:relative; z-index:1; }
.stepper li.done .dot { background:var(--acc); border-color:var(--acc); color:#fff; }
.stepper li.current .dot { border-color:var(--navy); color:var(--navy); box-shadow:0 0 0 4px rgba(27,42,74,.1); }
.stepper li.warn .dot { border-color:var(--rej); color:var(--rej); }
.stepper .st-t { font-weight:600; font-size:13px; } .stepper li.current .st-t { color:var(--navy); }
.stepper .st-h { line-height:1.3; }
/* kpis */
.kpis { display:grid; grid-template-columns:repeat(5, 1fr); gap:12px; margin:0 0 16px; }
.kpi { background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px 16px; display:flex; flex-direction:column; gap:2px; text-decoration:none; color:var(--ink); box-shadow:0 1px 2px rgba(16,24,40,.04); }
.kpi .k-v { font-size:24px; font-weight:800; color:var(--navy); line-height:1.1; } .kpi .k-l { font-size:12.5px; color:var(--muted); }
.kpi.ok .k-v { color:var(--acc); } .kpi.bad .k-v { color:var(--rej); }
a.kpi:hover { border-color:var(--navy); }
/* items in offer */
.item-card { padding:0; overflow:hidden; }
.item-card summary { padding:12px 14px; align-items:center; }
.item-card summary:hover { background:#f7f9fb; }
.item-card[open] summary { border-bottom:1px solid var(--line); background:#f7f9fb; }
.item-card > form, .item-card > .flash { margin:12px 14px; }
.item-card.bundle-head { padding:12px 14px; }
.it-l { display:flex; align-items:center; gap:10px; min-width:0; }
.it-n { width:26px; height:26px; border-radius:50%; background:#eef2f7; color:var(--muted); display:grid; place-items:center; font-size:12px; flex-shrink:0; }
.it-t { font-weight:700; }
.it-r { display:flex; align-items:center; gap:10px; white-space:nowrap; }
.tag { display:inline-block; font-size:11.5px; padding:1px 8px; border-radius:10px; background:#e3e8ef; color:#3c4756; font-weight:600; vertical-align:middle; }
.tag.pkg { background:#fbf0d2; color:#7a5a00; } .tag.warn { background:#fdf1ef; color:#7a1f16; } .tag.info { background:#eaf2fd; color:#1b4f8f; }
.tabs { gap:2px; margin:6px 0 16px; }
.tabs a { padding:9px 13px; border-radius:8px 8px 0 0; }
.tabs a:hover { background:#f3f5f8; color:var(--navy); }
.tbl th { background:#f7f9fb; }
.btn:hover { border-color:#c9d2de; } .btn.primary:hover { background:#24385f; }
label input:focus, label select:focus, label textarea:focus, .row > input:focus, .row > select:focus, .new-offer input:focus, .new-offer select:focus { outline:none; border-color:var(--navy); box-shadow:0 0 0 3px rgba(27,42,74,.08); }
@media (max-width:860px) { .stepper { grid-template-columns:repeat(3, 1fr); } .stepper li a::after { display:none; } .kpis { grid-template-columns:repeat(2, 1fr); } .page-head { align-items:stretch; } .ph-actions { width:100%; } .it-r { flex-direction:column; align-items:flex-end; gap:2px; } }
