﻿/**
 * Events@CIIL Stylesheet + Bootstrap 4 Compatibility Helpers
 */

:root {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #0f766e;
    --accent-color: #f59e0b;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
}

.main-content {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Bootstrap 5 utility polyfills for CIIL Bootstrap 4 base */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fs-1 { font-size: 2.25rem !important; }
.fs-4 { font-size: 1.35rem !important; }
.fs-6 { font-size: 0.95rem !important; }
.rounded-3 { border-radius: 0.5rem !important; }
.rounded-4 { border-radius: 0.75rem !important; }
.opacity-75 { opacity: 0.75 !important; }
.text-white-50 { color: rgba(255, 255, 255, 0.85) !important; }
.border-4 { border-width: 4px !important; }
.border-start { border-left: 4px solid #dee2e6 !important; }
.border-start.border-success { border-left-color: #28a745 !important; }
.border-start.border-info { border-left-color: #17a2b8 !important; }
.border-start.border-secondary { border-left-color: #6c757d !important; }
.border-start.border-primary { border-left-color: #007bff !important; }
.bg-success-subtle { background-color: #dcfce7 !important; }
.bg-info-subtle { background-color: #cffafe !important; }
.bg-secondary-subtle { background-color: #e2e8f0 !important; }
.bg-primary-subtle { background-color: #dbeafe !important; }
.bg-danger-subtle { background-color: #fee2e2 !important; }
.bg-warning-subtle { background-color: #fef3c7 !important; }
.text-warning-emphasis { color: #92400e !important; }
.border-success-subtle { border-color: #86efac !important; }
.border-info-subtle { border-color: #67e8f9 !important; }
.border-secondary-subtle { border-color: #cbd5e1 !important; }
.border-danger-subtle { border-color: #fca5a5 !important; }
.border-warning-subtle { border-color: #fcd34d !important; }
.text-bg-primary { background-color: #007bff !important; color: #fff !important; }
.text-bg-secondary { background-color: #6c757d !important; color: #fff !important; }
.form-select {
    display: block;
    width: 100%;
    height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

/* Dashboard Metric Cards */
.metric-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 1.25rem;
}

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

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* Forms */
.form-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
    padding: 2rem;
}

.form-label.required::after {
    content: " *";
    color: #dc2626;
    font-weight: bold;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.2);
}

.input-hint {
    font-size: 0.825rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Section Dividers */
.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    margin-top: 1rem;
}

/* Badges */
.badge-unit {
    background-color: #e0e7ff;
    color: #3730a3;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge-type {
    background-color: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge-cat-Internal {
    background-color: #dcfce7;
    color: #166534;
}

.badge-cat-External {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-cat-Confidential {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-cat-Collaborative {
    background-color: #f3e8ff;
    color: #6b21a8;
}

/* Tables */
.table-container {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.table th {
    background-color: #f1f5f9;
    color: #334155;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

/* Filter Card */
.filter-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Modal details */
.detail-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.detail-value {
    color: #0f172a;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Programme Tiles */
.programme-tile {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.programme-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow) !important;
}

.programme-tile-banner {
    height: 170px;
    width: 100%;
    object-fit: cover;
}

.border-top-success {
    border-top: 4px solid #28a745 !important;
}

.border-top-primary {
    border-top: 4px solid #007bff !important;
}
