/* wolken caffee — styles for the non-browser pages (login, viewer, share,
   admin). The file-grid "browser" lives in app.css alongside the shared shell;
   everything here is loaded only on the pages that need it. The design tokens,
   resets and the cardFadeInUp keyframe are defined in app.css, which loads on
   every page. */

/* The login/share cards reuse the file-grid's fade-and-rise entrance. */
.auth-card {
  animation: cardFadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .auth-card {
    animation: none;
  }
}

/* ---- Shared card / button primitives (auth, viewer, admin, share) -------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  padding: 32px;
}

.page-card {
  max-width: 1100px;
  margin: 0 auto 24px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-head h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-head .meta {
  font-size: 13px;
  color: var(--text-meta);
  margin-top: 4px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.linklike {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--accent);
  padding: 0;
}

.linklike.danger {
  color: var(--danger);
}

/* Form fields */
.field {
  display: block;
  margin-bottom: 18px;
}

.field span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.field input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e2e6;
  background: #fbfbfd;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

/* Data table (admin) */
.data {
  width: 100%;
  border-collapse: collapse;
}

.data th,
.data td {
  text-align: left;
  padding: 12px 8px;
  font-size: 14px;
  border-bottom: 1px solid var(--card-border);
}

.data th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-meta);
  font-weight: 600;
}

.data td.actions {
  text-align: right;
}

/* ---- Auth page ----------------------------------------------------------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-wrap {
  width: 100%;
  max-width: 380px;
}

.auth-card {
  text-align: center;
}

.brand {
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0.07em;
}

.tagline {
  color: var(--text-meta);
  font-size: 14px;
  margin: 6px 0 28px;
}

.auth-card form {
  text-align: left;
}

.auth-card .btn {
  width: 100%;
  margin-top: 6px;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* ---- Viewer / share ------------------------------------------------------ */
.viewer-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.text {
  width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  background: #fbfbfd;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  overflow-x: auto;
}

.notice {
  color: var(--text-meta);
  font-size: 13px;
  text-align: center;
  margin-bottom: 20px;
}

/* The public share page is anonymous, so it gets its own full-width shell
   (base.html) rather than the narrow auth-wrap used by the login card. */
.share-shell {
  min-height: 100vh;
  padding: 24px;
}

.share-main {
  width: 100%;
}

.share-page {
  max-width: 720px;
  margin: 48px auto;
  padding: 40px;
}

.share-head {
  text-align: center;
  margin-bottom: 24px;
}

.share-head h1 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 4px;
}

.share-unlock {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-unlock input {
  font-family: inherit;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e2e6;
  background: #fbfbfd;
  outline: none;
}

.share-download {
  display: block;
  width: max-content;
  margin: 24px auto 0;
}
