/* ── Colony Bank — Modern Neobank UI ─────────────────────────────────────── */

/* Page container */
#bank-app {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 48px 80px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ── Balance Card ───────────────────────────────────────────────────────── */

.bank-balance-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
}

.bank-balance-label {
    font-size: 12px;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.bank-balance-amount {
    font-size: 52px;
    font-weight: 600;
    color: #F5A623;
    text-shadow: 0 0 40px rgba(245, 166, 35, 0.3), 0 0 80px rgba(245, 166, 35, 0.1);
    line-height: 1.1;
    margin-bottom: 32px;
}

.bank-balance-icon {
    opacity: 0.6;
    font-size: 40px;
}

.bank-balance-num {
    font-variant-numeric: tabular-nums;
}

/* ── Action Buttons ─────────────────────────────────────────────────────── */

.bank-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.bank-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.bank-btn svg {
    flex-shrink: 0;
}

.bank-btn--primary {
    background: #F5A623;
    color: #1a0a06;
}

.bank-btn--primary:hover {
    background: #f7b84a;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(245, 166, 35, 0.3);
}

.bank-btn--primary:active {
    transform: translateY(0);
}

.bank-btn--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.bank-btn--disabled {
    cursor: not-allowed;
    opacity: 0.5;
    position: relative;
}

.bank-btn--disabled:hover {
    transform: none;
    box-shadow: none;
}

.bank-btn--secondary {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bank-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.bank-btn--full {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 14px;
}

.bank-btn--full:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Coming Soon chip */
.bank-chip {
    display: inline-block;
    font-size: 9px;
    letter-spacing: 0.1em;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
}

.bank-chip--soon {
    background: rgba(245, 166, 35, 0.15);
    color: #F5A623;
}

/* ── Stats Row ──────────────────────────────────────────────────────────── */

.bank-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.bank-stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.bank-stat-num {
    font-size: 28px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
    line-height: 1.2;
}

.bank-stat-card--green .bank-stat-num { color: #4CD964; }
.bank-stat-card--red .bank-stat-num { color: #FF6B6B; }
.bank-stat-card--amber .bank-stat-num { color: #F5A623; }
.bank-stat-card--cyan .bank-stat-num { color: #5AC8FA; }

.bank-stat-label {
    font-size: 10px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

/* ── Section Titles ─────────────────────────────────────────────────────── */

.bank-section-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 20px;
    text-transform: uppercase;
}

/* ── Transaction History ────────────────────────────────────────────────── */

.bank-history-section {
    display: flex;
    flex-direction: column;
}

.bank-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.bank-history-header .bank-section-title {
    margin-bottom: 0;
}

/* Filter pills */
.bank-filter-pills {
    display: flex;
    gap: 8px;
}

.bank-pill {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.bank-pill:hover {
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
}

.bank-pill--active {
    background: #F5A623;
    color: #1a0a06;
    border-color: #F5A623;
}

.bank-pill--active:hover {
    color: #1a0a06;
}

/* History list */
.bank-history-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bank-history-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    transition: background 0.15s ease;
}

.bank-history-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.bank-history-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bank-history-icon--in {
    background: rgba(76, 217, 100, 0.12);
    color: #4CD964;
}

.bank-history-icon--out {
    background: rgba(255, 107, 107, 0.12);
    color: #FF6B6B;
}

.bank-history-info {
    flex: 1;
    min-width: 0;
}

.bank-history-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bank-history-note {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
    margin-top: 2px;
}

.bank-history-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 2px;
}

.bank-history-amount {
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.bank-history-amount--in { color: #4CD964; }
.bank-history-amount--out { color: #FF6B6B; }

/* Empty state */
.bank-history-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.25);
}

.bank-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

/* Load more */
.bank-load-more {
    margin: 20px auto 0;
    display: block;
}

/* ── Transfer Modal ─────────────────────────────────────────────────────── */

.bank-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
    animation: bankFadeIn 0.2s ease;
}

@keyframes bankFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bank-modal-card {
    background: #2a1008;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
    position: relative;
    animation: bankSlideUp 0.25s ease;
}

@keyframes bankSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.bank-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.bank-modal-close:hover {
    color: rgba(255, 255, 255, 0.8);
}

.bank-modal-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #F5A623;
    margin: 0 0 28px;
}

/* Form */
.bank-form-group {
    margin-bottom: 20px;
}

.bank-form-label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.bank-form-optional {
    color: rgba(255, 255, 255, 0.25);
    text-transform: lowercase;
    letter-spacing: normal;
}

.bank-form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.bank-form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.bank-form-input:focus {
    outline: none;
    border-color: rgba(245, 166, 35, 0.5);
}

.bank-form-textarea {
    resize: none;
    min-height: 56px;
}

.bank-amount-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: border-color 0.2s;
}

.bank-amount-wrap:focus-within {
    border-color: rgba(245, 166, 35, 0.5);
}

.bank-amount-prefix {
    padding: 14px 0 14px 16px;
    color: #F5A623;
    font-size: 22px;
    flex-shrink: 0;
}

.bank-form-input--amount {
    background: transparent;
    border: none;
    font-size: 28px;
    font-weight: 600;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.95);
    font-variant-numeric: tabular-nums;
}

.bank-form-input--amount:focus {
    outline: none;
    border-color: transparent;
}

/* Remove number input spinners */
.bank-form-input--amount::-webkit-outer-spin-button,
.bank-form-input--amount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bank-form-input--amount[type=number] {
    -moz-appearance: textfield;
}

.bank-modal-balance {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 20px;
}

.bank-modal-error {
    background: rgba(255, 59, 48, 0.12);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #FF6B6B;
    margin-bottom: 16px;
}

.bank-modal-success {
    text-align: center;
    padding: 24px 16px;
}

.bank-success-check {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(76, 217, 100, 0.15);
    color: #4CD964;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.bank-success-balance {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

/* ── Placeholder Sections ───────────────────────────────────────────────── */

.bank-placeholder-section {
    position: relative;
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(0.8);
}

.bank-placeholder-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.bank-placeholder-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    overflow: hidden;
}

.bank-shimmer {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin: 0 auto 12px;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 75%
    );
    background-size: 200% 100%;
    animation: bankShimmer 2s infinite linear;
}

@keyframes bankShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.bank-placeholder-label {
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
}

.bank-coming-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    letter-spacing: 0.15em;
    color: rgba(245, 166, 35, 0.6);
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(245, 166, 35, 0.2);
    white-space: nowrap;
}

/* ── Buy Credits Section ───────────────────────────────────────────────── */

.bank-buy-section {
    position: relative;
}

.bank-buy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.bank-buy-header .bank-section-title {
    margin-bottom: 0;
}

.bank-pay-badge {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.1em;
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(245, 166, 35, 0.1);
    color: #F5A623;
    border: 1px solid rgba(245, 166, 35, 0.25);
    font-weight: 600;
}

.bank-buy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.bank-buy-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    transition: border-color 0.2s;
}

.bank-buy-card--highlight {
    border-color: rgba(245, 166, 35, 0.3);
    background: rgba(245, 166, 35, 0.04);
}

.bank-buy-tag {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 12px;
    border-radius: 20px;
    background: #F5A623;
    color: #1a0a06;
    white-space: nowrap;
}

.bank-buy-name {
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.bank-buy-amount {
    font-size: 28px;
    font-weight: 600;
    color: #F5A623;
    margin-bottom: 4px;
    text-shadow: 0 0 20px rgba(245, 166, 35, 0.15);
}

.bank-buy-price {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
}

.bank-btn--buy-disabled {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: not-allowed;
    font-family: inherit;
}

.bank-buy-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.5;
}

.bank-buy-footer-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* ── Commodity Market ──────────────────────────────────────────────────── */

.bank-commodity-section {
    display: flex;
    flex-direction: column;
}

.bank-commodity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.bank-commodity-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s;
}

.bank-commodity-card:hover {
    border-color: rgba(245, 166, 35, 0.3);
}

.bank-commodity-name {
    font-size: 15px;
    font-weight: 600;
    color: #F5A623;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bank-commodity-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    margin-bottom: 8px;
}

.bank-commodity-price {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.bank-commodity-qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.bank-commodity-qty-input {
    width: 64px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-family: 'Courier New', monospace;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.bank-commodity-qty-input:focus {
    outline: none;
    border-color: rgba(245, 166, 35, 0.5);
}

/* Remove spinners */
.bank-commodity-qty-input::-webkit-outer-spin-button,
.bank-commodity-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.bank-commodity-qty-input[type=number] {
    -moz-appearance: textfield;
}

.bank-commodity-total {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    font-variant-numeric: tabular-nums;
}

.bank-btn--success {
    background: #4CD964;
    color: #1a0a06;
}

.bank-btn--success:hover {
    background: #5be075;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(76, 217, 100, 0.3);
}

.bank-btn--success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.bank-btn--danger {
    background: rgba(255, 107, 107, 0.15);
    color: #FF6B6B;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    #bank-app {
        padding: 24px 16px 64px;
        gap: 32px;
    }

    .bank-balance-amount {
        font-size: 40px;
    }

    .bank-balance-icon {
        font-size: 32px;
    }

    .bank-balance-card {
        padding: 32px 20px;
    }

    .bank-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .bank-stat-num {
        font-size: 24px;
    }

    .bank-stat-card {
        padding: 20px 16px;
    }

    .bank-history-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bank-filter-pills {
        flex-wrap: wrap;
    }

    .bank-history-row {
        padding: 14px 16px;
        gap: 12px;
    }

    .bank-history-amount {
        font-size: 16px;
    }

    .bank-history-desc {
        font-size: 13px;
    }

    .bank-placeholder-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bank-buy-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bank-buy-tag {
        top: -8px;
    }

    /* Modal goes near-fullscreen on mobile */
    .bank-modal-card {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 28px 20px;
    }

    .bank-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .bank-form-input--amount {
        font-size: 24px;
    }

    .bank-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .bank-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .bank-balance-amount {
        font-size: 36px;
    }

    .bank-stat-num {
        font-size: 20px;
    }

    .bank-history-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
}
