/* SYSTEEL Compras: identidade forest + gold, fontes de sistema. */
:root {
  --forest: #105000; --forest-dark: #0b3a00; --forest-mid: #1e6b0e; --forest-tint: #e4ede0;
  --gold: #C4A35A; --gold-soft: #efe4c9; --gold-deep: #8f7130;
  --paper: #F5F5F0; --white: #ffffff; --ink: #23281f; --muted: #6b7263; --line: #dcded4;
  --bad: #a33327; --bad-bg: #f8e3df; --warn: #b5741a; --warn-bg: #fbf1dc; --good: #1e6b0e; --good-bg: #e4ede0;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--sans); background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.45; }
a { color: var(--forest); }
h1, h2, h3 { font-family: var(--serif); margin: 0 0 .4rem; font-weight: 400; }
code { font-family: var(--mono); background: #ecefe6; padding: 1px 5px; border-radius: 3px; font-size: .85em; }
.layout { display: flex; min-height: 100vh; }
.content { flex: 1; padding: 1.4rem 2rem 3rem; max-width: 1280px; min-width: 0; }
.sidebar { width: 228px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; background: linear-gradient(180deg, var(--forest-dark), var(--forest)); color: #eef2e8; display: flex; flex-direction: column; }
.brand { padding: 1.3rem 1.2rem .9rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand h1 { font-size: 1.6rem; color: var(--gold); margin: .1rem 0; }
.brand-kicker { font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; opacity: .75; }
.sidebar nav { flex: 1; padding: .7rem .6rem; display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { color: #d9e2cf; text-decoration: none; padding: .48rem .7rem; border-radius: 6px; font-size: .9rem; display: flex; align-items: center; gap: .5rem; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav a.active { background: rgba(196,163,90,.18); color: var(--gold); border-left: 3px solid var(--gold); padding-left: calc(.7rem - 3px); }
.badge { background: var(--gold); color: var(--forest-dark); font-size: .68rem; font-weight: 700; border-radius: 99px; padding: 1px 7px; margin-left: auto; }
.sidebar-foot { padding: .9rem 1.2rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.user-email { font-family: var(--mono); font-size: .66rem; opacity: .75; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 130px; }
.app-version { font-family: var(--mono); font-size: .6rem; opacity: .5; }
.page-head { margin-bottom: 1.1rem; display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.page-head h2 { font-size: 1.6rem; color: var(--forest-dark); }
.page-head .sub { margin: 0; color: var(--muted); font-size: .88rem; }
.crumb { font-size: .78rem; text-decoration: none; color: var(--muted); }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1.1rem; }
.panel h3 { font-size: 1.05rem; color: var(--forest-dark); margin-bottom: .7rem; display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.panel h3 small { font-family: var(--mono); font-size: .66rem; color: var(--muted); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; text-decoration: none; color: inherit; }
.stat-card:hover { border-color: var(--gold); }
.stat-label { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; }
.stat-value { font-family: var(--serif); font-size: 1.9rem; color: var(--forest-dark); }
.stat-value.gold { color: var(--gold-deep); } .stat-value.bad { color: var(--bad); }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .4rem .6rem; border-bottom: 2px solid var(--line); }
.table td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:hover td { background: #fafaf5; }
.table td.num, .table th.num { text-align: right; }
.tbl-wrap { overflow-x: auto; }
.nowrap { white-space: nowrap; } .mono { font-family: var(--mono); font-size: .8rem; } .muted { color: var(--muted); } .sm-text { font-size: .78rem; }
.empty { color: var(--muted); font-style: italic; padding: .4rem 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .7rem; font-weight: 600; white-space: nowrap; }
.st-rascunho { background: #e8ecf5; color: #33507a; } .st-enviado { background: #fdf3d7; color: #8a6d1a; } .st-em_cotacao { background: #f5e8d0; color: #7a5a20; }
.st-mapa { background: #e5d9f2; color: #5b3b85; } .st-adjudicado { background: #ddecd4; color: var(--forest); } .st-encomendado { background: #d4e6d0; color: var(--forest-dark); }
.st-fechado { background: #e6e6e0; color: #555; } .st-cancelado { background: #f5dcd7; color: var(--bad); }
.st-pendente { background: #e8ecf5; color: #33507a; } .st-respondido { background: #ddecd4; color: var(--forest); } .st-bounce, .st-erro { background: #f5dcd7; color: var(--bad); } .st-sem_resposta { background: #fdf3d7; color: #8a6d1a; }
.st-auto { background: #ddecd4; color: var(--forest); } .st-provavel { background: #fdf3d7; color: #8a6d1a; } .st-manual { background: #e5d9f2; color: #5b3b85; } .st-ignorada { background: #e6e6e0; color: #555; }
.st-emitida { background: #e8ecf5; color: #33507a; } .st-enviada { background: #fdf3d7; color: #8a6d1a; } .st-confirmada { background: #ddecd4; color: var(--forest); } .st-entregue { background: #d4e6d0; color: var(--forest-dark); }
.sev-alta { border-left: 3px solid var(--bad); } .sev-media { border-left: 3px solid var(--warn); } .sev-baixa { border-left: 3px solid var(--good); }
.tag { display: inline-block; background: #eef0e7; color: var(--muted); font-family: var(--mono); font-size: .66rem; padding: 1px 6px; border-radius: 4px; margin-right: 3px; }
label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .5rem; }
input, select, textarea { width: 100%; padding: .45rem .6rem; margin-top: .2rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: .88rem; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
input[type=checkbox], input[type=radio] { width: auto; margin: 0 .3rem 0 0; }
textarea { min-height: 90px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .2rem 1rem; }
.grid-form .wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: .6rem; align-items: center; margin-top: .6rem; flex-wrap: wrap; }
.inline-form { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; }
.inline-form label { margin: 0; } .inline-form input, .inline-form select { width: auto; min-width: 120px; }
.inline-form input[type=search] { width: 260px; }
.check { display: flex; align-items: center; gap: .4rem; font-size: .88rem; color: var(--ink); margin: 0; }
.btn { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; border: 1px solid transparent; border-radius: 6px; font: inherit; font-size: .84rem; font-weight: 600; padding: .48rem .95rem; text-decoration: none; transition: background .15s; }
.btn.primary { background: var(--forest); color: #fff; } .btn.primary:hover { background: var(--forest-mid); }
.btn.secondary { background: var(--gold-soft); color: var(--forest-dark); border-color: var(--gold); } .btn.secondary:hover { background: var(--gold); }
.btn.ghost { background: transparent; color: inherit; border-color: var(--line); } .btn.ghost:hover { border-color: var(--gold); }
.btn.danger { background: var(--bad); color: #fff; } .btn.sm { padding: .28rem .65rem; font-size: .74rem; } .btn.link { background: none; border: none; color: var(--forest); padding: 0; font-weight: 400; text-decoration: underline; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.filters a { font-size: .8rem; padding: .3rem .7rem; border-radius: 99px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--white); }
.filters a.on { background: var(--forest); color: #fff; border-color: var(--forest); }
.flash { padding: .6rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .88rem; }
.flash.ok { background: var(--good-bg); color: var(--forest-dark); border: 1px solid #b9d3a8; } .flash.bad { background: var(--bad-bg); color: var(--bad); border: 1px solid #e3b3aa; }
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(160deg, var(--forest-dark), var(--forest) 70%); }
.login-card { background: var(--paper); border-radius: 14px; padding: 2.2rem 2.4rem; width: 350px; box-shadow: 0 18px 60px rgba(0,0,0,.35); }
.login-card h1 { color: var(--forest-dark); font-size: 2rem; margin: .2rem 0; }
.two-col { display: grid; grid-template-columns: 360px 1fr; gap: 1.1rem; align-items: start; } .col { min-width: 0; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; }
.timeline { display: flex; flex-direction: column; gap: .6rem; }
.bubble { max-width: 92%; background: #f2f4ec; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .9rem; }
.bubble.out { align-self: flex-end; background: #eaf2e2; border-color: #cfe0c2; }
.bubble header { display: flex; gap: .5rem; align-items: baseline; font-size: .76rem; margin-bottom: .15rem; flex-wrap: wrap; }
.bubble header time { margin-left: auto; color: var(--muted); font-size: .68rem; }
.bubble p { margin: .2rem 0; white-space: pre-wrap; word-break: break-word; font-size: .86rem; }
.bubble .subject { font-weight: 700; font-size: .84rem; }
.bubble details summary { font-size: .72rem; color: var(--muted); cursor: pointer; }
.hist { font-size: .8rem; color: var(--muted); } .hist li { margin-bottom: .2rem; }
.best { color: var(--good); font-weight: 700; } .chosen { background: var(--gold-soft); }
.mc td.q { cursor: pointer; } .mc td.q:hover { background: var(--forest-tint); }
.big { font-family: var(--serif); font-size: 1.6rem; color: var(--forest-dark); }
.note { font-size: .82rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: .2rem .8rem; font-size: .86rem; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
.notif { padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--white); margin-bottom: .45rem; display: flex; gap: .8rem; align-items: flex-start; }
.notif.lida { opacity: .6; } .notif .t { font-weight: 600; font-size: .88rem; } .notif .m { font-size: .8rem; color: var(--muted); }
details.box { border: 1px dashed var(--line); border-radius: 8px; padding: .5rem .8rem; margin-top: .6rem; } details.box summary { cursor: pointer; font-size: .84rem; color: var(--forest); }
@media (max-width: 900px) { .layout { flex-direction: column; } .sidebar { width: 100%; height: auto; position: static; } .sidebar nav { flex-direction: row; flex-wrap: wrap; } .two-col { grid-template-columns: 1fr; } .content { padding: 1rem; } }
