:root {
  --bg: #060b14;
  --bg-soft: #0b1220;
  --card: #111827;
  --card-soft: #151f32;
  --line: rgba(255, 255, 255, .1);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, .68);
  --muted-2: rgba(255, 255, 255, .48);
  --accent: #f97316;
  --accent-2: #7c3aed;
  --blue: #60a5fa;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, .18), transparent 34%),
    radial-gradient(circle at 80% 10%, rgba(124, 58, 237, .14), transparent 28%),
    var(--bg);
  background-attachment: fixed, fixed, fixed;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  isolation: isolate;
  position: relative;
}

html.desktop-mode,
body.desktop-mode {
  padding-top: 34px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overflow-y: auto;
}

html.desktop-mode::-webkit-scrollbar,
html.desktop-mode *::-webkit-scrollbar,
body.desktop-mode::-webkit-scrollbar,
body.desktop-mode *::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("/img/bad-hippo-com.svg") center 72% / min(58vw, 620px) no-repeat;
  opacity: .08;
  filter: drop-shadow(0 30px 90px rgba(0, 0, 0, .35));
}

a {
  color: inherit;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1180px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(6, 11, 20, .72);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

.desktop-titlebar {
  position: fixed;
  inset: 0 0 auto;
  height: 34px;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(90deg, rgba(6, 11, 20, .96), rgba(17, 24, 39, .96));
  color: var(--text);
  user-select: none;
}

.desktop-drag {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  -webkit-app-region: drag;
}

.desktop-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(249, 115, 22, .62);
}

.desktop-title {
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.desktop-window-controls {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  height: 34px;
  -webkit-app-region: no-drag;
}

.desktop-window-controls button {
  width: 42px;
  height: 34px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, .06);
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, .78);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.desktop-window-controls button:hover {
  background: rgba(249, 115, 22, .16);
  color: #fff;
}

.desktop-window-controls .desktop-close:hover {
  background: #ef4444;
}

body.desktop-mode .site-header {
  top: 52px;
}

body.desktop-mode .app-shell {
  padding-top: 130px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  min-width: 190px;
}

.brand-logo img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 220px;
}

.site-header nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-header nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}

.site-header nav a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.app-shell {
  min-height: 100vh;
  padding: 108px 16px 32px;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 20px 90px;
  overflow: hidden;
}

.auth-layout,
.unlock-layout {
  display: grid;
  grid-template-columns: 1.1fr minmax(320px, 440px);
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 176px);
  max-width: 1180px;
  margin: 0 auto;
}

.auth-copy h1 {
  margin: 0;
  font-size: clamp(46px, 8vw, 94px);
  line-height: .92;
}

.auth-copy p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.auth-panel,
.sidebar,
.vault-main,
.entry-form {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(17, 24, 39, .96), rgba(21, 31, 50, .9));
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
}

.auth-panel {
  padding: 24px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.tabs button,
.nav-button,
.side-head button,
.secret-row button,
.btn-danger,
.text-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.text-button {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  min-height: 34px;
  text-align: left;
}

.password-rules {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.password-rules li.ok {
  color: #86efac;
}

.password-rules li.fail {
  color: #fecaca;
}

.tabs button {
  min-height: 42px;
  border-radius: 999px;
}

.tabs button.active {
  background: rgba(249, 115, 22, .16);
  border-color: rgba(249, 115, 22, .55);
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checkbox-label {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 36px;
}

.checkbox-label input {
  min-height: 0;
  width: auto;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f172a;
  color: var(--text);
  font: inherit;
  padding: 7px 10px;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

.muted {
  color: var(--muted);
  line-height: 1.55;
}

.api-state {
  align-items: center;
  border: 1px solid rgba(249, 115, 22, .45);
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  font-size: 13px;
  min-height: 34px;
  padding: 0 12px;
}

.nav-button {
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
}

.vault-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
}

.sidebar {
  align-self: start;
  padding: 12px;
  position: sticky;
  top: 96px;
}

.side-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.side-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.side-head button {
  border-radius: 999px;
  height: 34px;
  width: 34px;
}

.group-list {
  display: grid;
  gap: 6px;
}

.group-row {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr auto;
}

.group-row.active .group-button {
  background: rgba(249, 115, 22, .12);
  border-color: rgba(249, 115, 22, .5);
  color: var(--text);
}

.group-button {
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
}

.group-edit-button {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  min-height: 34px;
  padding: 0 8px;
}

.vault-main {
  padding: 12px;
}

.admin-layout {
  max-width: 1180px;
  margin: 0 auto;
}

.admin-layout .settings-panel {
  margin: 0;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(7, auto);
  gap: 8px;
  margin-bottom: 10px;
}

.toolbar button.active {
  background: rgba(249, 115, 22, .16);
  border-color: rgba(249, 115, 22, .55);
  color: var(--text);
}

.vault-panel {
  min-width: 0;
}

.settings-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, .72);
  margin-bottom: 10px;
  padding: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.settings-grid button {
  align-self: end;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-user {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) 130px 130px auto;
  padding: 12px;
}

.admin-user strong {
  display: block;
}

.admin-user span {
  color: var(--muted);
  font-size: 13px;
}

.download-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}

.download-card {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.download-card strong {
  display: block;
}

.download-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.is-disabled {
  cursor: not-allowed;
  opacity: .55;
  pointer-events: none;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(360px, 1.2fr);
  gap: 18px;
}

.entry-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.entry-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 23, 42, .72);
  cursor: pointer;
  padding: 10px 12px;
}

.entry-card.active {
  border-color: rgba(249, 115, 22, .58);
}

.entry-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.entry-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.entry-form {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.compact-entry-form {
  grid-template-columns: minmax(180px, 1fr) minmax(150px, .75fr) minmax(130px, .55fr);
  align-items: end;
}

.compact-entry-form .field-title,
.compact-entry-form .field-url,
.compact-entry-form .field-secret,
.compact-entry-form .field-notes,
.compact-entry-form .password-toolbox,
.compact-entry-form .share-panel,
.compact-entry-form .form-actions {
  grid-column: 1 / -1;
}

.secret-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
}

.secret-row button,
.btn-danger {
  border-radius: 10px;
  padding: 0 10px;
}

.form-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.compact-actions {
  justify-content: flex-start;
}

.password-toolbox {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(260px, 1fr) auto minmax(220px, .75fr);
  align-items: center;
  background: rgba(249, 115, 22, .06);
}

.toolbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.toolbox-head h3 {
  margin: 0;
  font-size: 14px;
}

.toolbox-head span {
  color: var(--muted);
  font-size: 12px;
}

.generator-grid {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) repeat(3, auto);
  gap: 8px;
  align-items: end;
}

.password-toolbox .muted {
  margin: 0;
  font-size: 12px;
}

.btn-danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, .4);
}

.message {
  bottom: 24px;
  left: 50%;
  position: fixed;
  transform: translateX(-50%);
  z-index: 30;
  border: 1px solid rgba(249, 115, 22, .45);
  border-radius: 999px;
  background: rgba(17, 24, 39, .96);
  color: var(--text);
  padding: 12px 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.modal-backdrop {
  align-items: center;
  background: rgba(3, 7, 18, .72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 40;
}

.modal {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(17, 24, 39, .98), rgba(21, 31, 50, .96));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
  display: grid;
  gap: 18px;
  max-width: 460px;
  padding: 22px;
  width: min(100%, 460px);
}

.modal-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.modal-head h2 {
  font-size: 22px;
  margin: 0;
}

.modal-head button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  height: 36px;
  width: 36px;
}

.hero-glow {
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, .26), transparent 62%);
  filter: blur(12px);
  opacity: .9;
}

.hero-content {
  position: relative;
  max-width: 920px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 104px);
  line-height: .92;
}

.hero p {
  max-width: 760px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #fb923c);
  color: #111827;
}

.btn-secondary {
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(255, 255, 255, .05);
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 84px 20px;
}

.section-title {
  display: grid;
  grid-template-columns: .75fr 1.5fr;
  gap: 30px;
  align-items: end;
  margin-bottom: 28px;
}

.section-title p {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 700;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.area-card,
.signal-box {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(17, 24, 39, .96), rgba(21, 31, 50, .88));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
}

.area-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.area-card span {
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
}

.area-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.area-card p,
.signal-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.area-card code {
  color: #fb923c;
}

.signal-section {
  padding-top: 0;
}

.signal-box {
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, .18), rgba(124, 58, 237, .14)),
    rgba(17, 24, 39, .94);
}

.signal-box p {
  color: #fff;
  font-size: 24px;
}

.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 16px;
}

.share-panel {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 0;
}

.share-head,
.share-row,
.share-add {
  display: grid;
  gap: 8px;
  align-items: center;
}

.share-head {
  grid-template-columns: 1fr auto;
}

.share-head h3 {
  margin: 0;
  font-size: 14px;
}

.share-head span,
.share-row > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.share-row {
  grid-template-columns: 1fr auto auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.share-row div {
  display: grid;
  gap: 2px;
}

.share-row div span,
.empty-list {
  color: var(--muted);
  font-size: 13px;
}

.share-add {
  grid-template-columns: 1fr auto;
}

.shared-secret-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(15, 23, 42, .72);
}

.shared-secret-box h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.shared-secret-box dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 14px;
  margin: 0;
}

.shared-secret-box dt {
  color: var(--muted);
}

.shared-secret-box dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
    transform: none;
    left: 20px;
    right: 20px;
    width: auto;
    flex-direction: column;
    gap: 14px;
  }

  .site-header nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand-logo {
    justify-content: center;
    min-width: 0;
  }

  .section-title,
  .area-grid,
  .auth-layout,
  .unlock-layout,
  .vault-layout,
  .content-grid,
  .download-grid,
  .toolbar,
  .settings-grid,
  .admin-user {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding-top: 170px;
  }

  body.desktop-mode .app-shell {
    padding-top: 170px;
  }

  .sidebar {
    position: relative;
    top: auto;
  }

  .secret-row {
    grid-template-columns: 1fr;
  }

  .share-row,
  .share-add,
  .compact-entry-form,
  .password-toolbox,
  .generator-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    gap: 20px;
  }

  .site-footer a {
    margin: 0 16px 0 0;
  }
}
