/* ========== صفحات (عناوين، بطاقات، مبالغ، بنوك) ========== */
.page-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    position: sticky;
    top: 0;
    background: var(--topbar-bg);
    backdrop-filter: blur(24px);
    z-index: 10;
}
.page-header h3 { font-size: 19px; font-weight: 700; }

.back-btn {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--card);
    border: 1.5px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.back-btn:hover { border-color: var(--primary); color: var(--primary); }

.card {
    margin: 0 20px 16px;
    padding: 22px;
    background: var(--card);
    border: 1.5px solid var(--card-border);
    border-radius: 16px;
}
.card h4 { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; font-weight: 500; }

.available-balance { text-align: center; }
.available-balance h3 { color: var(--primary); font-size: 28px; margin-top: 6px; font-weight: 800; }

.amount-input-box {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
}
.amount-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-size: 34px;
    font-weight: 700;
    outline: none;
    width: 100%;
    text-align: left;
}
.amount-input::placeholder { color: var(--text-muted); }
.currency { color: var(--text-muted); font-weight: 600; font-size: 15px; }

.quick-amounts { display: flex; gap: 10px; margin-top: 16px; }
.quick-amount {
    flex: 1;
    padding: 12px;
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.quick-amount:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.bank-section { padding: 0 20px; margin-bottom: 16px; }
.bank-section h4 { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; font-weight: 500; }

.bank-form-section { padding: 0 20px; margin-bottom: 16px; }
.bank-form-section h4 { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; font-weight: 500; }
.bank-form-section.half { flex: 1; padding: 0; }
.bank-card-row { display: flex; gap: 12px; padding: 0 20px; margin-bottom: 16px; }

.bank-search-wrap { position: relative; margin-bottom: 10px; }
.bank-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.bank-search-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: var(--card);
    border: 1.5px solid var(--card-border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s;
}
.bank-search-input:focus { border-color: var(--primary); }
.bank-search-input::placeholder { color: var(--text-muted); }

.bank-autocomplete { position: relative; }
.bank-dropdown {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    margin-top: 6px;
    background: var(--card);
    border: 1.5px solid var(--card-border);
    border-radius: 12px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.bank-dropdown-item {
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--card-border);
}
.bank-dropdown-item:last-child { border-bottom: none; }
.bank-dropdown-item:hover { background: var(--primary); color: white; }
body.light .bank-dropdown { box-shadow: 0 8px 32px rgba(0,0,0,0.1); }

/* QR Code */
#transferQR { padding: 0 20px; }
#qrCodeContainer {
    width: 220px; height: 220px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* QR Scanner */
.qr-scanner-wrap { padding: 0 20px; text-align: center; }
.qr-scanner-frame {
    width: 240px; height: 240px;
    margin: 0 auto 16px;
    position: relative;
    background: var(--card);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.qr-corner {
    position: absolute;
    width: 30px; height: 30px;
    border-color: var(--primary);
    border-style: solid;
    border-width: 0;
}
.qr-corner-tl { top: 16px; left: 16px; border-top-width: 3px; border-left-width: 3px; border-radius: 6px 0 0 0; }
.qr-corner-tr { top: 16px; right: 16px; border-top-width: 3px; border-right-width: 3px; border-radius: 0 6px 0 0; }
.qr-corner-bl { bottom: 16px; left: 16px; border-bottom-width: 3px; border-left-width: 3px; border-radius: 0 0 0 6px; }
.qr-corner-br { bottom: 16px; right: 16px; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 6px 0; }
.qr-scanner-icon { color: var(--text-muted); opacity: 0.4; }
.qr-scan-line {
    position: absolute;
    width: 70%;
    height: 2px;
    background: var(--primary);
    top: 40%;
    animation: scanLine 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--primary);
}
@keyframes scanLine {
    0%, 100% { top: 25%; }
    50% { top: 70%; }
}
.qr-scan-text { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

.btn-cancel {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.btn-cancel:hover { border-color: #F87171; color: #F87171; background: rgba(248,113,113,0.05); }

/* QR Timer */
.qr-timer { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 12px; }
.qr-timer-num {
    font-size: 32px; font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    transition: color 0.3s;
}
.qr-timer-label { font-size: 14px; color: var(--text-muted); }

/* Bank Choice Grid */
.bank-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 20px;
    margin-bottom: 16px;
}
.bank-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 12px;
    background: var(--card);
    border: 2px solid var(--card-border);
    border-radius: 16px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.25s;
}
.bank-choice-btn:hover { border-color: var(--primary); transform: translateY(-2px); }
.bank-choice-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bank-choice-btn span { font-size: 15px; font-weight: 700; }
.bank-choice-btn small { font-size: 12px; color: var(--text-muted); }

/* Back Text Button */
.btn-back-text {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 12px 20px;
    width: calc(100% - 40px);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: color 0.2s;
}
.btn-back-text:hover { color: var(--text); }
