/* Volmex Secure Share — design tokens lifted from volmex-site-v2 */

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jbmono-var.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --cyan: #00ffb2;
  --cyan-hover: #00dc9a;
  --cyan-soft: rgba(0, 255, 178, 0.2);
  --black: #000000;
  --ink-900: #0a0b0d;
  --ink-800: #18191a;
  --ink-700: #1e2733;
  --ink-500: #5b616e;
  --ink-400: #a0a0a0;
  --ink-200: #eef0f3;
  --white: #ffffff;
  --down: #f0616d;
  --up: #27ad75;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--ink-800);
  color: var(--white);
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100%;
}

::selection {
  background: var(--cyan);
  color: var(--black);
}

/* ── Type ─────────────────────────────────────────────────────────────────── */

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-400);
  font-weight: 500;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}

h2 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}

a {
  color: var(--cyan);
  text-decoration: none;
}
a:hover {
  color: var(--cyan-hover);
}

/* ── Layout ───────────────────────────────────────────────────────────────── */

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: var(--ink-900);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  height: 22px;
  width: auto;
  display: block;
}

.brand .divider {
  width: 1px;
  height: 20px;
  background: var(--line-strong);
}

.main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 48px) 80px;
}

.center-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 80px;
}

/* ── Surfaces ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--ink-900);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: clamp(24px, 4vw, 36px);
}

.card-narrow {
  width: 100%;
  max-width: 420px;
}

.card-h1 {
  margin: 10px 0 8px;
}

.card .muted {
  margin: 0 0 22px;
}

.panel {
  background: var(--ink-900);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: 28px;
}

/* ── Forms ────────────────────────────────────────────────────────────────── */

label.field {
  display: block;
  margin-bottom: 18px;
}

label.field > span {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-400);
  margin-bottom: 8px;
}

input[type='text'],
input[type='password'],
input[type='number'],
select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: var(--ink-800);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease;
}

input:focus,
select:focus,
button:focus-visible {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan);
}

input::placeholder {
  color: var(--ink-500);
}

.input-row {
  display: flex;
  gap: 8px;
}

.input-row input {
  flex: 1;
  min-width: 0;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  cursor: pointer;
}

.checkbox input {
  margin: 2px 0 0;
  accent-color: var(--cyan);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.checkbox span {
  font-size: 13px;
  color: var(--ink-200);
  line-height: 1.5;
}

.checkbox .hint {
  display: block;
  color: var(--ink-500);
  font-size: 12px;
  margin-top: 2px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

button {
  font-family: inherit;
  cursor: pointer;
  border-radius: 2px;
  border: 1px solid transparent;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  font-weight: 500;
}

.btn {
  height: 46px;
  padding: 0 24px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--cyan);
  color: var(--black);
}
.btn-primary:hover:not(:disabled) {
  background: var(--cyan-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--line-strong);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-danger {
  background: transparent;
  color: var(--down);
  border-color: rgba(240, 97, 109, 0.4);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(240, 97, 109, 0.12);
  border-color: var(--down);
}

.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
}

.btn-full {
  width: 100%;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Strength meter ───────────────────────────────────────────────────────── */

.meter {
  margin-top: 10px;
}

.meter-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0;
  background: var(--down);
  transition:
    width 0.2s ease,
    background-color 0.2s ease;
}

.meter-fill.ok {
  background: #e8b339;
}
.meter-fill.good {
  background: var(--cyan);
}

.meter-label {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--ink-500);
  margin-top: 6px;
  display: block;
  min-height: 15px;
}

/* ── Messages ─────────────────────────────────────────────────────────────── */

.msg {
  border-radius: 2px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 18px;
  border: 1px solid transparent;
}

.msg:empty {
  display: none;
}

.msg-error {
  background: rgba(240, 97, 109, 0.1);
  border-color: rgba(240, 97, 109, 0.35);
  color: #ffb3b9;
}

.msg-success {
  background: var(--cyan-soft);
  border-color: rgba(0, 255, 178, 0.35);
  color: var(--cyan);
}

.msg-info {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--ink-400);
}

/* ── Page list ────────────────────────────────────────────────────────────── */

.page-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.page-row:last-child {
  border-bottom: none;
}

.page-info {
  min-width: 0;
  flex: 1;
}

.page-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
  word-break: break-word;
}

.page-meta {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--ink-500);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  line-height: 1.6;
}

.page-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-400);
  border: 1px solid var(--line);
  padding: 2px 6px;
  line-height: 1.2;
  border-radius: 2px;
}

.tag-warn {
  color: #e8b339;
  border-color: rgba(232, 179, 57, 0.4);
}

.tag-dead {
  color: var(--down);
  border-color: rgba(240, 97, 109, 0.4);
}

/* ── Share block (one-time password reveal) ───────────────────────────────── */

.share-box {
  border: 1px solid rgba(0, 255, 178, 0.35);
  background: var(--cyan-soft);
  border-radius: 2px;
  padding: 20px;
  margin-bottom: 24px;
}

.share-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.share-line code {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 13px;
  background: var(--ink-900);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 9px 12px;
  flex: 1;
  min-width: 220px;
  word-break: break-all;
  color: var(--white);
}

/* ── Drop zone ────────────────────────────────────────────────────────────── */

.dropzone {
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  padding: 28px 20px;
  text-align: center;
  color: var(--ink-400);
  font-size: 13px;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
  cursor: pointer;
}

.dropzone.hot {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.file-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.file-list li:last-child {
  border-bottom: none;
}

.file-name {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
}

.file-size {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--ink-500);
  flex-shrink: 0;
}

/* ── Viewer ───────────────────────────────────────────────────────────────── */

.viewer-body {
  padding: 0;
  max-width: none;
}

.asset-block {
  margin: 0 0 8px;
  border-top: 1px solid var(--line);
}

.asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(16px, 4vw, 32px);
  flex-wrap: wrap;
}

.asset-frame {
  width: 100%;
  height: 82vh;
  border: none;
  border-top: 1px solid var(--line);
  background: var(--white);
  display: block;
}

.asset-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.muted {
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.6;
}

.stack > * + * {
  margin-top: 14px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hidden {
  display: none !important;
}
