:root {
  color-scheme: light;
  --bg: #f0f5f8;
  --card: #fff;
  --text: #052e47;
  --muted: #687176;
  --line: #d8e4ef;
  --nav: #052e47;
  --teal: #0475bb;
  --blue: #0475bb;
  --field: #fbfdff;
  --shadow: 0 9px 28px #0b315b0c;
  --page: 78rem;
  font:
    16px/1.55 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/manrope-latin.woff2) format("woff2");
}
body {
  margin: 0;
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at 12% 0, #e1f0ff, transparent 45%), var(--bg);
  min-height: 100dvh;
}
body.dark {
  color-scheme: dark;
  --bg: #071523;
  --card: #0e2338;
  --text: #e7f1ff;
  --muted: #a4b9ce;
  --line: #29435a;
  --field: #0a1c2e;
  --shadow: 0 9px 28px #0003;
  background: var(--bg);
}
a {
  color: var(--blue);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #04bbd4;
}
button,
a.button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.68rem 1rem;
  color: var(--text);
  background: var(--card);
  font-weight: 650;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.primary,
a.primary {
  color: white;
  border-color: transparent;
  background: linear-gradient(
    130deg,
    var(--teal),
    color-mix(in srgb, var(--teal) 75%, #000)
  );
  box-shadow: 0 4px 10px #0475bb22;
}
.blue {
  background: linear-gradient(130deg, #0a8ad6, #0475bb);
  color: white;
  border-color: transparent;
}
.danger {
  color: #c33445;
}
.topbar {
  background: var(--nav);
  color: white;
  padding: 0.8rem max(1.2rem, calc((100% - var(--page)) / 2));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.6rem;
  min-height: 78px;
  box-shadow: 0 3px 12px #052e4720;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: white;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.brand span span {
  color: #8ed1fc;
}
.organisation {
  border-inline-start: 1px solid #57718a;
  padding-inline-start: 1.4rem;
  font-size: 0.85rem;
}
.topbar nav {
  min-width: 0;
  margin-inline-start: auto;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.topbar select {
  width: auto;
  border: 0;
  background: #f4f9ff;
  color: #102743;
  border-radius: 20px;
  padding: 0.35rem 0.65rem;
}
.topbar .icon {
  color: white;
  background: #ffffff16;
  border: 0;
  border-radius: 50%;
  padding: 0.35rem;
  min-width: 42px;
}
.account {
  color: white;
  font-size: 0.8rem;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
main {
  width: min(100% - 2.5rem, var(--page));
  margin: 2.5rem auto;
  min-height: 70dvh;
}
h1,
h2 {
  line-height: 1.2;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  margin: 0.5rem 0 0.8rem;
}
h2 {
  font-size: 1.4rem;
  margin: 0 0 0.8rem;
}
p {
  margin: 0.7rem 0;
}
.muted,
small {
  color: var(--muted);
}
.hero {
  padding: 1.4rem 0 2rem;
  max-width: 780px;
}
.hero .eyebrow {
  color: var(--teal);
  font-weight: 750;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: var(--shadow);
  min-width: 0;
}
.action-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.action-card p {
  max-width: 400px;
  color: var(--muted);
  flex: 1;
  margin: 0 0 1.6rem;
}
.action-icon {
  font-size: 2rem;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  background: #d9fbf2;
  color: var(--teal);
  border-radius: 22px;
  margin-bottom: 1.3rem;
}
.action-card:nth-child(2) .action-icon {
  background: #e0f0ff;
  color: var(--blue);
}
.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.3rem;
  padding: 1.6rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.narrow {
  width: min(100%, 760px);
  margin-inline: auto;
}
.form-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.form-head h1 {
  font-size: 1.8rem;
  margin: 0;
}
.form-head button {
  border: 0;
  background: transparent;
  padding: 0.2rem 0.6rem;
}
.fields {
  grid-template-columns: minmax(0, 1fr);
  display: grid;
  gap: 1.2rem;
}
label {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
}
input:not([type="checkbox"]):not([type="file"]),
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid #a9bdd4;
  background: var(--field);
  color: var(--text);
  border-radius: 9px;
  padding: 0.65rem 0.8rem;
  min-height: 44px;
}
textarea {
  min-height: 120px;
  resize: vertical;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.password-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.password-row input {
  flex: 1 1 170px;
}
.password-row button {
  padding: 0.5rem 0.75rem;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
input[type="checkbox"] {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  accent-color: var(--teal);
}
.drop {
  border: 2px dashed #adc4dc;
  background: var(--field);
  padding: 1.5rem;
  text-align: center;
  border-radius: 13px;
}
.drop.drag {
  border-color: var(--teal);
  background: #d9fbf2;
}
.drop input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 0.7rem;
}
.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.file-list li {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.45rem 0.7rem;
  min-width: 0;
}
.file-list span {
  overflow-wrap: anywhere;
  flex: 1;
}
.file-list button {
  padding: 0.2rem 0.6rem;
  min-height: 36px;
}
.submit {
  width: 100%;
  margin-top: 0.5rem;
}
.notice {
  border: 1px solid #bcd9f7;
  background: #eaf4ff;
  color: #18395c;
  border-radius: 12px;
  padding: 1rem;
  font-size: 0.9rem;
}
.notice.warning {
  background: #fff6df;
  border-color: #f2d99b;
  color: #624514;
}
.error {
  background: #fff0f0;
  color: #a52336;
  border: 1px solid #edb3bc;
  border-radius: 10px;
  padding: 0.8rem;
  margin-block: 1rem;
}
.result {
  display: grid;
  gap: 1.2rem;
}
.link-copy {
  display: flex;
  gap: 0.6rem;
}
.link-copy input {
  flex: 1;
  min-width: 0;
}
.output-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  max-height: 400px;
  overflow: auto;
}
.downloads {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0 1rem;
}
.table-wrap {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
  white-space: nowrap;
}
th,
td {
  text-align: start;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}
th {
  background: var(--field);
}
.badge {
  border-radius: 20px;
  background: #d7f5e9;
  color: #08664e;
  padding: 0.2rem 0.65rem;
  font-weight: 700;
  font-size: 0.78rem;
}
.badge.expired,
.badge.revoked {
  background: #fff0d4;
  color: #875000;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}
.status {
  color: var(--muted);
  min-height: 1.5em;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 1.5rem;
}
progress {
  width: 100%;
  accent-color: var(--teal);
  height: 12px;
}
footer {
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}
#toast {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 50%;
  max-width: calc(100% - 2rem);
  overflow-wrap: anywhere;
  transform: translateX(-50%);
  background: var(--nav);
  color: white;
  border-radius: 12px;
  padding: 0.7rem 1.3rem;
  box-shadow: var(--shadow);
  display: none;
  z-index: 10;
}
#toast.visible {
  display: block;
}
button:hover:not(:disabled),
a.button:hover {
  filter: brightness(0.96);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1800px) {
  :root {
    font-size: clamp(16px, 0.75vw, 22px);
    --page: 88rem;
  }
  main {
    width: min(100% - 4rem, var(--page));
  }
}
@media (min-width: 2560px) {
  :root {
    font-size: clamp(20px, 0.8vw, 34px);
    --page: 96rem;
  }
}
@media (max-width: 900px) {
  .organisation {
    display: none;
  }
  main {
    width: calc(100% - 2rem);
    margin: 1.8rem auto;
  }
  .card {
    padding: 1.4rem;
  }
}
@media (pointer: coarse) {
  .file-list button,
  .topbar .icon,
  .topbar select {
    min-height: 44px;
    min-width: 44px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .topbar {
    min-height: 56px;
  }
  main {
    margin-block: 1rem;
  }
}
@media (max-width: 650px) {
  .organisation {
    display: none;
  }
  .topbar {
    gap: 0.5rem;
    padding: 0.7rem 1rem;
  }
  .brand {
    font-size: 1.1rem;
  }
  .account {
    max-width: 100px;
    font-size: 0.7rem;
  }
  main {
    width: calc(100% - 1.3rem);
    margin: 1.3rem auto;
  }
  .cards,
  .row {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 1.2rem;
    border-radius: 16px;
  }
  .hero {
    padding-top: 0.5rem;
  }
  .action-card {
    padding: 1.5rem;
  }
  .link-copy {
    flex-wrap: wrap;
  }
  .link-copy button {
    width: 100%;
  }
  .topbar nav {
    gap: 0.35rem;
  }
  .topbar select {
    padding: 0.3rem;
  }
  .form-head h1 {
    font-size: 1.4rem;
  }
}
@media (max-width: 380px) {
  .topbar {
    flex-wrap: wrap;
  }
  .topbar nav {
    margin-inline-start: auto;
  }
  .link-copy input {
    flex-basis: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
body.dark a {
  color: #6fb0ff;
}
body.dark .danger {
  color: #ff8d9b;
}
body.dark input:not([type="checkbox"]):not([type="file"]),
body.dark textarea,
body.dark select {
  border-color: #3d5b78;
}
body.dark .notice {
  background: #0f2a45;
  border-color: #25507c;
  color: #cfe5ff;
}
body.dark .notice.warning {
  background: #33290f;
  border-color: #7a6126;
  color: #f5dfa5;
}
body.dark .error {
  background: #3a1820;
  border-color: #7d3340;
  color: #ffc2cb;
}
body.dark .badge {
  background: #0b3a5a;
  color: #aad8f2;
}
body.dark .badge.expired,
body.dark .badge.revoked {
  background: #473410;
  color: #ffd48a;
}
body.dark .action-icon,
body.dark .drop.drag {
  background: #0b3a5a;
}
body.dark .action-card:nth-child(2) .action-icon {
  background: #12304f;
}
body.dark .drop {
  border-color: #3d5b78;
}
@media (max-width: 650px) {
  .table-wrap {
    border: 0;
    overflow: visible;
  }
  table,
  tbody,
  tr,
  td {
    display: block;
    white-space: normal;
  }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  tbody tr {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    margin-bottom: 0.8rem;
    padding: 0.3rem 0;
  }
  td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 0;
    padding: 0.45rem 1rem;
    text-align: end;
  }
  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 600;
    text-align: start;
  }
  td.actions {
    justify-content: flex-end;
  }
  td.actions::before {
    content: none;
  }
  td.actions button {
    width: 100%;
  }
  .pagination {
    justify-content: space-between;
  }
  .pagination button {
    flex: 1;
  }
  .submit,
  .action-card button {
    width: 100%;
  }
}
main:focus {
  outline: none;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
}
.section-title {
  flex-wrap: wrap;
  gap: 0.6rem;
}
.filter {
  width: auto;
  max-width: 100%;
}
.hero .button {
  margin-top: 0.6rem;
}
td.actions {
  white-space: normal;
}
.actions button {
  padding: 0.35rem 0.7rem;
  min-height: 38px;
  margin: 0.15rem 0.3rem 0.15rem 0;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  display: grid;
  gap: 0.2rem;
  box-shadow: var(--shadow);
}
.kpi strong {
  font-size: 1.7rem;
  color: var(--teal);
  line-height: 1.1;
}
.kpi span {
  color: var(--muted);
  font-size: 0.8rem;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.toolbar input {
  flex: 1 1 14rem;
}
@media (max-width: 650px) {
  td.actions {
    flex-direction: column;
    align-items: stretch;
  }
  .actions button {
    margin: 0.15rem 0;
  }
  .toolbar > * {
    flex: 1 1 100%;
  }
}
.zip-opt {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.previews {
  display: grid;
  gap: 0.8rem;
  margin-block: 1rem;
}
.preview {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
}
.qr-box {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.qr {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.vault {
  display: grid;
  gap: 1rem;
}
.vault-form {
  display: grid;
  gap: 0.7rem;
  max-width: 34rem;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}
.row-actions button {
  padding: 0.35rem 0.7rem;
  min-height: 38px;
}
.settings h3 {
  margin: 0.8rem 0 0;
}
.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.8rem;
}
.logo-row label {
  flex: 1 1 14rem;
}
.logo-preview {
  max-height: 40px;
  background: var(--nav);
  padding: 4px 8px;
  border-radius: 8px;
}
input[type="color"] {
  padding: 0.2rem;
  max-width: 6rem;
}
.settings .primary {
  justify-self: start;
}
@media (max-width: 650px) {
  .row-actions {
    justify-content: stretch;
  }
  .row-actions button {
    flex: 1 1 45%;
  }
  .settings .primary {
    justify-self: stretch;
  }
}

/* ---- Professional polish ---- */
:root {
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
button,
a.button {
  transition:
    transform 0.12s var(--ease),
    box-shadow 0.18s var(--ease),
    background-color 0.18s,
    border-color 0.18s,
    filter 0.18s;
}
button:hover:not(:disabled),
a.button:hover {
  box-shadow: 0 6px 16px #0b315b1f;
  border-color: #9db8d3;
}
button:active:not(:disabled),
a.button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: none;
}
.primary:hover:not(:disabled) {
  filter: brightness(1.06);
  border-color: transparent;
}
button:disabled {
  cursor: not-allowed;
}
.primary.big {
  width: 100%;
  min-height: 54px;
  font-size: 1.05rem;
  border-radius: 12px;
  margin-top: 0.4rem;
}
.icon-btn {
  min-height: 34px;
  min-width: 34px;
  padding: 0 0.5rem;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
}
.icon-svg {
  flex: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}
.loading::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.6rem;
  vertical-align: -0.15em;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
tbody tr:hover td {
  background: color-mix(in srgb, var(--field) 70%, transparent);
}
#toast {
  animation: rise 0.25s var(--ease);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
}
/* account menu */
.account-menu {
  position: relative;
}
.account-signin {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border: 1px solid #ffffff44;
  border-radius: 999px;
}
.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.25rem 0.7rem 0.25rem 0.3rem;
  color: #fff;
  background: #ffffff14;
  border: 1px solid #ffffff22;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
}
.account-btn:hover:not(:disabled) {
  background: #ffffff24;
  box-shadow: none;
  border-color: #ffffff44;
}
.account-label {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #0475bb);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.avatar.big {
  width: 44px;
  height: 44px;
  font-size: 0.9rem;
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  width: min(19rem, calc(100vw - 1.5rem));
  padding: 0.5rem;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 48px #052e4740;
  z-index: 30;
  animation: pop 0.16s var(--ease);
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}
.menu-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.7rem 0.9rem;
}
.menu-head strong {
  display: block;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}
.role {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--field);
  color: var(--muted);
  border: 1px solid var(--line);
}
.role.admin {
  background: #d9fbf2;
  color: #08664e;
  border-color: #a9eddb;
}
.menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.35rem 0;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  min-height: 44px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.menu-item:hover,
.menu-item:focus-visible {
  background: var(--field);
}
/* dropzone and files */
.dropzone {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  padding: 1.8rem 1.2rem;
  text-align: center;
  border: 2px dashed #9db8d3;
  border-radius: 18px;
  background:
    radial-gradient(
      circle at 50% 0,
      color-mix(in srgb, var(--teal) 9%, transparent),
      transparent 70%
    ),
    var(--field);
  transition:
    border-color 0.18s,
    background-color 0.18s,
    transform 0.18s var(--ease);
}
.dropzone.drag {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--teal) 14%, var(--field));
  transform: scale(1.01);
}
.dz-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  color: var(--teal);
  background: color-mix(in srgb, var(--teal) 14%, transparent);
}
.dz-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}
.dz-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.file-list li {
  padding: 0.6rem 0.7rem;
  gap: 0.8rem;
  background: var(--card);
}
.file-info {
  flex: 1;
  min-width: 0;
  display: grid;
}
.file-info strong {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}
.file-info small {
  color: var(--muted);
}
.ext {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: #e6edf5;
  color: #31475f;
}
.ext.doc {
  background: #e0ecff;
  color: #0475bb;
}
.ext.img {
  background: #fde7f0;
  color: #a1285a;
}
.ext.zip {
  background: #fff1d6;
  color: #8a5300;
}
.totals {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  min-height: 1.2em;
}
.counter {
  display: block;
  text-align: end;
  color: var(--muted);
  margin-top: 0.3rem;
}
/* external pages */
.external {
  display: grid;
  grid-template-columns: minmax(17rem, 25rem) minmax(0, 1fr);
  gap: 1.6rem;
  align-items: start;
  max-width: 64rem;
  margin-inline: auto;
}
.ext-info {
  position: sticky;
  top: 6.2rem;
  padding: 2rem;
  border-radius: 22px;
  color: #eaf3ff;
  background:
    radial-gradient(
      circle at 90% -10%,
      color-mix(in srgb, var(--teal) 55%, transparent),
      transparent 55%
    ),
    linear-gradient(165deg, #052e47, #0a3358);
  box-shadow: 0 18px 44px #052e4733;
}
.ext-info h1 {
  color: #fff;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 0.9rem 0 0.6rem;
}
.ext-info .muted {
  color: #b6cbe2;
}
.ext-info .notice {
  background: #ffffff14;
  border-color: #ffffff2e;
  color: #eaf3ff;
  margin: 1rem 0;
}
.ext-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8bf5df;
  border: 1px solid #8bf5df55;
  background: #8bf5df14;
}
.trust-list {
  list-style: none;
  margin: 1.2rem 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}
.trust-list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.4;
}
.trust-list .icon-svg {
  color: #8ed1fc;
  margin-top: 0.12rem;
}
.ext-meta {
  margin: 1.2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid #ffffff22;
}
.ext-meta small {
  color: #b6cbe2;
}
.ext-form {
  padding: 1.8rem;
}
.step {
  margin-bottom: 1.6rem;
}
.step h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.1rem;
  margin-bottom: 0.9rem;
}
.num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
  color: #fff;
  background: var(--teal);
}
.reveal-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.textfield textarea {
  min-height: 130px;
}
.success,
.success-head {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: 1.4rem 0.5rem;
}
.success-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--teal),
    color-mix(in srgb, var(--teal) 70%, #000)
  );
  box-shadow: 0 10px 26px color-mix(in srgb, var(--teal) 40%, transparent);
  animation: bounce 0.5s var(--ease);
}
.success-head .success-icon {
  width: 56px;
  height: 56px;
}
@keyframes bounce {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
  }
}
.receipt {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.text-result {
  margin: 1rem 0;
}
.text-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.text-head button {
  min-height: 38px;
  padding: 0.3rem 0.8rem;
}
.result-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.result-files li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.download-all {
  margin-top: 0.8rem;
  width: 100%;
}
progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
  border: 0;
  background: var(--line);
}
progress::-webkit-progress-bar {
  background: var(--line);
}
progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--teal), #0475bb);
  transition: width 0.25s var(--ease);
}
progress::-moz-progress-bar {
  background: var(--teal);
}
body.dark .role.admin {
  background: #0b3a5a;
  color: #aad8f2;
  border-color: #1d5f8c;
}
body.dark .dropzone {
  border-color: #3d5b78;
}
body.dark .ext {
  background: #1b3550;
  color: #b9d3ee;
}
body.dark .ext.doc {
  background: #12304f;
  color: #8dbcff;
}
body.dark .ext.img {
  background: #3a1d2b;
  color: #ff9bc2;
}
body.dark .ext.zip {
  background: #3a2c10;
  color: #ffd48a;
}
@media (max-width: 900px) {
  .external {
    grid-template-columns: minmax(0, 1fr);
  }
  .ext-info {
    position: static;
    padding: 1.4rem;
  }
  .ext-form {
    padding: 1.2rem;
  }
}
@media (max-width: 650px) {
  .account-label {
    display: none;
  }
  .account-btn {
    padding: 0.25rem 0.5rem 0.25rem 0.3rem;
  }
  .account-menu {
    position: static;
  }
  .menu {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: 4.6rem;
    width: auto;
  }
  .result-files li {
    flex-wrap: wrap;
  }
  .result-files li button {
    width: 100%;
  }
  .dropzone {
    padding: 1.3rem 0.8rem;
  }
  .dz-actions button {
    flex: 1 1 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.menu-lang {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.4rem 0.8rem 0.7rem;
}
.menu-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--field);
  border: 1px solid var(--line);
}
.seg-btn {
  min-height: 34px;
  padding: 0.2rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: none;
}
.seg-btn:hover:not(:disabled) {
  box-shadow: none;
  color: var(--text);
}
.seg-btn.active {
  background: var(--teal);
  color: #fff;
}

.timeline {
  margin-top: 1rem;
}
.timeline .section-title {
  margin-bottom: 0.5rem;
}
a.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.admin-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}
.admin-nav {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 0.5rem;
  margin: 0 -0.5rem;
  background: var(--bg);
  scrollbar-width: none;
}
.admin-nav::-webkit-scrollbar {
  display: none;
}
.nav-item {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}
.nav-item[aria-current="page"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.admin-content {
  min-width: 0;
}
.admin-content > [hidden] {
  display: none !important;
}
@media (min-width: 900px) {
  .admin-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }
  .admin-nav {
    flex-direction: column;
    top: 1rem;
    margin: 0;
    padding: 0.6rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
  }
  .nav-item {
    border-radius: 10px;
    text-align: left;
    border-color: transparent;
    background: transparent;
  }
  .nav-item[aria-current="page"] {
    background: var(--teal);
  }
}
.email-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.mail-direct {
  margin: 0;
  padding: 0.8rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 0.7rem;
}
.mail-direct legend {
  padding: 0 0.4rem;
  font-weight: 700;
}

.seg {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.seg-btn {
  padding: 0.2rem 0.65rem;
}
.chart {
  margin: 1rem 0;
}
.bars {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 140px;
}
.bar {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}
.bar span {
  display: block;
  width: 100%;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: var(--teal);
}
.bar small {
  margin-top: 4px;
  font-size: 0.65rem;
  color: var(--muted);
}
.nav-item {
  transition: none;
}
@media (min-width: 900px) {
  .nav-item {
    justify-content: flex-start;
  }
  .nav-item:hover:not([aria-current="page"]) {
    background: var(--field);
    box-shadow: none;
  }
}

.link-copy input {
  font-weight: 650;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.2rem 0 0.4rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 10%, var(--card));
  border: 1px solid color-mix(in srgb, var(--teal) 25%, var(--line));
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 650;
}
.email-form {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.email-form h3 {
  margin: 0;
}
.email-row {
  display: flex;
  gap: 0.6rem;
}
.email-row input {
  flex: 1;
  min-width: 0;
}
.email-more summary {
  cursor: pointer;
  color: var(--teal);
  font-weight: 650;
  font-size: 0.9rem;
  padding: 0.25rem 0;
}
.email-more-body {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 520px) {
  .email-row {
    flex-direction: column;
  }
  .email-row button,
  .link-copy button {
    width: 100%;
  }
}

.status.ok {
  color: #17803d;
  font-weight: 650;
}
body.dark .status.ok {
  color: #6ee7a0;
}
.result .notice {
  margin: 0.6rem 0;
  padding: 0.7rem 1rem;
}

.mail-direct {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.35rem 0.9rem 0.6rem;
  background: var(--field);
}
.mail-direct[open] {
  padding-bottom: 0.9rem;
}

.result > button {
  justify-self: start;
}
#privacy .lead {
  font-size: 1.08rem;
  color: var(--muted);
  margin-top: 0;
}
#privacy .glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.9rem;
  margin: 1.4rem 0 0.6rem;
}
#privacy .glance-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
}
#privacy .glance-item strong {
  color: var(--blue);
}
#privacy .glance-item span {
  color: var(--muted);
  font-size: 0.92rem;
}
#privacy section h2 {
  margin-top: 1.8rem;
}
#privacy ul {
  padding-left: 1.2rem;
  margin: 0.4rem 0;
}
#privacy li {
  margin: 0.45rem 0;
}
#privacy .table-wrap {
  overflow-x: auto;
}
#privacy table td,
#privacy table th {
  vertical-align: top;
  text-align: left;
}
#privacy table {
  white-space: normal;
}
#privacy table td:first-child {
  font-weight: 600;
}
@media (max-width: 650px) {
  #privacy table tr:first-child {
    display: none;
  }
  #privacy table td {
    display: block;
    text-align: start;
    padding: 0.3rem 1rem;
    border: 0;
  }
  #privacy table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
  }
  #privacy table td:first-child {
    padding-top: 0.7rem;
  }
}
.rcpt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 3rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  cursor: text;
  flex: 1 1 14rem;
  min-width: 0;
}
.rcpt:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #0475bb26;
}
.rcpt input {
  flex: 1 1 9rem;
  width: auto;
  min-width: 8rem;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0.4rem 0.3rem;
}
.rcpt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.2rem 0.3rem 0.2rem 0.7rem;
  border-radius: 999px;
  background: #e1f0ff;
  color: #05466f;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.rcpt-chip.bad {
  background: #ffe3e0;
  color: #9b1c12;
}
.rcpt-chip button {
  all: unset;
  cursor: pointer;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  text-align: center;
  line-height: 1.4rem;
}
.rcpt-chip button:hover,
.rcpt-chip button:focus-visible {
  background: #0002;
}
body.dark .rcpt-chip {
  background: #12304f;
  color: #bfe3ff;
}
body.dark .rcpt-chip.bad {
  background: #4a1d1a;
  color: #ffc9c4;
}
