/* AD Report # 16: Reports Gateway (MMC console). Hand-written; one light look, like the console. */
:root {
  --ink: #1F2A33; --ink-2: #4F5B66; --ink-off: #6B747C;
  --chrome: #F4F6F8; --ground: #D9DFE4; --pane: #FBFCFC; --head: #F1F4F6;
  --line: #C7CFD6; --line-2: #DDE3E8; --line-3: #B9C3CC;
  --sel: #C9D6E2; --sel-line: #8EA5BC; --hover: #E3E9EE; --row-hover: #E8EDF1;
  --accent: #5B7A99; --error: #8C3F2E; --warn: #7A5A1E;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--ground); color: var(--ink); font: 12px/1.35 "Segoe UI", system-ui, -apple-system, sans-serif; }
body.dragging { cursor: col-resize; user-select: none; }
button { font: inherit; color: inherit; }
.app { height: 100vh; min-height: 560px; display: flex; flex-direction: column; overflow: hidden; }

/* title bar, menu, toolbar */
.titlebar { flex: none; height: 32px; display: flex; align-items: center; gap: 8px; padding-left: 10px; background: var(--chrome); border-bottom: 1px solid var(--line); }
.titlebar .ti { width: 16px; height: 16px; flex: none; }
.titlebar h1 { flex: 1; min-width: 0; margin: 0; font-size: 12px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titlebar small { color: var(--ink-2); font-size: 11px; }
.wbtn { width: 46px; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.wbtn svg { width: 10px; height: 10px; }
a.wbtn:hover { background: var(--hover); }
a.wbtn.x:hover { background: #A35A48; color: #fff; }
.menubar { flex: none; display: flex; flex-wrap: wrap; gap: 2px; padding: 2px 6px; background: var(--chrome); }
.menubar button { border: 0; background: transparent; padding: 4px 8px; border-radius: 3px; }
.menubar button:hover, .toolbar button:hover { background: var(--hover); }
.toolbar { flex: none; display: flex; align-items: center; gap: 2px; padding: 3px 6px; background: var(--chrome); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar > button { width: 28px; height: 26px; border: 0; background: transparent; border-radius: 3px; display: flex; align-items: center; justify-content: center; }
.toolbar > button svg { width: 16px; height: 16px; }
.toolbar > button[aria-pressed="true"] { background: #DCE3E9; }
.toolbar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.toolbar .grow { flex: 1; }
.home-link { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: 3px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.home-link svg { width: 16px; height: 16px; flex: none; }
.home-link:hover { background: var(--hover); }
.find { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.find input { font: inherit; width: 200px; max-width: 40vw; height: 24px; border: 1px solid var(--line-3); border-radius: 3px; padding: 0 8px; background: #fff; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.loading { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; color: var(--ink-2); font-size: 13px; text-align: center; }
.loading[hidden], #act-row[hidden], .empty[hidden] { display: none; }

/* panes */
.panes { flex: 1; min-height: 0; display: flex; padding: 4px; }
.panes[hidden] { display: none; }
.tree, .list, .act { background: var(--pane); border: 1px solid var(--line); }
.tree { flex: none; width: 310px; overflow: auto; padding: 4px 0; }
.list { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.act { flex: none; width: 230px; overflow: auto; }
.split { flex: none; width: 6px; border: 0; padding: 0; background: transparent; cursor: col-resize; }
.split:hover, .split:focus-visible { background: #B9C7D4; outline: none; }
.act-strip { display: none; flex: none; width: 24px; margin-left: 4px; border: 1px solid var(--line); background: var(--head); flex-direction: column; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.act-strip svg { width: 10px; height: 10px; }
.act-strip span { writing-mode: vertical-rl; font-weight: 600; }
.act-strip:hover { background: var(--hover); }
.panes.act-closed .act, .panes.act-closed #split-act { display: none; }
.panes.act-closed .act-strip { display: flex; }

/* tree */
.tr { display: flex; align-items: center; height: 22px; padding-right: 8px; white-space: nowrap; }
.tw { width: 16px; height: 16px; flex: none; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--ink-2); }
.tn { display: flex; align-items: center; gap: 5px; height: 20px; padding: 0 5px 0 3px; border: 1px solid transparent; background: transparent; border-radius: 2px; cursor: default; white-space: nowrap; }
.tn:hover { background: var(--row-hover); }
.tn.sel { background: var(--sel); border-color: var(--sel-line); }
.tn.nc { color: var(--ink-off); }
.ic { flex: none; display: block; }

/* list view */
.lv-wrap { flex: 1; min-height: 0; overflow: auto; }
.lv { border-collapse: collapse; table-layout: fixed; width: 100%; }
.lv th { position: sticky; top: 0; z-index: 1; background: var(--head); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line-2); padding: 0; text-align: left; font-weight: 400; height: 24px; }
.lv th.ic-col, .lv td.ic-col { width: 24px; padding: 0 0 0 5px; border-right: 0; }
.lv th.fill { border-right: 0; }
.hb { width: 100%; height: 24px; border: 0; background: transparent; text-align: left; padding: 0 8px 0 3px; display: flex; align-items: center; justify-content: space-between; gap: 4px; white-space: nowrap; overflow: hidden; }
.hb span:first-child { overflow: hidden; text-overflow: ellipsis; }
.hb:hover { background: var(--hover); }
.hb .ar { color: #4F6B85; font-size: 9px; }
.grip { position: absolute; top: 0; right: 0; width: 7px; height: 24px; border: 0; padding: 0; background: transparent; cursor: col-resize; z-index: 2; }
.grip:hover, .grip:focus-visible { background: #9FB2C4; outline: none; }
.lv td { height: 21px; padding: 0 8px 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv tr.lr:hover td { background: var(--row-hover); }
.lv tr.lr.sel td { background: var(--sel); }
.lv tr.lr:focus-visible { outline: 1px dotted var(--ink); outline-offset: -1px; }
.st-error { color: var(--error); }
.st-warn { color: var(--warn); }
.st-off { color: var(--ink-off); }
.empty { padding: 18px 12px; color: var(--ink-2); }
.lv-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 8px; min-height: 24px; border-top: 1px solid var(--line-2); background: var(--head); color: var(--ink-2); }
.lv-foot #status { flex: 1; }
.pager { display: flex; align-items: center; gap: 8px; }
.pager[hidden] { display: none; }
.pager button { border: 1px solid var(--line-3); background: var(--pane); border-radius: 3px; padding: 2px 10px; }

/* actions pane */
.act-h { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 2px 10px; font-weight: 600; border-bottom: 1px solid var(--line-2); }
.act-h button { width: 24px; height: 22px; border: 0; background: transparent; border-radius: 3px; display: flex; align-items: center; justify-content: center; color: var(--ink-2); }
.act-h button:hover { background: var(--hover); }
.act-h svg { width: 10px; height: 10px; }
.act-t { padding: 5px 10px; background: var(--sel); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-t.sub { background: #DCE3E9; }
.act-l { display: flex; flex-direction: column; padding: 4px 0; }
.ab { text-align: left; border: 0; background: transparent; padding: 4px 10px 4px 28px; }
.ab:hover { background: var(--hover); }
.ab.off { color: var(--ink-off); }
.act-note { margin: 10px; padding: 10px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--ink-2); line-height: 1.5; background: var(--chrome); }
.act-note b { color: var(--ink); }
.statusbar { flex: none; height: 22px; display: flex; align-items: center; padding: 0 10px; background: var(--chrome); border-top: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Properties dialog */
.dlg-back { position: fixed; inset: 0; background: rgba(31, 42, 51, .28); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.dlg-back[hidden] { display: none; }
.dlg { width: 600px; max-width: 100%; max-height: 92vh; background: var(--chrome); border: 1px solid var(--sel-line); box-shadow: 0 10px 30px rgba(31, 42, 51, .25); display: flex; flex-direction: column; }
.dlg-bar { height: 30px; flex: none; display: flex; align-items: center; justify-content: space-between; padding-left: 10px; background: #fff; border-bottom: 1px solid var(--line-2); }
.dlg-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlg-bar button { width: 44px; height: 30px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.dlg-bar button:hover { background: #A35A48; color: #fff; }
.dlg-bar svg { width: 10px; height: 10px; }
.dlg-tabs { flex: none; display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 10px 0; }
.dlg-tabs button { padding: 5px 12px; border: 1px solid var(--line-3); background: #E7ECF0; margin-bottom: -1px; }
.dlg-tabs button[aria-selected="true"] { background: var(--pane); border-bottom-color: var(--pane); }
.dlg-body { margin: 0 10px; border: 1px solid var(--line-3); background: var(--pane); flex: 1; min-height: 0; overflow: auto; padding: 14px; }
.dlg-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line-2); font-size: 14px; font-weight: 600; word-break: break-all; }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) minmax(0, 1fr); column-gap: 12px; row-gap: 6px; }
.kv.mono { font-family: Consolas, "SFMono-Regular", monospace; }
.kv .k { color: var(--ink-2); word-break: break-word; }
.kv .v { word-break: break-word; user-select: text; }
.dlg-btns { flex: none; display: flex; justify-content: flex-end; gap: 6px; padding: 10px; }
.dlg-btns button { min-width: 76px; height: 26px; border: 1px solid var(--line-3); background: var(--pane); border-radius: 3px; }
.dlg-btns button.def { border-color: var(--accent); background: var(--hover); }

/* phone: the panes stack */
@media (max-width: 820px) {
  .app { height: auto; min-height: 100vh; }
  .titlebar small { display: none; }
  .panes { flex-direction: column; gap: 4px; }
  .tree, .act { width: auto !important; height: 280px; }
  .list { height: 460px; flex: none; }
  .split { display: none; }
  .panes.act-closed .act-strip { width: auto; flex-direction: row; justify-content: center; margin: 0; padding: 8px; }
  .panes.act-closed .act-strip span { writing-mode: horizontal-tb; }
}
