/* ============================================================
   Components — buttons, modal, toast (shared across screens)
   ============================================================ */

/* ── BUTTONS ── */
.btn {
    height: 48px;
    padding: 12px 10px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s;
    -webkit-tap-highlight-color: transparent
}
.btn:active { opacity: .85 }

.btn-primary {
    background: var(--color-primary);
    color: var(--surface-white);
    box-shadow: inset 0 0 10px rgba(255,255,255,0.4)
}

.btn-secondary {
    background: var(--purple-100);
    color: var(--color-primary)
}
.btn-secondary:active { opacity: .7 }

.btn-approve-lg { flex: 1 }

.btn-row3 {
    display: flex;
    gap: 8px
}

/* ── MODAL ── */
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 90;
    pointer-events: none;
    transition: background .25s ease
}
.modal-backdrop.open {
    background: rgba(0,0,0,0.45);
    pointer-events: all
}
.modal {
    position: absolute;
    left: 24px;
    right: 24px;
    top: 50%;
    transform: translateY(-44%) scale(.94);
    background: var(--surface-white);
    border-radius: 20px;
    padding: 28px 20px 20px;
    z-index: 91;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: transform .25s cubic-bezier(0.34,1.56,0.64,1), opacity .2s ease;
    text-align: center
}
.modal.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(-50%) scale(1)
}
.modal-icon {
    width: 48px;
    height: 48px;
    background: var(--purple-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px
}
.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink-700)
}
.modal-sub {
    font-size: 13px;
    color: rgba(61,61,61,0.6);
    line-height: 1.45;
    margin-bottom: 8px
}
.modal-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 4px
}
.modal-btn {
    flex: 1
}
.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #EEECF2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s
}
.modal-close:active {
    background: #E1DEE8
}


/* ── TOAST ── */
.toast {
    position: absolute;
    top: 72px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: linear-gradient(135deg, #2D1B69, #1E1346);
    color: var(--surface-white);
    font-size: 12px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s, transform .22s;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 6px 24px rgba(124, 92, 191, 0.4);
    border: 0.5px solid rgba(167, 139, 250, 0.3)
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
}
