/* ===== Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    color: #262626;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.view {
    position: relative;
    min-height: 100vh;
}

/* ===== Back to Dashboard ===== */
.back-link {
    position: absolute;
    top: 33px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: #0074bd;
    text-decoration: none;
}
.back-link:hover { text-decoration: underline; }
.back-arrow { width: 14px; height: 14px; }

/* ===== Page content column ===== */
.page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== Search ===== */
.search-wrap { margin-top: 94px; width: 701px; max-width: 92%; }

.search-box {
    display: flex;
    align-items: center;
    height: 41px;
    border: 1px solid #757575;
    border-radius: 3px;
    background: #fff;
    padding: 0 12px;
}
.search-icon { width: 16px; height: 16px; flex: none; }

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
    color: #262626;
    padding: 0 0 0 8px;
    background: transparent;
}
.search-box input::placeholder { color: #757575; }

/* ===== Banks grid ===== */
.banks-grid {
    margin-top: 30px;
    width: 687px;
    max-width: 92%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    column-gap: 17px;
    row-gap: 10px;
}

/* mobile: fixed 2-column grid, full width */
@media (max-width: 480px) {
    .banks-grid {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
        padding: 0 10px;
    }
    .bank-tile,
    .other-account-card { height: 68px; }
    .bank-tile img { max-height: 42px; }
    .other-account-card { padding: 10px 8px; }
    .other-account-card .other-account-card-title { font-size: 12px; text-align: center; }
}

.bank-tile {
    height: 81px;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .12s ease;
}
.bank-tile:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }

.bank-tile img {
    max-width: 100%;
    max-height: 56px;
    object-fit: contain;
}

/* "Add ..." tiles */
.add-tile {
    height: 81px;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 6px;
    text-align: center;
}
.add-tile .plus {
    width: 16px;
    height: 16px;
    position: relative;
    flex: none;
}
.add-tile .plus::before,
.add-tile .plus::after {
    content: "";
    position: absolute;
    background: #747474;
}
.add-tile .plus::before {
    left: 50%; top: 0;
    width: 1.5px; height: 100%;
    transform: translateX(-50%);
}
.add-tile .plus::after {
    top: 50%; left: 0;
    height: 1.5px; width: 100%;
    transform: translateY(-50%);
}
.add-tile .add-label {
    font-size: 12px;
    color: #262626;
    line-height: 1.1;
}
a.add-tile {
    text-decoration: none;
    color: inherit;
}

/* ===== "Add real estate" / "Add manually" cards (Yodlee style) ===== */
.other-account-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 81px;
    background:#c3c3c378;;
    border: 1px solid #dedede;
    border-radius: 2px;
    text-decoration: none;
    color: inherit;
}
.other-account-card:hover { border-color: #b7bcc4; }
.other-account-card .image-icon { display: flex; }
.other-account-card .image-icon svg {
    width: 20px;
    height: 20px;
    color: #747474;
}
.other-account-card .other-account-card-title {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #262626;
    line-height: 1.1;
    text-align: center;
}

/* ===== Footer ===== */
.page-footer {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 80px 0 15px;
}

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

.footer-links a {
    font-size: 11px;
    color: #0074bd;
    text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }

.thawte {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.thawte-word {
    font-size: 13px;
    color: #6d6e71;
    font-weight: 600;
    letter-spacing: .2px;
}
.thawte-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #f47b20;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==================== Consent (Plaid-style) screen ==================== */
.consent { padding-top: 78px; width: 430px; max-width: 92%; margin: 0 auto; }

.consent-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 27px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.486);
    width: 100%;
}
.consent-logo img {
    height: 46px;
    width: auto;
    max-width: 308px;
    object-fit: contain;
}

.consent-note,
.consent-connect,
.consent-select {
    font-size: 12px;
    line-height: 1.35;
    color: #545454;
    text-align: center;
}
.consent-note { margin-bottom: 17px; }
.consent-connect { margin-bottom: 11px; }
.consent-connect b, .consent-note b { color: #545454; font-weight: 700; }
.consent-select { margin-bottom: 60px; }

.yodlee-brand {
    color: #25215c;
    font-weight: 700;
    font-size: 12px;
}
.yodlee-brand.big { font-size: 14px; }
.dot-end { color: #545454; }

.underlined { color: inherit; }

/* Checkbox panel */
.checkbox-panel {
    width: 216px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,.18), 0 0 2px rgba(0,0,0,.08);
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel-header {
    background: var(--accent, #117aca);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    text-align: center;
    padding: 9px 12px;
    margin: -14px -20px 0;
    border-radius: 8px 8px 0 0;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}
.check-row input { display: none; }

.checkbox {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1.5px solid #b5b5b5;
    background: #fff;
    position: relative;
    margin-top: -1px;
    transition: background .25s ease, border-color .25s ease;
}
.check-row input:checked + .checkbox {
    background: var(--accent, #117aca);
    border-color: var(--accent);
}
.check-row input:checked + .checkbox::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2.5px;
    width: 4.5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.check-label {
    font-size: 12px;
    line-height: 1.3;
    color: #262626;
}

/* Continue button */
#btn-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 344px;
    max-width: 100%;
    height: 40px;
    margin: 36px auto 0;
    background: var(--accent, #117aca);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s ease;
}
#btn-continue:hover { background: var(--accent-dark, #0d68ad); }
#btn-continue:disabled { opacity: .8; cursor: default; }

.btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin-left: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Fine print */
.fine-print {
    margin-top: 18px;
    font-size: 11px;
    line-height: 1.45;
    color: #545454;
    text-align: center;
}
.fine-print a { color: #0074bd; text-decoration: none; }
.fine-print a:hover { text-decoration: underline; }
.fine-print .underlined { color: #545454; text-decoration: underline; }

/* Secure row */
.secure-row {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.secure-text { font-size: 11px; color: #969596; }

.nowrap { white-space: nowrap; }

/* ===== Demo cursor (animated checkbox walkthrough) ===== */
.demo-cursor {
    position: absolute;
    z-index: 9999;
    width: 26px;
    height: 26px;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35));
}

.demo-ripple {
    position: absolute;
    z-index: 9998;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid var(--accent, #117aca);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}
.demo-ripple.play { animation: demo-ripple .45s ease-out; }

@keyframes demo-ripple {
    0%   { opacity: .8; transform: scale(.4); }
    100% { opacity: 0;  transform: scale(2.4); }
}
