/* Top Gun Vault hub. Header: Top Gun Transfer 1.2.4 (every Top Gun app). Body: Accounting's
   Option B light look (light grey page, white cards, quiet text links, no chunky buttons). */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 13px/1.38 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif; background: #eceef2; color: #393a3d; }
a { color: #0077c5; }
button, input { font: inherit; }

/* ---- header (Transfer 1.2.4) ---- */
.tg-app-header { background: #161616; border-bottom: 1px solid #3d3d3d; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: #e8e8e8; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 36px; height: 36px; display: block; flex-shrink: 0; }
.brand h1 { margin: 0; font: 400 26px/1 "Bebas Neue", "Oswald", system-ui, sans-serif; letter-spacing: .04em; color: #e8e8e8; }
.brand .tag { color: #9a9a9a; font: 12px "Oswald", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; display: block; margin-top: 3px; }
.header-meta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-meta .tag { color: #9a9a9a; font: 12px "Oswald", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; margin-top: 0; }
.header-meta .version-check { display: contents; }
.header-meta .commit { font: 10px "Oswald", system-ui, sans-serif; color: #6f6f6f; letter-spacing: .04em; margin-left: -8px; }
.header-meta .commit[hidden], #new-build[hidden], #update-status[hidden], #update-action[hidden] { display: none; }
#new-build, #check-updates, #update-status, #update-action { font: 12px "Oswald", system-ui, sans-serif; color: #9a9a9a; letter-spacing: .08em; text-transform: none; }
#update-status { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#new-build, #check-updates, #update-action { background: transparent; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
#check-updates:hover, #update-action:hover, #new-build:hover { color: #c8c8c8; }
#sign-out-btn { background: #3a3a3a; border: 1px solid #3d3d3d; color: #e8e8e8; padding: 6px 12px; border-radius: 4px; cursor: pointer; font: 12px "Segoe UI", system-ui, sans-serif; }
#sign-out-btn:hover { background: #484848; }

/* ---- page ---- */
main { max-width: 1240px; margin: 0 auto; padding: 18px 24px 32px; }
.page-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; position: relative; flex-wrap: wrap; }
.page-head .tlink:focus-visible { outline: 2px solid #0077c5; outline-offset: 2px; }
.links-panel.share-panel { left: 0; right: auto; top: calc(100% + 4px); width: min(520px, 100%); }
.links-panel .share-list { border-top: 0; margin-top: 0; padding-top: 0; max-height: 280px; }
.links-panel .share-foot { flex-wrap: wrap; }
.link-line { padding: 3px 0; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.link-line .link-name { font-weight: 600; color: #2b2c2e; }
.page-head h2 { margin: 0; font-size: 18px; font-weight: 600; color: #2b2c2e; }
.error-toggle { margin-left: auto; color: #393a3d; }
.muted { color: #6b6c72; }
.small { font-size: 12px; }
.tlink { background: none; border: 0; padding: 0; color: #0077c5; font: 500 12px "Segoe UI", system-ui, sans-serif; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.group { margin: 0 0 20px; }
.group h3 { margin: 0 0 8px; font: 600 11px "Segoe UI", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #6b6c72; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 10px; min-height: 112px; background: #fff; border: 1px solid #dcdfe4; border-radius: 6px; padding: 14px 14px 12px; color: inherit; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.tile { position: relative; }
.tile.has-link { cursor: pointer; }
.tile.has-link:hover { border-color: #b9c3cf; box-shadow: 0 2px 8px rgba(30, 40, 60, .08); }
.tile a.open:focus-visible, .tile .tlink:focus-visible { outline: 2px solid #0077c5; outline-offset: 2px; }
.tile.no-link { background: #fafbfc; }
.tile-top { display: flex; align-items: flex-start; gap: 12px; }
.tile-icon { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.tile-icon svg { width: 22px; height: 22px; }
.tile-name { font-size: 14px; font-weight: 600; color: #2b2c2e; line-height: 1.25; }
.tile-desc { font-size: 12px; color: #6b6c72; margin-top: 2px; }
.tile-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6b6c72; }
.tile-foot .foot-links { margin-left: auto; display: inline-flex; gap: 12px; align-items: center; }
.tile-foot .open { color: #0077c5; text-decoration: underline; text-underline-offset: 2px; }
.tile-foot .share-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tlink.strong { font-weight: 600; }
.share-panel { position: absolute; z-index: 20; left: -1px; right: -1px; top: calc(100% + 4px); background: #fff; border: 1px solid #c9ced6; border-radius: 6px; box-shadow: 0 8px 24px rgba(30, 40, 60, .16); padding: 10px 12px; cursor: default; }
.share-title { font-size: 12px; font-weight: 600; color: #2b2c2e; margin-bottom: 6px; }
.share-list { max-height: 220px; overflow: auto; border-top: 1px solid #eff1f4; margin-top: 4px; padding-top: 4px; }
.share-row { display: grid; grid-template-columns: 16px auto 1fr; gap: 6px; align-items: center; padding: 3px 0; font-size: 12px; cursor: pointer; }
.share-row .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.share-row.everyone { grid-template-columns: 16px 1fr; }
.share-row input { margin: 0; }
.share-foot { display: flex; align-items: center; gap: 12px; margin-top: 8px; border-top: 1px solid #eff1f4; padding-top: 8px; }
.share-foot .muted { margin-right: auto; }
.share-msg:empty { display: none; }
.share-msg { margin-top: 6px; color: #6b6c72; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.up { background: #2ca01c; box-shadow: 0 0 0 3px rgba(44, 160, 28, .14); }
.dot.down { background: #d52b1e; box-shadow: 0 0 0 3px rgba(213, 43, 30, .14); }
.dot.unknown { background: #a5a8ad; }
.mac-note { font-size: 11px; color: #8d9096; }
.share-note { font-size: 11px; color: #8d9096; }
.admin-note { margin-top: 18px; font-size: 12px; color: #6b6c72; border-top: 1px solid #dcdfe4; padding-top: 10px; }
.admin-note code { font: 11px ui-monospace, Menlo, monospace; background: #e3e6eb; padding: 1px 4px; border-radius: 3px; }
.problem { color: #8a1c1c; }

/* ---- sign-in ---- */
.signin { max-width: 340px; margin: 48px auto; background: #fff; border: 1px solid #dcdfe4; border-radius: 6px; padding: 20px 22px; }
.signin h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.signin label { display: block; margin-top: 12px; font-size: 12px; color: #4b4c52; }
.signin input { display: block; width: 100%; margin-top: 4px; height: 30px; padding: 0 8px; border: 1px solid #8d9096; border-radius: 3px; background: #fff; color: #393a3d; }
.signin input:focus { outline: none; border-color: #0077c5; box-shadow: 0 0 0 2px rgba(0, 119, 197, .18); }
.signin .row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.btn { height: 28px; padding: 0 14px; border-radius: 3px; border: 1px solid #2ca01c; background: #2ca01c; color: #fff; font: 600 12px "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.btn:hover { background: #108000; }
.btn:disabled { opacity: .6; cursor: default; }
.error { color: #8a1c1c; font-size: 12px; margin: 10px 0 0; }

/* ---- iPhone / narrow ---- */
@media (max-width: 900px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .tg-app-header { padding: 8px 12px; gap: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .brand img { width: 30px; height: 30px; }
  .brand h1 { font-size: 22px; }
  .brand .tag { display: none; }
  .header-meta { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
  main { padding: 12px 12px 24px; }
  .page-head h2 { font-size: 16px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { min-height: 104px; padding: 12px 12px 10px; gap: 8px; }
  .tile-top { flex-direction: column; gap: 8px; }
  .tile-icon { width: 34px; height: 34px; border-radius: 7px; }
  .tile-icon svg { width: 19px; height: 19px; }
  .tile-desc { display: none; }
  .signin { margin: 24px 12px; }
}

.tile-logo { background: transparent; overflow: hidden; }
.tile-logo img { width: 100%; height: 100%; display: block; }
