/* Custom CSS for Relation & Media Dashboard */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #1abc9c;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: var(--primary-color);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

/* App Header */
.app-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

/* Navigation */
.app-nav {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

.app-nav .nav-link {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    color: var(--primary-color);
    transition: all 0.3s;
}

.app-nav .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.app-nav .nav-link:hover:not(.active) {
    background: var(--light-color);
}

/* Stat Cards */
.stat-card {
    border-radius: 12px;
    padding: 25px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.bg-primary { background: linear-gradient(135deg, #3498db, #2980b9); }
.stat-card.bg-success { background: linear-gradient(135deg, #27ae60, #219653); }
.stat-card.bg-warning { background: linear-gradient(135deg, #f39c12, #e67e22); }
.stat-card.bg-info { background: linear-gradient(135deg, #1abc9c, #16a085); }

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.stat-info h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.stat-info p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem;
    border-radius: 12px 12px 0 0 !important;
}

/* Tables */
.table th {
    font-weight: 600;
    color: var(--primary-color);
    border-top: none;
}

.table td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* Media Cards */
.media-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
    height: 100%;
}

.media-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.1);
}

.media-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.media-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.media-category {
    background: #e3f2fd;
    color: var(--secondary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.media-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-content {
    color: #6c757d;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

/* Activities List */
.activities-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 12px 0;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    align-items: flex-start;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.activity-icon.mou {
    background: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
}

.activity-icon.media {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.activity-icon.system {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.activity-details h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.activity-details p {
    margin: 3px 0 0 0;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Status Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 20px;
}

.badge.active {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.badge.ending {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
}

.badge.expired {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

.badge.published {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.badge.draft {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* Footer */
.app-footer {
    background: var(--primary-color);
    color: white;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-info h3 {
        font-size: 2rem;
    }
    
    .app-nav .nav-link {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}