/* The signed-in pages' shared look: page head, cards, rows, notes, fields, tabs and steps. Colours and fonts come
   from /css/txlist.css (.ycp), the same family as the Swap, Transfer, History, Stats and Rewards pages. Load it after
   main.css, navigation-dark.css and txlist.css; a page's own CSS file comes after it. Everything is scoped to .ycp. */
body { background-color: #11141A; }

/* Page */
.dp { padding: 30px 32px 70px; max-width: 1180px; }
.dp.narrow { max-width: 860px; }
.dp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dp-head h1 { margin: 0; font-family: "titles", sans-serif !important; font-weight: 400; font-size: 32px; color: #E4E8EF; }
.dp-head p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: #A5ACB9; max-width: 640px; }
.dp-head-a { flex: none; display: flex; gap: 10px; flex-wrap: wrap; }
.ycp .dp-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.ycp .dp-back:hover { color: var(--text); }
.dp-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.dp-grid > * { min-width: 0; }
.dp-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dp-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dp-sec { margin-top: 30px; }
.dp-sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dp-sec-h h2 { margin: 0; font-size: 18px; font-weight: 600; color: var(--text); }
.dp-sec-h p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.ycp .num { font-variant-numeric: tabular-nums; }
.ycp .cur { font-weight: 500; opacity: .75; }
.ycp .in { color: var(--in); }

/* Profile and support sub-pages */
.dp-tabs { display: inline-flex; gap: 4px; margin-bottom: 22px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.dp-tabs::-webkit-scrollbar { display: none; }
.ycp .dp-tabs a { flex: none; height: 38px; padding: 0 15px; display: flex; align-items: center; gap: 8px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.ycp .dp-tabs a:hover { color: var(--text); }
.ycp .dp-tabs a.on { color: #fff; background: var(--surface-3); }
.dp-tabs .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Cards */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; min-width: 0; }
.card.hero { overflow: hidden; background: linear-gradient(180deg, rgba(155, 123, 255, .08), rgba(155, 123, 255, 0) 200px), var(--surface); }
.card.hero::after { content: ""; position: absolute; right: -70px; top: -90px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(closest-side, rgba(155, 123, 255, .2), transparent); pointer-events: none; }
.card.hero > * { position: relative; z-index: 1; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-width: 0; }
.card-h h2, .card-h h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--text); }
.card-h p { margin: 3px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.card-h > .linkish, .card-h > .btn, .card-h > .card-h-r { margin-left: auto; flex: none; }
.card-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.big { margin: 8px 0 0; font-size: 40px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.big .cur { font-size: .55em; margin-left: 4px; }
.card p.txt, .ycp .txt { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.txt + .txt { margin-top: 10px; }
.ycp .txt b { color: var(--text); font-weight: 600; }
.ycp .txt a, .ycp a.ul { color: var(--link); }
.ycp .txt a:hover, .ycp a.ul:hover { text-decoration: underline; }
.ycp .linkish { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--link); font-size: 13px; font-weight: 500; }
.ycp .linkish:hover { text-decoration: underline; }
.ycp .btn.big { width: 100%; height: 50px; font-size: 15.5px; font-weight: 600; border-radius: 13px; }
.ycp .btn.primary[disabled] { box-shadow: none; filter: grayscale(.5); }
.ycp .btn.danger { color: #FF9A9A; border-color: rgba(255, 122, 122, .35); background: rgba(255, 122, 122, .06); }
.ycp .btn.danger:hover { border-color: rgba(255, 122, 122, .6); }
.fine { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted-2); }
.fine.c { text-align: center; }

/* Key and value rows */
.rows { margin: 0; }
.rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13.5px; }
.rows > div + div { border-top: 1px solid var(--line); }
.rows dt { color: var(--muted); white-space: nowrap; }
.rows dd { margin: 0; min-width: 0; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rows dd small { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.rows .total dt { color: var(--text); font-weight: 600; }
.rows .total dd { font-size: 17px; font-weight: 700; }

/* Notes */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.note > .i:first-child, .note > [data-icon]:first-child { flex: none; margin-top: 2px; }
.note b { font-weight: 600; }
.note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.note.ok { color: #BDF2D6; background: rgba(61, 214, 140, .08); border: 1px solid rgba(61, 214, 140, .22); }
.note.warn { color: #F6DFB0; background: rgba(245, 185, 74, .08); border: 1px solid rgba(245, 185, 74, .25); }
.note.info { color: #CBD5FF; background: rgba(110, 168, 255, .08); border: 1px solid rgba(110, 168, 255, .22); }
.note.bad { color: #FFC9C9; background: rgba(255, 122, 122, .08); border: 1px solid rgba(255, 122, 122, .25); }
.note.quiet { color: var(--muted); background: var(--bg); border: 1px solid var(--line-2); }

/* Switched off or could not load */
.off-card { display: flex; gap: 14px; align-items: flex-start; }
.off-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(245, 185, 74, .12); color: var(--hold); }
.off-card.bad .off-ic { background: rgba(255, 122, 122, .12); color: #FF9A9A; }
.off-card b { display: block; font-size: 15.5px; font-weight: 600; color: var(--text); }
.off-card p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.off-card .btn { margin-top: 12px; }

/* Tags */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--muted); background: rgba(138, 146, 165, .14); }
.tag.ok { color: var(--in); background: rgba(61, 214, 140, .1); }
.tag.info { color: var(--processing); background: rgba(110, 168, 255, .12); }
.tag.warn { color: var(--hold); background: rgba(245, 185, 74, .12); }
.tag.bad { color: #FF9A9A; background: rgba(255, 122, 122, .12); }
.tag.violet { color: #C9B8FF; background: rgba(155, 123, 255, .14); }

/* Numbered steps */
.step { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.step > b { flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; color: #fff; background: var(--grad); }
.step h2, .step h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--text); }
.step em { margin-left: auto; font-style: normal; font-size: 12.5px; color: var(--muted); }
.how { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; counter-reset: how; }
.how li { position: relative; padding-left: 38px; font-size: 13.5px; line-height: 1.55; color: var(--text-2); counter-increment: how; }
.how li::before { content: counter(how); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; color: #C9B8FF; background: rgba(155, 123, 255, .14); }
.how li b { display: block; color: var(--text); font-weight: 600; margin-bottom: 1px; }

/* Fields */
.field { display: block; margin-top: 14px; }
.field:first-child { margin-top: 0; }
.field > .lbl, .lbl { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.lbl small { font-size: 12px; font-weight: 400; color: var(--muted-2); }
.ycp .input { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--muted); font-size: 15px; }
.ycp .input:focus-within { border-color: #6B6BFF; box-shadow: 0 0 0 3px rgba(107, 107, 255, .18); }
.ycp .input.bad { border-color: rgba(255, 122, 122, .6); }
.ycp .input input, .ycp .input select { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 15px; }
.ycp .input select { appearance: none; cursor: pointer; }
.ycp .input select option { background: #151922; color: var(--text); }
.ycp .input input::placeholder, .ycp textarea::placeholder { color: var(--muted-2); }
.ycp .input input[readonly] { color: var(--text-2); }
.ycp .input .k { flex: none; font-size: 13px; font-weight: 600; color: var(--muted); }
.ycp .input .btn { height: 32px; margin-right: -6px; }
.ycp .input.mono input { font-family: 'YCP Mono', ui-monospace, monospace; font-size: 13.5px; }
.ycp textarea.ta { display: block; width: 100%; min-height: 120px; resize: vertical; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.5; outline: 0; }
.ycp textarea.ta:focus { border-color: #6B6BFF; box-shadow: 0 0 0 3px rgba(107, 107, 255, .18); }
.ycp .input input:focus-visible, .ycp .input select:focus-visible, .ycp textarea.ta:focus-visible { outline: 0; }
.hint { margin: 7px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.f-err { margin: 7px 2px 0; font-size: 12.5px; line-height: 1.45; color: #FF9A9A; }

/* Checkbox and switch drawn over a real input */
.chk { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.chk input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chk .box { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid #4A5370; color: transparent; display: flex; align-items: center; justify-content: center; }
.chk input:checked + .box { border-color: transparent; background: var(--grad); color: #fff; }
.chk input:focus-visible + .box { outline: 2px solid #7E7BFF; outline-offset: 2px; }
.chk b { color: var(--text); font-weight: 600; }
.tgl { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.tgl input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tgl .sw { flex: none; width: 40px; height: 24px; border-radius: 999px; background: #3A4257; position: relative; margin-top: 1px; transition: background .15s; }
.tgl .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.tgl input:checked + .sw { background: var(--grad); }
.tgl input:checked + .sw::after { left: 19px; }
.tgl input:focus-visible + .sw { outline: 2px solid #7E7BFF; outline-offset: 2px; }
.tgl-t b { display: block; font-size: 14.5px; font-weight: 600; color: var(--text); }
.tgl-t span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Choice tiles (a radio or a link that looks like a card) */
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ycp .opt { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-align: left; min-width: 0; transition: border-color .15s, background .15s; }
.ycp a.opt:hover, .ycp label.opt:hover, .ycp button.opt:hover { border-color: #3A4257; background: var(--surface-2); }
.ycp .opt.on, .ycp .opt:has(input:checked) { border: 1px solid transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; }
.ycp .opt.off { opacity: .55; cursor: default; }
.ycp .opt.off:hover { border-color: var(--line-2); background: var(--surface); }
.opt input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.opt-ic { flex: none; width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.opt-ic img { width: 30px; height: 30px; border-radius: 50%; }
.opt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.opt-t b { font-size: 15px; font-weight: 600; color: var(--text); }
.opt-t span { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.opt > .i:last-child, .opt > .go { flex: none; color: var(--muted-2); }

/* Copy field: an address, an email or a code with a copy button */
.copy { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); min-width: 0; }
.copy > span, .copy > code { flex: 1; min-width: 0; font-family: 'YCP Mono', ui-monospace, monospace; font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; }
.ycp .copy .btn { flex: none; }

/* Lists of rows inside a card */
.lst { display: flex; flex-direction: column; }
.lst-r { display: flex; align-items: center; gap: 14px; padding: 13px 0; min-width: 0; }
.lst-r + .lst-r { border-top: 1px solid var(--line); }
.card.flush .lst-r { padding: 13px 20px; }
.ycp a.lst-r:hover { background: var(--surface-2); }
.lst-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lst-t b { font-size: 14.5px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lst-t span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lst-r > .amt, .lst-r .lst-v { flex: none; text-align: right; }

/* Tables (address book, email bans): rows turn into cards on phones */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { padding: 0 14px 10px; text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-top: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
.tbl td.mono { font-family: 'YCP Mono', ui-monospace, monospace; font-size: 12.5px; overflow-wrap: anywhere; }
.tbl td:last-child, .tbl th:last-child { text-align: right; }

/* Empty and loading */
.empty { padding: 30px 20px; border-radius: 16px; border: 1px dashed var(--line-2); text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.empty .empty-ic { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--surface-2); }
.empty b { display: block; margin-bottom: 3px; font-size: 14.5px; color: var(--text-2); font-weight: 600; }
.empty .btn { margin-top: 14px; }
.sk { display: block; height: 14px; width: 60%; margin: 10px 0; border-radius: 6px; background: var(--surface-3); animation: dp-pulse 1.2s ease-in-out infinite; }
@keyframes dp-pulse { 50% { opacity: .5; } }

/* Coin with its name */
.coinx { display: flex; align-items: center; gap: 12px; min-width: 0; }
.coinx img { flex: none; width: 36px; height: 36px; border-radius: 50%; }
.coinx b { display: block; font-size: 14.5px; font-weight: 600; color: var(--text); }
.coinx span { display: block; font-size: 12.5px; color: var(--muted); }

@media (max-width: 1100px) {
  .dp-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
}
@media (max-width: 920px) {
  .dp-grid, .dp-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 750px) {
  .dp { padding: 22px 16px 40px; }
  .dp-head { flex-direction: column; align-items: center; text-align: center; margin-bottom: 20px; }
  .dp-head h1 { font-size: 28px; }
  .dp-head p { font-size: 14.5px; }
  .dp-head-a { justify-content: center; }
  .dp-back { margin-bottom: 10px; }
  .dp-2 { grid-template-columns: minmax(0, 1fr); }
  .dp-grid, .dp-2, .dp-3, .dp-stack { gap: 14px; }
  .dp-sec { margin-top: 24px; }
  .dp-tabs { display: flex; margin-bottom: 18px; }
  .ycp .dp-tabs a { flex: 1; justify-content: center; padding: 0 10px; font-size: 13.5px; }
  .card { padding: 16px; border-radius: 16px; }
  .card.flush .lst-r { padding: 12px 16px; }
  .big { font-size: 34px; }
  .opts { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 12px 0; border-top: 1px solid var(--line); }
  .tbl tr:first-child { border-top: 0; }
  .tbl td { padding: 3px 0; border: 0; text-align: left !important; }
  .tbl td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 1px; }
}
