:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #172841;
  background: #f2f5fb;
  font-synthesis: none;
  --muted: #52647f;
  --edge: #d7e0ee;
  --primary: #24569e;
  --blue-tint: #e8f0fc;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.topbar { background: #346dc1; color: #fff; border-bottom: 3px solid #ffdc32; }
.topbar-inner, main { width: min(1220px, calc(100% - 48px)); margin-inline: auto; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 73px; gap: 16px; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.identity { display: flex; align-items: center; gap: 17px; font-size: 14px; font-weight: 650; }
.identity img { object-fit: contain; display: block; height: auto; }
.identity span { border-left: 1px solid #91afe0; padding-left: 17px; }
.topbar .button.quiet { color: #fff; }
.topbar button:focus-visible { outline-color: #ffdc32; }
main { padding: 42px 0 72px; }
.page-header, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.page-header { margin-bottom: 24px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(29px, 4vw, 43px); letter-spacing: -.045em; line-height: 1.1; }
h2 { font-size: 19px; letter-spacing: -.025em; }
.page-header p, .login > p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.panel { border: 1px solid var(--edge); border-radius: 15px; background: #fff; padding: 24px; }
.login { width: min(430px, 100%); margin: 44px auto; padding: 30px; }
.login h1 { font-size: 32px; }
#login-form { display: grid; gap: 10px; margin-top: 24px; }
#login-form button { margin-top: 4px; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 19px; margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; margin-top: 17px; }
.form-grid .full { grid-column: 1 / -1; }
label, legend { font-size: 13px; font-weight: 650; }
label span { color: var(--muted); font-weight: 450; font-size: 12px; }
input:not([type=radio], [type=range]) { width: 100%; font: inherit; font-size: 14px; font-weight: 450; color: inherit; padding: 10px 11px; min-height: 40px; background: #fff; border: 1px solid #c5d2e3; border-radius: 7px; }
input::placeholder { color: #627590; opacity: 1; }
.form-grid input { display: block; margin-top: 5px; }
:focus-visible { outline: 2px solid #346dc1; outline-offset: 2px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 9px 13px; min-height: 39px; border-radius: 7px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 670; border: 1px solid transparent; white-space: nowrap; }
.button.primary { background: var(--primary); color: white; }
.button.secondary { background: #fff; border-color: #bacbe3; color: #224e90; }
.button.quiet { background: transparent; color: #2f4d77; }
.button.danger { background: #fff4f3; color: #982c24; border-color: #f1d3d0; }
.button:hover:enabled { filter: brightness(.93); }
.button:disabled { opacity: .46; cursor: default; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.error { margin-top: 8px; color: #9d2d23; font-size: 13px; }
.error:empty { display: none; }
.notice { background: var(--blue-tint); color: #244d86; padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; }
.preview-shell { display: grid; justify-items: center; background: #f5f7fc; border: 1px solid var(--edge); border-radius: 9px; padding: 12px; overflow: auto; }
#preview { width: 368px; }
#sample-dialog { width: min(454px, calc(100% - 28px)); }
#sample-preview { margin-top: 10px; }
#preview a:hover { text-decoration: underline !important; }
.hint { color: var(--muted); font-size: 12px; margin-top: 8px; }
.count { color: var(--muted); font-size: 13px; }
#empty { padding: 33px 0 14px; text-align: center; color: var(--muted); }
#empty p { margin-bottom: 12px; }
#table-wrap { overflow-x: auto; }
.records-table { border-collapse: collapse; width: 100%; text-align: left; margin-top: 14px; font-size: 14px; }
.records-table :is(th, td) { padding: 11px 12px; border-bottom: 1px solid var(--edge); }
.records-table th { color: var(--muted); font-size: 12px; background: #f2f6fc; }
.records-table td:last-child { text-align: right; }
.row-actions .button + .button { margin-left: 6px; }
.records-table tbody tr:last-child td { border-bottom: 0; }
.employee { font-weight: 660; }
.employee-email { display: block; color: var(--muted); font-size: 12px; font-weight: 450; overflow-wrap: anywhere; }
.pill { display: inline-block; border-radius: 20px; padding: 4px 9px; background: #edf2fa; color: #415879; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill[data-status=shared] { color: #24569e; background: var(--blue-tint); }
.pill[data-status=disabled] { color: #69563b; background: #f6f0e4; }
#clear-photo { margin-top: 5px; }
dialog { width: min(440px, calc(100% - 28px)); border: 1px solid var(--edge); border-radius: 13px; padding: 24px; color: inherit; }
#crop-preview {
  display: block;
  width: min(100%, 260px);
  height: auto;
  margin: 14px auto;
  border: 1px solid var(--edge);
  border-radius: 8px;
  cursor: grab;
  touch-action: none;
}
#crop-preview:active { cursor: grabbing; }
.crop-controls { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 8px; }
.crop-controls input { width: 100%; accent-color: var(--primary); }
#links-dialog { width: min(540px, calc(100% - 28px)); }
dialog p { margin-top: 10px; font-size: 14px; color: var(--muted); }
dialog::backdrop { background: rgb(18 36 67 / 38%); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 940px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 530px) {
  main, .topbar-inner { width: calc(100% - 28px); }
  main { padding-top: 25px; }
  .page-header { flex-wrap: wrap; }
  .panel { padding: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar-inner { flex-wrap: wrap; gap: 6px; padding-block: 8px; }
  .topbar-actions { margin-left: auto; }
  .identity { gap: 9px; }
  .identity span { padding-left: 9px; }
  .identity img { width: 84px; }
  .records-table :is(th, td) { padding: 8px 5px; }
}

.venture-links { margin: 18px 0 0; padding: 0; min-width: 0; border: 0; }
.venture-links .form-grid { margin-top: 8px; }
