/* IGH Vault — one small stylesheet, no framework. */
:root {
  --bg: #f4f5f7; --card: #fff; --ink: #1d2733; --muted: #6b7684; --line: #dde2e8;
  --brand: #1f4e79; --brand-ink: #fff; --ok: #1d7a3e; --warn: #b7791f; --bad: #b42323; --info: #2b6cb0;
  --todo: #6b7684; --in_progress: #2b6cb0; --blocked: #b42323; --done: #1d7a3e;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 12px; } h2 { font-size: 16px; margin: 18px 0 8px; } h3 { font-size: 14px; margin: 12px 0 6px; }
main { max-width: 1400px; margin: 0 auto; padding: 16px 20px 60px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }

header.top { display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 48px; background: var(--brand); color: var(--brand-ink); }
header.top .brand { color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .3px; }
header.top nav a { color: #d6e2ef; padding: 14px 8px; display: inline-block; }
header.top nav a.on, header.top nav a:hover { color: #fff; text-decoration: none; box-shadow: inset 0 -3px #fff; }
header.top .search { flex: 1; } header.top .search input { width: 100%; max-width: 420px; padding: 6px 10px; border: 0; border-radius: 4px; }
header.top .who { color: #d6e2ef; white-space: nowrap; } header.top .who a { color: #fff; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; margin-bottom: 16px; }
.card.narrow { max-width: 560px; margin: 40px auto; } .card.login { margin-top: 80px; }
.grid { display: grid; gap: 16px; } .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.tiles { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 900px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
tr.dim td { color: var(--muted); } tr.hl td { background: #fff8e6; }
.table-wrap { overflow-x: auto; }

form label { display: block; margin: 0 0 10px; font-weight: 600; }
form label input, form label select, form label textarea { display: block; width: 100%; margin-top: 3px; font-weight: 400; }
form label.check { font-weight: 400; } form label.check input { display: inline; width: auto; margin-right: 6px; }
form .inline { display: flex; gap: 10px; align-items: flex-end; } form .inline label { flex: 1; }
input, select, textarea, button { font: inherit; } input:not([type=checkbox]):not([type=radio]), select, textarea { padding: 6px 8px; border: 1px solid #b9c2cc; border-radius: 4px; background: #fff; }
textarea { min-height: 80px; }
button, .btn { display: inline-block; padding: 6px 12px; border: 1px solid #b9c2cc; border-radius: 4px; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none !important; }
button.primary, .btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
button.danger, .btn.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
button.small, .btn.small { padding: 2px 8px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }
form.inline-form { display: inline; }

.flash { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; background: #e6f4ea; color: var(--ok); border: 1px solid #b9e0c5; }
.flash.error { background: #fdecec; color: var(--bad); border-color: #f3b8b8; } .flash.warn { background: #fff5e0; color: var(--warn); border-color: #f0d69a; }

.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; font-weight: 600; background: #e7ebf0; color: #3b4652; white-space: nowrap; }
.badge.ok, .badge.done, .badge.released, .badge.approved, .badge.available, .badge.live, .badge.adopted, .badge.restored, .badge.production { background: #e6f4ea; color: var(--ok); }
.badge.warn, .badge.blocked, .badge.deferred, .badge.checked_out, .badge.pending, .badge.ready, .badge.review, .badge.prototype { background: #fff5e0; color: var(--warn); }
.badge.bad, .badge.failed, .badge.rejected, .badge.missing, .badge.overdue, .badge.obsolete { background: #fdecec; color: var(--bad); }
.badge.info, .badge.in_progress, .badge.under_review, .badge.in_work, .badge.running, .badge.open { background: #e5effa; color: var(--info); }
.badge.admin { background: #ede5fa; color: #5b3fa0; }

.stat { display: flex; gap: 20px; flex-wrap: wrap; } .stat div { min-width: 90px; } .stat b { display: block; font-size: 22px; } .stat span { color: var(--muted); font-size: 12px; }
.tile h3 { margin: 0 0 6px; } .tile .bar { height: 6px; background: #e7ebf0; border-radius: 3px; overflow: hidden; margin: 8px 0; } .tile .bar i { display: block; height: 100%; background: var(--ok); }

/* Kanban */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.col { background: #eceff3; border-radius: 6px; padding: 8px; min-height: 300px; }
.col h3 { margin: 4px 4px 8px; display: flex; justify-content: space-between; } .col h3 span { color: var(--muted); font-weight: 400; }
.col.todo h3 { color: var(--todo); } .col.in_progress h3 { color: var(--in_progress); } .col.blocked h3 { color: var(--blocked); } .col.done h3 { color: var(--done); }
.task { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; margin-bottom: 8px; cursor: grab; }
.task.dragging { opacity: .4; } .col.over { outline: 2px dashed var(--brand); }
.task .t { font-weight: 600; } .task .m { color: var(--muted); font-size: 12px; margin-top: 3px; display: flex; justify-content: space-between; gap: 6px; }
.task.overdue .m .due { color: var(--bad); font-weight: 600; }

/* File tree */
.tree ul { list-style: none; padding-left: 18px; margin: 0; } .tree > ul { padding-left: 0; }
.tree li { margin: 1px 0; } .tree .folder > span { font-weight: 600; cursor: pointer; } .tree .folder.closed > ul { display: none; }
.tree .file { display: flex; gap: 8px; align-items: center; padding: 2px 4px; border-radius: 3px; } .tree .file:hover { background: #f0f3f6; }
.tree .file .name { flex: 1; } .tree .file.untracked .name { color: var(--warn); } .tree .file.ignored .name { color: var(--muted); text-decoration: line-through; }

.comments .c { border-top: 1px solid var(--line); padding: 8px 0; } .comments .c .who { font-weight: 600; } .comments .c .when { color: var(--muted); font-size: 12px; margin-left: 6px; }
.timeline li { margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; } .tabs a { padding: 8px 12px; border-bottom: 2px solid transparent; } .tabs a.on { border-color: var(--brand); font-weight: 600; }
details summary { cursor: pointer; font-weight: 600; }
pre { background: #f0f3f6; padding: 8px 10px; border-radius: 4px; overflow: auto; font-size: 12px; }
.indent-1 { padding-left: 18px; } .indent-2 { padding-left: 36px; } .indent-3 { padding-left: 54px; } .indent-4 { padding-left: 72px; } .indent-5 { padding-left: 90px; }
.diff-add td { background: #e6f4ea; } .diff-del td { background: #fdecec; } .diff-chg td { background: #fff5e0; }
.progress { height: 8px; background: #e7ebf0; border-radius: 4px; overflow: hidden; } .progress i { display: block; height: 100%; background: var(--brand); }
