@font-face { font-family: "Tomorrow"; font-weight: 400; font-display: swap;
  src: url("https://fonts.gstatic.com/s/tomorrow/v19/WBLmrETNbFtZCeGqgRXSe2A.woff2") format("woff2"); }
@font-face { font-family: "Tomorrow"; font-weight: 500; font-display: swap;
  src: url("https://fonts.gstatic.com/s/tomorrow/v19/WBLhrETNbFtZCeGqgR0hWHXPDMU.woff2") format("woff2"); }
@font-face { font-family: "Tomorrow"; font-weight: 600; font-display: swap;
  src: url("https://fonts.gstatic.com/s/tomorrow/v19/WBLhrETNbFtZCeGqgR0NX3XPDMU.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: #9d0e7866; color: #e9d9ff; }

/* ── Layout ──────────────────────────────────── */
body {
  font-family: "Tomorrow", sans-serif;
  background: #0e0b12;
  color: #e9d9ff;
  -webkit-font-smoothing: antialiased;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.open {
  height: auto;
  min-height: 100dvh;
  overflow-y: auto;
  justify-content: flex-start;
  padding: 40px 20px 40px;
}

/* ── Animations ──────────────────────────────── */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeOut { to   { opacity: 0; transform: translateY(-8px); } }

/* ── Typography ──────────────────────────────── */
h1 {
  font-size: 30px; font-weight: 600; color: #a77fdb;
  margin-bottom: 8px; letter-spacing: 0.05em;
  animation: fadeUp 0.5s ease 0.05s backwards;
}
.sub {
  font-size: 14px; font-weight: 500; color: rgba(233,217,255,.5);
  margin-bottom: 24px; letter-spacing: 0.02em;
  animation: fadeUp 0.5s ease 0.1s backwards;
}

/* ── Cards ───────────────────────────────────── */
.card {
  background: rgba(41, 32, 54, 0.3);
  border: 2px solid #292036;
  border-radius: 20px;
  padding: 16px 20px;
  width: calc(100% - 40px);
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card.wide { max-width: 520px; }
.card-anim { animation: fadeUp 0.5s ease 0.15s backwards; }

/* ── Inputs ──────────────────────────────────── */
.row { display: flex; align-items: center; gap: 8px; }

input[type="password"],
input[type="text"],
input[type="url"] {
  height: 42px;
  padding: 0 12px;
  border-radius: 12px; border: none;
  background: #292036; color: #e9d9ff;
  font-family: "Tomorrow", sans-serif;
  font-size: 14px; font-weight: 500;
  flex: 1; outline: none; transition: background 0.15s;
}
input[type="password"] { padding-right: 50px; }
input:disabled { opacity: 0.35; cursor: not-allowed; }
input::placeholder { color: rgba(233,217,255,.35); }
input:focus:not(:disabled) { background: #302048; }

/* ── Buttons ─────────────────────────────────── */
.ibtn {
  width: 42px; height: 42px; border-radius: 12px; border: none;
  background: #292036; color: #a77fdb; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s;
}
.ibtn:hover { background: #342850; }
.ibtn img, .ibtn svg { width: 18px; height: 18px; }

.pbtn {
  height: 42px; border-radius: 12px; border: none;
  background: #292036; color: #a77fdb;
  font-family: "Tomorrow", sans-serif; font-size: 14px;
  font-weight: 600; letter-spacing: 0.04em; cursor: pointer;
  width: 100%; transition: background 0.15s, transform 0.15s;
}
.pbtn:hover  { background: #342850; transform: scale(1.01); }
.pbtn:active { transform: scale(0.99); }

.ghost {
  height: 42px; border-radius: 12px; border: 2px solid #292036;
  background: transparent; color: rgba(233,217,255,.4);
  font-family: "Tomorrow", sans-serif; font-size: 14px; font-weight: 500;
  cursor: pointer; flex: 1; transition: border-color 0.15s, color 0.15s;
}
.ghost:hover { border-color: #a77fdb; color: #a77fdb; }

/* ── Labels ──────────────────────────────────── */
.lbl  { font-size: 11px; font-weight: 500; color: rgba(167,127,219,.5); letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 0; }
.hdr  { display: flex; align-items: center; justify-content: space-between; }
.div  { height: 1px; background: #292036; margin: 2px 0; }
.trow { display: flex; align-items: center; gap: 10px; }
.trow input[type="checkbox"] { width: 16px; height: 16px; flex: none; accent-color: #a77fdb; cursor: pointer; }
.trow .ico { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.5; }

/* ── Admin badge ─────────────────────────────── */
.badge {
  display: none; align-items: center; gap: 5px;
  background: rgba(167,127,219,.12); border: 1px solid rgba(167,127,219,.3);
  border-radius: 8px; padding: 4px 10px;
  font-size: 10px; font-weight: 600; color: #a77fdb;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.badge.on { display: flex; }

/* ── Link rows ───────────────────────────────── */
.lrow { display: flex; align-items: center; justify-content: space-between; background: #292036; border-radius: 12px; padding: 10px 14px; gap: 10px; transition: background 0.15s; }
.lrow:hover { background: #302048; }
.linfo { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow: hidden; }
.lcode { font-size: 13px; font-weight: 600; color: #a77fdb; flex-shrink: 0; }
.lsep  { color: rgba(233,217,255,.25); flex-shrink: 0; }
.lurl  { font-size: 12px; color: rgba(233,217,255,.45); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lact  { display: flex; gap: 6px; flex-shrink: 0; }
.sbtn  { height: 30px; padding: 0 12px; border-radius: 8px; border: none; background: rgba(167,127,219,.12); color: #a77fdb; font-family: "Tomorrow", sans-serif; font-size: 11px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.sbtn:hover { background: rgba(167,127,219,.22); }
.dbtn { background: rgba(220,60,60,.1); color: rgba(255,110,110,.8); }
.dbtn:hover { background: rgba(220,60,60,.2); }

/* ── Misc ────────────────────────────────────── */
.hint  { font-size: 13px; color: rgba(233,217,255,.3); text-align: center; padding: 6px 0; }
.rrow  { display: flex; align-items: center; justify-content: space-between; background: #292036; border-radius: 12px; padding: 10px 14px; gap: 10px; }
.rlink { color: #a77fdb; font-size: 14px; font-weight: 500; word-break: break-all; flex: 1; }

/* ── Footer ──────────────────────────────────── */
.ft  { display: none; padding-top: 32px; font-size: 12px; font-weight: 500; color: rgba(233,217,255,.5); align-items: center; gap: 8px; }
body.open .ft { display: flex; margin-top: auto; }
.ftd { width: 4px; height: 4px; border-radius: 50%; background: rgba(233,217,255,.5); }

/* ── Panel ───────────────────────────────────── */
#panel     { display: none; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
#linksCard { display: none; }

/* ── Admin modal ─────────────────────────────── */
#adminModal {
  display: none; position: fixed; inset: 0;
  background: rgba(14, 11, 18, 0.82); backdrop-filter: blur(6px);
  z-index: 100; align-items: center; justify-content: center;
}
#adminModal.on { display: flex; }
.mcard  { background: #0e0b12; border: 2px solid #292036; border-radius: 20px; padding: 28px 24px; width: calc(100% - 40px); max-width: 400px; display: flex; flex-direction: column; gap: 12px; animation: fadeUp 0.3s ease; }
.mtitle { font-size: 18px; font-weight: 600; color: #a77fdb; letter-spacing: 0.04em; }
.msub   { font-size: 13px; color: rgba(233,217,255,.45); }
.mact   { display: flex; gap: 8px; }
