:root {
  --bg: #000000;
  --panel: #080808;
  --panel-2: #101010;
  --line: #1b1b1b;
  --line-2: #2a2a2a;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --dim: #5f5f5f;
  --white: #f7f7f7;
  --radius: 10px;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.85);
  --ui: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* texture: dotted grid fading out under the header + a soft top wash */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(820px 560px at 50% 0%, #000 0%, transparent 76%);
  mask-image: radial-gradient(820px 560px at 50% 0%, #000 0%, transparent 76%);
}

body::after {
  content: '';
  position: fixed;
  top: -260px;
  left: 50%;
  width: 900px;
  height: 520px;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.085), transparent);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

::selection {
  background: rgba(255, 255, 255, 0.24);
  color: #000;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #242424;
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #3d3d3d;
  background-clip: content-box;
}

/* ------------------------------------------------------------------ dock */

.dock {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(6, 6, 6, 0.9);
  backdrop-filter: blur(18px) saturate(120%);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.dock:hover,
.dock:has(:focus-visible) {
  border-color: #3d3d3d;
  box-shadow: 0 26px 65px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dock-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.dock-sep {
  width: 1px;
  height: 16px;
  flex: none;
  margin: 0 2px;
  background: var(--line-2);
}

.dock-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.dock-item .icon {
  width: 17px;
  height: 17px;
}

.dock-item:hover {
  background: #151515;
  color: var(--text);
}

/* no click ring or lingering glow — keyboard focus still gets an outline */
.dock-item:focus {
  outline: none;
}

.dock-item:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 2px;
}

.dock-item.is-active {
  background: #151515;
  border-color: #4a4a4a;
  color: var(--white);
}

.dock-item.is-active:hover {
  background: #1b1b1b;
  border-color: #5e5e5e;
}

/* icon-only dock: the labels stay in the DOM as accessible names, never rendered */
.dock-item .label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.dock-brand .brand-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--white);
  color: #000;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.dock-account img,
.dock-account .avatar-letter {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
}

.dock-account .avatar-letter {
  display: grid;
  place-items: center;
  border: 1px solid #343434;
  background: #1b1b1b;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}

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

.main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 104px 24px 76px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--dim);
}

.page-head h1 {
  margin: 0;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.1;
  text-transform: uppercase;
}

.sub {
  margin: 8px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 12.5px;
}

.head-stats {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  padding-bottom: 2px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  max-width: 170px;
}

.stat-value {
  max-width: 170px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
}

.panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.panel.is-active {
  display: flex;
}

/* --------------------------------------------------------------- toolbar */

.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  flex: 1 1 230px;
  max-width: 380px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--dim);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search:focus-within {
  border-color: #4a4a4a;
  background: #0d0d0d;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  outline: none;
}

.search input::placeholder {
  color: var(--dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10px;
}

.search input::-webkit-search-cancel-button {
  filter: invert(0.6);
}

.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.seg-btn {
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.is-active {
  background: #262626;
  color: var(--text);
}

.select {
  height: 36px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--panel);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 11px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  appearance: none;
  cursor: pointer;
  outline: none;
}

.select:focus {
  border-color: #4a4a4a;
}

.select.sm {
  height: 28px;
  padding: 0 24px 0 8px;
  font-size: 9.5px;
  background-size: 10px;
  background-position: right 7px center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #0c0c0c;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  background: #171717;
  border-color: #404040;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.btn.primary {
  background: var(--white);
  border-color: var(--white);
  color: #050505;
}

.btn.primary:hover {
  background: #ffffff;
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  background: #101010;
  border-color: #3d3d3d;
  color: #ffb0b0;
}

.btn.danger:hover {
  background: #191919;
}

.btn.icon-btn {
  width: 36px;
  padding: 0;
}

.btn.sm {
  height: 28px;
  padding: 0 10px;
  font-size: 9px;
  letter-spacing: 0.12em;
}

/* ------------------------------------------------------------------ list */

.list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.repo {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0a0a0a, #070707);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.repo:hover {
  border-color: #333333;
  background: linear-gradient(180deg, #0e0e0e, #080808);
  box-shadow: inset 2px 0 0 var(--white);
}

.repo-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: #0f0f0f;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.repo:hover .repo-icon {
  border-color: #4a4a4a;
  color: var(--muted);
}

.repo-main {
  min-width: 0;
}

.repo-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.repo-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.repo-owner {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.badge {
  padding: 2px 6px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: #101010;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.badge.private {
  border-color: #4a4a4a;
  color: #ededed;
}

.repo-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repo-meta {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.repo-meta .mi {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.repo-meta .icon {
  width: 11px;
  height: 11px;
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang i {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #6a6a6a;
}

.repo-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.repo-branches {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 11px;
  margin-top: 2px;
  border-top: 1px dashed var(--line);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: #101010;
  color: var(--text);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.chip:hover {
  border-color: #4f4f4f;
  background: #1b1b1b;
}

.chip .icon {
  width: 11px;
  height: 11px;
  color: var(--dim);
}

/* ---------------------------------------------------------------- logins */

.login {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(150px, 218px) auto auto;
  gap: 14px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0a0a0a, #070707);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.login:hover {
  border-color: #333333;
  box-shadow: inset 2px 0 0 var(--white);
}

.login-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: #101010;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-main {
  min-width: 0;
}

.login-title {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.login-user {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.login-user:hover {
  color: var(--text);
  text-decoration: underline;
}

.login-pass {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.login-pass code {
  flex: 1;
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #030303;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.mini:hover {
  background: #1a1a1a;
  color: var(--text);
}

.mini.danger:hover {
  background: #221616;
  color: #ffb0b0;
}

.login-actions {
  display: flex;
  gap: 1px;
}

.login-link {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  color: var(--dim);
}

.login-link:hover {
  background: #1a1a1a;
  color: var(--text);
}

.login-notes {
  margin-top: 2px;
  color: var(--dim);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- pastes */

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

.paste-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding-right: 4px;
}

.paste-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080808;
  color: inherit;
  font-family: var(--ui);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.paste-row:hover {
  border-color: #333333;
  background: #0c0c0c;
}

.paste-row.is-active {
  border-color: #4f4f4f;
  background: #131313;
  box-shadow: inset 2px 0 0 var(--white);
}

.paste-title {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paste-preview {
  color: var(--dim);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paste-meta {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.paste-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 450px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #090909, #060606);
}

.editor-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-input {
  flex: 1;
  min-width: 0;
  padding: 3px 2px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  outline: none;
}

.title-input::placeholder {
  color: var(--dim);
}

.editor-area {
  flex: 1;
  min-height: 310px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #020202;
  color: #d8d8d8;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  resize: none;
  outline: none;
}

.editor-area:focus {
  border-color: #4a4a4a;
}

.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hint {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------- accounts */

.account-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #070707;
}

.account.is-active {
  border-color: #414141;
  background: #121212;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: #141414;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  object-fit: cover;
  text-transform: uppercase;
}

.account-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.account-login {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-name {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-add {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------------- shared */

.empty {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  padding: 58px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.014) 0 1px,
      transparent 1px 9px
    ),
    #050505;
  text-align: center;
}

.empty::before,
.empty::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: #4a4a4a;
}

.empty::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.empty::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #0d0d0d;
  color: var(--muted);
}

.empty-icon .icon {
  width: 20px;
  height: 20px;
}

.empty h2 {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.empty p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.empty-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.fine {
  margin-top: 2px;
  color: var(--dim);
  font-size: 11px;
}

.fine code,
.dialog-sub code {
  padding: 1px 5px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: #131313;
  font-family: var(--mono);
  font-size: 10px;
}

.skeleton {
  height: 70px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(90deg, #070707, #161616, #070707);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

/* -------------------------------------------------------------- settings */

.settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  align-items: start;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #090909, #060606);
}

.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 12px;
  height: 12px;
  border-top: 1px solid #4a4a4a;
  border-left: 1px solid #4a4a4a;
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: #0f0f0f;
  color: var(--muted);
}

.card-head h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.card-head p {
  margin: 4px 0 0;
  color: var(--dim);
  font-size: 11.5px;
}

.kv {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 9px 14px;
  margin: 0;
  font-size: 12.5px;
}

.kv dt {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 3px;
}

.kv dd {
  margin: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 12.5px;
}

.bullets li::marker {
  color: #4a4a4a;
}

.bullets code {
  padding: 1px 5px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: #131313;
  color: #d5d5d5;
  font-family: var(--mono);
  font-size: 10px;
}

/* ----------------------------------------------------------------- modal */

.modal {
  width: min(500px, calc(100% - 26px));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.modal > form,
.modal > div {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 18px;
  border: 1px solid #303030;
  border-radius: 12px;
  background: #070707;
  box-shadow: var(--shadow);
}

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

.dialog-head h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.dialog-sub {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.dialog-sub a {
  color: #dcdcdc;
}

.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.confirm h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.confirm p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  padding: 9px 11px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: #030303;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: #4f4f4f;
}

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

/* ---------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: 340px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #2e2e2e;
  border-radius: 7px;
  background: #0a0a0a;
  box-shadow: var(--shadow);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  animation: toastIn 0.18s ease-out;
}

.toast .icon {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  color: var(--muted);
}

.toast.error {
  border-color: #4a4a4a;
  background: #111111;
}

.toast.error .icon {
  color: #ffffff;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 880px) {
  .main {
    padding: 96px 16px 60px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .head-stats {
    align-items: flex-start;
    gap: 22px;
  }

  .stat {
    align-items: flex-start;
  }

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

  .paste-list {
    max-height: 250px;
  }

  .login {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .login-pass,
  .login-notes {
    grid-column: 1 / -1;
  }

  .repo {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .repo-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

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

/* -------------------------------------------------------- no node server */

.no-backend {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(6px);
}

.no-backend[hidden] {
  display: none;
}

.no-backend-card {
  width: min(520px, 100%);
  padding: 30px 28px;
  border: 1px solid #2f2f2f;
  border-radius: 10px;
  background: #0a0a0a;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
}

.no-backend-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  color: var(--white);
}

.no-backend-icon .icon {
  width: 18px;
  height: 18px;
}

.no-backend-card h2 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
}

.no-backend-card p,
.no-backend-card li {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.no-backend-card ol {
  display: grid;
  gap: 6px;
  margin: 16px 0 0;
  padding-left: 18px;
}

.no-backend-card code {
  padding: 1px 5px;
  border: 1px solid #333;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--white);
}

body.no-backend-on {
  overflow: hidden;
}

