/* Modern UI Styles for ITA Document System */

:root {
    --primary-color: #334155;
    --primary-dark: #334155;
    --secondary-color: #64748b;
    --accent-color: #8b5cf6;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #475569;
    --dark-bg: #1f2937;
    --sidebar-bg: #111827;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}



body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Fix sidenav height - Fixed positioning */
/* Sidebar Overrides for the NEW sidenav.php */
#main-sidenav {
    /* Standard styles are in PHP, only overrides here if absolutely necessary */
}

/* Ensure the main content area shifts to the right for the fixed sidenav */
.flex.h-screen>div.flex-1,
header.ml-64,
main.ml-64,
footer.ml-64 {
    margin-left: 16rem !important;
}

/* Custom Scrollbar for Sidenav */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Navbar Improvements (Scoped to prevent global conflicts) */
.top-navbar nav {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Card Improvements */
.card-modern {
    background: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-modern:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

/* Form Improvements */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.1);
    transform: translateY(-1px);
}

/* Button Improvements */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(71, 85, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(71, 85, 105, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2563eb 100%);
    transition: all 0.3s ease;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    transition: all 0.3s ease;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    transition: all 0.3s ease;
}

/* Table Improvements */
table thead {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

table tbody tr {
    transition: all 0.2s ease;
}

table tbody tr:hover {
    background: #f8fafc;
    transform: scale(1.01);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Alert Improvements */
.alert {
    border-radius: 12px;
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge Improvements */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Icon Improvements */
.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(71, 85, 105, 0.3);
}

/* File Upload Improvements */
input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

input[type="file"]::file-selector-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

/* DataTables Custom Styling */
.dataTables_wrapper {
    padding: 20px 0;
}

.dataTables_filter input {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.dataTables_filter input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.1);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Improvements */
@media (max-width: 768px) {
    aside {
        position: fixed;
        left: -100%;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    aside.mobile-open {
        left: 0;
    }
}

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse Animation for Important Elements */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}


/* Additional Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slideInDown {
    animation: slideInDown 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-in;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

.animate-bounceIn {
    animation: bounceIn 0.6s ease-out;
}

/* Hover Effects for Cards */
.card-hover-effect {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-effect:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.tooltip:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    background-size: 200% 100%;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.success {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: white;
}

.status-badge.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.status-badge.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.status-badge.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}


/* Enhanced Sidebar Styles */
aside {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Scrollbar for Sidebar */
aside::-webkit-scrollbar {
    width: 6px;
}

aside::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

aside::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #475569 0%, #334155 100%);
    border-radius: 10px;
}

aside::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
}

/* Sidebar Menu Item Active State */
aside nav ul li a.active {
    background: linear-gradient(90deg, rgba(71, 85, 105, 0.2) 0%, rgba(71, 85, 105, 0.05) 100%);
    border-left: 3px solid #475569;
    color: #94a3b8;
}

aside nav ul li a.active .w-10 {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.3) 0%, rgba(71, 85, 105, 0.1) 100%);
    box-shadow: 0 4px 6px -1px rgba(71, 85, 105, 0.3);
}

/* Sidebar Glow Effect on Hover */
aside nav ul li a:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 70%;
    background: linear-gradient(180deg, transparent, currentColor, transparent);
    border-radius: 0 2px 2px 0;
}

/* Icon Pulse Animation on Hover */
aside nav ul li a:hover .w-10 i {
    animation: iconPulse 0.6s ease-in-out;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Sidebar Background Pattern */
/* Sidebar Background Pattern */
aside::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(71, 85, 105, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(100, 116, 139, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

aside>* {
    position: relative;
    z-index: 1;
}

/* Menu Item Shine Effect */
aside nav ul li a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

aside nav ul li a:hover::after {
    left: 100%;
}

/* Badge for Menu Items (optional) */
.menu-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.625rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

/* Sidebar Footer Animation */
/* Sidebar Footer Animation - Disabled to prevent visibility issues
aside .absolute.bottom-0 {
    opacity: 1 !important;
} */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu Items Stagger Animation */
/* Menu Items Stagger Animation - Disabled to prevent visibility issues
aside nav ul li {
    opacity: 1 !important;
} */

/* Clean end of file */