/* App chrome — same palette, tighter professional layout. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --cgz-bg: #15202C;
  --cgz-brand: #215C5C;
  --cgz-brand-soft: #5ec4c4;
  --cgz-line: rgba(33, 92, 92, 0.28);
  --cgz-card: rgba(31, 41, 55, 0.38);
  --cgz-card-border: rgba(55, 65, 81, 0.95);
}

html { color-scheme: dark; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cgz-bg);
  -webkit-font-smoothing: antialiased;
}

.sidebar {
  width: 280px;
  background: #15202C;
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--cgz-line);
}

.content-area {
  margin-left: 280px;
}

@media (max-width: 768px) {
  .content-area { margin-left: 0; }
}

.mobile-drawer-panel {
  width: 288px;
  background: #15202C;
  border-right: 1px solid rgba(33, 92, 92, 0.25);
}

.content-area main {
  padding: 1.5rem 1.5rem 6rem;
}

@media (min-width: 768px) {
  .content-area main { padding-bottom: 2.5rem; }
}

.content-area > nav,
.content-area > header {
  min-height: 64px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.15rem;
  border-radius: 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: #215C5C;
  color: #fff;
  border: 1px solid transparent;
}
.btn-primary:hover { background: #1a4a4a; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: rgba(31, 41, 55, 0.55);
  color: #e5e7eb;
  border: 1px solid #374151;
}
.btn-secondary:hover {
  border-color: rgba(33, 92, 92, 0.5);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: #d1d5db;
  border: 1px solid #374151;
}
.btn-ghost:hover { background: rgba(31, 41, 55, 0.5); color: #fff; }

.wallet-input,
.wallet-select-sm {
  width: 100%;
  background: rgba(17, 24, 39, 0.55);
  border: 1px solid #374151;
  color: #f3f4f6;
  border-radius: 0.85rem;
  padding: 0.8rem 0.95rem;
  font-size: 0.9rem;
  outline: none;
}
.wallet-input:focus,
.wallet-select-sm:focus {
  border-color: #215C5C;
  box-shadow: 0 0 0 3px rgba(33, 92, 92, 0.22);
}

.wallet-select-sm {
  width: auto;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
}

.wallet-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 0.45rem;
}

.wallet-check {
  accent-color: #215C5C;
  width: 1rem;
  height: 1rem;
}

.wallet-card {
  display: block;
  width: 100%;
  background: var(--cgz-card);
  border: 1px solid var(--cgz-card-border);
  border-radius: 1rem;
  padding: 1.25rem 1.3rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.wallet-card:hover { border-color: rgba(33, 92, 92, 0.55); }
.wallet-card.is-alert { border-color: rgba(185, 28, 28, 0.45); }

.wallet-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.wallet-pill-good { background: rgba(21, 128, 61, 0.2); color: #86efac; border: 1px solid rgba(21, 128, 61, 0.3); }
.wallet-pill-alert { background: rgba(153, 27, 27, 0.25); color: #fecaca; border: 1px solid rgba(185, 28, 28, 0.35); }

.wallet-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  color: #9ca3af;
  background: transparent;
  border: 0;
}
.wallet-icon-btn:hover { color: #fff; background: rgba(55, 65, 81, 0.5); }

.wallet-asset-logo,
.wallet-stack-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  background: #111827;
  border: 1px solid #1f2937;
}
.wallet-stack-icon { width: 22px; height: 22px; }

.wallet-asset-tile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.7rem;
  border-radius: 0.8rem;
  background: rgba(17, 24, 39, 0.45);
  border: 1px solid #1f2937;
  text-align: left;
}
.wallet-asset-tile.is-pick {
  cursor: pointer;
  width: 100%;
}
.wallet-asset-tile.is-pick:hover {
  border-color: rgba(33, 92, 92, 0.55);
}
.wallet-asset-tile.is-on {
  border-color: #215C5C;
  background: rgba(33, 92, 92, 0.22);
}

.wallet-asset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.wallet-asset-grid-compact { grid-template-columns: 1fr 1fr; }

.wallet-sheet-open { overflow: hidden; }

.wallet-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background: rgba(8, 12, 18, 0.72);
  backdrop-filter: blur(8px);
}

.wallet-sheet {
  width: 100%;
  max-width: 920px;
  max-height: 100vh;
  overflow: auto;
  background: #161f2b;
  border-left: 1px solid #1f2937;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
  .wallet-sheet-overlay {
    align-items: center;
    padding: 2rem 1.25rem;
  }
  .wallet-sheet {
    max-height: min(880px, calc(100vh - 4rem));
    border: 1px solid #1f2937;
    border-radius: 1.25rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  }
}

.wallet-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem 0;
}

.wallet-kicker {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5ec4c4;
  margin-bottom: 0.35rem;
}

.wallet-sheet-title {
  font-size: 1.45rem;
  font-weight: 650;
  color: #fff;
  letter-spacing: -0.02em;
}

.wallet-sheet-lead {
  margin-top: 0.45rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #9ca3af;
  max-width: 38rem;
}

.wallet-sheet-body { padding: 1.35rem 1.5rem 1.6rem; }

.wallet-sheet-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 840px) {
  .wallet-sheet-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }
  .wallet-sheet-actions {
    grid-column: 1 / -1;
  }
}

.wallet-sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 1rem;
  margin-top: 0.25rem;
  border-top: 1px solid #1f2937;
}

.wallet-seg {
  display: flex;
  padding: 0.25rem;
  background: rgba(17, 24, 39, 0.65);
  border: 1px solid #1f2937;
  border-radius: 0.85rem;
}
.wallet-seg button {
  flex: 1;
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border-radius: 0.65rem;
}
.wallet-seg button.is-on {
  background: #215C5C;
  color: #fff;
}

.wallet-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .wallet-import-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 840px) {
  .wallet-import-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.wallet-word {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(17, 24, 39, 0.55);
  border: 1px solid #1f2937;
  border-radius: 0.7rem;
  padding: 0.45rem 0.55rem;
}
.wallet-word span {
  font-size: 0.65rem;
  color: #6b7280;
  width: 1.1rem;
  font-variant-numeric: tabular-nums;
}
.wallet-word input {
  width: 100%;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.wallet-phrase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 640px) {
  .wallet-phrase-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.wallet-phrase-grid li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(17, 24, 39, 0.55);
  border: 1px solid #1f2937;
  border-radius: 0.7rem;
  padding: 0.65rem 0.75rem;
}
.wallet-phrase-grid span { font-size: 0.7rem; color: #6b7280; width: 1.2rem; }
.wallet-phrase-grid em { font-style: normal; color: #fff; font-weight: 600; }

.wallet-status {
  font-size: 0.85rem;
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
}
.wallet-status.is-ok { background: rgba(20, 83, 45, 0.35); color: #86efac; }
.wallet-status.is-error { background: rgba(127, 29, 29, 0.35); color: #fca5a5; }

.wallet-balance-list {
  display: flex;
  flex-direction: column;
  border: 1px solid #1f2937;
  border-radius: 0.9rem;
  overflow: hidden;
}
.wallet-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid #1f2937;
}
.wallet-balance-row:last-child { border-bottom: 0; }

.wallet-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  padding: 0.7rem 1rem;
  border-radius: 0.8rem;
  font-size: 0.85rem;
  font-weight: 550;
  transition: opacity 0.25s ease;
}
.wallet-toast.is-ok { background: rgba(20, 83, 45, 0.95); color: #bbf7d0; border: 1px solid rgba(74, 222, 128, 0.25); }
.wallet-toast.is-error { background: rgba(127, 29, 29, 0.95); color: #fecaca; border: 1px solid rgba(248, 113, 113, 0.25); }

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #15202C;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: rgba(31, 41, 55, 0.42);
  border: 1px solid #374151;
  border-radius: 1.35rem;
  padding: 2rem 2rem 1.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}
.auth-card input {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-card input:focus {
  outline: none;
  border-color: #215C5C;
  box-shadow: 0 0 0 3px rgba(33, 92, 92, 0.22);
}

.page-card {
  background: var(--cgz-card);
  border: 1px solid var(--cgz-card-border);
  border-radius: 1rem;
}

.page-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

.content-area > nav {
  background: rgba(21, 32, 44, 0.88);
  border-bottom: 1px solid #1f2937;
  backdrop-filter: blur(10px);
}

.content-area input[type="text"],
.content-area input[type="email"],
.content-area input[type="tel"],
.content-area input[type="date"],
.content-area input[type="password"],
.content-area input[type="number"],
.content-area select,
.content-area textarea {
  border-radius: 0.8rem;
}

.upload-drop:hover,
[id$="-container"].border-dashed:hover {
  border-color: #215C5C !important;
}
