/* Dashboard CSS - External file to avoid CSP violations */

:root {
    --primary-color: #415081;
    --success-color: #2ba766;
    --warning-color: #e3cc2b;
    --danger-color: #f12317;
    --info-color: #5197dc;
    --dark-color: #062b02;
    --light-color: #dde0ca;
    --border-radius: 0;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.2s ease-in-out;
}

/* Dashboard Container */
.dashboard-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding-bottom: 2rem;
}

/* Dashboard Header */
.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.dashboard-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Metric Cards */
.metric-card {
    border-radius: var(--border-radius);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    height: 100%;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1));
    pointer-events: none;
}

.metric-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.metric-content {
    position: relative;
    z-index: 1;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.metric-trend {
    font-size: 0.75rem;
    font-weight: 600;
}

.metric-trend.positive {
    color: rgba(255, 255, 255, 0.9);
}

.metric-trend.negative {
    color: rgba(255, 255, 255, 0.8);
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--success-color), var(--dark-color));
}

.bg-gradient-warning {
    background: linear-gradient(135deg, var(--warning-color), var(--dark-color));
}

.bg-gradient-info {
    background: linear-gradient(135deg, var(--info-color), var(--dark-color));
}

/* Dashboard Cards */
.dashboard-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.dashboard-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.dashboard-card .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

/* Table Enhancements */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--dark-color);
    background: rgba(0, 0, 0, 0.02);
}

.table td {
    vertical-align: middle;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dashboard Truncate */
.dashboard-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-truncate.dashboard-truncate-small {
    max-width: 120px;
}

.dashboard-truncate.dashboard-truncate-medium {
    max-width: 180px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 0.5rem 0;
    }
    
    .metric-card {
        padding: 1rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .dashboard-card .card-body {
        padding: 1rem;
    }
    
    .dashboard-truncate {
        max-width: 150px;
    }
}

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

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

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    animation: spin 1s linear infinite;
}

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

/* Dark Mode Styles */
[data-theme="dark"] .dashboard-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

[data-theme="dark"] .dashboard-header {
    background: rgba(45, 45, 45, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dashboard-card {
    background: rgba(45, 45, 45, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

[data-theme="dark"] .table td {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Quick Link Cards */
.quick-link-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--white, #ffffff);
    border: 1px solid var(--border-color, #e9ecef);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary, #495057);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(65, 80, 129, 0.15);
    border-color: var(--primary-color, #012C19);
    color: var(--primary-color, #012C19);
    text-decoration: none;
}

.quick-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color, #012C19);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.quick-link-card:hover::before {
    transform: scaleY(1);
}

.quick-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color, #012C19), var(--primary-light, #1a4d2e));
    border-radius: 12px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.quick-link-icon i {
    font-size: 1.25rem;
    color: var(--white, #ffffff);
}

.quick-link-content {
    flex: 1;
    min-width: 0;
}

.quick-link-title {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: #212529;
    transition: color 0.3s ease;
}

.quick-link-desc {
    margin: 0;
    color: #6c757d;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.quick-link-card:hover .quick-link-title {
    color: #012C19;
}

.quick-link-card:hover .quick-link-desc {
    color: #1a4d2e;
}

.quick-link-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.quick-link-arrow i {
    font-size: 0.875rem;
    color: #6c757d;
    transition: all 0.3s ease;
}

.quick-link-card:hover .quick-link-arrow {
    background: #012C19;
    transform: translateX(4px);
}

.quick-link-card:hover .quick-link-arrow i {
    color: #ffffff;
}

/* Dark mode quick link cards */
[data-theme="dark"] .quick-link-card {
    background: #2d2d2d;
    border-color: #404040;
    color: #ffffff;
}

[data-theme="dark"] .quick-link-card:hover {
    border-color: #012C19;
    color: #012C19;
}

[data-theme="dark"] .quick-link-title {
    color: #ffffff;
}

[data-theme="dark"] .quick-link-desc {
    color: #adb5bd;
}

[data-theme="dark"] .quick-link-arrow {
    background: #404040;
}

[data-theme="dark"] .quick-link-arrow i {
    color: #adb5bd;
}

[data-theme="dark"] .quick-link-card:hover .quick-link-arrow {
    background: #012C19;
}

[data-theme="dark"] .quick-link-card:hover .quick-link-arrow i {
    color: #ffffff;
}

/* Horizontal Quick Link Cards */
.quick-link-card-horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    height: 100%;
}

.quick-link-card-horizontal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 44, 25, 0.15);
    border-color: #012C19;
    color: #012C19;
    text-decoration: none;
}

.quick-link-card-horizontal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #012C19;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.quick-link-card-horizontal:hover::before {
    transform: scaleX(1);
}

.quick-link-icon-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #012C19, #1a4d2e);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.quick-link-icon-small i {
    font-size: 1rem;
    color: #ffffff;
}

.quick-link-content-small {
    flex: 1;
    min-width: 0;
}

.quick-link-title-small {
    margin: 0;
    font-weight: 600;
    font-size: 0.85rem;
    color: #212529;
    transition: color 0.3s ease;
    line-height: 1.2;
}

.quick-link-desc-small {
    margin: 0;
    color: #6c757d;
    font-size: 0.7rem;
    transition: color 0.3s ease;
    line-height: 1.2;
}

.quick-link-card-horizontal:hover .quick-link-title-small {
    color: #012C19;
}

.quick-link-card-horizontal:hover .quick-link-desc-small {
    color: #1a4d2e;
}

/* Mobile: Vertical Layout */
@media (max-width: 767.98px) {
    .quick-link-card-horizontal {
        flex-direction: row;
        text-align: left;
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .quick-link-icon-small {
        margin-bottom: 0;
        margin-right: 0.75rem;
        width: 36px;
        height: 36px;
    }
    
    .quick-link-icon-small i {
        font-size: 0.9rem;
    }
    
    .quick-link-title-small {
        font-size: 0.9rem;
    }
    
    .quick-link-desc-small {
        font-size: 0.75rem;
    }
}

/* Dark mode horizontal quick link cards */
[data-theme="dark"] .quick-link-card-horizontal {
    background: #2d2d2d;
    border-color: #404040;
    color: #ffffff;
}

[data-theme="dark"] .quick-link-card-horizontal:hover {
    border-color: #012C19;
    color: #012C19;
}

[data-theme="dark"] .quick-link-title-small {
    color: #ffffff;
}

[data-theme="dark"] .quick-link-desc-small {
    color: #adb5bd;
}


