/* Bussi Solutions — admin dashboard */
:root {
  --ink: #0B2B22; --green: #12513F; --green-2: #1E7A5C; --leaf: #3FAF7F; --gold: #E9A23B; --gold-2: #F4C26B;
  --bg: #F6F3EC; --card: #fff; --line: #E8E1D2; --text: #1C2A25; --muted: #66736E; --red: #C2410C;
  --serif: 'Fraunces', Georgia, serif; --sans: 'Manrope', system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(11,43,34,.05), 0 8px 24px -14px rgba(11,43,34,.2);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 var(--sans); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--green-2); text-decoration: none; }
a:hover { color: var(--green); }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); margin: 0; letter-spacing: -.01em; }
[x-cloak] { display: none !important; }
.hp { position: absolute !important; left: -9999px; opacity: 0; width: 1px; height: 1px; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.grow { flex: 1; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 10px; font: 700 .9rem var(--sans); border: 1.5px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s; white-space: nowrap; line-height: 1.2; }
.btn--sm { padding: 6px 11px; font-size: .8rem; border-radius: 8px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--ink); color: #fff; }
.btn--line { border-color: var(--line); background: #fff; color: var(--ink); }
.btn--line:hover { border-color: var(--ink); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--bg); color: var(--ink); }
.btn--danger { background: #FDECE5; color: var(--red); }
.btn--danger:hover { background: var(--red); color: #fff; }
.danger-text { color: var(--red) !important; }

/* layout */
.side { position: fixed; inset: 0 auto 0 0; width: 256px; background: var(--ink); color: rgba(255,255,255,.72); display: flex; flex-direction: column; z-index: 40; overflow-y: auto; }
.side__brand { display: flex; align-items: center; gap: 10px; padding: 22px 22px 18px; color: #fff; }
.side__brand span { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: #fff; display: flex; align-items: baseline; }
.side__brand em { font-style: normal; color: var(--gold); }
.side__brand small { font: 700 .62rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-left: 8px; }
.side nav { display: grid; gap: 2px; padding: 4px 12px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: rgba(255,255,255,.75); font-weight: 600; font-size: .9rem; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.is-on { background: rgba(244,194,107,.14); color: var(--gold-2); }
.side__group { font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.38); padding: 18px 12px 6px; }
.count { margin-left: auto; background: var(--gold); color: var(--ink); font-size: .7rem; padding: 1px 8px; border-radius: 999px; }
.side__foot { margin-top: auto; padding: 16px 24px 24px; border-top: 1px solid rgba(255,255,255,.08); }
.side__foot a { display: flex; gap: 8px; align-items: center; color: rgba(255,255,255,.7); font-weight: 600; font-size: .88rem; }
.side-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
.main { margin-left: 256px; min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 16px 32px; background: rgba(246,243,236,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 1.4rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.burger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--ink); }
.top__me { position: relative; }
.top__me > button { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px 4px 4px; cursor: pointer; font: 700 .88rem var(--sans); color: var(--ink); }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; }
.drop { position: absolute; right: 0; top: 48px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; min-width: 220px; display: grid; }
.drop small { color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.drop a, .drop button { text-align: left; padding: 9px 10px; border-radius: 8px; background: none; border: 0; font: 600 .9rem var(--sans); color: var(--ink); cursor: pointer; width: 100%; }
.drop a:hover, .drop button:hover { background: var(--bg); }
.content { padding: 28px 32px 60px; max-width: 1500px; }

/* alerts */
.alert { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 600; }
.alert button { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: inherit; line-height: 1; }
.alert--success { background: #E4F3EB; color: var(--green); }
.alert--error { background: #FDECE5; color: #8A2D0F; }
.alert a { font-weight: 800; color: inherit; text-decoration: underline; }

/* dashboard */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.hello h2 { font-size: 1.8rem; }
.hello p { margin: 4px 0 0; }
.hello__actions { display: flex; gap: 8px; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; color: var(--text); display: grid; gap: 2px; transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.kpi__icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 10px; }
.kpi small { color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.kpi strong { font-family: var(--serif); font-size: 2rem; color: var(--ink); line-height: 1.1; }
.kpi__sub { font-size: .8rem; color: var(--muted); }
.kpi__sub em { font-style: normal; font-weight: 800; }
.up { color: var(--green-2); } .down { color: var(--red); }
.tone-green { background: #E4F3EB; color: var(--green); }
.tone-gold { background: #FCEBCB; color: #8A5A0E; }
.tone-ink { background: #E3E8E6; color: var(--ink); }
.tone-leaf { background: #DDF4E8; color: var(--green-2); }
.tone-red { background: #FDECE5; color: var(--red); }

.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid--2-1 { grid-template-columns: 2fr 1fr; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 18px; }
.grid > .panel { margin-bottom: 0; }
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel__head h3 { font-size: 1.1rem; }

.cols { display: flex; align-items: flex-end; gap: 4px; height: 200px; padding-top: 10px; border-bottom: 1px solid var(--line); }
.col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.col i { width: 100%; background: var(--green-2); border-radius: 4px 4px 0 0; min-height: 2px; transition: background .2s; }
.col i.zero { background: var(--line); }
.col:hover i { background: var(--gold); }
.cols__axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 6px; }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 1fr 1.2fr 28px; gap: 10px; align-items: center; font-size: .84rem; }
.hbar__l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar__t { height: 8px; background: var(--bg); border-radius: 8px; overflow: hidden; display: block; }
.hbar__t i { display: block; height: 100%; border-radius: 8px; }
.hbar__t i.tone-green { background: var(--green-2); } .hbar__t i.tone-gold { background: var(--gold); } .hbar__t i.tone-ink { background: var(--ink); } .hbar__t i.tone-leaf { background: var(--leaf); } .hbar__t i.tone-red { background: var(--red); }
.hbar b { text-align: right; }
.funnel { display: grid; gap: 12px; }
.funnel__row { display: grid; grid-template-columns: 110px 1fr 30px; gap: 10px; align-items: center; color: var(--text); }
.funnel__row b { text-align: right; }
.wsrow { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.wsrow__d { width: 48px; height: 52px; flex-shrink: 0; border-radius: 10px; background: var(--ink); color: rgba(255,255,255,.7); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.wsrow__d b { font-family: var(--serif); font-size: 1.3rem; color: var(--gold-2); line-height: 1; }
.wsrow__b { flex: 1; display: grid; gap: 4px; min-width: 0; }
.wsrow__b strong { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wsrow__b small { color: var(--muted); font-size: .76rem; }
.feed { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.feed:last-child { border-bottom: 0; }
.feed > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.feed strong { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed small { color: var(--muted); font-size: .76rem; }
.feed__ic { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; color: var(--green-2); flex-shrink: 0; }

/* status pills */
.st { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.st--blue { background: #E3EEFB; color: #1F4E8C; }
.st--amber { background: #FCEBCB; color: #8A5A0E; }
.st--green { background: #E4F3EB; color: var(--green); }
.st--grey { background: #EEEBE4; color: var(--muted); }
.st--red { background: #FDECE5; color: var(--red); }
.st--gold { background: #FCEBCB; color: #8A5A0E; }

/* tables & lists */
.table-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; padding: 12px 16px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #FBF9F4; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #FBF9F4; }
.tbl tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.tbl tr.link { cursor: pointer; }
.tbl .cb { width: 40px; }
.tbl .actions { text-align: right; white-space: nowrap; }
.panel .tbl th:first-child, .panel .tbl td:first-child { padding-left: 20px; }
.thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; display: block; }
.thumb--ph { background: var(--bg); }
.inline { display: inline; }
.inline-flex { display: inline-flex; gap: 6px; align-items: center; }
.toggle { width: 40px; height: 22px; border-radius: 999px; background: var(--line); border: 0; position: relative; cursor: pointer; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle.is-on { background: var(--leaf); }
.toggle.is-on::after { left: 21px; }

.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.pills a { padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: .84rem; color: var(--text); }
.pills a b { margin-left: 4px; color: var(--muted); }
.pills a.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pills a.is-on b { color: var(--gold-2); }
.filterbar, .toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filterbar input, .filterbar select, .bulk select, .inline-flex input { padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: 500 .88rem var(--sans); background: #fff; color: var(--text); }
.filterbar input[type=search] { min-width: 220px; }
.bulk { display: flex; gap: 8px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #FBF9F4; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 6px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pager a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-weight: 700; color: var(--text); }
.pager a.is-on { background: var(--ink); color: #fff; }

.dl { display: grid; grid-template-columns: 180px 1fr; margin: 0; }
.dl dt, .dl dd { padding: 11px 0; border-bottom: 1px solid var(--line); margin: 0; }
.dl dt { color: var(--muted); font-weight: 700; font-size: .84rem; }
.dl dd { word-break: break-word; }
.quick { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-zone { margin-top: 16px; }
.danger-inline { margin-top: -4px; }

/* forms */
.form { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: .86rem; color: var(--ink); }
.form label small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.form input:not([type=checkbox]):not([type=file]), .form select, .form textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; font: 500 .94rem var(--sans); color: var(--text); background: #fff; }
.form textarea { resize: vertical; line-height: 1.55; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(30,122,92,.12); }
.form input:disabled { background: var(--bg); color: var(--muted); }
.form .check { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.form .check input { width: 18px; height: 18px; accent-color: var(--green); }
.req { color: var(--red); font-style: normal; }
.imgfield { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px; border: 1.5px dashed var(--line); border-radius: 10px; }
.imgfield img { width: 90px; height: 64px; object-fit: cover; border-radius: 8px; }
.formbar { display: flex; gap: 8px; padding-top: 6px; }
.formbar.sticky { position: sticky; bottom: 0; background: var(--bg); padding: 14px 0; }

/* login */
.login { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.login__art { background: var(--ink); color: rgba(255,255,255,.75); padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='%23F4C26B' stroke-opacity='.1' stroke-width='1.2'%3E%3Cpath d='M0 40 20 20 40 40 20 60z'/%3E%3Cpath d='M40 40 60 20 80 40 60 60z'/%3E%3Cpath d='M20 0 40 20 60 0M20 80 40 60 60 80'/%3E%3C/g%3E%3C/svg%3E"); }
.login__art .side__brand { padding: 0; }
.login__art h2 { color: #fff; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.1; margin-bottom: 16px; }
.login__art h2 em { color: var(--gold-2); font-weight: 400; }
.login__form { display: grid; place-items: center; padding: 40px 20px; }
.login .card { width: min(420px, 100%); display: grid; gap: 16px; }
.login .card h1 { font-size: 2rem; }
.login .card p { margin: -8px 0 4px; }
.login label { display: grid; gap: 6px; font-weight: 700; font-size: .86rem; }
.login input { padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: 500 1rem var(--sans); }
.login input:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(30,122,92,.12); }
.login .btn { padding: 14px; font-size: 1rem; }
.back { font-size: .88rem; text-align: center; }

@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .side { transform: translateX(-100%); transition: transform .25s; }
  .side.is-open { transform: none; }
  .main { margin-left: 0; }
  .burger { display: block; }
  .top { padding: 12px 18px; }
  .content { padding: 20px 18px 60px; }
  .grid--2-1, .grid--2 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login__art { display: none; }
}
@media (max-width: 640px) {
  .kpis, .grid--4, .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid--4, .grid-2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { border-bottom: 0; padding-bottom: 0; }
  .filterbar input[type=search] { min-width: 0; flex: 1; }
}
