/**
 * Audit Dashboard Theme Styles
 * Built with Bootstrap 5
 */

/* CSS Custom Properties */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 0.75rem;
    --transition: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: #f8f8f8;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 700;
}

/* Layout */
.site-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Header Styles */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 0;
}

.logo-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-section h1 {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

.logo-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

/* Card Styles */
.category-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: none;
    overflow: hidden;
    height: 100%;
}

.category-card:hover {
    box-shadow: var(--shadow-xl);
}

.bg-dark {
    background: var(--dark-color) !important;
    border-color: var(--dark-color) !important;
    color: white;
}

.category-header {
    background: var(--dark-color);
    color: white;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    position: relative;
    z-index: 1;
}

.category-icon {
    position: relative;
    z-index: 1;
}



/* Progress Bars */
.progress {
    border-radius: 50px;
    background-color: #e2e8f0;
}

.progress-bar {
    border-radius: 50px;
    transition: width 0.6s ease;
}

/* Status and Priority Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge i {
    font-size: 0.875rem;
}


.task-header {
    background: var(--light-color);
}

.task-title a {
    color: var(--dark-color);
    transition: color 0.2s ease;
}

.task-title a:hover {
    color: var(--primary-color);
}

/* Archive Page Styles */
.archive-header {
    margin-bottom: 2rem;
}

.filter-controls, .view-controls {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.btn-group .btn {
    border-radius: 0.375rem;
}

.btn-group .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Single Task Styles */
.task-header-section {
    margin-bottom: 2rem;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: var(--secondary-color);
}

.breadcrumb-item.active {
    color: var(--dark-color);
}

.task-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-update-card {
    background: var(--light-color) !important;
    border: 1px solid var(--border-color);
}

/* Timeline Styles */
.progress-timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    border-left: 2px solid #e2e8f0;
    margin-left: 1rem;
}

.timeline-item:last-child {
    border-left: none;
    padding-bottom: 0;
}

.timeline-item.active {
    border-left-color: var(--warning-color);
}

.timeline-item.completed {
    border-left-color: var(--success-color);
}

.timeline-marker {
    position: absolute;
    left: -0.75rem;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--secondary-color);
}

.timeline-item.active .timeline-marker {
    border-color: var(--warning-color);
    color: var(--warning-color);
    background: #fef3c7;
}

.timeline-item.completed .timeline-marker {
    border-color: var(--success-color);
    color: var(--success-color);
    background: #dcfce7;
}

.timeline-content {
    padding-left: 1rem;
}

.timeline-content h6 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

/* Info Cards */
.info-card, .related-tasks, .category-stats {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.info-item {
    font-size: 0.9rem;
}

.related-item {
    border-bottom: 1px solid var(--border-color) !important;
}

.related-item:last-child {
    border-bottom: none !important;
}

/* Statistics */
.stats-card {
    border: 1px solid var(--border-color);
}


.stat-number {
    font-weight: 700;
    line-height: 1;
}

.stat-item {
    border-radius: 5px;
    padding: 1rem;
}


/* Footer */
.site-footer {
    background: var(--dark-color) !important;
    margin-top: auto;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links li a:hover {
    color: white;
}

.social-links a {
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
}

/* Back to Top Button */
.btn-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    border: none;
    box-shadow: var(--shadow-lg);
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.btn-back-to-top:hover {
    transform: translateY(-2px);
}

/* Table Styles */
.table th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
    background-color: var(--light-color);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Dropdown Menus */
.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
}

.dropdown-item {
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: var(--light-color);
}

/* Form Controls */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
}

.alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo-section {
        padding: 2rem 0;
        margin-bottom: 2rem;
    }
    
    .logo-section h1 {
        font-size: 2rem;
    }
    
    .category-card {
        margin-bottom: 1.5rem;
    }
    
    .task-header-section .row > div:first-child {
        margin-bottom: 1rem;
    }
    
    .btn-back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .timeline-item {
        padding-left: 1rem;
    }
    
    .progress-timeline {
        padding-left: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .category-header {
        padding: 1rem;
    }
    
    .category-body {
        padding: 1rem;
    }
    
    .task-card .p-4, .task-card .p-3 {
        padding: 1rem !important;
    }
    
    .logo-container {
        padding: 1.5rem;
    }
    
    .stats-card .row [class*="col-"] {
        margin-bottom: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Custom Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

/* Print Styles */
@media print {
    body {
        background: white !important;
    }
    
    .site-header, .site-footer, .btn, .dropdown, .filter-controls, .view-controls {
        display: none !important;
    }
    
    .category-card, .task-card, .info-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
    
    .container {
        max-width: none !important;
    }
}