:root {
  --bg: #f4eef3; --surface: rgb(255 255 255 / .74); --surface-solid: #fff; --text: #1d2433; --muted: #6b7385; --border: rgb(29 36 51 / .09);
  --primary: #2c55d6; --primary-soft: rgb(44 85 214 / .10); --primary-text: #fff; --accent: #f08a24;
  --danger: #c0392b; --ok: #1f8a4c; --warn: #b7791f;
  --radius: 18px; --radius-sm: 12px; --shadow: 0 1px 2px rgb(29 36 51 / .04), 0 8px 24px rgb(29 36 51 / .07);
  --page: linear-gradient(135deg, #fdf1ea 0%, #f4eaf4 42%, #e6eefc 100%);
  --field: rgb(255 255 255 / .9);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --surface: rgb(30 36 48 / .78); --surface-solid: #1b2029; --text: #e8ebf0; --muted: #98a2b3; --border: rgb(255 255 255 / .09);
    --primary: #7c9bff; --primary-soft: rgb(124 155 255 / .14); --primary-text: #0c1020; --accent: #f3a256;
    --danger: #ff7b6b; --ok: #4ccb86; --warn: #f0b95a; --shadow: 0 8px 24px rgb(0 0 0 / .3);
    --page: linear-gradient(135deg, #1a1620 0%, #151b2a 55%, #101826 100%);
    --field: rgb(255 255 255 / .06);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); background-image: var(--page); background-attachment: fixed; color: var(--text); font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.55rem; font-weight: 650; } h2 { font-size: 1.1rem; font-weight: 650; } h3 { font-size: 1rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.hidden { display: none !important; }
svg.ico { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* spaced uppercase section titles with a blue underline accent */
.section-title { font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text); margin: 0 0 .85rem; padding-bottom: .45rem; position: relative; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 5.5rem; height: 2px; border-radius: 2px; background: var(--primary); }

/* layout */
.shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 1rem; min-height: 100vh; padding: .75rem; }
.sidebar { background: var(--surface); backdrop-filter: blur(14px); border: 1px solid var(--border); border-radius: 22px; padding: 1.1rem .8rem; position: sticky; top: .75rem; height: calc(100vh - 1.5rem); display: flex; flex-direction: column; gap: .15rem; overflow-y: auto; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; padding: .1rem .5rem 1rem; border-bottom: 1px solid var(--border); margin-bottom: .6rem; }
.brand i { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-style: normal; background: linear-gradient(135deg, #2c55d6, #6a8bff); color: #fff; font-size: 1rem; box-shadow: 0 6px 14px rgb(44 85 214 / .35); }
.brand b { background: linear-gradient(90deg, var(--primary), #e0701a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-group { display: grid; gap: .1rem; padding: .35rem 0 .6rem; border-bottom: 1px solid var(--border); }
.nav-group:last-of-type { border-bottom: 0; }
.nav-head { display: flex; align-items: center; gap: .5rem; width: 100%; border: 0; background: none; padding: .4rem .5rem; font-size: .7rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); cursor: pointer; border-radius: 8px; box-shadow: none; }
.nav-head:hover { border: 0; color: var(--text); }
.nav-head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dot, var(--primary)); }
.nav-head .chev { margin-left: auto; transition: transform .15s; width: 1em; height: 1em; }
.nav-group.closed .chev { transform: rotate(-90deg); }
.nav-group.closed a { display: none; }
.nav a { display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; border-radius: 12px; color: var(--text); font-size: .9rem; position: relative; }
.nav a:hover { background: var(--primary-soft); text-decoration: none; }
.nav a.active { background: var(--surface-solid); color: var(--primary); font-weight: 600; box-shadow: 0 2px 10px rgb(29 36 51 / .08); }
.nav a .count { margin-left: auto; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 0 .45rem; min-width: 1.2rem; text-align: center; }
.sidebar .me { margin-top: auto; }
.content { min-width: 0; display: grid; align-content: start; gap: 1rem; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .15rem .15rem 0; }
.search { flex: 1; max-width: 640px; position: relative; }
.search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { border-radius: 999px; padding: .6rem 1rem .6rem 2.6rem; background: var(--field); box-shadow: var(--shadow); border-color: transparent; }
.topbar .spacer { flex: 1; }
.iconbtn { position: relative; width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; padding: 0; background: var(--field); border-color: transparent; box-shadow: var(--shadow); color: var(--text); }
.iconbtn .badge-n { position: absolute; top: -3px; right: -3px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 0 .38rem; min-width: 1.15rem; line-height: 1.15rem; }
.userchip { display: flex; align-items: center; gap: .7rem; text-align: right; }
.userchip .name { font-weight: 600; line-height: 1.2; } .userchip .role { color: var(--muted); font-size: .8rem; }
.avatar { width: 42px; height: 42px; border-radius: 999px; background: linear-gradient(135deg, #2c55d6, #5b7cf0); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; letter-spacing: .02em; flex: none; box-shadow: 0 4px 12px rgb(44 85 214 / .3); }
.userchip .links { display: flex; gap: .6rem; justify-content: flex-end; font-size: .78rem; }
main { padding: .25rem .15rem 2rem; width: 100%; max-width: 1180px; display: grid; gap: 1.1rem; align-content: start; }
main > * { min-width: 0; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding: .5rem; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .6rem; }
  .brand { border: 0; margin: 0; padding: .1rem .4rem; }
  .nav-group { display: contents; border: 0; padding: 0; }
  .nav-head { display: none; } .nav-group.closed a { display: flex; }
  .nav { display: contents; }
  .userchip .name, .userchip .role { display: none; }
}
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.crumbs { margin-bottom: .1rem; }
.two-col { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

/* components */
.card { background: var(--surface); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
a.card { display: block; color: inherit; transition: transform .12s, box-shadow .12s; }
a.card:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 2px 4px rgb(29 36 51 / .05), 0 14px 30px rgb(29 36 51 / .11); }
.card.accent { position: relative; }
.card.accent::before { content: ""; position: absolute; left: 0; top: 1.1rem; height: 2.4rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.app-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; line-height: 1; background: var(--primary-soft); }
.counts { display: flex; gap: .5rem; margin-top: .9rem; flex-wrap: wrap; }
.stat { text-align: center; flex: 1; min-width: 56px; background: rgb(255 255 255 / .55); border: 1px solid var(--border); border-radius: 12px; padding: .4rem .25rem; }
@media (prefers-color-scheme: dark) { .stat { background: rgb(255 255 255 / .05); } }
.stat b { display: block; font-size: 1.15rem; } .stat span { font-size: .72rem; color: var(--muted); }
.stat.bad b { color: var(--danger); }
.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: .15rem; }
.tile b { font-size: 1.9rem; font-weight: 650; letter-spacing: -.02em; }
.tile.warn b { color: var(--danger); }
.pill-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; }

/* quick actions: round icon buttons like a banking dashboard */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem .5rem; padding-top: .25rem; }
.quick a { display: grid; justify-items: center; gap: .5rem; text-align: center; color: var(--text); font-size: .8rem; padding: .2rem; border-radius: 12px; }
.quick a:hover { text-decoration: none; background: var(--primary-soft); }
.quick .circle { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px rgb(44 85 214 / .32); }
.quick .circle svg { width: 1.3rem; height: 1.3rem; }
.todo { display: flex; align-items: center; gap: .75rem; padding: .65rem .75rem; border-radius: 12px; background: rgb(255 255 255 / .55); border: 1px solid var(--border); color: var(--text); }
@media (prefers-color-scheme: dark) { .todo { background: rgb(255 255 255 / .05); } }
a.todo:hover { text-decoration: none; border-color: var(--primary); }
.todo b { margin-left: auto; font-size: 1.1rem; }
.todo.hot b { color: var(--accent); }

button, .btn { font: inherit; font-size: .9rem; cursor: pointer; border: 1px solid var(--border); background: var(--surface-solid); color: var(--text); padding: .5rem 1.05rem; border-radius: 999px; display: inline-flex; align-items: center; gap: .45rem; box-shadow: 0 1px 2px rgb(29 36 51 / .05); transition: border-color .12s, box-shadow .12s; }
button:hover, .btn:hover { border-color: var(--primary); text-decoration: none; box-shadow: 0 4px 12px rgb(29 36 51 / .09); }
button.primary, .btn.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); font-weight: 600; box-shadow: 0 6px 14px rgb(44 85 214 / .28); }
button.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
button.link { border: 0; background: none; padding: 0; color: var(--primary); box-shadow: none; border-radius: 4px; }
button.link:hover { box-shadow: none; text-decoration: underline; }
button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
input, select, textarea { font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .55rem .75rem; width: 100%; }
input[type=checkbox] { width: auto; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
textarea { min-height: 120px; resize: vertical; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .88rem; }
label > span.hint { font-weight: 400; color: var(--muted); }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; }
.filters > * { width: auto; min-width: 130px; }
.filters input[type=search] { flex: 1; min-width: 180px; border-radius: 999px; }
.filters select { border-radius: 999px; }
form.stack label { max-width: 720px; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); max-width: 720px; }

.badge { display: inline-block; padding: .12rem .65rem; border-radius: 999px; font-size: .74rem; font-weight: 650; background: rgb(255 255 255 / .6); border: 1px solid var(--border); white-space: nowrap; }
@media (prefers-color-scheme: dark) { .badge { background: rgb(255 255 255 / .06); } }
.s-new { color: var(--muted); } .s-review { color: var(--warn); border-color: var(--warn); } .s-approved { color: var(--primary); }
.s-in_progress { color: var(--primary); border-color: var(--primary); } .s-testing { color: var(--accent); border-color: var(--accent); }
.s-completed { color: var(--ok); border-color: var(--ok); } .s-rejected { color: var(--danger); border-color: var(--danger); }
.p-critical { color: var(--danger); border-color: var(--danger); } .p-high { color: var(--warn); border-color: var(--warn); }
.progress { height: 8px; background: var(--primary-soft); border-radius: 99px; overflow: hidden; min-width: 80px; }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.progress.done > i { background: var(--ok); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--primary-soft); }
.table-wrap { overflow-x: auto; padding: 0; }
.overdue { color: var(--danger); font-weight: 600; }

.error { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent); padding: .65rem .85rem; border-radius: var(--radius-sm); }
.notice { background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 55%, transparent); padding: .65rem .85rem; border-radius: var(--radius-sm); }
.notice.info { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
code.pw { font-size: 1.1rem; user-select: all; background: var(--primary-soft); padding: .15rem .4rem; border-radius: 6px; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.auth .card { width: min(430px, 100%); padding: 1.8rem; }
.auth .brand { border: 0; padding: 0 0 .5rem; margin: 0; }

/* sign-off box shown to the requester */
.confirm { border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 9%, var(--surface-solid)); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: grid; gap: .8rem; box-shadow: var(--shadow); }
.confirm label.check { display: flex; gap: .65rem; align-items: center; font-weight: 600; font-size: .95rem; cursor: pointer; }
.confirm label.check input { width: 1.25rem; height: 1.25rem; }

/* attachments */
.drop { border: 2px dashed var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; color: var(--muted); max-width: 720px; background: var(--field); }
.drop:focus-within, .drop.over { border-color: var(--primary); }
.thumbs { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .75rem; justify-content: flex-start; }
.thumb { width: 150px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-solid); text-align: left; }
.thumb .pic { height: 100px; display: grid; place-items: center; background: var(--primary-soft); font-size: 2rem; overflow: hidden; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .meta { padding: .35rem .5rem; font-size: .78rem; word-break: break-all; }
.thumb .acts { display: flex; gap: .5rem; padding: 0 .5rem .4rem; }
.modal { position: fixed; inset: 0; background: rgb(15 20 35 / .55); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 10; padding: 1rem; }
.modal .box { background: var(--surface-solid); border-radius: 22px; padding: 1.3rem; max-width: 96vw; max-height: 96vh; overflow: auto; display: grid; gap: .75rem; box-shadow: 0 24px 60px rgb(0 0 0 / .3); }
.modal canvas { max-width: 100%; border: 1px solid var(--border); cursor: crosshair; touch-action: none; }
.tools { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.tools button.on { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.tools input[type=color] { width: 44px; padding: 2px; height: 36px; }

/* request detail */
.detail { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.meta-list { display: grid; gap: .7rem; margin: 0; }
.meta-list dt { font-size: .68rem; text-transform: uppercase; color: var(--muted); letter-spacing: .12em; font-weight: 600; }
.meta-list dd { margin: 0; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment { border-top: 1px solid var(--border); padding: .75rem 0; }
.comment:first-child { border-top: 0; }
.comment .who { font-weight: 600; }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .88rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.steps { display: flex; gap: .35rem; flex-wrap: wrap; }
.steps span { font-size: .72rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; background: var(--primary-soft); color: var(--muted); }
.steps span.done { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.steps span.now { background: var(--primary); color: var(--primary-text); }
.steps span.hold { background: var(--accent); color: #fff; }
