/* ══════════════════════════════════
   TOAST NOTIFICATIONS
══════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    padding: 14px 16px;
    border-radius: 6px;
    background: var(--white);
    border-left: 4px solid var(--blue-dark);
    box-shadow: 0 8px 24px rgba(10, 25, 49, 0.18);
    pointer-events: all;
    animation: toastIn .35s cubic-bezier(.21,1.02,.73,1) forwards;
    position: relative;
    overflow: hidden;
}

.toast.toast-success { border-left-color: #16a34a; }
.toast.toast-error   { border-left-color: #dc2626; }
.toast.toast-info    { border-left-color: var(--blue-dark); }
.toast.toast-warning { border-left-color: #d97706; }

.toast.toast-hiding {
    animation: toastOut .3s ease forwards;
}

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-body { flex: 1; }

.toast-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--navy-dark);
    margin-bottom: 2px;
}

.toast-msg {
    font-size: 0.88rem;
    color: #374151;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
    flex-shrink: 0;
    line-height: 1;
    transition: color .2s;
}
.toast-close:hover { color: var(--navy-dark); }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: toastProgress linear forwards;
}
.toast.toast-success .toast-progress { color: #16a34a; }
.toast.toast-error   .toast-progress { color: #dc2626; }
.toast.toast-info    .toast-progress { color: var(--blue-dark); }
.toast.toast-warning .toast-progress { color: #d97706; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(110%); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); max-height: 100px; }
    to   { opacity: 0; transform: translateX(110%); max-height: 0; padding: 0; margin: 0; }
}
@keyframes toastProgress {
    from { width: 100%; }
    to   { width: 0%; }
}

/* ══════════════════════════════════
/* ══════════════════════════════════
   CUSTOM CONFIRM MODAL
══════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 49, 0.62);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    padding: 16px;
}

.modal-overlay.modal-active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--white);
    border-radius: 14px;
    border-top: 5px solid var(--blue-dark);
    box-shadow: 0 24px 60px rgba(10, 25, 49, 0.35);
    width: 100%;
    max-width: 440px;
    margin: auto;
    transform: scale(.92) translateY(14px);
    transition: transform .25s cubic-bezier(.21,1.02,.73,1);
    overflow: hidden;
}

.modal-overlay.modal-active .modal-box {
    transform: scale(1) translateY(0);
}

.modal-box.modal-danger  { border-top-color: #dc2626; }
.modal-box.modal-warning { border-top-color: #d97706; }
.modal-box.modal-info    { border-top-color: var(--blue-dark); }
.modal-box.modal-success { border-top-color: #16a34a; }

.modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px 14px;
}

.modal-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f1f5f9;
    color: var(--navy-dark);
}

.modal-box.modal-danger .modal-icon-badge {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.modal-box.modal-warning .modal-icon-badge {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fef3c7;
}

.modal-box.modal-info .modal-icon-badge {
    background: #eef3f9;
    color: var(--blue-dark);
    border: 1px solid #dbeafe;
}

.modal-box.modal-success .modal-icon-badge {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #dcfce7;
}

.modal-title {
    font-family: 'Merriweather', serif;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin: 0;
    line-height: 1.35;
}

.modal-body {
    padding: 0 24px 22px;
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.6;
}

.modal-details-card {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--navy-dark);
}

.modal-details-card .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dashed #e2e8f0;
}
.modal-details-card .detail-row:last-child {
    border-bottom: none;
}
.modal-details-card .detail-label {
    color: #64748b;
    font-weight: 500;
}
.modal-details-card .detail-val {
    font-weight: 700;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.modal-btn {
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
    transition: all .18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.modal-btn:active { transform: translateY(1px); }

.modal-btn-cancel {
    background: #f1f5f9;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
}
.modal-btn-cancel:hover {
    background: #e2e8f0;
    color: var(--navy-dark);
}

.modal-btn-confirm {
    background: var(--blue-dark);
    color: var(--white);
    border: 1.5px solid transparent;
}
.modal-btn-confirm:hover {
    opacity: .92;
    transform: translateY(-1px);
}
.modal-btn-confirm.btn-red,
.modal-btn-confirm.btn-danger {
    background: #dc2626;
}
.modal-btn-confirm.btn-red:hover,
.modal-btn-confirm.btn-danger:hover {
    background: #b91c1c;
}
.modal-btn-confirm.btn-orange,
.modal-btn-confirm.btn-warning {
    background: #d97706;
}
.modal-btn-confirm.btn-orange:hover,
.modal-btn-confirm.btn-warning:hover {
    background: #b45309;
}
.modal-btn-confirm.btn-success {
    background: #16a34a;
}
.modal-btn-confirm.btn-success:hover {
    background: #15803d;
}

/* ══════════════════════════════════
   INTERACTIVE UI POLISH HELPERS
══════════════════════════════════ */

/* Password toggle wrap */
.input-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-password-wrap input {
    padding-right: 44px !important;
}
.toggle-password-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color .2s, background .2s;
}
.toggle-password-btn:hover {
    color: var(--navy-dark);
    background: #f1f5f9;
}

/* Caps Lock detector tooltip */
.caps-warning {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #d97706;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    padding: 4px 10px;
    border-radius: 4px;
    margin-top: 5px;
}
.caps-warning.show {
    display: inline-flex;
}

/* Password Strength Meter */
.password-strength-wrap {
    margin-top: 6px;
}
.password-strength-track {
    height: 4px;
    width: 100%;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}
.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width .25s ease, background-color .25s ease;
}
.password-strength-text {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 4px;
    color: #94a3b8;
}

/* Quick amount chips */
.chips-amount-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.chip-amount-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: var(--blue-dark);
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 99px;
    cursor: pointer;
    transition: all .15s ease;
}
.chip-amount-btn:hover {
    background: var(--blue-dark);
    color: var(--white);
    border-color: var(--blue-dark);
    transform: translateY(-1px);
}

/* Terbilang live preview */
.terbilang-preview {
    display: none;
    font-size: 0.8rem;
    color: #0369a1;
    font-weight: 500;
    margin-top: 8px;
    padding: 6px 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    align-items: center;
    gap: 6px;
}
.terbilang-preview:not(:empty) {
    display: inline-flex;
}


/* Character counter */
.char-counter-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}
.char-counter {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}
.char-counter.limit-near { color: #d97706; }
.char-counter.limit-hit { color: #dc2626; font-weight: 700; }
