/* ===================================
   SHARED DASHBOARD STYLES
   Used by: Admin, Institute panels
   =================================== */

/* ===================================
   STAT CARDS - Enhanced Light Theme
   =================================== */
.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8faf5 30%, #f0f5e8 100%) !important;
    border-left: 5px solid var(--olive-primary) !important;
    border-radius: 12px !important;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.1), 0 2px 4px rgba(0, 0, 0, 0.04);
    border-top: 1px solid #e8f0dc !important;
    border-right: 1px solid #e8f0dc !important;
    border-bottom: 1px solid #e8f0dc !important;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(107, 142, 35, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(107, 142, 35, 0.18), 0 4px 8px rgba(0, 0, 0, 0.06);
    border-left-width: 6px !important;
    border-color: #d0e0c0 !important;
}

.stat-card .stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(107, 142, 35, 0.12) 0%, rgba(107, 142, 35, 0.08) 100%);
    color: var(--olive-primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(107, 142, 35, 0.12);
}

.stat-card:hover .stat-icon {
    background: linear-gradient(135deg, #7a9a28 0%, var(--olive-primary) 100%);
    color: white;
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 6px 16px rgba(107, 142, 35, 0.3);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #2a4a1a;
    margin: 0.5rem 0;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.stat-label {
    font-size: 0.8rem;
    color: #4a6a3a;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-trend {
    font-size: 0.8125rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 2px solid #e5edd8;
    color: #4a6a4a;
}

/* ===================================
   WELCOME CARD - Enhanced Light Theme
   =================================== */
.welcome-card {
    background: linear-gradient(135deg, #7a9a28 0%, var(--olive-primary) 30%, #5a7a1f 70%, #4a6a18 100%);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(107, 142, 35, 0.25), 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.welcome-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.welcome-card h2 {
    color: white !important;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ===================================
   QUICK STAT CARDS - Enhanced Light Theme
   =================================== */
.quick-stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafcf8 50%, #f5f8f0 100%);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    border: 2px solid #d8e5c8;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.quick-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--olive-primary), #8ab032);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.quick-stat-card:hover {
    border-color: var(--olive-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(107, 142, 35, 0.15);
}

.quick-stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: #3a6a1a;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.quick-stat-label {
    font-size: 0.75rem;
    color: #5a7a4a;
    text-transform: uppercase;
    margin-top: 0.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ===================================
   CHART CARDS - Enhanced Light Theme
   =================================== */
.chart-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafcf8 50%, #f5f8f0 100%) !important;
    border-left: 4px solid var(--olive-primary) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    border-top: 1px solid #e5edd8 !important;
    border-right: 1px solid #e5edd8 !important;
    border-bottom: 1px solid #e5edd8 !important;
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.08);
}

.chart-card:hover {
    box-shadow: 0 12px 28px rgba(107, 142, 35, 0.15);
    transform: translateY(-3px);
    border-color: #d0dcc0 !important;
}

.chart-card .card-header {
    background: linear-gradient(135deg, #f8faf5 0%, #f0f5e8 100%) !important;
    border-bottom: 2px solid #e0e8d5 !important;
    padding: 1.25rem 1.5rem;
    color: #2a4a1a;
    font-weight: 600;
}

/* ===================================
   ACTIVITY FEED - Enhanced Light Theme
   =================================== */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 0.85rem 1rem;
    border-left: 3px solid #d8e5c8;
    margin-bottom: 0.75rem;
    background: linear-gradient(90deg, #ffffff 0%, #fafcf8 100%);
    border-radius: 0 10px 10px 0;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(107, 142, 35, 0.04);
}

.activity-item:hover {
    border-left-color: var(--olive-primary);
    border-left-width: 4px;
    background: linear-gradient(90deg, #f5f8f0 0%, #eef3e5 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.1);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    background: linear-gradient(135deg, rgba(107, 142, 35, 0.12) 0%, rgba(107, 142, 35, 0.06) 100%);
    color: var(--olive-primary);
    box-shadow: 0 2px 4px rgba(107, 142, 35, 0.1);
}

/* ===================================
   QUICK ACTION CARDS - Enhanced Light Theme
   =================================== */
.quick-action-card {
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid #d8e5c8;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    background: linear-gradient(135deg, #ffffff 0%, #fafcf8 50%, #f5f8f0 100%);
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--olive-primary), #8ab032, var(--olive-primary));
    background-size: 200% 100%;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.quick-action-card:hover {
    border-color: var(--olive-primary);
    background: linear-gradient(135deg, #f5f8f0 0%, #eef3e5 50%, #e8f0dc 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(107, 142, 35, 0.15);
    text-decoration: none;
}

.quick-action-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8faf5 100%);
    border: 2px solid #d8e5c8;
    color: #3a4a3a;
    transition: all 0.25s ease;
    font-weight: 500;
}

.quick-action-btn:hover {
    border-color: var(--olive-primary);
    background: linear-gradient(135deg, rgba(107, 142, 35, 0.12) 0%, rgba(107, 142, 35, 0.06) 100%);
    color: var(--olive-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.15);
}

.quick-action-btn i {
    color: var(--olive-primary);
}

/* ===================================
   PROGRESS BARS - Enhanced Light Theme
   =================================== */
.custom-progress {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, #e8f0dc 0%, #d8e5c8 100%);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(107, 142, 35, 0.1);
}

.custom-progress-bar {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, #7a9a28 0%, var(--olive-primary) 50%, #8ab032 100%);
    transition: width 1s ease;
    box-shadow: 0 2px 4px rgba(107, 142, 35, 0.25);
    position: relative;
}

.custom-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: 5px 5px 0 0;
}

/* ===================================
   OLIVE BUTTONS - Enhanced Light Theme
   =================================== */
.btn-olive {
    background: linear-gradient(135deg, #7a9a28 0%, var(--olive-primary) 50%, #5a7a1f 100%);
    border: none;
    color: white;
    box-shadow: 0 2px 8px rgba(107, 142, 35, 0.25);
    font-weight: 600;
}

.btn-olive:hover {
    background: linear-gradient(135deg, var(--olive-primary) 0%, #5a7a1f 50%, #4a6a18 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.35);
    transform: translateY(-1px);
}

.btn-outline-olive {
    color: var(--olive-primary);
    border: 2px solid var(--olive-primary);
    background: transparent;
    font-weight: 600;
}

.btn-outline-olive:hover {
    background: linear-gradient(135deg, #7a9a28 0%, var(--olive-primary) 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.25);
}

/* ===================================
   DARK MODE - DASHBOARD
   Uses consistent colors from theme.css:
   - bg-primary: #0f1410
   - bg-secondary: #1a1f16
   - bg-tertiary: #252c20
   - border: #2a352a
   =================================== */
[data-theme="dark"] .stat-card {
    background: linear-gradient(135deg, #1a1f1a 0%, #151a15 100%) !important;
    border-left-color: #7a9a3a !important;
}

[data-theme="dark"] .stat-value {
    color: #9aba4a;
}

[data-theme="dark"] .stat-label {
    color: #a0b0a0;
}

[data-theme="dark"] .stat-trend {
    border-top-color: #2a352a;
    color: #8a9a8a;
}

[data-theme="dark"] .welcome-card {
    background: linear-gradient(135deg, #2a3520 0%, #1f2a18 100%);
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.15);
}

[data-theme="dark"] .quick-stat-card {
    background: #1a1f1a;
    border-color: #2a352a;
}

[data-theme="dark"] .quick-stat-card:hover {
    border-color: #7a9a3a;
}

[data-theme="dark"] .quick-stat-value {
    color: #9aba4a;
}

[data-theme="dark"] .quick-stat-label {
    color: #8a9a8a;
}

[data-theme="dark"] .chart-card {
    background: #1a1f1a !important;
    border-left-color: #7a9a3a !important;
}

[data-theme="dark"] .chart-card .card-header {
    background-color: #1f251f !important;
    border-bottom-color: #2a352a !important;
    color: #d0dac0;
}

[data-theme="dark"] .activity-item {
    background: #1a1f1a;
    border-left-color: #2a352a;
}

[data-theme="dark"] .activity-item:hover {
    background: #1f251f;
    border-left-color: #7a9a3a;
}

[data-theme="dark"] .quick-action-card {
    background: #1a1f1a;
    border-color: #2a352a;
}

[data-theme="dark"] .quick-action-card:hover {
    background: #1f251f;
    border-color: #7a9a3a;
}

[data-theme="dark"] .quick-action-btn {
    background: #1f251f;
    border-color: #2a352a;
    color: #c0cac0;
}

[data-theme="dark"] .quick-action-btn:hover {
    background: rgba(107, 142, 35, 0.15);
    border-color: #7a9a3a;
    color: #9aba4a;
}

[data-theme="dark"] .quick-action-btn i {
    color: #9aba4a;
}

[data-theme="dark"] .custom-progress {
    background: #2a352a;
}

[data-theme="dark"] .custom-progress-bar {
    background: linear-gradient(90deg, #7a9a3a, #9aba4a);
}

[data-theme="dark"] .btn-outline-olive {
    color: #9aba4a;
    border-color: #6a8a2a;
}

[data-theme="dark"] .btn-outline-olive:hover {
    background: #6a8a2a;
    border-color: #6a8a2a;
    color: white;
}

/* ===================================
   LIGHT THEME EXPLICIT OVERRIDES
   =================================== */
[data-theme="light"] .stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8faf5 30%, #f0f5e8 100%) !important;
    border-color: #e8f0dc !important;
}

[data-theme="light"] .stat-value {
    color: #2a4a1a;
}

[data-theme="light"] .stat-label {
    color: #4a6a3a;
}

[data-theme="light"] .stat-trend {
    color: #4a6a4a;
    border-top-color: #e5edd8;
}

[data-theme="light"] .welcome-card {
    background: linear-gradient(135deg, #7a9a28 0%, var(--olive-primary) 30%, #5a7a1f 70%, #4a6a18 100%);
}

[data-theme="light"] .quick-stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafcf8 50%, #f5f8f0 100%);
    border-color: #d8e5c8;
}

[data-theme="light"] .quick-stat-card:hover {
    border-color: var(--olive-primary);
    box-shadow: 0 8px 20px rgba(107, 142, 35, 0.15);
}

[data-theme="light"] .quick-stat-value {
    color: #3a6a1a;
}

[data-theme="light"] .quick-stat-label {
    color: #5a7a4a;
}

[data-theme="light"] .chart-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafcf8 50%, #f5f8f0 100%) !important;
    border-color: #e5edd8 !important;
}

[data-theme="light"] .chart-card .card-header {
    background: linear-gradient(135deg, #f5f8f0 0%, #eef3e5 100%);
    border-bottom-color: #e5edd8;
    color: #3a5a2a;
}

[data-theme="light"] .activity-item {
    background: #ffffff;
    border-color: #e5edd8;
}

[data-theme="light"] .activity-item:hover {
    background: #fafcf8;
    border-color: #d0e0c0;
}

[data-theme="light"] .quick-action-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafcf8 100%);
    border-color: #e5edd8;
}

[data-theme="light"] .quick-action-card:hover {
    border-color: var(--olive-primary);
    box-shadow: 0 8px 20px rgba(107, 142, 35, 0.15);
}

[data-theme="light"] .quick-action-btn {
    background: linear-gradient(135deg, #f5f8f0 0%, #eef3e5 100%);
    color: #4a6a3a;
    border-color: #d8e5c8;
}

[data-theme="light"] .quick-action-btn:hover {
    background: linear-gradient(135deg, #7a9a28 0%, var(--olive-primary) 100%);
    color: white;
}

[data-theme="light"] .quick-action-btn i {
    color: #6B8E23;
}

[data-theme="light"] .custom-progress {
    background: #e8f0dc;
}

[data-theme="light"] .custom-progress-bar {
    background: linear-gradient(90deg, #6B8E23, #7a9a28);
}

[data-theme="light"] .btn-outline-olive {
    color: #5a7a1f;
    border-color: #6B8E23;
}

[data-theme="light"] .btn-outline-olive:hover {
    background: #6B8E23;
    border-color: #6B8E23;
    color: white;
}
