/* SecureSend – grimm.lt prekės ženklas, tylus chrome, akcentas tik ten, kur jis ką nors reiškia.
   Tinklelis 4px. Vienas akcentas (--blue-600). Trys teksto rolės. Viena judesio kreivė. */

:root {
  --blue-950: #0b1430;
  --blue-900: #14224a;
  --blue-800: #1b2f63;
  --blue-700: #24407a;
  --blue-600: #2d4a8a;
  --blue-100: #e4ebf8;
  --blue-50: #f2f5fc;
  --ink: #0e1a33;
  --text: #3d4a64;
  --muted: #6c7891;
  --line: rgba(14, 26, 51, 0.08);
  --line-strong: rgba(14, 26, 51, 0.16);
  --bg: #ffffff;
  --bg-page: #f5f7fb;
  --bg-alt: #f6f8fc;
  --accent: var(--blue-600);
  --accent-ink: var(--blue-700);
  --danger: #c2410c;
  --danger-bg: #fff4ee;
  --success: #15803d;
  --warning: #b45309;
  --font-head: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --r-sm: 6px;
  --r: 8px;
  --r-card: 16px;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms;
  --container: 1280px;
  --header-h: 64px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 22px;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

a:hover {
  color: var(--ink);
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  font-size: 36px;
  line-height: 44px;
  font-weight: 600;
  margin: 0;
}

h2 {
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  margin: 0 0 12px;
}

h3 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  margin: 0 0 8px;
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

.eyebrow {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--accent-ink);
  margin: 0 0 8px;
}

.lead {
  font-size: 17px;
  line-height: 26px;
  color: var(--text);
  max-width: 40rem;
}

.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 20px; }
.text-danger { color: var(--danger); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 16px; }
.mt-2 { margin-top: 24px; }
.mb-1 { margin-bottom: 16px; }

svg.ico {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- header */

header.topbar {
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  line-height: 1;
}

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

.brand-app {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

nav.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

nav.main-nav a:hover {
  color: var(--ink);
  background: var(--bg-alt);
}

nav.main-nav a.active {
  color: var(--ink);
}

nav.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -15px;
  height: 2px;
  background: var(--accent);
}

.user-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 4px;
  border-radius: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  line-height: 20px;
}

.user-chip .avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: var(--blue-100);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ main */

main {
  flex: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 40px 80px;
}

main.center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 48px;
  padding-bottom: 48px;
}

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

.page-head p.lead {
  margin-top: 8px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-xs);
  padding: 32px;
  margin-bottom: 24px;
}

.card.narrow {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 40px;
}

.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.side {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.side .card {
  padding: 24px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 20px;
}

.steps li:first-child {
  border-top: none;
  padding-top: 0;
}

.steps li:last-child {
  padding-bottom: 0;
}

.steps .n {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: var(--blue-100);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 500;
}

.steps strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
}

/* ----------------------------------------------------------------- stats */

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  padding: 20px 24px;
}

.stat .label {
  display: block;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
}

.stat .figure {
  display: block;
  font-family: var(--font-head);
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

.stat .figure .accent {
  color: var(--accent-ink);
}

.stat .meta {
  display: block;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
  margin-top: 4px;
}

/* ----------------------------------------------------------------- forms */

.field {
  margin-bottom: 20px;
}

.field label,
.field .label {
  display: block;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.field label small {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  margin-left: 6px;
}

.field .help {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  margin-top: 6px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="datetime-local"],
input[type="file"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  line-height: 22px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 10px 14px;
  min-height: 44px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236C7891' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

textarea {
  min-height: 180px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 14px;
}

textarea.short {
  min-height: 80px;
  font-family: inherit;
  font-size: 15px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 74, 138, 0.18);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.segmented label {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 20px;
  border-radius: var(--r);
  cursor: pointer;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label:has(input:checked) {
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--line);
}

.segmented label:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(45, 74, 138, 0.18);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--ink);
}

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

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

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

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), transform 120ms var(--ease);
}

.btn:hover {
  background: var(--bg-alt);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 74, 138, 0.18);
}

.btn:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

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

.btn-danger:hover {
  background: var(--danger-bg);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: var(--r-sm);
}

.btn-icon {
  width: 32px;
  padding: 0;
  color: var(--text);
}

.btn-icon.btn-danger {
  color: var(--danger);
}

.btn-block {
  width: 100%;
}

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

/* ---------------------------------------------------------------- alerts */

.alert {
  padding: 12px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  margin-bottom: 20px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
}

.alert-error {
  background: var(--danger-bg);
  border-color: rgba(194, 65, 12, 0.2);
  color: var(--danger);
}

.alert-success {
  color: var(--success);
}

.alert-info {
  color: var(--accent-ink);
}

.alert ul {
  margin: 0;
  padding-left: 20px;
}

.form-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

/* ---------------------------------------------------- the moment: the link */

.secret-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 12px; /* inner buttons are 6px: 12 − 6 padding */
}

.secret-box code {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 22px;
  color: var(--text);
  word-break: break-all;
  padding: 5px 0;
}

.secret-box .btn {
  flex: none;
}

/* Signature: the part after # is the decryption key. It is always the accent. */
.link-key {
  color: var(--accent-ink);
  font-weight: 500;
}

/* --------------------------------------------------- decrypted document */

.document {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}

.document-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.document pre {
  margin: 0;
  padding: 20px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 24px;
  color: var(--ink);
  max-height: 60vh;
  overflow: auto;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  color: var(--ink);
}

.file-row svg.ico {
  color: var(--muted);
}

.file-row .file-name {
  font-weight: 500;
  word-break: break-all;
}

/* ----------------------------------------------------------------- table */

.table-wrap {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  overflow-x: auto;
}

table.sends {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

table.sends th,
table.sends td {
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 14px;
  line-height: 20px;
}

table.sends th {
  height: 44px;
  padding-top: 0;
  padding-bottom: 0;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  background: var(--bg-alt);
  white-space: nowrap;
}

table.sends td {
  height: 68px;
}

table.sends tbody tr {
  transition: background-color var(--t-fast) var(--ease);
}

table.sends tbody tr:hover {
  background: var(--bg-alt);
}

table.sends tr:last-child td {
  border-bottom: none;
}

table.sends td strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
}

table.sends td .small {
  color: var(--muted);
}

table.sends td.num {
  white-space: nowrap;
}

table.sends td.row-actions {
  width: 1%;
  white-space: nowrap;
}

table.sends .actions {
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: flex-end;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--text);
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--muted);
}

.status-ok::before { background: var(--success); }
.status-off::before { background: var(--warning); }

.inline-form {
  display: inline;
}

.empty {
  text-align: center;
  padding: 64px 24px;
}

/* ------------------------------------------------------------------ auth */

.auth {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  min-height: 100vh;
}

.auth-side {
  background: var(--blue-950);
  color: rgba(255, 255, 255, 0.72);
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.auth-side > * {
  align-self: flex-start;
}

.auth-side .auth-logo {
  height: 36px;
  width: auto;
  display: block;
}

.auth-side h2 {
  color: #fff;
  font-size: 36px;
  line-height: 44px;
  font-weight: 600;
  margin: 0 0 16px;
  max-width: 18ch;
}

.auth-side .lead {
  color: rgba(255, 255, 255, 0.72);
  max-width: 34rem;
}

.auth-side .steps li {
  border-top-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
}

.auth-side .steps strong {
  color: #fff;
}

.auth-side .steps .n {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.auth-side .footer-note {
  margin-top: auto;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.56);
}

/* The moment: a finished send, rendered in code */
.preview {
  background: var(--bg);
  color: var(--text);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.5);
  max-width: 440px;
}

.preview .label {
  display: block;
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.preview .secret-box {
  margin-bottom: 16px;
}

.preview .secret-box code {
  font-size: 13px;
  line-height: 20px;
}

.preview .secret-box:last-of-type {
  margin-bottom: 0;
}

.preview-meta {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
  background: var(--bg);
}

.auth-form {
  width: 100%;
  max-width: 400px;
}

.auth-form h1 {
  margin-bottom: 8px;
}

.auth-form .lead {
  margin-bottom: 32px;
}

/* --------------------------------------------------------------- allauth */

.allauth form p,
.allauth form div {
  margin-bottom: 20px;
}

.allauth form label {
  display: block;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.allauth ul.errorlist {
  color: var(--danger);
  margin: 0 0 8px;
  padding-left: 20px;
  font-size: 13px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin: 24px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.ms-icon {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 16px;
  height: 16px;
}

.ms-icon span { display: block; }
.ms-icon span:nth-child(1) { background: #f25022; }
.ms-icon span:nth-child(2) { background: #7fba00; }
.ms-icon span:nth-child(3) { background: #00a4ef; }
.ms-icon span:nth-child(4) { background: #ffb900; }

/* ---------------------------------------------------------------- footer */

footer.site-footer {
  color: rgba(255, 255, 255, 0.64);
  background: var(--blue-950);
  font-size: 13px;
  line-height: 20px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  height: 28px;
  width: auto;
  display: block;
}

.footer-app {
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.64);
}

.footer-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------------------------------------------------------------- mobile */

@media (max-width: 1024px) {
  .layout-split {
    grid-template-columns: 1fr;
  }

  .side {
    position: static;
  }

  .auth {
    grid-template-columns: 1fr;
  }

  .auth-side {
    padding: 40px;
    gap: 32px;
  }

  .auth-side .preview,
  .auth-side .footer-note {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  nav.main-nav {
    order: 3;
    width: 100%;
    gap: 0;
  }

  nav.main-nav a.active::after {
    display: none;
  }

  nav.main-nav a.active {
    background: var(--bg-alt);
  }

  .brand-app {
    display: none;
  }

  main {
    padding: 24px 16px 48px;
  }

  .footer-inner {
    padding: 24px 16px;
  }

  .card,
  .card.narrow,
  .side .card {
    padding: 20px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
    line-height: 36px;
  }

  .auth-side,
  .auth-main {
    padding: 32px 20px;
  }
}
