:root {
  color-scheme: dark;
  font: 16px/1.55 "Inter", "Segoe UI", system-ui, sans-serif;
  --ink: #edf5ef;
  --dim: #aabbb2;
  --bg: #101814;
  --panel: #17231d;
  --line: #304439;
  --green: #b9f2c7;
  --danger: #ffc3bd;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at top right, #20382a 0, transparent 44rem), var(--bg); color: var(--ink); min-height: 100vh; }
h1, h2, h3, p { margin: 0; }
p { color: var(--dim); }
a { color: inherit; }
.wrap { width: min(1056px, calc(100% - 40px)); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); }
.top-inner { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 70px; }
.brand { align-items: center; display: inline-flex; gap: 12px; text-decoration: none; font-weight: 700; }
.brand svg { color: var(--green); flex: none; }
main { padding-bottom: 54px; }
.hero { display: grid; grid-template-columns: 1fr minmax(250px, .60fr); align-items: end; gap: 22px; padding-block: 50px 32px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(2.55rem, 7vw, 5rem); line-height: 1.06; letter-spacing: -.065em; }
.hero p { max-width: 32ch; padding-bottom: 5px; }
.section { margin-top: 27px; }
h2 { font-size: 1.27rem; line-height: 1.25; margin-bottom: 6px; }
.shortcut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 13px; }
.shortcut-grid a { display: flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.shortcut-grid a:hover { border-color: var(--green); }
.shortcut-grid small { display: block; color: var(--dim); overflow-wrap: anywhere; }
.app-icon { display: grid; flex: 0 0 38px; height: 38px; place-items: center; border-radius: 10px; font-size: 1.05rem; font-weight: 800; }
.whatsapp { background: #233d2c; color: #acf2b8; }
.telegram { background: #193648; color: #a5dcfc; }
.zalo { background: #252e4c; color: #c6d0ff; }
.arrow { color: var(--dim); margin-left: auto; }
.panel, dialog { border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--panel); padding: 19px; }
form { display: grid; gap: 13px; }
#login-fields { display: grid; gap: 13px; }
label { display: grid; gap: 5px; font-size: .88rem; font-weight: 650; min-width: 0; }
input, select, button { font: inherit; }
input:not([type=checkbox]), select { width: 100%; min-width: 0; padding: 9px 11px; background: #0f1813; border: 1px solid #3c5144; color: var(--ink); border-radius: 8px; min-height: 43px; }
input[type=file] { font-size: .85rem; }
input::placeholder { color: #9baea2; }
button, .open-link { cursor: pointer; padding: 8px 12px; min-height: 42px; border-radius: 8px; border: 1px solid transparent; color: inherit; font-weight: 650; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.primary { background: var(--green); color: #102019; }
.primary:hover { background: #d2fadc; }
.quiet, .open-link { background: #1e3026; border-color: #3c5144; }
.quiet:hover, .open-link:hover { background: #2a4334; }
.danger { color: #370d08; background: var(--danger); }
button:disabled { cursor: wait; opacity: .60; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.notice { margin-top: 17px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--green); }
.error, .notice[data-error="true"] { color: var(--danger); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.toolbar { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.entry-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.entry { display: grid; align-content: start; gap: 10px; overflow-wrap: anywhere; }
.entry h3 { font-size: 1.04rem; }
.entry-meta, .entry-user { font-size: .86rem; }
.entry .actions button, .open-link { font-size: .83rem; }
.empty { grid-column: 1 / -1; }
dialog { width: min(510px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; }
dialog::backdrop { background: #080e0bc9; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.check input { accent-color: var(--green); margin-top: 4px; }
@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; gap: 14px; padding-block: 29px 22px; }
  .hero h1 br { display: none; }
  .shortcut-grid, .entry-list { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .wrap { width: calc(100% - 24px); }
  .panel { padding: 13px; }
  .toolbar { grid-template-columns: 1fr; }
}

body.locked {
  background: #040a07;
}
.lock-scene {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(20px, 6vw, 64px);
  background: #040a07;
}
#matrix, .lock-scene::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#matrix {
  z-index: -2;
  opacity: .72;
}
.lock-scene::after {
  z-index: -1;
  content: "";
  background: radial-gradient(ellipse at 50% 46%, #06120cee 0%, #040a0788 49%, #0308052c 76%, #0308058c 100%);
}
.lock-content {
  width: min(100%, 420px);
}
.lock-card {
  padding: clamp(22px, 6vw, 37px);
  color: #e9f6ed;
  border: 1px solid #2b543c;
  border-radius: 18px;
  background: linear-gradient(155deg, #0c1b13fa, #07100cf7);
  box-shadow: 0 22px 82px #000b, 0 0 30px #2db65a16;
}
.lock-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border: 1px solid #326244;
  border-radius: 12px;
  color: #8af7af;
  background: #132c1c;
  box-shadow: 0 0 20px #49f88520;
}
.lock-card h1 {
  font-size: clamp(1.8rem, 6vw, 2.3rem);
  line-height: 1.13;
  letter-spacing: -.045em;
}
.lock-card > p {
  margin-top: 9px;
  font-size: .91rem;
  color: #aabfb0;
}
#gate form { margin-top: 23px; }
.lock-card input:not([type=checkbox]), body.locked #restore input:not([type=checkbox]) {
  min-height: 47px;
  border-color: #365741;
  background: #070e0a;
}
.lock-card .primary, body.locked #restore .primary {
  margin-top: 3px;
  min-height: 46px;
  background: #91f4ae;
  color: #08180e;
}
.lock-card .primary:hover, body.locked #restore .primary:hover {
  background: #b1ffc8;
}
.lock-tools {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 9px;
}
.lock-tools button {
  padding: 4px 0;
  min-height: 36px;
  border: 0;
  color: #abc7b2;
  background: transparent;
  font-size: .8rem;
}
.lock-tools button:hover {
  color: #ddffe6;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lock-content .notice {
  margin-top: 10px;
  background: #0c1b13;
}
body.locked #restore {
  background: #0c1b13;
  border-color: #365741;
}
