:root {
  --bg: #0f1419;
  --card: #1a2332;
  --text: #e7ecf3;
  --muted: #8b98a5;
  --accent: #3b82f6;
  --danger: #ef4444;
  --ok: #22c55e;
  --border: #2a3544;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
.top-app {
  padding: 0;
  background: linear-gradient(180deg, #1e293b 0%, var(--card) 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
.top-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}
.brand-block { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand:hover { filter: brightness(1.08); }
.whoami { font-size: 0.78rem; color: var(--muted); }
.whoami-code { color: var(--accent); font-family: ui-monospace, Consolas, monospace; }
.top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  max-width: 52rem;
}
.top-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.top-nav a:hover {
  color: var(--text);
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.25);
}
.top-nav-out {
  color: #fca5a5 !important;
}
.top-nav-out:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}
.wrap { flex: 1; padding: 1.35rem 1.25rem 2rem; max-width: 1200px; margin: 0 auto; width: 100%; }
.foot {
  padding: 1rem 1.25rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

/* Bendras puslapių karkasas */
.app-page { max-width: 1100px; margin: 0 auto; }
.app-page--narrow { max-width: 520px; }
.app-page--login { max-width: 440px; padding-top: 1rem; }
.page-head { margin-bottom: 1.35rem; }
.page-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.page-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
  max-width: 40rem;
}
.page-lead + .page-lead { margin-top: 0.5rem; }
.card--section { margin-bottom: 1.1rem; }
.card--section > h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #e2e8f0;
}
.card--section > h2:first-child { margin-top: 0; }
.enterprise-hint {
  padding: 1rem 1.1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #cbd5e1;
}
.form-stack .btn { margin-top: 1.1rem; }
.kbd {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82em;
  background: #0a0e14;
  padding: 0.12rem 0.38rem;
  border-radius: 5px;
  border: 1px solid #334155;
}
.data-table-wrap {
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow-x: auto;
  margin-top: 0.25rem;
  background: var(--card);
}
.data-table { margin: 0; font-size: 0.86rem; }
.data-table thead th {
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  white-space: nowrap;
}
.data-table tbody tr:hover { background: rgba(59, 130, 246, 0.06); }
.login-shell { min-height: 55vh; display: flex; align-items: center; justify-content: center; padding: 1rem 0 2rem; }
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 1.75rem 1.5rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, #1a2332 0%, #141c28 100%);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}
.login-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.login-lead { margin: 0 0 1.1rem; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.server-alert {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.45);
}
.server-alert-mark {
  flex-shrink: 0;
  font-weight: 800;
  color: #fecaca;
}
.server-list { margin: 0; padding-left: 1.2rem; line-height: 1.65; color: var(--muted); font-size: 0.9rem; }
.server-list li { margin-bottom: 0.4rem; }
input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.55);
  outline-offset: 2px;
}
.card {
  background: var(--card);
  border-radius: 10px;
  padding: 1.25rem;
  border: 1px solid #2a3544;
  margin-bottom: 1rem;
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid #2a3544; }
th { color: var(--muted); font-weight: 600; }
label { display: block; margin: 0.5rem 0 0.25rem; color: var(--muted); font-size: 0.9rem; }
input, select {
  width: 100%; max-width: 400px;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid #2a3544;
  background: #0f1419;
  color: var(--text);
}
.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}
.btn:hover { filter: brightness(1.1); }
.msg { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.msg.ok { background: rgba(34,197,94,0.15); border: 1px solid var(--ok); }
.msg.err { background: rgba(239,68,68,0.15); border: 1px solid var(--danger); }
.login-box { max-width: 400px; margin: 3rem auto; }
.muted { color: var(--muted); font-size: 0.9rem; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; word-break: break-all; }
.cred { background: #0a0e14; padding: 0.15rem 0.35rem; border-radius: 4px; }
.preblock {
  background: #0a0e14;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.45;
  border: 1px solid #2a3544;
}
.hint { color: var(--muted); font-size: 0.9rem; line-height: 1.5; margin: 0 0 1rem; max-width: 900px; }
.users-actions .actions-cell { vertical-align: top; min-width: 12rem; }
.users-actions .device-cell { font-size: 0.75rem; word-break: break-all; max-width: 10rem; display: inline-block; }
.inline-actions { display: block; margin-bottom: 0.35rem; }
.inline-actions .btn { margin-top: 0; margin-right: 0; width: 100%; max-width: 11rem; }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; font-weight: 600; }
.btn-secondary { background: #475569; }
.btn-warn { background: #d97706; color: #fff; }
.btn-danger { background: var(--danger); }
.danger-zone { margin-top: 0.5rem; font-size: 0.8rem; color: var(--muted); }
.danger-zone summary { cursor: pointer; color: #f87171; }
.delete-form { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.delete-form input[type="text"] { max-width: 100%; }
.licenses-table .key-cell { font-size: 0.78rem; word-break: break-all; display: inline-block; max-width: 11rem; }
.status-pill {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.status-available { background: rgba(34,197,94,0.2); color: #4ade80; }
.status-activated { background: rgba(59,130,246,0.2); color: #93c5fd; }
.status-revoked { background: rgba(239,68,68,0.2); color: #fca5a5; }
.status-expired { background: rgba(234,179,8,0.2); color: #fde047; }
.table-wrap { overflow-x: auto; margin-top: 0.5rem; }
.small { font-size: 0.78rem; }

/* Šifruotas image (encrypted_apnr.php) */
.page-hero { padding: 0.25rem 0 0.5rem; }
.page-hero h1 { margin: 0 0 0.4rem; font-size: 1.65rem; font-weight: 700; letter-spacing: -0.02em; }
.page-sub { color: var(--muted); font-size: 0.95rem; max-width: 48rem; line-height: 1.55; margin: 0; }
.subnav {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: 1rem 0 1.25rem; padding: 0.65rem 0;
  border-bottom: 1px solid #2a3544;
  position: sticky; top: 0;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(15,20,25,0.92));
  z-index: 5;
}
.subnav a {
  color: var(--muted); text-decoration: none;
  padding: 0.4rem 0.85rem; border-radius: 8px; font-size: 0.88rem;
  border: 1px solid transparent;
}
.subnav a:hover { color: var(--text); background: rgba(59,130,246,0.12); border-color: #2a4a6a; }
.section-anchor { scroll-margin-top: 4.5rem; }
.card h2 { margin-top: 0; font-size: 1.15rem; }
.card-elevated { border-color: #334155; box-shadow: 0 4px 24px rgba(0,0,0,0.25); }
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 0;
}
.stat-box {
  background: #0a0e14;
  border: 1px solid #2a3544;
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.stat-box .stat-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-box .stat-value { font-family: ui-monospace, Consolas, monospace; font-size: 0.82rem; margin-top: 0.4rem; word-break: break-word; color: var(--text); }
.table-audit th { white-space: nowrap; background: rgba(0,0,0,0.2); font-size: 0.78rem; }
.table-audit td { font-size: 0.82rem; vertical-align: top; }
.pill-ok { display: inline-block; padding: 0.12rem 0.45rem; border-radius: 4px; font-size: 0.72rem; background: rgba(34,197,94,0.15); color: #4ade80; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* Šifruotas image — pilnas puslapis (2026) */
.enc-page { max-width: 920px; margin: 0 auto; }
.enc-hero {
  padding: 0.5rem 0 1.25rem;
  border-bottom: 1px solid #2a3544;
  margin-bottom: 0.25rem;
}
.enc-hero-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.enc-hero-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.enc-hero-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 42rem;
}
.enc-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0 1.5rem;
  padding: 0.6rem 0;
  position: sticky;
  top: 0;
  z-index: 8;
  background: linear-gradient(180deg, var(--bg) 88%, rgba(15, 20, 25, 0));
  border-bottom: 1px solid #2a3544;
}
.enc-subnav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.enc-subnav a:hover {
  color: var(--text);
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.35);
}
.enc-section { scroll-margin-top: 5rem; margin-bottom: 2.25rem; }
.enc-section-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.enc-section-intro {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 46rem;
}
.enc-h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.enc-alert {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.enc-alert--danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.45);
}
.enc-alert-icon {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.25);
  color: #fecaca;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.enc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.enc-stat {
  background: linear-gradient(145deg, #121a26 0%, #0a0e14 100%);
  border: 1px solid #2a3544;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.enc-stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.enc-stat-value {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.88rem;
  color: var(--text);
  word-break: break-word;
}
.enc-stat-value--sm { font-size: 0.8rem; }
.enc-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.enc-pill--ok {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}
.enc-pill--muted {
  background: rgba(139, 152, 165, 0.15);
  color: var(--muted);
}
.enc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 720px) {
  .enc-grid-2 { grid-template-columns: 1fr; }
}
.enc-card-accent {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.08);
}
.enc-card-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.enc-list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.65;
  color: var(--text);
  font-size: 0.9rem;
}
.enc-list li { margin-bottom: 0.5rem; }
.enc-list--muted { color: var(--muted); }
.pre-inline {
  display: inline;
  padding: 0.15rem 0.4rem;
  font-size: 0.78rem;
  border-radius: 5px;
  background: #0a0e14;
  border: 1px solid #2a3544;
}
.enc-callout {
  padding: 1rem 1.15rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.55;
  margin-top: 1rem;
}
.enc-callout--info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #cbd5e1;
}
.enc-callout--neutral {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid #334155;
  color: var(--muted);
}
.enc-callout--warn {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fde68a;
}
.enc-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.enc-steps > li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid #2a3544;
}
.enc-steps > li:last-child { border-bottom: none; }
.enc-step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.35), rgba(59, 130, 246, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #93c5fd;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.enc-steps p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}
.enc-instruction-block {
  margin-bottom: 1.75rem;
}
.enc-instruction-block:last-of-type { margin-bottom: 1rem; }
.enc-checklist {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  line-height: 1.65;
  font-size: 0.9rem;
  color: var(--text);
}
.enc-checklist li { margin-bottom: 0.45rem; }
.enc-p { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.enc-card-key .enc-key-desc { margin: 0 0 1rem; color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.enc-meta { font-size: 0.82rem; color: var(--muted); margin: 0 0 0.75rem; }
.enc-hex-wrap { margin: 0.5rem 0 0; }
.enc-hex-block { margin: 0; }
.enc-copy-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.enc-copy-feedback {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ok);
}
.enc-table-wrap { border-radius: 8px; border: 1px solid #2a3544; overflow: hidden; }
.enc-table { margin: 0; }
.enc-table thead th {
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}
.enc-table tbody tr:hover { background: rgba(59, 130, 246, 0.06); }
.enc-th-actions { width: 8rem; text-align: right; }
.enc-files-table td:last-child { text-align: right; }
.enc-link-btn {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.enc-link-btn:hover {
  background: rgba(59, 130, 246, 0.28);
  color: #e0f2fe;
}
.enc-empty { margin: 0; padding: 0.5rem 0; }
.enc-faq { display: flex; flex-direction: column; gap: 0.5rem; }
.enc-details {
  background: var(--card);
  border: 1px solid #2a3544;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
}
.enc-details summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  list-style: none;
}
.enc-details summary::-webkit-details-marker { display: none; }
.enc-details summary::after {
  content: "▸";
  float: right;
  color: var(--muted);
  transition: transform 0.2s;
}
.enc-details[open] summary::after { transform: rotate(90deg); }
.enc-details p {
  margin: 0;
  padding: 0 1rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  border-top: 1px solid #2a3544;
  padding-top: 0.75rem;
}
.enc-template-view { padding-top: 0.25rem; }
.enc-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.enc-back-link:hover { text-decoration: underline; }
.enc-file-card { margin-top: 0; }
.enc-file-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  word-break: break-all;
}
