/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.3s ease-out;
    backdrop-filter: blur(12px);
}

.toast.success {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-right: 5px solid #00a859;
    box-shadow: 0 10px 30px rgba(0, 168, 89, 0.12);
}

.toast.error {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-right: 5px solid #ef4444;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.12);
}

.toast.warning {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-right: 5px solid #f59e0b;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.12);
}

.toast.info {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-right: 5px solid #1967d2;
    box-shadow: 0 10px 30px rgba(25, 103, 210, 0.12);
}

.toast-icon {
    font-size: 1.7rem;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #00a859;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast.info .toast-icon {
    color: #1967d2;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 800;
    margin-bottom: 4px;
    font-size: 1.05rem;
    font-family: 'Cairo', sans-serif;
}

.toast.success .toast-title {
    color: #00a859;
}

.toast.error .toast-title {
    color: #ef4444;
}

.toast.warning .toast-title {
    color: #d97706;
}

.toast.info .toast-title {
    color: #1967d2;
}

.toast-message {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
    line-height: 1.45;
    font-family: 'Cairo', sans-serif;
}

.toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.toast-close:hover {
    background: #f1f5f9;
    color: #17171d;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOut 0.3s ease-out forwards;
}

/* Confirmation Modal */
.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    z-index: 99998;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(6px);
}

.confirm-modal.show {
    display: flex;
}

.confirm-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 26px 24px;
    max-width: 420px;
    width: 100%;
    animation: scaleIn 0.3s ease-out;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    font-family: 'Cairo', sans-serif;
}

.confirm-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(25, 103, 210, 0.1);
    border: 1.5px solid rgba(25, 103, 210, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.8rem;
    color: var(--primary);
}

.confirm-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #17171d;
    font-family: 'Cairo', sans-serif;
}

.confirm-message {
    text-align: center;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 24px;
    line-height: 1.6;
    font-family: 'Cairo', sans-serif;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
}

.confirm-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.confirm-btn-yes {
    background: linear-gradient(135deg, var(--primary), var(--primary-dim));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(25, 103, 210, 0.3);
}

.confirm-btn-yes:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 103, 210, 0.45);
}

.confirm-btn-no {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.confirm-btn-no:hover {
    background: #e2e8f0;
    color: #17171d;
    transform: translateY(-2px);
}

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

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    z-index: 99997;
    align-items: center;
    justify-content: center;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--primary);
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 20px;
    color: #17171d;
    font-weight: 700;
    font-size: 1.1rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Welcome Modal Overlay */
.welcome-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.welcome-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.welcome-modal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    border-radius: 20px;
    padding: 30px 25px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.welcome-modal-overlay.show .welcome-modal-card {
    transform: scale(1);
}

.welcome-modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1455b6, #1967d2, #3b82f6);
}

.welcome-modal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px auto;
    background: rgba(25, 103, 210, 0.1);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    box-shadow: 0 0 15px rgba(25, 103, 210, 0.2);
}

.welcome-modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #17171d;
    margin-bottom: 15px;
    line-height: 1.4;
}

.welcome-modal-body {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 25px;
    text-align: right;
    background: #f8fafc;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    border-right: 3px solid var(--primary);
}

.welcome-modal-body p + p {
    margin-top: 12px;
}

.welcome-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}

.welcome-modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    text-decoration: none;
}

.welcome-modal-btn-primary {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.welcome-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: #ffffff;
}

.welcome-modal-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.welcome-modal-btn-secondary:hover {
    background: #e2e8f0;
    color: #17171d;
}

/* Floating Support Button in Dashboard - Collapsible Design */
.floating-support-btn {
    position: fixed;
    bottom: 90px;
    left: 20px;
    z-index: 8000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #ffffff;
    padding: 0;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    overflow: hidden;
    white-space: nowrap;
}

.floating-support-btn .support-text {
    max-width: 0;
    opacity: 0;
    transition: max-width 0.35s ease, opacity 0.25s ease, margin 0.35s ease;
    margin-right: 0;
    font-size: 0.8rem;
    font-weight: 700;
}

.floating-support-btn.expanded {
    width: auto;
    height: 44px;
    padding: 0 16px;
    border-radius: 25px;
}

.floating-support-btn.expanded .support-text {
    max-width: 200px;
    opacity: 1;
    margin-right: 6px;
}

.floating-support-btn.financial-view-pos {
    bottom: calc(165px + env(safe-area-inset-bottom, 0px)) !important;
}

.floating-support-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.floating-support-btn .support-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .floating-support-btn {
        bottom: 85px;
        left: 15px;
        width: 46px;
        height: 46px;
    }
    .floating-support-btn.financial-view-pos {
        bottom: calc(160px + env(safe-area-inset-bottom, 0px)) !important;
        left: 12px !important;
    }
}
