:root {
  --bg: #0e1a2a;
  --panel: #142235;
  --muted: #a9b6c7;
  --text: #e8edf2;
  --accent: #4c7fb8;
  --accent-strong: #5fa1e0;
  --border: #1f3046;
  --offwhite: #f5f5f0;
  --danger: #b85c5c;
  --success: #4e9b74;
  --warning: #c7a54b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header {
  background: rgba(14, 26, 42, 0.96);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(6px);
}

.nav-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  display: block;
  height: 28px;
  width: auto;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--offwhite);
  font-size: 16px;
}

.tagline {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  color: var(--text);
  padding: 8px 10px;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

nav a:hover,
nav a:focus {
  background: var(--border);
  color: var(--offwhite);
  text-decoration: none;
}

.hero {
  padding: 96px 24px 72px;
  background: linear-gradient(135deg, #0f2038 0%, #0d1828 60%, #0e1a2a 100%);
  border-bottom: 1px solid var(--border);
}

.hero .inner,
.shell,
.form-shell,
main {
  max-width: 1200px;
  margin: 0 auto;
}

.pill {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.hero h1,
.section-title {
  color: var(--offwhite);
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 44px);
}

.lead,
.section-lead,
.muted {
  color: var(--muted);
}

.cta,
.btn-secondary,
button,
.button-link {
  display: inline-block;
  border-radius: 6px;
  padding: 12px 18px;
  cursor: pointer;
  border: 1px solid var(--border);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.cta,
button.primary {
  background: var(--accent);
  color: var(--offwhite);
  border-color: var(--accent-strong);
}

.cta:hover,
button.primary:hover {
  background: var(--accent-strong);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary,
button.secondary,
.button-link {
  background: transparent;
  color: var(--text);
}

.btn-secondary:hover,
button.secondary:hover,
.button-link:hover {
  background: var(--border);
  text-decoration: none;
}

main {
  padding: 48px 24px 64px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card,
.panel,
.auth-card,
.sidebar,
.workspace {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.card,
.panel,
.auth-card {
  padding: 24px;
}

.form-shell {
  padding: 48px 24px 64px;
  max-width: 560px;
}

.auth-card label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--offwhite);
}

.auth-card input {
  width: 100%;
  border: 1px solid var(--border);
  background: #0c1624;
  color: var(--text);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 16px;
}

.auth-card input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0c1624;
}

.notice-success {
  border-color: rgba(78, 155, 116, 0.5);
  background: rgba(78, 155, 116, 0.12);
}

.notice-error {
  border-color: rgba(184, 92, 92, 0.5);
  background: rgba(184, 92, 92, 0.12);
}

.notice-warning {
  border-color: rgba(199, 165, 75, 0.5);
  background: rgba(199, 165, 75, 0.12);
}

.app-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 32px 24px 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.sidebar {
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 90px;
}

.workspace {
  padding: 20px;
  min-height: 520px;
}

.side-title {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--offwhite);
}

.side-block {
  margin-bottom: 18px;
}

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.toolbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

#breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.crumb {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 10px;
}

.crumb:hover {
  background: var(--border);
}

.crumb-sep {
  color: var(--muted);
}

.entry-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #101c2d;
}

.entry-main {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.entry-icon {
  font-size: 22px;
}

.entry-name {
  font-weight: 600;
  color: var(--offwhite);
  word-break: break-word;
}

.entry-meta {
  color: var(--muted);
  font-size: 13px;
}

.entry-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.entry-actions button {
  padding: 8px 12px;
  background: transparent;
  color: var(--text);
}

.entry-actions .danger {
  border-color: rgba(184, 92, 92, 0.45);
  color: #f0c5c5;
}

.entry-actions .danger:hover {
  background: rgba(184, 92, 92, 0.12);
}

.empty-state {
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

footer {
  border-top: 1px solid var(--border);
  background: #0c1422;
  padding: 18px 24px;
  color: var(--muted);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 920px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 680px) {
  .nav-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 72px;
  }

  .entry-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.full-width {
  width: 100%;
}

.push-bottom {
  margin-bottom: 12px;
}

.upload-label {
  display: block;
  text-align: center;
}

.compact-title {
  margin-bottom: 4px;
}

.unlock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 12, 19, 0.76);
  backdrop-filter: blur(4px);
}

.unlock-overlay[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.unlock-card {
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  padding: 24px;
}

.unlock-card label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--offwhite);
}

.unlock-card input {
  width: 100%;
  border: 1px solid var(--border);
  background: #0c1624;
  color: var(--text);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 16px;
}

.unlock-card input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.plan-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #101c2d;
  padding: 22px;
}

.plan-card h2 {
  margin-top: 0;
  color: var(--offwhite);
}

.plan-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plan-list li {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.plan-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkbox-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
}

.checkbox-row input {
  margin-top: 3px;
}

.text-center {
  text-align: center;
}

.legal {
  max-width: 960px;
  margin: 32px auto;
}

.legal h2 {
  margin-top: 24px;
  color: var(--offwhite);
}

.transfer-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(420px, calc(100vw - 32px));
  background: rgba(15, 25, 39, 0.96);
  border: 1px solid rgba(95, 161, 224, 0.45);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
  padding: 18px;
  z-index: 60;
  backdrop-filter: blur(10px);
}

.transfer-panel-header,
.transfer-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.transfer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--offwhite);
}

.transfer-message,
.transfer-stats {
  color: var(--muted);
  font-size: 13px;
}

.transfer-stats + .transfer-stats {
  margin-top: 8px;
}

.transfer-percent {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-strong);
}

.transfer-progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #0b1422;
  border: 1px solid var(--border);
  margin: 14px 0 12px;
}

.transfer-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.18s ease;
}

.transfer-panel.is-success {
  border-color: rgba(78, 155, 116, 0.5);
}

.transfer-panel.is-success .transfer-progress-bar {
  background: linear-gradient(90deg, #3f8d68, #5dc18f);
}

.transfer-panel.is-error {
  border-color: rgba(184, 92, 92, 0.58);
}

.transfer-panel.is-error .transfer-progress-bar {
  background: linear-gradient(90deg, #9e4040, #d97373);
}

@media (max-width: 720px) {
  .transfer-panel {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
  }
}
