/* NAJ Capital Solution - Portal Custom Styles */

/* Auth page background */
.auth-bg {
    background: linear-gradient(135deg, #0D0D0D 0%, #1A1A1A 50%, #0D0D0D 100%);
    min-height: 100vh;
}

.auth-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* Dashboard stat cards hover */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.dark .stat-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Notification item */
.notification-item {
    transition: background-color 0.15s ease;
}

.notification-item.unread {
    background-color: #FEF6E7;
    border-left: 3px solid #F5A623;
}

.dark .notification-item.unread {
    background-color: rgba(245, 166, 35, 0.10);
}

.notification-item:hover {
    background-color: #F3F4F6;
}

.dark .notification-item:hover {
    background-color: #1F2937;
}

/* File upload drag active */
.file-upload-zone.drag-active {
    border-color: #F5A623;
    background-color: rgba(245, 166, 35, 0.08);
}

/* Wizard progress animation */
@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.step-circle.active {
    animation: progressPulse 2s infinite;
}

/* Chart container */
.chart-container {
    position: relative;
    width: 100%;
    max-height: 300px;
}

/* Loan card status strip */
.loan-status-strip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 1rem 1rem 0 0;
}

.loan-status-strip.active { background-color: #F5A623; }
.loan-status-strip.completed { background-color: #10B981; }
.loan-status-strip.overdue { background-color: #EF4444; }
.loan-status-strip.pending { background-color: #F59E0B; }

/* Mobile sidebar animation */
@media (max-width: 1023px) {
    #sidebar.open {
        transform: translateX(0);
    }
}

/* OTP input */
.otp-input {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #D1D5DB;
    border-radius: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
    color: #1F2937;
}

.dark .otp-input {
    background-color: #1F2937;
    border-color: #4B5563;
    color: #E5E7EB;
}

.otp-input:focus {
    outline: none;
    border-color: #F5A623;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.20);
}

/* Progress bar */
.progress-bar {
    height: 0.5rem;
    border-radius: 9999px;
    background-color: #E5E7EB;
    overflow: hidden;
}

.dark .progress-bar {
    background-color: #374151;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #F5A623, #D98E0B);
    transition: width 0.5s ease;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.75rem;
}

/* Print styles */
@media print {
    #top-nav, #sidebar, #sidebar-overlay, #toast-container,
    #notification-dropdown, #user-dropdown, .btn, button {
        display: none !important;
    }
    main {
        margin-left: 0 !important;
        padding: 0 !important;
    }
}

/* Animation helpers */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.3s ease forwards;
}

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

.animate-slide-in {
    animation: slideInRight 0.3s ease forwards;
}

/* Stagger children animation */
.stagger-children > * {
    opacity: 0;
    animation: fadeInUp 0.3s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
