:root {
  color-scheme: dark;
  --ink: #f5f8fc;
  --muted: #a1adbb;
  --muted-2: #748397;
  --bg: #07101b;
  --panel: #0d1724;
  --panel-raised: #101d2b;
  --line: #1c2b3e;
  --line-bright: #2d425a;
  --blue: #5792d8;
  --blue-bright: #78b7ff;
  --green: #61c99a;
  --amber: #e9ad5c;
  --red: #ef7478;
  --violet: #a493ee;
  --radius: 10px;
  --shadow: 0 18px 60px rgba(0, 0, 0, .28);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; overflow-x: clip; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 50% -18%, rgba(87,146,216,.09), transparent 34rem), var(--bg); font-size: 15px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, summary, select, input[type="file"] { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
::selection { color: #fff; background: rgba(87,146,216,.5); }
* { scrollbar-color: #31465f #09121d; scrollbar-width: thin; }
.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 10px 14px; color: var(--ink); background: #132b45; border: 1px solid var(--blue-bright); border-radius: 7px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.topbar { height: 68px; border-bottom: 1px solid #203047; background: rgba(7,14,23,.97); display: flex; align-items: center; padding: 0 42px; position: sticky; top: 0; z-index: 60; backdrop-filter: blur(16px); box-shadow: 0 8px 24px rgba(0,0,0,.13); }
.brand, .login-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; white-space: nowrap; }
.brand { font-size: 14px; }
.brand em { color: #3b4a5c; font-style: normal; }
.brand strong { color: var(--blue-bright); font-weight: 650; }
.logo-wrap { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; background: #05070a; border: 1px solid #252a32; overflow: hidden; flex: none; }
.logo-wrap img { width: 26px; height: 26px; object-fit: contain; }
.nav-links { min-width: 0; margin-left: 38px; display: flex; align-self: stretch; gap: 5px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { flex: none; display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-size: 13px; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,.025); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); background: rgba(87,146,216,.055); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.account-identity { min-width: 0; display: flex; align-items: center; gap: 9px; }
.identity { display: grid; max-width: min(220px, 20vw); text-align: right; line-height: 1.25; }
.identity span, .identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity span { font-size: 12px; color: #d8e2ed; }
.identity small { font-size: 10px; color: var(--muted-2); }
.icon-button { color: var(--muted); border: 1px solid var(--line); background: transparent; border-radius: 7px; width: 34px; height: 34px; padding: 0; }
.icon-button:hover { color: var(--ink); border-color: var(--line-bright); }
.logout-button { min-height: 36px; padding: 0 12px; }

.app-main { width: min(1420px, calc(100% - 64px)); margin: 0 auto; padding: 36px 0 72px; }
.narrow-main { width: min(1000px, calc(100% - 48px)); }
.page-heading { margin-bottom: 22px; }
.page-heading h1 { margin: 0 0 4px; letter-spacing: -.035em; font-size: clamp(27px, 2.6vw, 36px); line-height: 1.12; }
.page-heading p { margin: 0; color: var(--muted); }
.split-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.eyebrow { color: var(--blue-bright); font-size: 11px; font-weight: 850; letter-spacing: .15em; }
.heading-actions, .table-actions, .version-actions, .user-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.panel { background: linear-gradient(155deg, rgba(15,27,42,.97), rgba(10,19,30,.99)); border: 1px solid #203248; border-radius: var(--radius); box-shadow: 0 1px 0 rgba(255,255,255,.025), 0 14px 36px rgba(0,0,0,.09); }
.panel-heading { min-height: 74px; display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); gap: 15px; }
.panel-heading h2 { font-size: 17px; margin: 4px 0 0; letter-spacing: -.015em; }
.button { min-height: 43px; padding: 0 17px; border-radius: 8px; border: 1px solid var(--line-bright); display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; font-weight: 750; color: var(--ink); background: transparent; transition: border-color .15s, background .15s, box-shadow .15s; }
.button:hover { border-color: #4c6683; background: rgba(255,255,255,.035); box-shadow: 0 5px 16px rgba(0,0,0,.14); }
.button-primary { background: linear-gradient(135deg, #518bcd, #487ebd); border-color: #6099dc; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 8px 20px rgba(50,112,180,.15); }
.button-primary:hover { background: linear-gradient(135deg, #62a0e5, #4d86c8); border-color: #75b2f3; }
.button-quiet { background: #0c1622; }
.button-danger { color: #ffd9da; border-color: #6a3941; background: #321b22; }
.button-wide { width: 100%; justify-content: space-between; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.back-link { display: inline-block; color: var(--muted); font-size: 13px; margin-bottom: 25px; }
.back-link:hover, .forgot-link:hover { color: var(--blue-bright); }

.stack-form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: #c5d0db; font-size: 12px; font-weight: 700; }
label small, .field-note, .form-footer p, .form-note span { color: var(--muted-2); font-weight: 400; }
input, select, textarea { width: 100%; color: var(--ink); background: #08121d; border: 1px solid #26394f; border-radius: 7px; min-height: 43px; padding: 9px 11px; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; min-height: 16px; padding: 0; flex: none; accent-color: var(--blue); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #647184; }
input:hover, select:hover, textarea:hover { border-color: #38516d; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-size: 13px; font-weight: 800; margin-bottom: 12px; }
.form-panel { padding: 24px; }
.form-panel[open] > form { margin-top: 18px; }
.form-panel h2, .compact-form h2, .authorization-panel h2 { margin: 6px 0 8px; font-size: 20px; }
.compact-form { padding: 20px; }
.form-footer { border-top: 1px solid var(--line); padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.form-footer p { margin: 0; }
.inline-form, .smtp-test-form { display: flex; gap: 9px; align-items: end; }
.inline-form input { min-width: 280px; }
.search-inline { display: flex; gap: 8px; min-width: min(430px, 100%); }
.compact-search { display: flex; gap: 8px; width: min(360px, 100%); }
.compact-search input { min-height: 38px; }
.compact-search .button { min-height: 38px; }
.content-list-heading { flex-wrap: wrap; }
.content-search, .recycle-search { width: min(520px, 100%); margin-left: auto; }
.content-search input, .recycle-search input { min-width: 0; flex: 1; }
.content-search .button, .recycle-search .button { flex: none; }
.search-hero { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 18px; margin-bottom: 22px; }
.search-guide { width: min(980px, 100%); margin: -10px 0 22px; padding: 0; overflow: hidden; }
.search-guide > summary { padding: 12px 16px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 750; }
.search-guide[open] > summary { color: var(--ink); border-bottom: 1px solid var(--line); }
.search-guide-body { padding: 14px 18px 16px; color: var(--muted); font-size: 12px; }
.search-guide-body ul { margin: 0; padding-left: 19px; }
.search-guide-body li + li { margin-top: 7px; }
.search-guide-body p { margin: 12px 0 0; }
.search-guide-body code { color: #cbe2fb; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { padding: 18px; background: linear-gradient(145deg, #101d2b, #0c1622); border: 1px solid #203248; border-radius: var(--radius); display: flex; align-items: center; gap: 15px; min-height: 106px; }
.stat-icon { width: 41px; height: 41px; border: 1px solid; border-radius: 9px; display: grid; place-items: center; font-size: 18px; }
.stat-icon.blue { color: var(--blue-bright); background: rgba(87,146,216,.1); border-color: rgba(87,146,216,.25); }
.stat-icon.green { color: var(--green); background: rgba(97,201,154,.08); border-color: rgba(97,201,154,.22); }
.stat-icon.amber { color: var(--amber); background: rgba(233,173,92,.08); border-color: rgba(233,173,92,.22); }
.stat-card small { color: var(--muted); font-size: 11px; display: block; }
.stat-card strong { font-size: 26px; line-height: 1.25; display: block; }
.stat-card p { color: var(--muted-2); font-size: 11px; margin: 1px 0 0; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.sidebar-stack { display: grid; gap: 20px; }
.recent-panel { margin-top: 20px; }
.folder-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); padding: 16px; gap: 12px; }
.folder-card { min-height: 94px; border: 1px solid var(--line); background: rgba(255,255,255,.016); border-radius: 8px; padding: 16px; display: grid; grid-template-columns: auto 1fr; gap: 12px; position: relative; }
.folder-card:hover { border-color: #35516f; background: rgba(87,146,216,.04); }
.folder-card strong, .folder-card small { display: block; }
.folder-card small { color: var(--muted-2); font-size: 11px; margin-top: 3px; }
.folder-symbol { color: #7dbbff; font-size: 25px; line-height: 1; }
.folder-symbol.small { font-size: 20px; }
.authorization-panel { padding: 20px; }
.authorization-panel > p { color: var(--muted); font-size: 12px; }
.authorization-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.authorization-row:last-child { border-bottom: 0; }
.authorization-row span { color: var(--muted); font-size: 11px; }

.role-badge, .authorization-badge, .permission-pills span { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line-bright); color: var(--muted); background: rgba(255,255,255,.025); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; border: 1px solid var(--line-bright); color: var(--muted); background: rgba(255,255,255,.025); }
.status::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status-approved, .status-clean { color: var(--green); border-color: rgba(97,201,154,.25); background: rgba(97,201,154,.07); }
.status-pending, .status-unscanned { color: var(--amber); border-color: rgba(233,173,92,.28); background: rgba(233,173,92,.07); }
.status-rejected, .status-quarantined { color: var(--red); border-color: rgba(239,116,120,.28); background: rgba(239,116,120,.07); }
.version-uploader { display: inline-flex; align-items: center; gap: 7px; }

.table-wrap { max-width: 100%; overflow: auto; overscroll-behavior-inline: contain; scrollbar-gutter: stable; }
.table-wrap:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
th { color: var(--muted-2); text-transform: uppercase; letter-spacing: .09em; font-size: 10px; text-align: left; font-weight: 850; padding: 13px 17px; border-bottom: 1px solid var(--line); }
td { padding: 14px 17px; color: #bdc7d3; font-size: 12px; border-bottom: 1px solid rgba(28,43,62,.72); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.018); }
.access-tag-table th:nth-child(n+3):nth-child(-n+5),
.access-tag-table td:nth-child(n+3):nth-child(-n+5) { width: 112px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.access-tag-table th:last-child, .access-tag-table td:last-child { width: 1%; white-space: nowrap; }
.access-tag-actions { display: flex; align-items: flex-start; justify-content: flex-end; gap: 12px; }
.access-tag-actions details[open] { width: 320px; }
.access-tag-actions summary { cursor: pointer; list-style: none; }
.access-tag-actions summary::-webkit-details-marker { display: none; }
.access-tag-rename-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 320px; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.access-tag-rename-form input { min-width: 0; }
.access-tag-assignment-table td > strong,
.access-tag-assignment-table td > small,
.storage-breakdown td > small { display: block; }
.access-tag-assignment-table td > small,
.storage-breakdown td > small { margin-top: 4px; color: var(--muted-2); line-height: 1.4; }
.record-link, .table-action { color: var(--blue-bright); font-weight: 700; }
.table-action { display: inline-flex; align-items: center; min-height: 28px; padding-block: 4px; }
button.table-action { background: none; border: 0; padding-inline: 0; }
.table-action-danger { color: #f0a6aa; }
.record-name { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.record-name strong, .record-name small { display: block; }
.record-name strong { color: var(--ink); }
.record-name > span:last-child { min-width: 0; }
.record-name strong { overflow-wrap: anywhere; }
.record-name small { color: var(--muted-2); font-size: 10px; margin-top: 2px; }
.file-symbol { flex: none; width: 34px; height: 38px; border: 1px solid #36587d; background: #12253a; color: #79b9ff; border-radius: 5px; display: grid; place-items: center; font-weight: 850; font-size: 8px; position: relative; }
.file-symbol::after { content: ""; position: absolute; right: -1px; top: -1px; border-left: 8px solid transparent; border-top: 8px solid #5792d8; }
.empty-state { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty-state h3 { color: var(--ink); margin: 0 0 6px; }
.empty-state p { margin: 0; }
.empty-state.compact { padding: 24px; }

.breadcrumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: 18px; overflow-x: auto; white-space: nowrap; }
.breadcrumbs a:hover { color: var(--blue-bright); }
.action-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(280px,1fr); gap: 14px; margin-bottom: 18px; align-items: start; }
.upload-panel { padding: 17px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 14px; align-items: center; }
.upload-panel strong, .upload-panel small { display: block; }
.upload-panel small { color: var(--muted-2); font-size: 11px; margin-top: 3px; }
.upload-panel { transition: border-color .15s, background .15s, box-shadow .15s; }
.upload-panel.drop-active { border-color: var(--blue-bright); background: rgba(87,146,216,.09); box-shadow: 0 0 0 3px rgba(87,146,216,.12); }
.upload-progress { grid-column: 1 / -1; min-height: 18px; color: var(--muted); font-size: 11px; }
.file-picker { display: inline-flex; position: relative; }
.file-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-picker span { min-height: 43px; min-width: 120px; padding: 0 14px; border: 1px dashed #456585; border-radius: 8px; display: grid; place-items: center; color: var(--blue-bright); }
.file-picker input:focus-visible + span { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
details > summary { list-style: none; font-weight: 750; color: #dce6f0; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; float: right; color: var(--blue-bright); font-size: 18px; }
details[open] > summary::after { content: "−"; }
.details-panel { padding: 18px; }
.details-panel > form { margin-top: 16px; }
.content-list > .table-wrap, .recycle-section > .table-wrap { max-height: min(72vh, 860px); }
.content-list > .table-wrap thead th, .recycle-section > .table-wrap thead th { position: sticky; z-index: 2; top: 0; background: #0d1927; box-shadow: 0 1px 0 var(--line); }
.compact-actions { grid-template-columns: 1fr auto; align-items: center; }
.version-list { display: grid; gap: 13px; }
.version-card { padding: 20px; }
.version-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.version-heading strong, .version-heading small { display: block; }
.version-heading small { color: var(--muted-2); margin-top: 5px; overflow-wrap: anywhere; font-size: 11px; }
.version-number { display: inline-grid; place-items: center; min-width: 34px; height: 28px; margin-right: 9px; border-radius: 6px; color: var(--blue-bright); background: rgba(87,146,216,.1); border: 1px solid rgba(87,146,216,.25); font-size: 11px; font-weight: 850; }
.version-actions { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; justify-content: space-between; }

.app-shell { width: min(1420px, calc(100% - 64px)); margin: 0 auto; padding: 36px 0 72px; }
.button-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.button-secondary { background: #0c1622; }
.stacked-form { display: grid; gap: 14px; padding: 20px 22px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.split-layout > .panel { min-width: 0; }
.document-preview { display: block; width: 100%; min-height: 72vh; border: 0; background: #fff; }
.media-preview { display: block; width: 100%; max-height: 76vh; margin: 0; padding: 18px; object-fit: contain; background: #050b12; }
figure.media-preview { text-align: center; }
figure.media-preview img { display: block; max-width: 100%; max-height: 72vh; margin: auto; object-fit: contain; }
.markdown-preview { padding: 24px; overflow-wrap: anywhere; }
.markdown-preview > :first-child { margin-top: 0; }
.markdown-preview > :last-child { margin-bottom: 0; }
.markdown-preview h1, .markdown-preview h2, .markdown-preview h3 { line-height: 1.22; letter-spacing: -.025em; }
.markdown-preview a { color: var(--blue-bright); text-decoration: underline; text-underline-offset: 2px; }
.markdown-preview pre, .markdown-preview code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.markdown-preview pre { max-width: 100%; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #060d16; }
.markdown-preview code { color: #cbe2fb; }
.markdown-preview img { max-width: 100%; height: auto; }
.markdown-preview table { min-width: 0; }
.callout { margin: 18px 22px 0; padding: 13px 15px; border: 1px solid var(--line-bright); border-radius: 8px; color: var(--muted); background: rgba(255,255,255,.025); }
.callout strong { color: var(--ink); }
.callout ul { margin-bottom: 0; }
.callout-warning { border-color: rgba(233,173,92,.35); background: rgba(233,173,92,.07); }
.count-pill { min-width: 28px; padding: 3px 8px; border: 1px solid var(--line-bright); border-radius: 999px; color: var(--muted); text-align: center; font-size: 11px; }
.move-impact { overflow: hidden; }
.impact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.impact-grid div { padding: 17px 20px; border-bottom: 1px solid var(--line); }
.impact-grid div:nth-child(odd) { border-right: 1px solid var(--line); }
.impact-grid dt { color: var(--muted-2); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.impact-grid dd { margin: 5px 0 0; color: var(--ink); overflow-wrap: anywhere; }
.move-warning { display: grid; gap: 3px; margin: 18px 20px 0; padding: 13px 15px; border: 1px solid rgba(239,116,120,.38); border-radius: 8px; color: #ffd9da; background: rgba(239,116,120,.08); }
.move-warning span { color: var(--muted); font-size: 12px; }
.move-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 20px; }
[draggable="true"] { cursor: grab; }
[draggable="true"]:active { cursor: grabbing; }
.drag-source { opacity: .42; }
.drop-target { position: relative; background: rgba(87,146,216,.10) !important; box-shadow: inset 3px 0 0 var(--blue-bright); }
.drop-target td:first-child::after { content: "Drop to move here"; display: inline-block; margin-left: 10px; color: var(--blue-bright); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }

.editor-status { min-height: 20px; color: var(--muted); font-size: 11px; }
.link-search-panel { margin: 0 22px 22px; overflow: hidden; border: 1px solid var(--line-bright); border-radius: 9px; background: #091522; box-shadow: var(--shadow); }
.link-search-panel .panel-heading { min-height: 62px; }
.link-search-panel .panel-heading h3 { margin: 3px 0 0; font-size: 15px; }
.link-search-controls { display: grid; grid-template-columns: 1fr auto; gap: 9px; padding: 15px; border-bottom: 1px solid var(--line); }
.link-search-results { max-height: 310px; overflow: auto; padding: 7px; }
.link-search-results > .field-note { display: block; margin: 10px; }
.link-search-result { display: grid; gap: 2px; width: 100%; padding: 11px 12px; color: var(--ink); text-align: left; border: 0; border-radius: 7px; background: transparent; }
.link-search-result:hover { background: rgba(87,146,216,.09); }
.link-search-result strong { font-size: 12px; }
.link-search-result small { color: var(--muted-2); overflow-wrap: anywhere; }

.inheritance-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; margin-bottom: 17px; }
.inheritance-panel span, .inheritance-panel strong { display: block; }
.inheritance-panel span { color: var(--muted-2); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.inheritance-panel p { color: var(--muted); margin: 3px 0 0; }
.permission-editor { overflow: hidden; }
.permission-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 22px; }
.permission-columns fieldset { min-width: 0; }
.grant-row { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.grant-row strong, .grant-row small { display: block; }
.grant-row small { overflow-wrap: anywhere; }
.policy-rule-panel { overflow: visible; margin-bottom: 18px; }
.policy-rule-panel .panel-heading small { color: var(--muted-2); }
.rule-composer { padding: 16px 20px; border-top: 1px solid var(--line); }
.rule-composer[open] > summary { margin-bottom: 15px; }
.rule-form { display: grid; grid-template-columns: 130px minmax(220px, 1fr) 130px 130px minmax(180px, .7fr) auto; gap: 10px; align-items: end; }
.entity-picker { position: relative; display: block; min-width: 0; }
.entity-picker-results { position: absolute; z-index: 40; top: calc(100% + 5px); left: 0; right: 0; max-height: 260px; overflow-y: auto; padding: 5px; border: 1px solid var(--line-bright); border-radius: 8px; background: #091522; box-shadow: var(--shadow); }
.entity-picker-option { display: grid; gap: 1px; width: 100%; min-width: 0; padding: 9px 10px; color: var(--ink); text-align: left; border: 0; border-radius: 6px; background: transparent; }
.entity-picker-option:hover, .entity-picker-option.active { background: rgba(87,146,216,.12); }
.entity-picker-option strong, .entity-picker-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-picker-option strong { font-size: 12px; }
.entity-picker-option small { color: var(--muted-2); font-size: 10px; }
.top-folder-form { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(240px, 1fr) 180px auto; gap: 10px; align-items: end; margin-top: 18px; }
.inline-rule-remove { position: relative; }
.inline-rule-remove[open] form { position: absolute; z-index: 20; right: 0; width: min(340px, 78vw); padding: 14px; border: 1px solid var(--line-bright); border-radius: 8px; background: #0a1623; box-shadow: var(--shadow); }
.inline-rule-remove form .button { width: 100%; margin-top: 10px; }

.settings-main { width: min(1180px, calc(100% - 64px)); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr)); gap: 16px; margin-bottom: 22px; }
.storage-summary { margin-bottom: 22px; }
.storage-breakdown td code, .storage-location code { overflow-wrap: anywhere; }
.storage-share { display: block; width: 120px; height: 7px; margin-bottom: 5px; accent-color: var(--green); }
.storage-location { margin: 12px 2px 0; color: var(--muted); font-size: 12px; }
.settings-card { min-height: 104px; padding: 22px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.settings-card:hover { transform: translateY(-2px); border-color: #38536f; background: linear-gradient(155deg, rgba(18,32,49,.98), rgba(12,22,35,.99)); box-shadow: 0 16px 38px rgba(0,0,0,.16); }
.settings-card strong, .settings-card small { display: block; }
.settings-card > span:nth-child(2) { min-width: 0; }
.settings-card strong { font-size: 14px; }
.settings-card small { color: var(--muted); font-size: 11px; margin-top: 4px; }
.settings-card b { color: var(--blue-bright); font-size: 17px; }
.settings-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #315172; border-radius: 10px; color: var(--blue-bright); background: linear-gradient(145deg, #152b43, #0d1d2f); }
.settings-stats { grid-template-columns: repeat(4,1fr); }
.settings-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.metadata-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.metadata-grid div { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.metadata-grid div:nth-child(odd) { border-right: 1px solid var(--line); }
.metadata-grid dt { color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.metadata-grid dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.smtp-card { overflow: hidden; margin-bottom: 18px; }

.create-panel { padding: 20px; margin-bottom: 18px; }
.create-panel > form { margin-top: 19px; }
.recovery-admin-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; margin-bottom: 18px; }
.recovery-admin-card h2, .recovery-admin-card p { margin: 0; }
.recovery-admin-card p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.recovery-admin-card .user-actions { flex: none; padding: 0; margin: 0; border: 0; }
.local-admin-status-form { display: flex; align-items: end; gap: 9px; flex-wrap: wrap; }
.local-admin-status-form label { min-width: min(300px, 62vw); margin: 0; }
.local-admin-status-form input { margin-top: 4px; }
.admin-filter { display: grid; grid-template-columns: minmax(220px, 1fr) 150px minmax(180px, .45fr) auto; gap: 10px; align-items: end; padding: 14px; margin-bottom: 14px; }
.admin-result-summary { display: flex; justify-content: space-between; gap: 12px; margin: 0 2px 10px; color: var(--muted-2); font-size: 11px; }
.admin-card-list { grid-template-columns: 1fr; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; color: var(--muted); font-size: 12px; }
.role-filter { grid-template-columns: minmax(220px, 1fr) auto; }
.role-edit-form { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.user-create-form { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(260px,.6fr); gap: 18px; align-items: start; }
.user-create-form textarea { min-height: 160px; }
.user-invite-options { display: grid; gap: 14px; }
.user-invite-options [data-oidc-subjects] textarea { min-height: 118px; }
.user-invite-options .button { justify-self: start; }
.form-note { border: 1px solid rgba(233,173,92,.22); border-radius: 8px; background: rgba(233,173,92,.055); padding: 12px; display: grid; }
.form-note strong { color: var(--amber); }
.user-list, .role-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.user-card, .role-card { padding: 19px; }
.disabled-card { opacity: .7; }
.user-heading, .role-heading { display: flex; align-items: center; gap: 12px; }
.user-heading > div, .role-heading > div { min-width: 0; flex: 1; }
.user-heading strong, .user-heading small, .role-heading strong, .role-heading small { display: block; }
.user-heading small, .role-heading small { color: var(--muted); overflow-wrap: anywhere; }
.admin-card-title { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.user-avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #132b45; color: #8bc4ff; border: 1px solid #335474; font-size: 13px; font-weight: 850; line-height: 1; }
.user-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.user-avatar-small { width: 32px; height: 32px; font-size: 10px; }
.user-avatar-large { width: 64px; height: 64px; font-size: 19px; }
.account-page-heading { display: flex; align-items: center; gap: 16px; }
.account-page-heading h1 { margin-bottom: 4px; }
.avatar-settings { display: grid; gap: 18px; }
.avatar-settings-heading h2, .avatar-settings-heading p { margin: 0; }
.avatar-upload-form { padding-top: 17px; border-top: 1px solid var(--line); }
.avatar-picker { display: grid; gap: 8px; }
.avatar-picker .field-note { margin: 0; line-height: 1.45; }
.avatar-file-picker { position: relative; display: grid; gap: 4px; min-height: 78px; padding: 14px 16px; place-content: center; border: 1px dashed #456585; border-radius: 9px; color: var(--muted); background: rgba(87,146,216,.035); text-align: center; transition: border-color .15s, background .15s, box-shadow .15s; }
.avatar-file-picker:hover { border-color: #6796c7; background: rgba(87,146,216,.075); }
.avatar-file-picker > span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.avatar-file-picker > strong { color: var(--blue-bright); font-size: 13px; }
.avatar-file-picker input { position: absolute; width: 1px; height: 1px; min-height: 1px; margin: -1px; padding: 0; overflow: hidden; opacity: 0; }
.avatar-file-picker:has(input:focus-visible) { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.avatar-editor-error { margin: 0; padding: 10px 12px; border: 1px solid rgba(239,116,120,.36); border-radius: 7px; color: #ffb4b7; background: rgba(239,116,120,.07); font-size: 11px; line-height: 1.45; }
.avatar-crop-editor { display: grid; gap: 14px; padding: 14px; border: 1px solid #29435f; border-radius: 9px; background: #08131f; }
.avatar-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.avatar-editor-heading h3 { margin: 0; color: var(--ink); font-size: 15px; }
.avatar-editor-heading p { margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.avatar-editor-heading-actions { flex: none; display: flex; align-items: center; gap: 13px; }
.avatar-editor-heading .button-link { flex: none; }
.avatar-crop-layout { min-width: 0; display: grid; gap: 11px; }
.avatar-crop-stage { width: min(100%, 520px); margin-inline: auto; overflow: hidden; border: 1px solid #2b4663; border-radius: 9px; background: #040a11; box-shadow: inset 0 0 0 1px rgba(255,255,255,.015); }
.avatar-crop-stage canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; touch-action: none; user-select: none; cursor: default; }
.avatar-crop-stage canvas[data-crop-cursor="move"] { cursor: grab; }
.avatar-crop-stage canvas[data-crop-cursor="resize"] { cursor: nwse-resize; }
.avatar-crop-stage canvas[data-crop-action="move"] { cursor: grabbing; }
.avatar-crop-stage canvas[data-crop-action="resize"] { cursor: nwse-resize; }
.avatar-crop-stage canvas:focus-visible { position: relative; outline: 3px solid var(--blue-bright); outline-offset: -4px; }
.avatar-crop-instructions { margin: 0; color: var(--muted-2); font-size: 10px; line-height: 1.5; }
.avatar-crop-tools { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: center; }
.avatar-preview-wrap { display: grid; justify-items: center; gap: 5px; color: var(--muted-2); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.avatar-preview-wrap canvas, .avatar-crop-ready > canvas { display: block; width: 72px; height: 72px; border: 1px solid #3d5d7d; border-radius: 50%; background-color: #0d1a27; background-image: linear-gradient(45deg, rgba(255,255,255,.045) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.045) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.045) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.045) 75%); background-position: 0 0, 0 6px, 6px -6px, -6px 0; background-size: 12px 12px; box-shadow: 0 7px 18px rgba(0,0,0,.22); }
.avatar-crop-sliders { min-width: 0; display: grid; gap: 7px; }
.avatar-crop-sliders label { gap: 2px; }
.avatar-crop-sliders label > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; font-weight: 700; }
.avatar-crop-sliders output { color: var(--blue-bright); font-variant-numeric: tabular-nums; }
.avatar-crop-sliders input[type="range"] { min-height: 24px; height: 24px; padding: 0; border: 0; background: transparent; accent-color: var(--blue); }
.avatar-editor-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 12px; border-top: 1px solid var(--line); }
.avatar-editor-actions .button { min-height: 38px; }
.avatar-crop-ready { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 13px; align-items: center; padding: 13px; border: 1px solid rgba(97,201,154,.27); border-radius: 9px; background: rgba(97,201,154,.055); }
.avatar-crop-ready > canvas { grid-row: 1 / span 2; width: 64px; height: 64px; border-color: rgba(97,201,154,.4); }
.avatar-crop-ready strong, .avatar-crop-ready small { display: block; }
.avatar-crop-ready strong { color: #d9f6e9; font-size: 12px; }
.avatar-crop-ready small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 450; line-height: 1.4; }
.avatar-ready-actions { display: flex; align-items: center; gap: 14px; }
.avatar-ready-actions .button-link { min-height: 24px; }
.avatar-confirm { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 9px; color: var(--muted); font-weight: 550; line-height: 1.45; }
.avatar-confirm input { width: 17px; min-height: 17px; margin-top: 2px; }
.avatar-remove-form { padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 480px) {
  .avatar-crop-tools { grid-template-columns: 68px minmax(0, 1fr); gap: 10px; }
  .avatar-preview-wrap canvas { width: 60px; height: 60px; }
  .avatar-editor-heading { display: grid; }
  .avatar-editor-heading-actions { justify-content: flex-start; }
  .avatar-editor-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .avatar-crop-ready { grid-template-columns: 52px minmax(0, 1fr); }
  .avatar-crop-ready > canvas { width: 52px; height: 52px; }
}
.user-badges { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0; }
.authorization-actions { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 0 12px; }
.authorization-badge.active { color: var(--green); border-color: rgba(97,201,154,.25); }
.user-card details, .role-card details { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.user-card details form, .role-card details form { margin-top: 14px; }
.user-actions { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.role-card > p { color: var(--muted); min-height: 45px; }
.permission-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.permission-pills span { text-transform: none; letter-spacing: 0; }
.access-tag-editor { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.access-tag-editor legend { padding: 0 5px; margin-left: -5px; }
.user-create-access-tags { grid-column: 1 / -1; }
.access-tag-chip-list { max-height: 146px; overflow-y: auto; scrollbar-gutter: stable; }
.access-tag-evidence { display: grid; grid-template-columns: minmax(150px, .42fr) minmax(220px, 1fr); gap: 10px; margin-top: 10px; }
.access-tag-summary { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.access-tag-summary span { display: inline-flex; max-width: 100%; padding: 4px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid rgba(97,201,154,.25); border-radius: 999px; color: var(--green); background: rgba(97,201,154,.06); font-size: 10px; font-weight: 750; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.check-grid label { display: grid; grid-template-columns: 16px 1fr; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; }
.check-grid input { width: 16px; min-height: 16px; margin: 2px 0 0; }
.check-grid strong, .check-grid small { display: block; }
@media (max-width: 640px) {
  .recovery-admin-card { align-items: flex-start; flex-direction: column; }
}
.policy-panel { margin-top: 18px; }
.policy-check { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.policy-check input { width: 16px; min-height: 16px; margin: 3px 0 0; }
.policy-check strong, .policy-check small { display: block; }
.policy-check small { color: var(--muted-2); }
.advanced-boundary { margin-top: 18px; }
.advanced-boundary > form { margin-top: 14px; }
.api-token-create { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(170px, .45fr); gap: 14px; margin: 20px 0; }
.api-token-create fieldset, .api-token-create label:nth-of-type(3) { grid-column: 1 / -1; }
.api-token-create .button { justify-self: start; }
.pat-secret { margin: 18px 0; padding: 16px; border: 1px solid rgba(233,173,92,.35); border-radius: 8px; background: rgba(233,173,92,.07); }
.pat-secret strong, .pat-secret code, .pat-secret p { display: block; }
.pat-secret code { margin: 10px 0; padding: 10px; overflow-wrap: anywhere; color: #fff1d8; background: #100d08; border-radius: 6px; user-select: all; }
.pat-secret p { margin: 0; color: var(--muted); }
.pat-list { margin-top: 20px; border-top: 1px solid var(--line); }

.markdown-preview { color: #d5dee8; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.markdown-preview > :first-child { margin-top: 0; }
.markdown-preview > :last-child { margin-bottom: 0; }
.markdown-preview h1, .markdown-preview h2, .markdown-preview h3, .markdown-preview h4 { color: var(--ink); line-height: 1.25; margin: 1.6em 0 .65em; scroll-margin-top: 120px; }
.markdown-preview h1 { font-size: 2rem; border-bottom: 1px solid var(--line); padding-bottom: .35em; }
.markdown-preview h2 { font-size: 1.45rem; border-bottom: 1px solid rgba(28,43,62,.75); padding-bottom: .28em; }
.markdown-preview h3 { font-size: 1.16rem; }
.markdown-preview a { color: var(--blue-bright); text-decoration: underline; text-decoration-color: rgba(120,183,255,.35); text-underline-offset: 3px; }
.markdown-preview blockquote { margin: 1.2em 0; padding: .2em 1em; color: var(--muted); border-left: 3px solid var(--blue); background: rgba(87,146,216,.045); }
.markdown-preview pre { overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #06101a; }
.markdown-preview :not(pre) > code { color: #b8dcff; background: #07111c; border: 1px solid rgba(45,66,90,.65); border-radius: 4px; padding: .1em .35em; }
.markdown-preview table { min-width: 0; margin: 1.25em 0; border: 1px solid var(--line); }
.markdown-preview th, .markdown-preview td { padding: 9px 12px; border: 1px solid var(--line); }
.markdown-preview .share-markdown-image { display: block; max-width: 100%; max-height: 72vh; margin: 18px auto; border-radius: 8px; }
.compact-markdown-description { padding: 0; font-size: inherit; line-height: 1.55; }
.compact-markdown-description p { margin: .35rem 0 0; }
.share-plot-source { margin: .55rem 0 0; color: var(--muted); font-size: .875rem; }
.share-math-display { display: block; overflow-x: auto; padding: 8px 0; text-align: center; }
.share-math-unavailable { color: var(--amber); }
.share-embed { min-height: 120px; white-space: pre-wrap; }
.share-embed-rendered { border: 0; padding: 0; background: transparent; }
.share-embed-error { display: block; color: var(--amber); border: 1px solid rgba(233,173,92,.28); border-radius: 8px; background: rgba(233,173,92,.055); padding: 14px; }
.share-mermaid-svg, .share-plot-svg { display: block; width: min(100%, 920px); margin: 22px auto; overflow: auto; }
.share-mermaid-svg svg { display: block; width: 100%; max-height: 70vh; margin: auto; }
.share-plot-svg { min-height: 320px; border: 1px solid var(--line); border-radius: 9px; background: #07111c; }
.plot-title { fill: var(--ink); font-size: 18px; font-weight: 750; }
.plot-label, .plot-legend, .plot-axis-title { fill: var(--muted); font-size: 11px; }
.plot-axis-title { font-weight: 750; }
.plot-axis { fill: none; stroke: #597089; stroke-width: 1.2; }
.plot-gridline { stroke: #23364a; stroke-width: 1; }
.plot-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.plot-point, .plot-bar, .plot-slice { stroke: #07111c; stroke-width: 1; }
.plot-area { opacity: .24; stroke: none; }
.document-preview { display: block; width: 100%; min-height: 76vh; border: 0; border-radius: 7px; background: #fff; }
.pdf-workspace { width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; background: #06101a; }
.pdf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #0b1724; }
.pdf-toolbar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pdf-page-control { display: flex; align-items: center; grid-template-columns: none; gap: 7px; color: var(--muted); font-weight: 650; }
.pdf-page-control input { width: 68px; min-height: 34px; padding: 5px 8px; text-align: center; }
.pdf-zoom-label { min-width: 48px; color: var(--muted); font-size: 11px; text-align: center; }
.pdf-search-bar { display: grid; grid-template-columns: minmax(180px, 360px) auto minmax(0, 1fr); gap: 9px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #08131f; }
.pdf-search-bar input { min-height: 38px; }
.pdf-search-bar .button { min-height: 38px; }
.pdf-search-results { display: flex; align-items: center; gap: 6px; min-height: 30px; overflow-x: auto; color: var(--muted); font-size: 11px; }
.pdf-search-results button { flex: none; padding: 6px 9px; color: var(--blue-bright); border: 1px solid var(--line-bright); border-radius: 999px; background: #0d1a29; }
.pdf-search-results small { flex: none; color: var(--amber); }
.pdf-review-layout { width: 100%; min-width: 820px; display: grid; grid-template-columns: minmax(460px, 3fr) minmax(360px, 2fr); min-height: 72vh; }
.pdf-document-pane { min-width: 0; border-right: 1px solid var(--line); }
.pdf-stage { height: 72vh; min-height: 560px; overflow: auto; padding: 24px; background: #03080d; scroll-behavior: smooth; overscroll-behavior: contain; }
.pdf-pages { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.pdf-page { position: relative; flex: none; min-width: 280px; min-height: 360px; box-shadow: 0 10px 35px rgba(0,0,0,.5); background: #fff; scroll-margin-top: 22px; }
.pdf-page:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 4px; }
.pdf-page canvas { display: block; width: 100%; height: 100%; }
.pdf-marker-layer { position: absolute; inset: 0; pointer-events: none; }
.pdf-comment-marker { position: absolute; z-index: 2; width: 32px; height: 32px; padding: 0; transform: translate(-50%, -50%); display: grid; place-items: center; color: #08131f; font-size: 18px; font-weight: 900; border: 2px solid #fff; border-radius: 50%; background: var(--amber); box-shadow: 0 3px 12px rgba(0,0,0,.45); pointer-events: auto; }
.pdf-comment-marker[data-pdf-movable="true"] { cursor: grab; touch-action: none; }
.pdf-comment-marker[data-pdf-movable="true"]:active { cursor: grabbing; }
.pdf-comment-marker.drag-source { opacity: .3; }
.pdf-comment-marker-drag-preview { z-index: 4; cursor: grabbing; pointer-events: none; opacity: .92; box-shadow: 0 0 0 4px rgba(120,183,255,.25), 0 8px 22px rgba(0,0,0,.55); }
.moving-pdf-marker .pdf-page { cursor: grabbing; }
.pdf-comment-marker img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
.pdf-comment-marker > span { width: 100%; height: 100%; display: grid; place-items: center; border-radius: inherit; color: #08131f; background: var(--amber); font-size: 10px; letter-spacing: -.02em; }
.pdf-comment-marker:hover { transform: translate(-50%, -50%) scale(1.12); }
.pdf-comment-marker.pending { color: #fff; background: var(--blue); }
.pdf-comment-marker.marker-focus { animation: pdf-marker-pulse .9s ease-out 2; }
.placing-comment .pdf-page { cursor: crosshair; box-shadow: 0 0 0 3px var(--blue), 0 10px 35px rgba(0,0,0,.5); }
.pdf-status { min-height: 38px; padding: 9px 14px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.pdf-status.pdf-error { color: var(--amber); }
.pdf-fallback { border-top: 1px solid var(--line); }
.pdf-comments-sidebar { width: 100%; min-width: 0; height: calc(72vh + 87px); min-height: 647px; display: flex; flex-direction: column; box-sizing: border-box; background: #09131f; }
.pdf-comments-heading { width: 100%; min-width: 0; min-height: 52px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; box-sizing: border-box; border-bottom: 1px solid var(--line); }
.pdf-comments-heading h3 { margin: 0; font-size: 14px; }
.pdf-comment-composer { width: calc(100% - 24px); min-width: 0; margin: 12px; padding: 12px; display: grid; gap: 10px; box-sizing: border-box; border: 1px solid #35516f; border-radius: 8px; background: #0d1a29; box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.pdf-composer-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #dce6f0; font-size: 12px; }
.pdf-comment-composer textarea, .pdf-reply-form textarea { min-height: 78px; resize: vertical; }
.pdf-comment-composer .button-row, .pdf-reply-form .button-row { justify-content: flex-end; }
.pdf-comment-composer .button, .pdf-reply-form .button { min-height: 34px; padding: 0 12px; }
.pdf-thread-list { width: 100%; min-width: 0; flex: 1; overflow-y: auto; padding: 10px; box-sizing: border-box; }
.pdf-thread-list > .empty-state { padding: 42px 12px; }
.pdf-comment-thread { width: 100%; min-width: 0; margin-bottom: 9px; padding: 11px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.018); transition: border-color .15s, background .15s, box-shadow .15s; }
.pdf-comment-thread:hover { border-color: #314a65; }
.pdf-comment-thread.comment-focus { border-color: var(--amber); background: rgba(233,173,92,.07); box-shadow: 0 0 0 2px rgba(233,173,92,.09); }
.pdf-comment-thread:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.pdf-thread-location { margin: 0 0 8px; padding: 0; color: var(--blue-bright); border: 0; background: transparent; font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.pdf-thread-messages, .pdf-thread-message, .pdf-comment-body, .pdf-comment-edit, .pdf-comment-edit > form, .pdf-reply-form, .pdf-comment-composer [data-pdf-compose-write], .pdf-comment-edit [data-pdf-compose-write], .pdf-reply-form [data-pdf-compose-write], .pdf-comment-preview, .pdf-comment-composer .link-search-panel, .pdf-comment-edit .link-search-panel, .pdf-reply-form .link-search-panel { width: 100%; min-width: 0; box-sizing: border-box; }
.pdf-thread-message { padding: 2px 0 8px; }
.pdf-thread-message + .pdf-thread-message { padding: 9px 0 8px 13px; border-top: 1px solid rgba(45,66,90,.58); }
.pdf-thread-message p { margin: 5px 0 0; color: #d2dbe5; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pdf-comment-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.pdf-comment-meta strong { color: #e3ebf4; font-size: 11px; }
.pdf-comment-meta time { color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-comment-author { min-width: 0; display: inline-flex; align-items: center; gap: 7px; }
.pdf-comment-body.markdown-preview { padding: 3px 0 1px; color: #d2dbe5; font-size: 12px; line-height: 1.55; }
.pdf-comment-body.markdown-preview p { margin: 5px 0; padding: 0; white-space: normal; }
.pdf-comment-body.markdown-preview pre { padding: 9px; font-size: 11px; }
.pdf-comment-edit { margin-top: 4px; }
.pdf-comment-edit > summary { width: max-content; color: var(--blue-bright); cursor: pointer; font-size: 10px; font-weight: 750; }
.pdf-comment-edit > form { margin-top: 7px; display: grid; gap: 8px; }
.pdf-comment-edit textarea { min-height: 84px; resize: vertical; }
.pdf-comment-edit .button-row { justify-content: flex-end; }
.pdf-comment-composer .markdown-editor-tabs, .pdf-reply-form .markdown-editor-tabs, .pdf-comment-edit .markdown-editor-tabs { min-height: 38px; padding-inline: 4px; }
.pdf-comment-preview { min-height: 72px; padding: 10px; font-size: 12px; }
.pdf-thread-actions { display: flex; align-items: center; gap: 13px; padding-top: 6px; border-top: 1px solid rgba(45,66,90,.45); }
.pdf-thread-actions form { display: contents; }
.button-link { min-height: 28px; padding: 4px 0; color: var(--blue-bright); border: 0; background: transparent; font-size: 11px; font-weight: 750; }
.button-link:hover { color: #b9dcff; text-decoration: underline; }
.pdf-thread-actions form .button-link { color: var(--muted); }
.pdf-reply-form { display: grid; gap: 8px; margin-top: 9px; }
.form-error { margin: 0; color: #ff9b9f; font-size: 11px; }
@keyframes pdf-marker-pulse { 50% { transform: translate(-50%, -50%) scale(1.35); box-shadow: 0 0 0 8px rgba(233,173,92,.18); } }
.media-preview { display: block; max-width: 100%; max-height: 76vh; margin: auto; border-radius: 8px; }
figure.media-preview { text-align: center; }
figure.media-preview img { max-width: 100%; max-height: 76vh; }

.authorization-history { padding: 14px 0; border-bottom: 1px solid var(--line); }
.authorization-history > div { display: flex; justify-content: space-between; gap: 10px; }
.authorization-history p { color: var(--muted); font-size: 11px; }
.authorization-history small { color: var(--muted-2); }
.filter-panel { padding: 14px; display: flex; align-items: end; gap: 10px; margin-bottom: 15px; }
.filter-panel label { min-width: min(340px, 100%); }
.filter-panel.admin-filter { display: grid; }
.filter-panel.admin-filter label { min-width: 0; }
.assignment-filter { display: grid; grid-template-columns: minmax(220px, 1fr) 150px 150px auto; }
.assignment-filter label { min-width: 0; }
.tag-policy-filter { margin-top: 18px; }
.compact-pagination { margin: 0; padding: 12px 18px; border-top: 1px solid var(--line); }
.compact-pagination .button { min-height: 35px; padding-inline: 12px; }
.audit-table code { color: #9dc9f5; font-size: 10px; }
.audit-table td { overflow-wrap: anywhere; }
.audit-details-row td { padding-top: 0; background: rgba(5, 14, 28, .35); }
.audit-details-row summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.audit-details-row dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; }
.audit-details-row dt { color: var(--muted); }
.audit-details-row dd { margin: 0; }
.audit-details-row pre { max-height: 320px; overflow: auto; white-space: pre-wrap; color: #d8e9fb; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 15px; color: var(--muted); font-size: 12px; }
.search-results { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; width: min(980px, 100%); }
.search-page-reset, .search-more { display: flex; justify-content: flex-end; }
.search-page-reset { padding-bottom: 2px; }
.search-more { padding: 2px 0 8px; border-bottom: 1px solid var(--line); }
.search-result-card { display: grid; gap: 5px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.014); }
.search-result-card:hover { border-color: #3c5a79; background: rgba(87,146,216,.04); }
.search-result-title { color: var(--blue-bright); font-size: 15px; font-weight: 750; }
.search-result-meta { color: var(--muted-2); font-size: 11px; overflow-wrap: anywhere; }
.search-snippet { margin: 3px 0 0; color: #c3ced9; font-size: 13px; line-height: 1.55; }
.search-snippet mark { color: #fff4d6; background: rgba(233,173,92,.28); border-radius: 2px; padding: 0 2px; }
.result-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.result-row:last-child { border-bottom: 0; }
.result-row:hover { background: rgba(255,255,255,.02); }
.result-row strong, .result-row small { display: block; }
.result-row small { color: var(--muted-2); }

.toast-stack { position: fixed; z-index: 200; top: 82px; right: 20px; width: min(420px, calc(100% - 40px)); display: grid; gap: 9px; }
.toast { background: #111d2a; border: 1px solid #2a4058; border-radius: 8px; box-shadow: var(--shadow); padding: 13px 14px; display: flex; justify-content: space-between; gap: 12px; color: #d8e1ea; font-size: 12px; }
.toast-success { border-color: rgba(97,201,154,.35); }
.toast-error { border-color: rgba(239,116,120,.45); }
.toast button { border: 0; background: none; color: var(--muted); font-size: 18px; }

.login-screen { overflow: hidden; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px,1.15fr) minmax(420px,.85fr); background: #050a11; }
.login-story { position: relative; padding: 48px clamp(48px,7vw,110px); overflow: hidden; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: radial-gradient(circle at 58% 48%, rgba(69,126,198,.12), transparent 31%), linear-gradient(145deg,#101a26,#070c13 67%); }
.login-story::before { content: ""; position: absolute; inset: 0; opacity: .17; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(90deg,black,transparent); }
.login-brand { font-size: 15px; position: relative; z-index: 2; }
.login-brand-large { font-size: 18px; }
.login-brand-large .logo-wrap { width: 34px; height: 34px; border-radius: 9px; }
.login-brand-large .logo-wrap img { width: 30px; height: 30px; }
.story-copy { position: relative; z-index: 2; min-height: 0; flex: 1; display: flex; flex-direction: column; padding-top: clamp(35px, 7vh, 75px); }
.earth-stage { position: relative; min-height: 0; flex: 1; display: grid; place-items: center; isolation: isolate; }
.earth-stage::before { content: ""; position: absolute; inset: 3% 0 0; z-index: -2; opacity: .72; background-image: radial-gradient(circle at 14% 28%,#c9e0ff 0 1px,transparent 1.6px),radial-gradient(circle at 78% 18%,#9ec4f2 0 1px,transparent 1.5px),radial-gradient(circle at 61% 73%,#c9e0ff 0 .8px,transparent 1.5px),radial-gradient(circle at 30% 82%,#7699be 0 1px,transparent 1.6px),radial-gradient(circle at 92% 62%,#d7e8ff 0 .8px,transparent 1.5px); background-size: 173px 181px,229px 211px,149px 167px,257px 243px,193px 227px; }
.earth-stage::after { content: ""; position: absolute; width: min(56vh,570px); max-width: 78%; aspect-ratio: 1; z-index: -1; border-radius: 50%; background: rgba(53,128,215,.16); filter: blur(28px); box-shadow: 0 0 90px rgba(73,147,229,.19); }
.earth-stage canvas { display: block; width: min(68vh,700px); max-width: 100%; aspect-ratio: 1; filter: drop-shadow(0 24px 28px rgba(0,0,0,.48)); }
.earth-stage.earth-fallback canvas { width: min(55vh,560px); max-width: 78%; border-radius: 50%; background: url('/static/earth-blue-marble.png') center / cover; box-shadow: 0 0 55px rgba(66,140,225,.32); }
.earth-credit { position: absolute; bottom: 4%; color: #718196; font-size: 10px; letter-spacing: .04em; }
.login-panel { display: grid; place-items: center; padding: 40px; background: #0a0d11; }
.login-form-wrap { width: min(100%,410px); }
.login-form-wrap h1 { font-size: 34px; line-height: 1.14; letter-spacing: -.04em; margin: 10px 0; }
.lede { color: var(--muted); margin: 0 0 26px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 62px; }
.reveal-password { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); border: 0; color: var(--blue-bright); background: transparent; font-size: 11px; }
.login-form-wrap .button-primary { margin-top: 14px; height: 50px; }
.login-security-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: center; }
.sso-stack { display: grid; gap: 10px; margin: 20px 0; }
.sso-stack form { margin: 0; }
.login-account-choice { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; margin: 18px 0 22px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.login-account-choice span { min-width: 0; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.login-account-choice a { flex: none; font-size: 12px; font-weight: 800; }
.other-signin-options { margin-top: 24px; }
.other-signin-options summary { color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; cursor: pointer; }
.button-sso { min-height: 50px; border-color: #496987; background: #101d2b; }
.button-sso:hover { border-color: #73a8d8; background: #15283b; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.forgot-link { display: inline-block; color: var(--muted); font-size: 12px; margin-top: 16px; }
.micro-note { color: var(--muted-2); font-size: 10px; margin: 27px 0 0; display: flex; gap: 8px; align-items: center; }
.micro-note i { width: 6px; height: 6px; background: var(--green); border-radius: 50%; box-shadow: 0 0 9px rgba(97,201,154,.7); }
.mobile-login-brand { display: none; margin-bottom: 48px; }
.simple-auth-screen { overflow: auto; background: radial-gradient(circle at 50% 20%,rgba(87,146,216,.12),transparent 32rem),#060c14; }
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; }
.auth-card { width: min(480px,100%); padding: 34px; }
.auth-card .login-brand { margin-bottom: 42px; }
.auth-card h1 { font-size: 29px; letter-spacing: -.035em; margin: 8px 0; }
.auth-card > p { color: var(--muted); margin: 0 0 22px; }
.auth-card .back-link { margin: 22px 0 0; }
.mfa-setup-card { text-align: center; }
.mfa-setup-card form, .mfa-enrollment-method { text-align: left; }
.mfa-enrollment-method { margin-top: 18px; }
.mfa-enrollment-method h2 { margin: 0; color: var(--ink); font-size: 13px; letter-spacing: 0; }
.mfa-qr { display: block; width: min(280px, 80%); aspect-ratio: 1; margin: 12px auto 0; border-radius: 10px; background: #fff; padding: 10px; }
.mfa-manual-method { padding-top: 18px; border-top: 1px solid var(--line); }
.mfa-setup-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px; }
.mfa-setup-details div { min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-raised); }
.mfa-setup-details dt { color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.mfa-setup-details dd { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; font-weight: 700; }
.mfa-secret-field { margin-bottom: 0; }
.mfa-secret-field input { color: #b8dcff; background: #07111c; border-color: var(--line); font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .045em; }
.mfa-secret-warning { margin: 7px 0 22px; color: var(--muted-2); font-size: 11px; }
.recovery-code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 0 24px; }
.recovery-code-grid code { padding: 9px; color: #cce5ff; background: #07111c; border: 1px solid var(--line); border-radius: 6px; text-align: center; }
.error-card { text-align: center; width: min(500px,100%); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 45px; box-shadow: var(--shadow); }
.error-card > span { font-size: 44px; color: #315579; font-weight: 850; }
.error-card h1 { margin: 7px 0; }
.error-card p { color: var(--muted); margin: 0 0 22px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (max-width: 1100px) {
  .dashboard-grid, .settings-layout, .split-layout { grid-template-columns: 1fr; }
  .user-list, .role-list { grid-template-columns: 1fr; }
  .permission-columns { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: minmax(390px,1fr) minmax(390px,1fr); }
}
@media (max-width: 960px) {
  .topbar { padding-inline: 24px; }
  .nav-links { margin-left: 24px; gap: 2px; }
  .nav-links a { padding-inline: 9px; }
  .identity { max-width: 90px; }
  .identity small { display: none; }
  .top-actions { gap: 8px; }
}
@media (max-width: 780px) {
  .topbar { padding: 0 16px; backdrop-filter: none; }
  .brand > span:not(.logo-wrap), .brand em, .identity { display: none; }
  .nav-links { position: fixed; left: 0; right: 0; bottom: 0; height: 55px; margin: 0; padding: 0 8px; background: #08111c; border-top: 1px solid var(--line); justify-content: flex-start; gap: 8px; overflow-x: auto; z-index: 100; }
  .nav-links a { border-bottom: 0; flex: none; padding: 0 5px; }
  .app-main, .app-shell, .narrow-main { width: min(100% - 28px,100%); padding-top: 32px; padding-bottom: 90px; }
  .split-heading { align-items: flex-start; flex-direction: column; }
  .search-inline { width: 100%; min-width: 0; }
  .stat-grid, .settings-stats { grid-template-columns: 1fr 1fr; }
  .dashboard-grid, .folder-grid, .settings-grid, .settings-layout, .search-results, .permission-columns { grid-template-columns: 1fr; }
  .action-grid, .upload-panel { grid-template-columns: 1fr; }
  .upload-panel .button, .file-picker span { width: 100%; }
  .version-heading, .inheritance-panel, .form-footer { align-items: flex-start; flex-direction: column; }
  .form-grid, .impact-grid { grid-template-columns: 1fr; }
  .impact-grid div:nth-child(odd) { border-right: 0; }
  .move-confirm-actions { align-items: stretch; flex-direction: column-reverse; }
  .grant-row { grid-template-columns: 1fr 110px; }
  .rule-form { grid-template-columns: 1fr; }
  .top-folder-form { grid-template-columns: 1fr; }
  .user-create-form, .check-grid, .access-tag-evidence { grid-template-columns: 1fr; }
  .admin-filter, .assignment-filter { grid-template-columns: 1fr; }
  .metadata-grid { grid-template-columns: 1fr; }.metadata-grid div:nth-child(odd){border-right:0}
  .smtp-test-form, .inline-form { align-items: stretch; flex-direction: column; }
  .link-search-controls { grid-template-columns: 1fr; }
  .pdf-toolbar { align-items: stretch; flex-direction: column; }
  .pdf-search-bar { grid-template-columns: 1fr auto; }
  .pdf-search-results { grid-column: 1 / -1; }
  .pdf-stage { height: 62vh; min-height: 440px; padding: 12px; }
  .inline-form input { min-width: 0; }
  .filter-panel { align-items: stretch; flex-direction: column; }.filter-panel label{min-width:0}
  .login-shell { grid-template-columns: 1fr; }.login-story{display:none}.mobile-login-brand{display:flex}.login-panel{min-height:100vh;padding:28px}.login-screen{overflow:auto}
}
@media (max-width: 480px) {
  .stat-grid, .settings-stats { grid-template-columns: 1fr; }
  .toast-stack { top: 72px; }
  .auth-card { padding: 24px; }
  .mfa-setup-details { grid-template-columns: 1fr; }
  .content-table { min-width: 680px; }
  .pdf-stage { height: 55vh; min-height: 340px; }
  .pdf-toolbar-group { width: 100%; justify-content: center; }
  .pdf-page { min-width: 240px; }
}

/* Native Git and issue workspaces */
.repository-catalog { overflow: hidden; }
.repository-catalog-toolbar { min-height: 76px; padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.repository-catalog-toolbar h2 { margin: 0; font-size: 17px; letter-spacing: -.015em; }
.repository-catalog-toolbar small { display: block; max-width: 420px; margin-top: 3px; overflow: hidden; color: var(--muted-2); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.repository-search { width: min(590px, 62%); }
.repository-search input { min-width: 0; flex: 1; }
.repository-search .button { flex: none; }
.repository-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; padding: 18px; }
.repository-card { min-height: 152px; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.014); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: start; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.repository-card:hover { border-color: #3c5a79; background: rgba(87,146,216,.045); }
.repository-card > div:nth-child(2) { min-width: 0; }
.repository-card strong, .repository-card small { display: block; }
.repository-card strong, .repository-card small, .repository-card p { overflow-wrap: anywhere; }
.repository-card small { color: var(--muted-2); margin-top: 2px; }
.repository-card p { display: -webkit-box; margin: 9px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.repository-activity { display: grid; gap: 2px; margin-top: 13px; padding-top: 10px; border-top: 1px solid rgba(45,66,90,.6); }
.repository-activity b { overflow: hidden; color: #cbd8e5; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.repository-activity time, .repository-activity > span { overflow: hidden; color: var(--muted-2); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.repository-icon { width: 37px; height: 37px; border: 1px solid rgba(87,146,216,.3); border-radius: 8px; background: rgba(87,146,216,.09); color: var(--blue-bright); display: grid; place-items: center; font-weight: 850; }
.git-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.git-create-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.repository-summary-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 18px; }
.repository-policy-card { padding: 22px; }
.repository-policy-card h2 { margin: 7px 0 4px; }
.repository-policy-card a { color: var(--blue-bright); font-size: 12px; }
.compact-list { display: grid; }
.compact-list a { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.compact-list a:last-child { border-bottom: 0; }
.compact-list code { color: var(--muted-2); font-size: 11px; }
.commit-list article { display: grid; grid-template-columns: 100px 1fr; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.commit-list article:last-child { border-bottom: 0; }
.commit-list article > code { color: var(--blue-bright); font-size: 11px; }
.commit-list strong, .commit-list small { display: block; }
.commit-list small { color: var(--muted-2); font-size: 11px; margin-top: 3px; }
.source-table { min-width: 680px; }
.source-viewer { overflow: hidden; }
.source-viewer pre { margin: 0; padding: 22px; max-height: 72vh; overflow: auto; background: #07101a; color: #d7e3f0; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 4; }
.source-viewer pre bdi { display: block; white-space: inherit; }
.diff-viewer pre { white-space: pre; }
.diff-document { display: grid; gap: 16px; }
.diff-file { overflow: clip; border: 1px solid #263a51; border-radius: 9px; background: #08121d; box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.diff-file-header { position: sticky; z-index: 8; top: 68px; min-height: 48px; padding: 9px 14px; border-bottom: 1px solid #263a51; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: rgba(13,25,39,.98); backdrop-filter: blur(12px); }
.diff-file-header > div { min-width: 0; display: flex; align-items: center; gap: 9px; }
.diff-file-title h3 { min-width: 0; margin: 0; font: inherit; }
.diff-file-header code, .diff-file-header small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diff-file-header code { color: #e3edf7; font: 650 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.diff-file-header small { color: var(--muted-2); font-size: 10px; }
.diff-file-summary { flex: none; color: var(--muted-2); font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; }
.diff-file-summary .diff-additions { color: #75d9a9; }
.diff-file-summary .diff-deletions { color: #f38c91; }
.diff-table-scroll { max-width: 100%; overflow: auto; background: #07101a; }
.diff-table-scroll:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: -2px; }
.diff-table { width: max-content; min-width: 100%; border-collapse: collapse; color: #d7e3f0; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 4; }
.diff-table td { height: 23px; padding: 0; border: 0; vertical-align: top; }
.diff-table .diff-hunk td { padding: 7px 12px; color: #a8c9eb; background: #10253a; border-block: 1px solid #173550; }
.diff-line { --diff-row-bg: #07101a; background: var(--diff-row-bg); }
.diff-line-addition { --diff-row-bg: #0b271f; }
.diff-line-deletion { --diff-row-bg: #2a171d; }
.diff-line-note { --diff-row-bg: #111b27; color: var(--muted-2); }
.diff-line:hover { filter: brightness(1.09); }
.diff-line-selected { box-shadow: inset 3px 0 var(--blue-bright); filter: brightness(1.12); }
.diff-gutter { position: sticky; z-index: 3; width: 50px; min-width: 50px; color: #91a4b8; background: var(--diff-row-bg); text-align: right; user-select: none; box-shadow: inset -1px 0 rgba(93,115,140,.16); }
.diff-gutter:nth-child(1) { left: 0; }
.diff-gutter:nth-child(2) { left: 50px; }
.diff-gutter > span { display: block; padding: 2px 9px; }
.diff-line-comment-button { position: relative; width: 100%; min-height: 23px; padding: 1px 9px 1px 19px; border: 0; border-radius: 0; display: flex; align-items: center; justify-content: flex-end; color: inherit; background: transparent; font: inherit; }
.diff-line-comment-button:hover, .diff-line-comment-button[aria-expanded="true"] { color: #d9ecff; background: #205f99; }
.diff-comment-plus { position: absolute; left: 5px; top: 50%; width: 14px; height: 14px; border-radius: 3px; display: grid; place-items: center; opacity: 0; transform: translateY(-50%); color: #fff; background: #397dbb; font: 800 13px/13px Inter, sans-serif; }
.diff-line-comment-button:hover .diff-comment-plus, .diff-line-comment-button:focus-visible .diff-comment-plus, .diff-line-comment-button[aria-expanded="true"] .diff-comment-plus { opacity: 1; }
.diff-marker { position: sticky; z-index: 2; left: 100px; width: 22px; min-width: 22px; padding: 2px 5px !important; color: #79889a; background: var(--diff-row-bg); text-align: center; user-select: none; }
.diff-line-addition .diff-marker { color: #75d9a9; }
.diff-line-deletion .diff-marker { color: #f38c91; }
.diff-code { width: 100%; min-width: 42rem; padding: 2px 16px 2px 6px !important; white-space: pre; }
.diff-code code { display: block; min-height: 19px; }
.diff-code bdi { display: block; min-height: inherit; }
.diff-document bdi[dir="ltr"] { direction: ltr; unicode-bidi: isolate; }
.unicode-control-text { border-radius: 3px; color: #ffd28b !important; background: rgba(233,173,92,.16); box-shadow: 0 0 0 1px rgba(233,173,92,.32); font-style: normal; }
.diff-line-actions { width: 1px; }
.syntax-comment { color: #7f91a5; font-style: italic; }
.syntax-string { color: #a8d792; }
.syntax-number { color: #d5abf4; }
.syntax-keyword { color: #80bfff; font-weight: 650; }
.syntax-operator { color: #f0a4a8; }
.syntax-punctuation { color: #aebdcd; }
.diff-file-metadata { margin: 0; padding: 8px 14px; border-bottom: 1px solid #263a51; display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; color: #c1d0df; background: #0b1724; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.diff-file-metadata li { min-width: 0; overflow-wrap: anywhere; }
.diff-binary, .diff-metadata { margin: 0; padding: 22px; color: var(--muted); background: #07101a; }
.diff-metadata { max-height: 260px; overflow: auto; white-space: pre; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.diff-notice { margin: 0; padding: 10px 14px; border: 1px solid rgba(233,173,92,.25); border-radius: 7px; color: #e7c385; background: rgba(233,173,92,.06); font-size: 11px; }
.diff-fallback .diff-notice { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.diff-discussion-row > td, .diff-comment-composer-row > td { padding: 12px 16px 14px 122px; background: #091522; border-block: 1px solid #1d3349; }
.diff-discussions { width: min(780px, calc(100vw - 210px)); display: grid; gap: 10px; white-space: normal; }
.diff-thread { overflow: hidden; border: 1px solid #2c425a; border-radius: 8px; background: #0d1926; }
.diff-thread:target, .diff-comment:target { border-color: var(--blue-bright); box-shadow: 0 0 0 2px rgba(120,183,255,.14); }
.diff-comment + .diff-comment { border-top: 1px solid var(--line); }
.diff-comment header { min-height: 34px; padding: 7px 11px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted-2); background: rgba(255,255,255,.018); font: 11px/1.4 Inter, sans-serif; }
.diff-comment header strong { color: #d7e3ef; }
.diff-comment p { margin: 0; padding: 11px 12px; color: #d5dfeb; white-space: pre-wrap; overflow-wrap: anywhere; unicode-bidi: plaintext; font: 12px/1.55 Inter, sans-serif; }
.diff-comment-author { min-width: 0; display: inline-flex; align-items: center; gap: 8px; }
.diff-comment-body { color: #d5dfeb; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.diff-comment-body.markdown-preview { padding: 10px 12px; font-size: 12px; line-height: 1.55; }
.diff-comment-body.markdown-preview p { margin: 7px 0; padding: 0; white-space: normal; }
.diff-comment-body.markdown-preview pre { padding: 10px; font-size: 11px; }
.diff-comment-edit { border-top: 1px solid var(--line); }
.diff-comment-edit > summary { padding: 8px 12px; color: var(--blue-bright); font: 700 11px/1.4 Inter, sans-serif; }
.diff-comment-edit > form { padding: 0 12px 12px; }
.diff-comment-reply { margin-left: 22px; border-left: 2px solid #27415c; }
.diff-reply { border-top: 1px solid var(--line); }
.diff-reply > summary { padding: 8px 12px; color: var(--blue-bright); font: 700 11px/1.4 Inter, sans-serif; }
.diff-reply form { padding: 0 12px 12px; }
.diff-comment-composer { width: min(780px, calc(100vw - 210px)); padding: 13px; border: 1px solid #37618b; border-radius: 8px; background: #0d1927; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.diff-comment-composer-heading { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #dbe9f7; font: 700 12px/1.4 Inter, sans-serif; }
.diff-comment-composer textarea { min-height: 88px; font: 13px/1.5 Inter, sans-serif; }
.diff-comment-composer .form-actions { margin-top: 9px; }
.small-hash { font-size: 16px !important; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.inline-warning { margin-bottom: 18px; padding: 12px 15px; border: 1px solid rgba(233,173,92,.3); border-radius: 8px; color: #f0c783; background: rgba(233,173,92,.07); }
.issue-filters { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) auto; gap: 12px; align-items: end; padding: 16px; margin-bottom: 18px; }
.issue-filter-panel { padding: 16px; margin-bottom: 18px; overflow: visible; }
.issue-search-row { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 9px; align-items: center; }
.issue-search-row input { min-width: 0; }
.issue-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 12px; margin-top: 13px; }
.issue-filter-grid > label { min-width: 0; display: grid; gap: 6px; }
.issue-filter-grid select, .issue-filter-grid input { width: 100%; min-width: 0; }
.issue-list-panel { margin-bottom: 20px; }
.issue-list { display: grid; }
.issue-list > a { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.issue-list > a:last-child { border-bottom: 0; }
.issue-list > a:hover { background: rgba(255,255,255,.018); }
.issue-list > a strong, .issue-list > a small { min-width: 0; overflow-wrap: anywhere; }
.issue-list > a small { grid-column: 2; color: var(--muted-2); font-size: 11px; }
.issue-list-global .issue-list > a { grid-template-columns: auto auto minmax(0, 1fr); }
.issue-list-copy { min-width: 0; display: grid; gap: 4px; }
.issue-list-copy > strong, .issue-list-copy > small, .issue-search-excerpt { display: block; min-width: 0; overflow-wrap: anywhere; }
.issue-search-excerpt { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.45; }
.issue-body { padding: 22px; margin-bottom: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.issue-body p { margin: 0; }
.issue-thread { display: grid; gap: 12px; margin-bottom: 16px; }
.issue-comment { overflow: hidden; }
.issue-comment header { display: flex; justify-content: space-between; gap: 15px; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 11px; }
.issue-comment header time { color: var(--muted-2); }
.issue-comment p { margin: 0; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.issue-state-action { margin-top: 16px; padding: 14px; display: flex; justify-content: flex-end; }
.pull-merge-panel { margin-bottom: 16px; padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, auto); align-items: center; gap: 18px; }
.pull-merge-panel h2, .pull-merge-panel p { margin: 3px 0 0; }
.pull-merge-main { min-width: 0; display: grid; gap: 12px; }
.pull-merge-main form { justify-self: start; }
.repository-policy-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.review-override-panel, .review-override-status { width: min(410px, 100%); padding: 13px; border: 1px solid rgba(239,116,120,.35); border-radius: 8px; background: rgba(239,116,120,.055); }
.review-override-panel > summary { color: #ffd0d2; font-size: 12px; font-weight: 800; cursor: pointer; }
.review-override-panel > form, .review-override-panel > .button { margin-top: 12px; }
.review-override-status { display: grid; gap: 4px; }
.review-override-status strong { color: #ffd0d2; }
.review-override-status span { color: var(--muted-2); font-size: 10px; }
.review-override-status .review-override-author { display: flex; align-items: center; gap: 8px; }
.review-override-status p { color: #d5dee8; overflow-wrap: anywhere; }
.pull-review-row { padding: 11px 15px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.pull-review-row + .pull-review-row { border-top: 1px solid var(--line); }
.pull-review-row small { color: var(--muted-2); }
.pull-commits-panel { margin-bottom: 16px; overflow: hidden; }
.pull-commit-list { margin: 0; padding: 0; list-style: none; }
.pull-commit-item { padding: 15px 18px; }
.pull-commit-item + .pull-commit-item { border-top: 1px solid var(--line); }
.pull-commit-heading { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.pull-commit-heading a { min-width: 0; color: var(--ink); font-weight: 800; overflow-wrap: anywhere; }
.pull-commit-heading a:hover { color: var(--blue-bright); }
.pull-commit-heading code { flex: none; color: var(--blue-bright); font-size: 10px; }
.pull-commit-meta { margin-top: 4px; color: var(--muted-2); font-size: 10px; }
.pull-commit-body { max-height: 360px; margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; color: #c9d4df; background: #07111c; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pull-commit-body-limited { margin: 10px 0 0; color: var(--muted-2); font-size: 11px; }
.pull-commits-panel .compact-pagination { margin: 0; }
@media (max-width: 900px) { .issue-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .repository-summary-grid, .git-form-grid, .issue-filters { grid-template-columns: 1fr; } .issue-search-row, .issue-filter-grid { grid-template-columns: 1fr; } .repository-card { grid-template-columns: auto 1fr; } .repository-card > .status, .repository-card > .branch-label { grid-column: 2; } .pull-merge-panel { grid-template-columns: 1fr; align-items: stretch; } .diff-file-header { position: static; align-items: flex-start; } .diff-file-header small { display: none; } .diff-file-summary { flex-wrap: wrap; justify-content: flex-end; } .diff-discussion-row > td, .diff-comment-composer-row > td { padding-left: 12px; } .diff-discussions, .diff-comment-composer { width: calc(100vw - 76px); } }
@media (max-width: 760px) {
  .repository-catalog-toolbar { align-items: stretch; flex-direction: column; }
  .repository-search { width: 100%; }
}

/* Repository workspace */
.repository-workspace { width: min(1280px, calc(100% - 56px)); padding-top: 24px; }
.repository-masthead { margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.repository-masthead .breadcrumbs { margin-bottom: 12px; }
.repository-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.repository-title-row > div { min-width: 0; }
.repository-title-row h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 24px; letter-spacing: -.025em; }
.repository-title-row h1, .repository-title-row p { overflow-wrap: anywhere; }
.repository-title-row p { margin: 4px 0 0 35px; color: var(--muted); font-size: 13px; }
.repository-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid rgba(120,183,255,.28); border-radius: 6px; color: var(--blue-bright); background: rgba(87,146,216,.08); font-size: 13px; }
.repository-visibility { flex: none; padding: 4px 9px; border: 1px solid var(--line-bright); border-radius: 999px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.repository-tabs { display: flex; gap: 4px; margin-top: 18px; overflow-x: auto; }
.repository-tabs a { min-height: 42px; padding: 0 14px; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap; }
.repository-tabs a:hover { color: var(--ink); background: rgba(255,255,255,.025); }
.repository-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue-bright); }
.repository-toolbar, .issues-toolbar { min-height: 48px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.branch-picker, .issue-repository-filter { display: flex; align-items: center; gap: 8px; }
.branch-picker select { min-width: 180px; max-width: min(360px, 45vw); }
.repository-toolbar select, .repository-toolbar .button, .issues-toolbar select, .issues-toolbar .button { min-height: 38px; }
.repository-toolbar-links { min-width: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 12px; }
.repository-toolbar-links a:not(.button):hover { color: var(--blue-bright); }
.branch-label { padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; color: #cbd8e5; background: #091522; font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.clone-menu { position: relative; }
.clone-menu > summary::after { content: none; }
.clone-popover { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: min(430px, 82vw); padding: 16px; border: 1px solid var(--line-bright); border-radius: 9px; background: #0c1724; box-shadow: var(--shadow); }
.clone-popover p { margin: 0; color: var(--muted); }
.clone-popover label { display: block; color: var(--muted); font-size: 11px; font-weight: 750; }
.clone-popover .copy-field + label { margin-top: 14px; }
.clone-lfs-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 7px; }
.copy-field input, .copy-field .button { min-height: 38px; }
.clone-key-link { display: inline-flex; margin-top: 12px; font-size: 11px; font-weight: 750; }
.clone-credential-note { display: block; margin-top: 9px; color: var(--muted-2); font-size: 10px; }
.api-token-panel, .ssh-key-panel { scroll-margin-top: 88px; }
.repository-browser { overflow: hidden; }
.latest-commit { min-height: 58px; padding: 10px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; background: rgba(87,146,216,.035); }
.latest-commit strong, .latest-commit small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-commit strong { font-size: 12px; }
.latest-commit small { color: var(--muted-2); font-size: 10px; }
.latest-commit code { color: var(--blue-bright); font-size: 10px; }
.commit-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #d9ecff; background: #224568; font-size: 11px; font-weight: 850; }
.repository-file-table { min-width: 620px; }
.repository-file-table th:first-child { width: 65%; }
.repository-file-table td:first-child { display: flex; align-items: center; gap: 10px; }
.file-kind { width: 18px; flex: none; color: var(--muted-2); text-align: center; }
.file-kind-tree { color: var(--blue-bright); }
.repository-readme { margin-top: 18px; overflow: hidden; }
.repository-readme .panel-heading { min-height: 54px; padding-block: 12px; }
.repository-readme .panel-heading h2 { font-size: 13px; }
.repository-readme .panel-heading a { color: var(--blue-bright); font-size: 11px; }
.repository-markdown-preview { min-height: 120px; }
.repository-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.repository-settings-card { min-width: 0; overflow: visible; }
.repository-settings-card > .panel-heading { min-height: 64px; }
.repository-settings-card .panel-heading > div { display: flex; align-items: center; gap: 10px; }
.repository-settings-card > .stack-form, .repository-access-add form { padding: 22px; }
.repository-settings-card .compact-search { margin: 16px 20px; }
.repository-settings-card .table-wrap { border-top: 1px solid var(--line); }
.repository-settings-card .pagination { margin: 0; padding: 15px 20px; border-top: 1px solid var(--line); }
.settings-card-footer { padding: 13px 18px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 10px; }
.settings-card-footer a { color: var(--blue-bright); }
.policy-expression-preview { min-height: 45px; max-height: 180px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 6px; overflow: auto; background: #07111c; }
.policy-token { display: inline-flex; min-height: 25px; padding: 3px 8px; border: 1px solid transparent; border-radius: 6px; align-items: center; color: var(--muted); background: transparent; font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.policy-token-tag { border-color: rgba(120,183,255,.34); color: #c9e2ff; background: rgba(87,146,216,.1); }
.policy-token-allow { border-color: rgba(164,147,238,.36); color: #dcd4ff; background: rgba(164,147,238,.1); }
.policy-token-inherit { border-color: rgba(226,176,93,.36); color: #ecd09b; background: rgba(226,176,93,.08); }
.policy-token-operator, .policy-token-parenthesis { padding-inline: 3px; color: var(--muted-2); }
.policy-token-invalid { border-color: rgba(246,126,126,.45); color: #ffb3b3; background: rgba(246,126,126,.08); }
button.policy-token { cursor: pointer; }
button.policy-token:hover { border-color: var(--blue-bright); }
.policy-tree-panel { min-width: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #07111c; }
.policy-tree-toolbar { min-height: 39px; padding: 8px 11px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted-2); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.policy-tree-result { padding: 4px 7px; border: 1px solid; border-radius: 999px; font-size: 9px; letter-spacing: .05em; white-space: nowrap; }
.policy-tree-result-true { color: var(--green); border-color: rgba(97,201,154,.28); background: rgba(97,201,154,.07); }
.policy-tree-result-false { color: #ffb3b3; border-color: rgba(246,126,126,.32); background: rgba(246,126,126,.07); }
.policy-tree-scroll { max-height: 420px; padding: 10px 12px 12px; overflow: auto; transition: opacity .12s ease; }
.policy-tree-scroll.policy-tree-loading { opacity: .46; }
.policy-tree, .policy-tree-children { min-width: max-content; margin: 0; padding: 0; list-style: none; }
.policy-tree-children { margin-left: 11px; padding-left: 17px; border-left: 1px solid #28415c; }
.policy-tree-item { position: relative; }
.policy-tree-children > .policy-tree-item::before { position: absolute; top: 17px; left: -17px; width: 13px; border-top: 1px solid #28415c; content: ""; }
.policy-tree-row { min-height: 34px; display: flex; align-items: center; gap: 7px; }
.policy-tree-toggle, .policy-tree-toggle-spacer { width: 22px; height: 22px; flex: none; }
.policy-tree-toggle { padding: 0; border: 1px solid transparent; border-radius: 5px; color: var(--muted-2); background: transparent; cursor: pointer; font-size: 11px; line-height: 1; }
.policy-tree-toggle:hover, .policy-tree-toggle:focus-visible { border-color: var(--line-bright); color: var(--text); background: rgba(255,255,255,.035); }
.policy-tree-toggle[aria-expanded="false"] { transform: rotate(-90deg); }
.policy-tree-node { min-height: 26px; padding: 4px 8px; border: 1px solid; border-radius: 6px; display: inline-flex; align-items: center; gap: 7px; font: 750 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.policy-tree-node small { color: currentColor; opacity: .62; font-size: 9px; }
.policy-tree-node-operator { border-color: rgba(164,147,238,.38); color: #ddd5ff; background: rgba(164,147,238,.1); }
.policy-tree-node-tag { border-color: rgba(120,183,255,.34); color: #c9e2ff; background: rgba(87,146,216,.1); }
.policy-tree-node-literal { border-color: rgba(97,201,154,.3); color: #b8efd5; background: rgba(97,201,154,.075); }
.policy-tree-value { min-width: 38px; padding: 3px 6px; border-radius: 999px; font: 750 9px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: center; }
.policy-tree-value-true { color: var(--green); background: rgba(97,201,154,.08); }
.policy-tree-value-false { color: #ffb3b3; background: rgba(246,126,126,.08); }
.policy-tree-error { margin: 0; padding: 10px 12px; border-top: 1px solid rgba(246,126,126,.28); color: #ffb3b3; background: rgba(246,126,126,.06); font-size: 11px; }
.policy-tree-error[hidden], .policy-tree-result[hidden] { display: none; }
.policy-palette-group { min-width: 0; display: grid; gap: 6px; }
.policy-palette-label { color: var(--muted-2); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.policy-tag-palette { max-height: 170px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; overflow: auto; }
.policy-tag-palette .policy-token { max-width: 100%; overflow-wrap: anywhere; }
.policy-operator-palette .policy-token { min-width: 32px; justify-content: center; padding-inline: 8px; border-color: var(--line-bright); background: rgba(255,255,255,.018); }
.form-warning { margin: 0; padding: 10px 12px; border: 1px solid rgba(226,176,93,.32); border-radius: 7px; color: #e8c687; background: rgba(226,176,93,.07); font-size: 11px; }
.policy-risk-confirm { display: flex; align-items: flex-start; gap: 8px; }
.policy-risk-confirm[hidden] { display: none; }
.policy-risk-confirm input { width: 15px; min-height: 15px; margin-top: 1px; flex: none; }
.repository-access-add { margin: 16px 20px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.012); }
.branch-policy-form { padding: 18px; display: grid; gap: 14px; }
.branch-policy-fields { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(150px, .42fr); gap: 14px; align-items: end; }
.branch-policy-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.compact-check { min-height: 38px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; display: flex; grid-template-columns: none; align-items: center; gap: 9px; color: #cbd6e2; background: rgba(255,255,255,.014); font-size: 12px; font-weight: 700; }
.compact-check:hover { border-color: var(--line-bright); background: rgba(255,255,255,.025); }
.branch-policy-list { display: grid; gap: 10px; padding: 0 20px 20px; }
.branch-policy-card { border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.012); overflow: hidden; }
.branch-policy-card > summary { min-height: 52px; padding: 10px 13px; display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; }
.branch-policy-card > summary::-webkit-details-marker { display: none; }
.branch-policy-card > summary::after { margin-left: auto; color: var(--muted-2); content: "Edit"; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.branch-policy-card[open] > summary::after { content: "Close"; }
.branch-policy-card-title { min-width: 140px; color: var(--ink); }
.branch-policy-summary { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.branch-policy-summary small { color: var(--muted-2); }
.branch-policy-editor { padding: 16px; border-top: 1px solid var(--line); }
.branch-policy-editor .branch-policy-form { padding: 0 0 15px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.branch-policy-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.branch-policy-actions .button-danger { margin-left: auto; }
.repository-access-table td:first-child strong, .repository-access-table td:first-child small, .repository-access-table td:nth-child(2) small { display: block; }
.repository-access-table td:first-child small, .repository-access-table td:nth-child(2) small { margin-top: 3px; color: var(--muted-2); font-size: 10px; }
.repository-access-user { min-width: 180px; display: flex; align-items: center; gap: 10px; }
.repository-access-user > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.repository-access-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.repository-access-actions details { position: relative; }
.repository-access-actions details > summary::after { content: none; }
.repository-access-actions details > form { position: absolute; z-index: 20; top: calc(100% + 7px); right: 0; width: min(320px, 78vw); padding: 14px; border: 1px solid var(--line-bright); border-radius: 8px; background: #0c1724; box-shadow: var(--shadow); }
.automation-workspace > .automation-section + .automation-section { margin-top: 20px; }
.automation-section { overflow: visible; }
.automation-section > .details-panel { margin: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.012); }
.automation-section > p { margin: 0; padding: 16px 20px; }
.automation-section td > strong, .automation-section td > small, .automation-section td > a + small, .automation-section td > .branch-label + small { display: block; }
.automation-section td > small, .automation-section td > a + small, .automation-section td > .branch-label + small { margin-top: 5px; color: var(--muted-2); line-height: 1.45; }
.automation-section .table-wrap + .pagination { padding: 16px 20px; border-top: 1px solid var(--line); }
.automation-section .panel-heading-actions { display: flex; align-items: center; gap: 10px; }
.runner-filter-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(140px, 220px) auto; gap: 10px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line); }
.runner-filter-form input, .runner-filter-form select { margin: 0; min-width: 0; }
.runner-management-panel + .runner-management-panel { margin-top: 20px; }
.runner-management-panel > .panel-heading > div { display: grid; gap: 7px; }
.runner-management-panel .back-link { margin: 0; }
.runner-management-panel h1, .runner-management-panel h2, .runner-management-panel h3 { margin-top: 0; margin-bottom: 0; line-height: 1.25; }
.runner-management-panel h1 { font-size: 22px; }
.runner-management-form, .reauth-card { max-width: 760px; padding: 22px; }
.runner-management-form > * + *, .reauth-card > * + * { margin-top: 14px; }
.runner-access-boundary { display: grid; gap: 7px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.018); line-height: 1.45; }
.runner-access-boundary span, .runner-capability-grid span { color: var(--muted-2); }
.runner-metadata-grid { padding: 20px; }
.runner-capability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 20px; }
.runner-capability-grid > div { display: grid; gap: 7px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 8px; line-height: 1.45; }
.policy-code { display: grid; gap: 8px; padding: 0 20px 20px; }
.policy-code code { overflow-wrap: anywhere; line-height: 1.5; }
.reauth-card { margin: 20px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.018); line-height: 1.5; }
.runner-revoke-form { margin: 0 22px 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.runner-token-panel { padding-bottom: 20px; }
.runner-token-panel > p, .runner-token-panel > label, .runner-token-panel > .form-actions { margin-right: 20px; margin-left: 20px; }
.runner-token-panel textarea { margin-top: 8px; font-family: var(--mono); }
@media (max-width: 700px) {
  .runner-filter-form, .runner-capability-grid { grid-template-columns: 1fr; }
  .runner-filter-form .button { width: 100%; }
}
.automation-workspace > .panel + .panel { margin-top: 20px; }
.recycle-sections { display: grid; gap: 20px; }
.path-bar { min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; overflow-x: auto; white-space: nowrap; }
.path-bar a { color: var(--blue-bright); }
.path-bar strong { color: var(--ink); }
.source-file-panel { overflow: hidden; }
.lfs-object-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 24px; }
.lfs-object-card h2, .lfs-object-card p { margin: 0; }
.lfs-object-card p { margin-top: 6px; color: var(--muted); overflow-wrap: anywhere; }
.lfs-object-mark { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--line-bright); border-radius: 12px; color: var(--blue-bright); background: var(--blue-soft); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.file-view-tabs { min-height: 48px; padding: 0 14px; border-bottom: 1px solid var(--line); display: flex; align-items: stretch; gap: 3px; }
.file-view-tabs a { padding: 0 13px; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; color: var(--muted); font-size: 12px; font-weight: 750; }
.file-view-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue-bright); }
.file-view-tabs span { margin-left: auto; align-self: center; color: var(--muted-2); font-size: 10px; }
.code-view { max-height: 76vh; overflow: auto; background: #07101a; }
.code-view table { width: max-content; min-width: 100%; }
.code-view th { position: sticky; left: 0; width: 1%; min-width: 56px; padding: 0 13px; border: 0; color: #52647a; background: #09131f; text-align: right; font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; user-select: none; }
.code-view td { padding: 0 18px; border: 0; color: #d3deea; background: #07101a; font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-view tr:hover th, .code-view tr:hover td { background: rgba(87,146,216,.055); }
.code-view code { white-space: pre; }
.code-view .empty-code { padding: 24px; color: var(--muted); }

/* Issue tracker */
.issues-toolbar { margin-bottom: 16px; }
.issue-repository-filter select { min-width: min(330px, 55vw); }
.issue-workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.issue-workspace-full { grid-template-columns: 1fr; }
.issue-state-tabs { min-height: 52px; padding: 0 14px; border-bottom: 1px solid var(--line); display: flex; align-items: stretch; }
.issue-state-tabs a { padding: 0 13px; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; color: var(--muted); font-size: 12px; font-weight: 750; }
.issue-state-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue-bright); }
.issue-state-tabs > span { margin-left: auto; align-self: center; color: var(--muted-2); font-size: 11px; }
.issue-state-icon { width: 22px; color: var(--green); font-size: 18px; line-height: 1; text-align: center; }
.issue-state-closed { color: var(--violet); }
.issue-state-merged { color: var(--violet); }
.milestone-sidebar { overflow: hidden; }
.milestone-sidebar .panel-heading { min-height: 56px; padding: 13px 16px; }
.milestone-list article { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.milestone-list strong, .milestone-list small { display: block; }
.milestone-list small { margin-top: 3px; color: var(--muted-2); font-size: 10px; }
.milestone-list progress { width: 100%; height: 6px; margin-top: 10px; accent-color: var(--green); }
.milestone-sidebar .details-panel { border: 0; border-radius: 0; }
.issue-heading { padding: 2px 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.issue-heading h2 { margin: 0 0 7px; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; letter-spacing: -.03em; }
.issue-heading h2 span { color: var(--muted-2); font-weight: 450; }
.issue-heading p { margin: 0; color: var(--muted); font-size: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.issue-status { display: inline-flex; align-items: center; padding: 4px 9px; margin-right: 5px; border: 1px solid rgba(97,201,154,.3); border-radius: 999px; color: var(--green); background: rgba(97,201,154,.08); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.issue-status-closed { color: var(--violet); border-color: rgba(164,147,238,.3); background: rgba(164,147,238,.08); }
.issue-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; align-items: start; }
.issue-timeline { min-width: 0; display: grid; gap: 14px; }
.timeline-comment { overflow: hidden; }
.timeline-comment > header { min-height: 48px; padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; background: rgba(255,255,255,.018); font-size: 11px; }
.timeline-comment > header time { color: var(--muted-2); }
.timeline-author, .issue-person { display: flex; align-items: center; gap: 9px; }
.issue-sidebar .issue-person + .issue-person { margin-top: 8px; }
.assignee-picker label { grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 8px; }
.issue-metadata-form { padding: 0; display: grid; }
.issue-metadata-form > section { padding-block: 15px; }
.issue-metadata-form > .button { margin-top: 14px; }
.sidebar-section-heading { margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sidebar-section-heading h3, .sidebar-section-heading strong { margin: 0; }
.sidebar-section-heading a { color: var(--blue-bright); font-size: 10px; font-weight: 800; }
.metadata-picker { position: relative; min-width: 0; display: grid; gap: 8px; }
.metadata-chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.metadata-chip { min-width: 0; min-height: 30px; padding: 3px 5px 3px 8px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #34506c; border-radius: 999px; color: #dce8f5; background: #0d1c2b; font-size: 11px; }
.metadata-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metadata-chip .user-avatar { flex: 0 0 auto; }
.metadata-chip-remove { width: 23px; min-height: 23px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; font: 800 15px/1 Inter, sans-serif; }
.metadata-chip-remove:hover { color: #fff; background: rgba(255,255,255,.08); }
.metadata-picker > input[type="search"] { min-height: 36px; padding: 7px 10px; font-size: 11px; }
.metadata-picker-results { top: calc(100% + 5px); }
.issue-linked-commits { overflow: hidden; }
.plain-list, .linked-commit-list { margin: 0; padding: 0; list-style: none; }
.linked-commit-list li { padding: 13px 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(140px, auto) minmax(0, 1fr); gap: 5px 14px; align-items: center; }
.linked-commit-identity { min-width: 0; display: flex; align-items: center; gap: 9px; }
.linked-commit-identity > a:first-child, .linked-commit-subject { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linked-commit-subject { color: var(--ink); font-weight: 750; }
.linked-commit-list small { grid-column: 2; color: var(--muted-2); font-size: 10px; }
.issue-activity-event { min-height: 74px; padding: 13px 15px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.issue-activity-event .activity-event-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #315171; border-radius: 50%; color: var(--blue-bright); background: #0b1a29; font-size: 16px; }
.issue-activity-event > div { min-width: 0; color: #cbd7e3; font-size: 12px; line-height: 1.55; }
.issue-activity-event > div > p { margin: 5px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.issue-activity-event > time { color: var(--muted-2); font-size: 10px; white-space: nowrap; }
.issue-activity-event .issue-status { padding: 2px 6px; margin: 0; vertical-align: 1px; }
.activity-truncated { margin: 0; padding: 2px 5px; }
.issue-list-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.priority-badge, .deadline-badge { padding: 2px 6px; border: 1px solid var(--line-bright); border-radius: 999px; color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.priority-high { color: var(--amber); border-color: rgba(233,173,92,.35); }
.priority-urgent { color: #ff9292; border-color: rgba(255,110,110,.38); background: rgba(255,80,80,.06); }
.priority-low { color: #8bbcff; border-color: rgba(105,168,255,.32); }
.issue-markdown-body { padding: 20px; min-height: 76px; }
.plain-text-body { white-space: pre-wrap; overflow-wrap: anywhere; color: #d8e1ea; line-height: 1.65; }
.markdown-preview .share-task-item { list-style: none; }
.markdown-preview .share-task-checkbox { width: 16px; min-height: 16px; margin: 0 7px 0 0; padding: 0; vertical-align: -2px; accent-color: var(--blue); }
.issue-markdown-body[data-issue-task-list] .share-task-checkbox:not(:disabled) { cursor: pointer; }
.task-update-status { min-height: 18px; margin: 0; padding: 0 20px 8px; color: var(--muted-2); font-size: 10px; }
.issue-sidebar { display: grid; gap: 0; }
.issue-sidebar section { padding: 15px 0; border-bottom: 1px solid var(--line); }
.issue-sidebar h3 { margin: 0 0 8px; color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.issue-sidebar p { margin: 0; color: #ced8e3; font-size: 12px; }
.issue-sidebar form { padding-top: 16px; }
.issue-sidebar .button { width: 100%; }
.issue-composer { position: relative; overflow: visible; padding: 0; }
.markdown-editor-tabs { min-height: 45px; padding: 0 10px; border-bottom: 1px solid var(--line); display: flex; align-items: stretch; }
.markdown-editor-tabs button { padding: 0 12px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 12px; font-weight: 750; }
.markdown-editor-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--blue-bright); }
.markdown-editor-tabs .insert-link-action { margin-left: auto; color: var(--blue-bright); }
.issue-composer textarea { min-height: 210px; border: 0; border-radius: 0; background: #08121d; }
.issue-composer textarea:focus-visible { position: relative; z-index: 1; }
.compose-preview { min-height: 240px; }
.issue-composer .editor-status { min-height: 28px; padding: 6px 14px; color: var(--muted-2); font-size: 10px; }
.issue-composer .button-row { padding: 0 14px 14px; justify-content: flex-end; }
.issue-composer .link-search-panel { position: absolute; z-index: 25; top: 44px; right: 8px; width: min(620px, calc(100% - 16px)); max-height: 430px; overflow: auto; box-shadow: var(--shadow); }
.issue-content-edit-panel, .comment-edit-panel { border-top: 1px solid var(--line); }
.issue-content-edit-panel > summary, .comment-edit-panel > summary { padding: 11px 16px; color: var(--blue-bright); font-size: 11px; font-weight: 800; cursor: pointer; }
.issue-content-edit-panel .issue-composer { border-top: 1px solid var(--line); }
.issue-new-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; align-items: start; }
.issue-title-input { min-height: 54px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #0a1521; font-size: 17px; font-weight: 750; }
.issue-create-sidebar { padding: 16px; display: grid; gap: 14px; }
.issue-create-sidebar > div > strong { display: block; margin-bottom: 8px; font-size: 12px; }
.comment-composer { margin-top: 4px; }
.pull-request-composer { margin-bottom: 16px; }
.pull-request-composer > summary { padding: 14px 16px; font-weight: 800; cursor: pointer; }
.pull-request-composer > form { padding: 0 16px 16px; }
.pull-description-editor { margin: 16px 18px 18px; border: 1px solid var(--line); border-radius: 8px; }
.pull-description-editor > summary { cursor: pointer; font-weight: 750; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.milestone-state-tabs { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 8px; }
.milestone-create-panel { margin-bottom: 16px; overflow: visible; }
.milestone-create-panel > summary, .milestone-edit-panel > summary { padding: 13px 16px; color: var(--blue-bright); font-weight: 800; cursor: pointer; }
.milestone-create-panel > form, .milestone-edit-panel > form { position: relative; padding: 0 16px 16px; display: grid; gap: 12px; }
.milestone-form-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr) minmax(130px, .7fr); gap: 12px; }
.milestone-form-grid > label { min-width: 0; display: grid; gap: 6px; }
.milestone-catalog { display: grid; gap: 14px; }
.milestone-card { overflow: visible; }
.milestone-card > header { padding: 16px 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.milestone-card > header h3 { margin: 0 0 5px; font-size: 17px; }
.milestone-card > header h3 span { color: var(--muted-2); font-weight: 500; }
.milestone-card > header p { margin: 0; color: var(--muted); font-size: 11px; }
.milestone-description { padding: 2px 18px 18px; }
.milestone-edit-panel { border-top: 1px solid var(--line); }
.milestone-create-panel textarea, .milestone-edit-panel textarea { min-height: 150px; }
.milestone-create-panel .link-search-panel, .milestone-edit-panel .link-search-panel { position: absolute; z-index: 30; top: 120px; right: 16px; width: min(620px, calc(100% - 32px)); max-height: 430px; overflow: auto; box-shadow: var(--shadow); }

@media (max-width: 860px) {
  .repository-workspace { width: min(100% - 28px, 1280px); }
  .repository-settings-grid { grid-template-columns: 1fr; }
  .issue-workspace-grid, .issue-detail-grid, .issue-new-layout { grid-template-columns: 1fr; }
  .issue-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .issue-sidebar form { align-self: center; }
  .milestone-form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .repository-title-row, .repository-toolbar, .issues-toolbar { align-items: stretch; flex-direction: column; }
  .repository-title-row p { margin-left: 0; }
  .repository-visibility { align-self: flex-start; }
  .branch-picker, .issue-repository-filter { width: 100%; }
  .branch-picker select, .issue-repository-filter select { min-width: 0; }
  .branch-picker select, .issue-repository-filter select { flex: 1; }
  .repository-toolbar-links { justify-content: space-between; }
  .latest-commit { grid-template-columns: auto minmax(0, 1fr); }
  .latest-commit > a { grid-column: 2; }
  .file-toolbar .repository-toolbar-links { justify-content: flex-end; }
  .lfs-object-card { grid-template-columns: auto minmax(0, 1fr); }
  .lfs-object-card > .button, .lfs-object-card > .status-badge { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
  .issue-sidebar { grid-template-columns: 1fr; gap: 0; }
  .timeline-comment > header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .markdown-editor-tabs button { padding-inline: 8px; }
  .linked-commit-list li { grid-template-columns: 1fr; }
  .linked-commit-list small { grid-column: 1; }
  .issue-activity-event { grid-template-columns: 30px minmax(0, 1fr); }
  .issue-activity-event > time { grid-column: 2; }
  .milestone-form-grid { grid-template-columns: 1fr; }
  .repository-search { display: grid; grid-template-columns: 1fr 1fr; }
  .repository-search input { grid-column: 1 / -1; }
  .content-search, .recycle-search { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-left: 0; }
  .content-search input, .recycle-search input { grid-column: 1 / -1; }
  .branch-policy-fields, .branch-policy-options { grid-template-columns: 1fr; }
  .branch-policy-card > summary { align-items: flex-start; flex-direction: column; }
  .branch-policy-card > summary::after { position: absolute; right: 14px; }
  .branch-policy-actions { align-items: stretch; flex-direction: column; }
  .branch-policy-actions .button, .branch-policy-actions .table-action { width: 100%; justify-content: center; text-align: center; }
}

/* Help */
.help-main { max-width: 1180px; }
.help-main .page-heading { margin-bottom: 20px; }
.help-search { width: min(380px, 100%); }
.help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.help-sidebar { position: sticky; top: 88px; padding: 8px; }
.help-sidebar nav { display: grid; }
.help-sidebar a { padding: 9px 11px; color: var(--muted); border-radius: 7px; font-size: 12px; font-weight: 700; }
.help-sidebar a:hover { color: var(--ink); background: rgba(87,146,216,.08); }
.help-content { display: grid; gap: 14px; min-width: 0; }
.help-topic { padding: 22px 24px; scroll-margin-top: 88px; }
.help-topic h2 { margin: 0 0 14px; font-size: 20px; letter-spacing: -.02em; }
.help-topic h3 { margin: 0 0 7px; font-size: 14px; }
.help-topic p { color: var(--muted); margin: 14px 0 0; }
.help-topic ol, .help-topic ul { margin: 0; padding-left: 21px; color: #cbd5df; }
.help-topic li + li { margin-top: 7px; }
.help-topic a { color: var(--blue-bright); text-decoration: underline; text-underline-offset: 2px; }
.help-topic code { color: #cbe2fb; overflow-wrap: anywhere; }
.help-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.help-steps section { padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.014); }
.help-steps section p { margin-top: 0; }
.help-subsection { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.help-admin-steps { margin-top: 14px; }
.help-empty { padding: 30px; text-align: center; }
.help-empty h2 { margin: 0 0 15px; }
@media (max-width: 780px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-sidebar { position: static; overflow-x: auto; }
  .help-sidebar nav { display: flex; width: max-content; }
  .help-steps { grid-template-columns: 1fr; }
}

/* Notifications */
.notification-nav-link { position: relative; display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; color: var(--muted); border-radius: 7px; font-size: 12px; font-weight: 750; }
.notification-nav-link:hover, .notification-nav-link[aria-current="page"] { color: var(--ink); background: rgba(87,146,216,.09); }
.notification-count { min-width: 19px; height: 19px; margin-left: 6px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--blue-bright); border-radius: 999px; font-size: 10px; line-height: 1; }
.notification-count-dot { min-width: 9px; width: 9px; height: 9px; padding: 0; font-size: 0; box-shadow: 0 0 0 2px var(--panel); }
.follow-control { display: inline-flex; margin: 0; }
.follow-control .button[aria-pressed="true"] { color: #dcecff; border-color: rgba(92,166,255,.38); background: rgba(72,139,219,.12); }
.issue-heading-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; min-width: 0; }
.issue-heading-title h2 { min-width: 0; overflow-wrap: anywhere; }
.notifications-page { max-width: 980px; }
.notification-list { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.notification-row { min-width: 0; padding: 16px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: center; border-bottom: 1px solid var(--line); }
.notification-row:last-child { border-bottom: 0; }
.notification-row.notification-unread { background: linear-gradient(90deg, rgba(52,132,220,.12), rgba(52,132,220,.025)); box-shadow: inset 3px 0 var(--blue-bright); }
.notification-content { min-width: 0; }
.notification-content p { margin: 0; color: #c8d3df; overflow-wrap: anywhere; }
.notification-content a { color: var(--blue-bright); font-weight: 750; }
.notification-meta { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted-2); font-size: 11px; }
.notification-read { margin: 0; }
.notifications-page .pagination { margin-top: 16px; }
@media (max-width: 780px) {
  .notification-nav-link { padding-inline: 7px; }
  .notification-nav-link { font-size: 0; }
  .notification-nav-link::before { content: "Alerts"; font-size: 11px; }
  .notification-row { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .notification-read { grid-column: 2; }
  .issue-heading-title { align-items: stretch; flex-direction: column; gap: 8px; }
  .issue-heading-title .follow-control { align-self: flex-start; }
}
