/* Modern Custom Styles for DZit */

:root {
    --primary-color: #1F1635;
    --primary-dark: #4f46e5;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --dark-bg: #1e293b;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #334155;
    min-height: 100vh;
    padding-bottom: 50px;
}

footer {
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* Bootstrap Overrides */
.btn {
    border-radius: 6px !important;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    padding: 0.75rem 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #C01C7A 0%, #82BDCC 100%);
    box-shadow: var(--box-shadow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a31867 0%, #65939e 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    /* transform: translateY(-4px); */
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    background-image: linear-gradient(37deg, rgb(32, 218, 233),rgb(40, 21, 236));
    color: white;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.min-vh-75 {
    min-height: 75vh;
    display: flex;
    align-items: center;
}

/* Form Styles */
.form-control {
    border: 0;
    border-bottom: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 1rem;
    border-radius: 6px !important;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #cbd5e1;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    background: #f8fafc;
    cursor: pointer;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 6px;
    background-color: #e2e8f0;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--success-color) 100%);
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* Image Preview */
.image-preview {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.image-preview:hover {
    transform: scale(1.02);
}

.image-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Dashboard Stats */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--primary-color);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
}

.alert-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table thead th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #e2e8f0;
}

.table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

/* Modals */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem;
}

/* Sidebar */
.sidebar {
    background: #1F1635 !important;
    min-height: calc(100vh - 2rem);
    height: 100%;
}

.sidebar .nav-link {
    color: #FFF;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin: 0.25rem 0;
    transition: var(--transition);
    font-weight: 500;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: rgba(99, 102, 241, 0.1);
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border-lg {
    width: 3rem;
    height: 3rem;
}

/* Badge Styles */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .bg-light {
        background-image: radial-gradient(circle at 90% 24%, rgba(209, 209, 209,0.04) 0%, rgba(209, 209, 209,0.04) 50%,rgba(160, 160, 160,0.04) 50%, rgba(160, 160, 160,0.04) 100%),radial-gradient(circle at 91% 63%, rgba(45, 45, 45,0.04) 0%, rgba(45, 45, 45,0.04) 50%,rgba(87, 87, 87,0.04) 50%, rgba(87, 87, 87,0.04) 100%),radial-gradient(circle at 17% 2%, rgba(124, 124, 124,0.04) 0%, rgba(124, 124, 124,0.04) 50%,rgba(117, 117, 117,0.04) 50%, rgba(117, 117, 117,0.04) 100%),linear-gradient(88deg, rgb(31,22,53),rgb(1, 15, 13));
    }
    
    .card {
        box-shadow: 0 .125rem .25rem rgba(2, 6, 23, .075);
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn, .sidebar {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
}

#login-card {
    min-height: 600px;
    padding: 3rem;
    border: 1px solid #aeaeae !important;
    box-shadow: unset !important;
    border-radius: 6px;
}

#login-card .card-header {
    background-color: unset;
}

#toggleIcon {
    position:absolute;
    right: 1rem;
    top: 1rem;
    z-index: 10;
}

/* Full Height Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    width: 16.666667%; /* col-lg-2 equivalent */
}

@media (max-width: 991.98px) {
    .sidebar {
        width: 25%; /* col-md-3 equivalent */
    }
}

@media (max-width: 767.98px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
    }
}

/* Navbar positioned after sidebar */
.navbar {
    margin-left: 16.666667%;
    width: calc(100% - 16.666667%);
}

@media (max-width: 991.98px) {
    .navbar {
        margin-left: 25%;
        width: calc(100% - 25%);
    }
}

@media (max-width: 767.98px) {
    .navbar {
        margin-left: 0;
        width: 100%;
    }
}

/* Adjust main content margin for fixed sidebar */
.main-content {
    margin-left: 16.666667%;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 25%;
    }
}

@media (max-width: 767.98px) {
    .main-content {
        margin-left: 0;
    }
}

@media screen and (max-width:760px) {
    .image-preview .btn-sm {
        padding:5px 10px;
        text-align:center;
    }
    .image-preview .btn-sm i {
        margin:0 !important;
    }
}

.alert.alert-primary {
    background:#1f1635 !important;
    color: #FFF;
}

.text-primary {
    color: #1f1635 !important;
}