:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color: #1d1d1f;
  background: #f2f2f7;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100svh; background: #f2f2f7; }
[hidden] { display: none !important; }

.home-link { position: fixed; z-index: 5; top: 16px; right: 16px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #dedfe4; border-radius: 50%; color: #3a3a3c; background: rgb(255 255 255 / 88%); box-shadow: 0 6px 18px rgb(45 55 72 / 10%); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.home-link:hover { color: #007aff; }
.home-link svg { width: 20px; height: 20px; }

.auth-panel { min-height: 100svh; padding: 16px; display: grid; place-items: center; }
.token-form { width: min(100%, 380px); padding: 24px; display: grid; gap: 14px; border: 1px solid rgb(60 60 67 / 12%); border-radius: 22px; background: #fff; box-shadow: 0 22px 55px rgb(45 55 72 / 12%); }
.token-form h1 { margin-bottom: 10px; font-size: 28px; }
.token-form input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid rgb(60 60 67 / 18%); border-radius: 12px; outline: none; color: #1d1d1f; background: #f9f9fb; font: inherit; font-size: 16px; }
.token-form input:focus { border-color: #007aff; background: #fff; box-shadow: 0 0 0 4px rgb(0 122 255 / 14%); }
.token-form button { height: 48px; cursor: pointer; border: 0; border-radius: 12px; color: #fff; background: #0071e3; font: inherit; font-weight: 650; }
.token-form button:disabled { cursor: default; opacity: .5; }

main { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0; }
header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
header p { margin: 0 0 8px; color: #7a7b74; font-size: 10px; font-weight: 700; letter-spacing: .15em; }
h1 { margin: 0; font-size: clamp(28px, 6vw, 46px); line-height: 1.1; letter-spacing: -.045em; }
.header-actions { display: flex; align-items: center; gap: 8px; }
#count { min-width: 42px; height: 42px; padding: 0 12px; display: grid; place-items: center; border-radius: 999px; color: #fff; background: #1d1d1f; font-size: 13px; }
#logout { height: 42px; padding: 0 14px; cursor: pointer; border: 1px solid #dedfe4; border-radius: 999px; color: #6e6e73; background: #fff; font: inherit; font-size: 13px; }
.table-wrap { overflow-x: auto; border: 1px solid #dedfe4; border-radius: 16px; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 18px; border-bottom: 1px solid #ececf0; text-align: left; }
th { color: #77797f; background: #fafafd; font-size: 11px; font-weight: 600; white-space: nowrap; }
td { font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
.description { min-width: 260px; max-width: 560px; overflow-wrap: anywhere; }
.date, .size { color: #77797f; white-space: nowrap; }
.download, .delete { width: 40px; padding-left: 6px; padding-right: 6px; }
.download button, .delete button { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; cursor: pointer; border: 0; border-radius: 9px; color: #fff; transition: transform .16s, opacity .16s, background .16s; }
.download button { background: #1d1d1f; }
.delete button { background: #d70015; }
.download button:hover, .delete button:hover { transform: translateY(-1px); }
.delete button:hover { background: #b80012; }
.download button:focus-visible, .delete button:focus-visible { outline: 3px solid rgb(0 122 255 / 20%); outline-offset: 2px; }
.download button:disabled, .delete button:disabled { cursor: default; opacity: .5; transform: none; }
.download svg, .delete svg { width: 17px; height: 17px; }
.state { padding: 48px 18px; color: #77797f; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 640px) {
  main { width: min(100% - 24px, 1100px); padding: 28px 0; }
  header { align-items: center; margin-bottom: 20px; }
  th, td { padding: 13px 14px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  .download, .delete { padding-left: 4px; padding-right: 4px; }
  .description { min-width: 190px; }
}
