/* Customer internet-banking dashboard: account strip, eight flat stat cards, chart row (cdb- prefix). */

/* Primary account strip */
.cdb-strip { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-left: 4px solid #0a6fd2; border-radius: 4px; padding: 10px 14px; box-shadow: var(--shadow); }
.cdb-strip .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cdb-strip .who b { display: block; font-size: 14px; }
.cdb-strip .who div span { display: block; font-size: 12px; color: var(--muted); }
.cdb-strip .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #e4f0ff; color: #0a6fd2; font-size: 18px; flex: none; }
.cdb-strip dl { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0 0 0 auto; }
.cdb-strip dl div { min-width: 0; }
.cdb-strip dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.cdb-strip dd { margin: 1px 0 0; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }

/* Stat cards: flat solid colours, white text, line icon on the right, faint ring pattern. */
.cdb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cdb-stat { --bg: #ff7189; position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 118px; padding: 16px 70px 14px 18px; border-radius: 6px; background: var(--bg); color: #fff; box-shadow: 0 3px 10px rgba(18, 45, 72, .14); transition: transform .15s, box-shadow .15s; min-width: 0; }
.cdb-stat::before, .cdb-stat::after { content: ""; position: absolute; border-radius: 50%; border: 18px solid rgba(255, 255, 255, .09); pointer-events: none; }
.cdb-stat::before { width: 150px; height: 150px; right: -58px; top: -62px; }
.cdb-stat::after { width: 92px; height: 92px; right: 34px; bottom: -64px; border-width: 12px; border-color: rgba(255, 255, 255, .07); }
a.cdb-stat:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(18, 45, 72, .22); }
.cdb-stat small { font-size: 13px; font-weight: 700; letter-spacing: .01em; opacity: .97; }
.cdb-stat strong { font-size: 26px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdb-stat em { font-style: normal; font-size: 12px; margin-top: auto; padding-top: 10px; opacity: .95; line-height: 1.35; }
.cdb-stat small, .cdb-stat strong, .cdb-stat em { position: relative; z-index: 1; text-shadow: 0 1px 1px rgba(0, 0, 0, .14); }
.cdb-stat .ico { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 34px; line-height: 1; opacity: .92; z-index: 1; }
.cdb-c1 { --bg: #f7657f; }   /* coral */
.cdb-c2 { --bg: #4a98f0; }   /* bright blue */
.cdb-c3 { --bg: #1fc1a7; }   /* turquoise */
.cdb-c4 { --bg: #f5a93b; }   /* amber */
.cdb-c5 { --bg: #8270ee; }   /* violet */
.cdb-c6 { --bg: #3d55c4; }   /* indigo */
.cdb-c7 { --bg: #26b07e; }   /* green */
.cdb-c8 { --bg: #ef6b4a; }   /* orange-red */

/* Top row: four information cards in the same style as the stat cards. */
.cdb-info { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cdb-c9 { --bg: #0e9aa7; }   /* teal: account */
.cdb-c10 { --bg: #2b6cb0; }  /* blue: dates */
.cdb-c11 { --bg: #c2508f; }  /* magenta: at a glance */
.cdb-c12 { --bg: #2d3e63; }  /* navy: security */
.cdb-info .cdb-stat { min-height: 118px; padding: 14px 16px 12px 18px; }
.cdb-info .cdb-stat .ico { top: 14px; right: 14px; transform: none; font-size: 24px; opacity: .85; }
.cdb-info dl { margin: 8px 0 0; position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; font-size: 13px; line-height: 1.5; text-shadow: 0 1px 1px rgba(0, 0, 0, .14); }
.cdb-info dl div { display: contents; }
.cdb-info dt { opacity: .88; white-space: nowrap; }
.cdb-info dd { margin: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-variant-numeric: tabular-nums; }
.cdb-info dd a { color: #fff; text-decoration: underline; }
.cdb-info .mono { font-family: Consolas, Menlo, monospace; letter-spacing: .03em; }
/* Narrower screens: the live clock may wrap onto a second line rather than lose its seconds. */
@media (max-width: 1400px) { .cdb-info .cdb-stat { padding-left: 16px; padding-right: 14px; } .cdb-info dl { font-size: 12.5px; gap: 2px 9px; } .cdb-info dd:has(time) { white-space: normal; } }
@media (max-width: 1100px) { .cdb-info { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cdb-info { grid-template-columns: minmax(0, 1fr); } }

/* Six-month totals under a chart */
.cdb-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line2); }
.cdb-mini div { min-width: 0; background: var(--panel2); border: 1px solid #dde5ed; border-radius: 4px; padding: 7px 9px; }
.cdb-mini span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdb-mini b { display: block; font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdb-mini b.in { color: #1a8a62; } .cdb-mini b.out { color: #d6455f; }

/* Chart row */
.cdb-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.cdb-charts > .ct-panel { min-width: 0; display: flex; flex-direction: column; margin: 0; }
.cdb-charts > .ct-panel > .ct-pbody { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.cdb-chart .db-legend { justify-content: center; }
.cdb-vgrid { stroke-dasharray: 2 4; }
.cdb-rowlabel { font-weight: 700; fill: #3d5166; }
.cdb-track { fill: #eef3f8; }
.cdb-barval { font-weight: 700; fill: #2f4559; }
.cdb-barval.in { fill: #fff; }
.db-legend i.cdb-dash { height: 3px; width: 16px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 8px); }
.cdb-foot { margin: 0; font-size: 11.5px; color: var(--muted); }
.cdb-subhead { font-size: 11.5px; font-weight: 700; color: #3d5166; text-transform: uppercase; letter-spacing: .03em; margin-top: 4px; }
.cdb-page .db-hbars.thin .row { padding: 2px 0; }

/* Money in and out: donut by source, then in against out */
.cdb-donut { flex: 1 1 0; min-height: 230px; position: relative; }
.cdb-donut svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cdb-donut-k { font-size: 10.5px; fill: var(--muted); }
.cdb-donut-v { font-size: 25px; font-weight: 700; fill: #1a8f68; }
.cdb-donut-v.out { fill: #d6455f; }
.cdb-srcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 16px; font-size: 12.5px; }
.cdb-srcs div { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cdb-srcs i { flex: none; width: 11px; height: 11px; border-radius: 3px; }
.cdb-srcs span { flex: 1; min-width: 0; color: #2a3f55; line-height: 1.25; }
.cdb-srcs b { font-variant-numeric: tabular-nums; }
.cdb-srcs em { font-style: normal; color: var(--muted); width: 32px; text-align: right; flex: none; }
.cdb-split { display: flex; height: 32px; border-radius: 5px; overflow: hidden; font-size: 12.5px; font-weight: 700; color: #fff; white-space: nowrap; }
.cdb-split .in { background: #2fb383; display: flex; align-items: center; padding: 0 10px; min-width: 4px; }
.cdb-split .out { flex: 1; background: #ff7189; display: flex; align-items: center; justify-content: flex-end; padding: 0 10px; min-width: 4px; }

/* Payments out: one bar per payment on a blue band, then where it went */
.cdb-pay { margin: -14px -14px 4px; padding: 12px 14px 8px; background: linear-gradient(135deg, #3b8ff0, #6db1f7); color: #fff; display: flex; flex-direction: column; min-height: 270px; flex: 1.1 1 0; }
.cdb-pay-hd { display: flex; align-items: center; gap: 14px; font-size: 11.5px; margin-bottom: 10px; }
.cdb-pay-hd b { margin-right: auto; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.cdb-pay-hd i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; background: #fff; margin-right: 5px; vertical-align: -1px; }
.cdb-pay-hd i.p { background: #ffd27a; }
.cdb-pay-plot { position: relative; flex: 1; min-height: 190px; }
.cdb-pay-grid { position: absolute; inset: 6px 0 0; display: flex; flex-direction: column; justify-content: space-between; }
.cdb-pay-grid div { height: 0; position: relative; }
.cdb-pay-grid div::after { content: ''; position: absolute; left: 46px; right: 0; top: 0; border-top: 1px solid rgba(255, 255, 255, .25); }
.cdb-pay-grid span { position: absolute; left: 0; width: 38px; top: -8px; text-align: right; font-size: 10.5px; opacity: .92; font-variant-numeric: tabular-nums; }
.cdb-pay-grid div:last-child::after { border-top-color: rgba(255, 255, 255, .6); }
.cdb-pay-bars, .cdb-pay-x { position: absolute; left: 46px; right: 4px; top: 6px; bottom: 0; display: flex; align-items: flex-end; gap: 2px; }
.cdb-pay-bars i { flex: 1; min-width: 2px; max-width: 18px; margin: 0 auto; border-radius: 2px 2px 0 0; background: linear-gradient(#fff, rgba(255, 255, 255, .6)); }
.cdb-pay-bars i.p { background: linear-gradient(#ffd27a, rgba(255, 210, 122, .65)); }
.cdb-pay-bars i:hover { background: #fff; outline: 2px solid rgba(255, 255, 255, .5); }
.cdb-pay-none { align-self: center; margin: 0 auto; font-size: 12.5px; text-align: center; opacity: .95; }
.cdb-pay-x { position: static; margin-left: 46px; margin-right: 4px; height: 18px; align-items: center; }
.cdb-pay-x span { flex: 1; min-width: 2px; text-align: center; font-size: 11px; font-weight: 700; white-space: nowrap; width: 0; overflow: visible; }
.cdb-went { display: flex; flex-direction: column; flex: 1 1 0; min-height: 210px; }
.cdb-went-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.cdb-went-hd small { font-size: 11.5px; color: var(--muted); }
.cdb-went-rows { flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
.cdb-went-rows > div, .cdb-went-ax { display: grid; grid-template-columns: 40% minmax(0, 1fr); gap: 10px; align-items: center; font-size: 12.5px; min-height: 22px; }
.cdb-went-rows > div > span:first-child { text-align: right; color: #2a3f55; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdb-went .t { display: flex; align-items: center; gap: 6px; height: 100%; min-height: 22px; background: repeating-linear-gradient(90deg, #eef2f6 0 1px, transparent 1px 25%); }
.cdb-went .t i { height: 14px; min-width: 2px; border-radius: 2px; flex: none; }
.cdb-went .t b { font-size: 12px; white-space: nowrap; }
.cdb-went-ax { min-height: 16px; }
.cdb-went-ax .t { position: relative; background: none; min-height: 16px; }
.cdb-went-ax em { position: absolute; transform: translateX(-50%); font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.cdb-went-ax em:last-child { transform: translateX(-100%); }

.cdb-narrow { display: none; }

@media (max-width: 1100px) {
    .cdb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cdb-charts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .cdb-charts > .ct-panel:last-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .cdb-wide { display: none; }
    .cdb-narrow { display: block; }
    .cdb-charts { grid-template-columns: minmax(0, 1fr); }
    .cdb-strip dl { margin-left: 0; gap: 8px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .cdb-strip dd { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 560px) {
    .cdb-stats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .cdb-stat { min-height: 104px; }
    .cdb-stat strong { font-size: 24px; }
}

/* Card faces with the bank logo at the top of the Cards panel; scroll sideways when there are several. */
.cdb-cardfaces { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px; scroll-snap-type: x mandatory; }
.cdb-cardfaces > a { flex: 0 0 210px; scroll-snap-align: start; text-decoration: none; }
.cdb-cardfaces .cd-card.sm { max-width: 210px; padding: 11px 13px; }
.cdb-cardfaces .cd-num { font-size: 13px; }
