/* share.mySites.guru: the manage.mysites.guru table canon (assets/css/table.css), ported.
   Ink #0e1116, 1px borders, 10px cards, 4px buttons, no shadows, system stack. Dark follows the OS. */
:root {
  --ink: #0e1116; --fg: #1f2328; --muted: #59636e; --faint: #818b98;
  --border: #d1d9e0; --panel: #fff; --panel-2: #f6f8fa; --panel-3: #eef1f4; --row-hover: #f6f8fa;
  --btn-bg: #f6f8fa; --btn-bd: #d1d9e0; --focus: #0e1116; --danger: #d1242f; --danger-bg: #ffebe9;
  --y-bg: #fff8c5; --y-fg: #7d4e00; --n-bg: #eef1f4; --n-fg: #3d444d;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #d1d9e0; --muted: #9198a1; --faint: #6e7681;
    --border: #3d444d; --panel: #0d1117; --panel-2: #151b23; --panel-3: #212830; --row-hover: #151b23;
    --btn-bg: #212830; --btn-bd: #3d444d; --focus: #fff; --danger: #ff8182; --danger-bg: rgba(248, 81, 73, .15);
    --y-bg: rgba(187, 128, 9, .18); --y-fg: #e3b341; --n-bg: #212830; --n-fg: #b7bdc8;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--panel); color: var(--fg); font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; -webkit-font-smoothing: antialiased; }
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button, input { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dim { color: var(--muted); }
[hidden] { display: none !important; }

/* Brand */
.topline { margin: 0 0 18px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--fg); text-decoration: none; border-radius: 4px; }
.brand .logo { width: 30px; height: auto; display: block; color: var(--ink); }
@media (prefers-color-scheme: dark) { .brand .logo { color: #fff; } }
.wordmark { font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.wordmark b { font-weight: 600; }

/* Page frames */
.recipient { max-width: 640px; margin: 0 auto; padding: 40px 16px 64px; }
.drop { max-width: 1080px; margin: 0 auto; padding: 24px 20px 64px; }
.pagehead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pagehead h1 { text-wrap: balance; font-size: 17px; font-weight: 650; margin: 0; letter-spacing: -.01em; }

/* Cards and the ink bar */
.tablecard { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel); }
.tablecard + .tablecard { margin-top: 12px; }
.narrow { max-width: 440px; margin: 0 auto; }
/* Narrow pages (password, gone): the brand lines up with the card's left edge, not the wider frame's. */
.recipient:has(.narrow) .topline { max-width: 440px; margin-inline: auto; }
.tbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--ink); color: #fff; padding: 7px 10px; min-height: 44px; }
@media (prefers-color-scheme: dark) { .tbar { background: #010409; border-bottom: 1px solid var(--border); } }
.tbar-left { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.tbar-right { display: flex; align-items: center; gap: 7px; margin: 0 0 0 auto; }
.tbar-count { font-size: 12.5px; font-weight: 400; margin: 0; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbar-count b { color: #fff; font-weight: 600; }

/* Buttons */
.tbtn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--fg); border-radius: 4px; cursor: pointer; font-size: 12px; white-space: nowrap; text-decoration: none; transition: background-color .12s, transform .12s; }
.tbtn:hover { background: var(--panel-3); }
.tbtn:active:not(:disabled) { transform: scale(.96); }
.tbtn:disabled { opacity: .5; cursor: default; }
.tbtn .ic { width: 14px; height: 14px; flex: none; color: var(--muted); }
.tbtn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.tbtn.primary:hover:not(:disabled) { background: #262c36; }
@media (prefers-color-scheme: dark) {
  .tbtn.primary { background: #f0f3f6; border-color: #f0f3f6; color: #0e1116; }
  .tbtn.primary:hover:not(:disabled) { background: #fff; }
}
.tbar .tbtn { background: #fff; border-color: #fff; color: #0e1116; height: 30px; font-weight: 600; }
.tbar .tbtn:hover { background: #e6e9ec; }
.tbar .tbtn .ic { color: #0e1116; }
.tbtn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) { .tbtn.danger { color: #0e1116; } }
.rbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid transparent; background: transparent; border-radius: 4px; cursor: pointer; color: var(--muted); position: relative; }
.rbtn::before { content: ''; position: absolute; inset: -2px; }
.rbtn { transition: background-color .12s, color .12s, transform .12s; }
.rbtn:active { transform: scale(.96); }
.rbtn:hover { background: var(--panel-3); color: var(--fg); border-color: var(--border); }
.rbtn.danger:hover { color: var(--danger); background: var(--danger-bg); border-color: transparent; }
.rbtn .ic { width: 14px; height: 14px; }

/* Recipient: facts sheet and image */
.facts { margin: 0; }
.fact { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; min-height: 34px; padding: 6px 12px; border-bottom: 1px solid var(--border); }
.fact:last-child { border-bottom: 0; }
.fact dt { color: var(--muted); font-size: 12px; }
.fact dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.fact:first-child dd { font-weight: 600; }
/* A bare text button: no fill or border at rest or on hover, so it reads as the value itself. */
.hash { appearance: none; -webkit-appearance: none; display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; min-height: 32px; margin: -4px 0; padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; cursor: copy; text-align: left; }
.hash:hover code { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.hash:hover .h-ic { color: var(--fg); }
.hash code { display: flex; min-width: 0; flex: 1; font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; white-space: nowrap; }
.hash .h-start { overflow: hidden; text-overflow: ellipsis; min-width: 2ch; }
.hash .h-end { flex: none; }
.hash .h-ic, .hash .h-done { flex: none; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.hash .ic { width: 14px; height: 14px; }
.stage { background: var(--panel-2); display: grid; place-items: center; padding: 12px; }
.stage img { display: block; max-width: 100%; max-height: 75vh; height: auto; border-radius: 4px; outline: 1px solid rgba(0, 0, 0, .1); outline-offset: -1px; }
@media (prefers-color-scheme: dark) { .stage img { outline-color: rgba(255, 255, 255, .1); } }

/* Password form */
.pwform { padding: 18px 16px 20px; }
.pwform label { display: flex; align-items: center; gap: 7px; font-weight: 600; margin-bottom: 10px; }
.pwform label .ic { width: 14px; height: 14px; color: var(--muted); }
.inrow { display: flex; gap: 7px; }
input[type=password], input[type=text], input[type=number] { height: 30px; min-width: 0; border: 2px solid var(--border); border-radius: 4px; padding: 0 8px; background: var(--panel); color: var(--fg); font-size: 13px; }
input:focus-visible { outline: none; border-color: var(--focus); }
.inrow input { flex: 1; }
.formerr { color: var(--danger); font-size: 12px; margin: 8px 0 0; }

/* Empty and gone states */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 20px 40px; }
.emptyic { display: block; width: 48px; height: 48px; color: var(--faint); }
.emptyic svg { width: 100%; height: 100%; display: block; }
.empty h1, .empty h3 { font-size: 17px; font-weight: 600; margin: 12px 0 4px; text-wrap: balance; }
.empty p { margin: 0; color: var(--muted); max-width: 42ch; text-wrap: pretty; }

/* Drop: new share form */
.newform { padding: 14px; display: grid; gap: 14px; }
.dropzone { display: flex; align-items: center; justify-content: center; min-height: 112px; border: 2px dashed var(--border); border-radius: 8px; background: var(--panel-2); cursor: pointer; padding: 16px; text-align: center; transition: border-color .12s, background-color .12s; }
.dropzone:hover, .dropzone.over { border-color: var(--muted); background: var(--panel-3); }
.dropzone:focus-within { border-color: var(--focus); }
.dz-empty, .dz-file { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.dz-file b { overflow-wrap: anywhere; }
.opts { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-end; }
.opt { display: grid; gap: 5px; }
.opt.grow { flex: 1; min-width: 180px; }
.opt input[type=number] { width: 120px; }
.opt.grow input { width: 100%; }
.lbl { font-size: 12px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--btn-bd); border-radius: 4px; overflow: hidden; height: 30px; }
.seg button { border: 0; background: var(--btn-bg); padding: 0 11px; font-size: 12px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--btn-bd); }
.seg button:hover { background: var(--panel-3); }
.seg button.on { background: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .seg button.on { background: #f0f3f6; color: #0e1116; } }
.formfoot { display: flex; align-items: center; gap: 12px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; }
.formfoot .formerr { margin: 0; margin-right: auto; }
.progress { display: flex; align-items: center; gap: 10px; margin-right: auto; font-variant-numeric: tabular-nums; font-size: 12px; }
.progress .bar { width: 220px; height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s ease-out; }
@media (prefers-color-scheme: dark) { .progress .bar span { background: #f0f3f6; } }
.result { display: flex; gap: 7px; padding: 14px; flex-wrap: wrap; }
.result input { flex: 1; min-width: 240px; font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* Drop: shares table (the mini tablecard) */
#list { --grid: minmax(0, 1fr) 110px 170px 100px 96px; }
.thead, .row { display: grid; grid-template-columns: var(--grid); align-items: center; }
.thead { background: var(--panel-2); border-bottom: 1px solid var(--border); font-size: 11px; color: var(--muted); height: 34px; }
.th, .cell { padding: 0 10px; min-width: 0; }
.row { min-height: 40px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--row-hover); }
.cell.name b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell .sub { display: block; color: var(--muted); font-size: 11.5px; }
.cell.acts { display: flex; gap: 4px; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 1px 7px; border-radius: 4px; white-space: nowrap; }
.pill .ic { width: 12px; height: 12px; }
.pz-n { background: var(--n-bg); color: var(--n-fg); }
.pz-y { background: var(--y-bg); color: var(--y-fg); }
.okdash { color: var(--faint); }
@media (max-width: 720px) {
  #list { --grid: minmax(0, 1fr) 84px 96px; }
  #list .thead .th:nth-child(3), #list .thead .th:nth-child(4), .row .c-exp, .row .c-pw { display: none; }
}

/* Confirm dialog (the canon's my-modal look: ink header, inset footer rule) */
dialog.confirm { border: 2px solid var(--ink); border-radius: 12px; padding: 0; width: min(420px, calc(100vw - 32px)); background: var(--panel); color: var(--fg); overflow: hidden; }
@media (prefers-color-scheme: dark) { dialog.confirm { border-color: var(--border); } }
dialog.confirm::backdrop { background: rgba(255, 255, 255, .55); backdrop-filter: blur(10px); }
@media (prefers-color-scheme: dark) { dialog.confirm::backdrop { background: rgba(1, 4, 9, .55); } }
.dhead { background: var(--ink); color: #fff; font-weight: 600; padding: 11px 20px; }
.dbody { margin: 0; padding: 16px 20px; overflow-wrap: anywhere; }
.dfoot { display: flex; justify-content: flex-end; gap: 7px; margin: 0 20px; padding: 12px 0 16px; border-top: 2px solid var(--border); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
