/* UMCAT Campus Lecture Monitoring System - Professional Styling */
/* Brand Colors: White & Red theme */

:root {
    --umcat-red: #C41E3A;        /* UMCAT Primary Red */
    --umcat-red-dark: #8B0000;   /* Dark Red for gradients */
    --umcat-red-light: #FF6B6B;  /* Light Red for accents */
    --umcat-white: #FFFFFF;      /* Pure White */
    --umcat-off-white: #F8F9FA;  /* Off-white for backgrounds */
    --umcat-gold: #FFD700;       /* Gold accent for excellence */
    --umcat-success: #28a745;
    --umcat-danger: #dc3545;
    --umcat-warning: #ffc107;
    --umcat-info: #17a2b8;
    --umcat-dark: #2c3e50;
    --umcat-light: #f8f9fa;
    --umcat-gray: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--umcat-white) 0%, var(--umcat-off-white) 100%);
    min-height: 100vh;
}

/* Sidebar - UMCAT White & Red Theme */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--umcat-white) 0%, #FFF5F5 100%);
    box-shadow: 3px 0 15px rgba(0,0,0,0.08);
    position: fixed;
    width: 280px;
    transition: all 0.3s;
    border-right: 4px solid var(--umcat-red);
}

.sidebar .umcat-logo {
    background: rgba(196, 30, 58, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin: 15px;
    text-align: center;
    border: 1px solid rgba(196, 30, 58, 0.15);
}

.sidebar .umcat-logo i {
    font-size: 3rem;
    color: var(--umcat-red);
    margin-bottom: 10px;
}

.sidebar .umcat-logo h4 {
    color: var(--umcat-red);
    font-weight: 700;
    margin: 10px 0 5px;
}

.sidebar .umcat-logo p {
    color: var(--umcat-gray);
    font-size: 0.75rem;
}

.sidebar .nav-link {
    color: #333;
    padding: 12px 20px;
    margin: 5px 10px;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar .nav-link:hover {
    background: rgba(196, 30, 58, 0.08);
    transform: translateX(5px);
    color: var(--umcat-red);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--umcat-red), var(--umcat-red-dark));
    color: white;
    box-shadow: 0 4px 10px rgba(196, 30, 58, 0.25);
}

.sidebar .nav-link i {
    width: 25px;
    margin-right: 12px;
    font-size: 1.1rem;
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    padding: 20px 30px;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
    margin-bottom: 25px;
    overflow: hidden;
    background: var(--umcat-white);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.1);
}

.card-header {
    background: linear-gradient(135deg, var(--umcat-red) 0%, var(--umcat-red-dark) 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    border: none;
}

.card-header h5, .card-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
}

.card-header i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Statistics Cards - Red Theme */
.stat-card {
    background: linear-gradient(135deg, var(--umcat-red) 0%, var(--umcat-red-dark) 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.35);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.9);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 10px 0;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Buttons - Red Theme */
.btn-primary {
    background: linear-gradient(135deg, var(--umcat-red) 0%, var(--umcat-red-dark) 100%);
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(196, 30, 58, 0.4);
    background: linear-gradient(135deg, var(--umcat-red-dark) 0%, #6B0000 100%);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--umcat-red);
    color: var(--umcat-red);
    background: transparent;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--umcat-red), var(--umcat-red-dark));
    border-color: var(--umcat-red);
    color: white;
}

.btn-success {
    background: var(--umcat-success);
    border: none;
}

.btn-warning {
    background: var(--umcat-warning);
    border: none;
    color: #333;
}

/* Welcome Banner - Red Theme */
.welcome-message {
    background: linear-gradient(135deg, var(--umcat-red), var(--umcat-red-dark));
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.welcome-message::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    transform: rotate(45deg);
}

.welcome-message i {
    font-size: 3rem;
    color: var(--umcat-white);
    margin-bottom: 15px;
    opacity: 0.9;
}

.welcome-message h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.welcome-message p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Tables - Red Header */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, var(--umcat-red) 0%, var(--umcat-red-dark) 100%);
    color: white;
    border: none;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.table tbody tr {
    transition: background 0.2s;
}

.table tbody tr:hover {
    background: rgba(196, 30, 58, 0.04);
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--umcat-red);
    box-shadow: 0 0 0 0.2rem rgba(196, 30, 58, 0.2);
}

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

.badge-success {
    background: var(--umcat-success);
    color: white;
}

.badge-warning {
    background: var(--umcat-warning);
    color: #333;
}

.badge-info {
    background: var(--umcat-info);
    color: white;
}

.badge-danger {
    background: var(--umcat-danger);
    color: white;
}

/* Progress Bars - Red Theme */
.progress {
    border-radius: 10px;
    height: 25px;
    background: #e9ecef;
}

.progress-bar {
    background: linear-gradient(90deg, var(--umcat-red) 0%, var(--umcat-red-dark) 100%);
    border-radius: 10px;
    font-weight: 600;
    line-height: 25px;
    color: white;
}

/* QR Container */
.qr-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(196, 30, 58, 0.1);
}

/* Alerts */
.alert {
    border-radius: 10px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-left-color: var(--umcat-success);
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-left-color: var(--umcat-danger);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-left-color: var(--umcat-warning);
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-left-color: var(--umcat-info);
    color: #0c5460;
}

/* Footer - Red/White Theme */
footer {
    background: linear-gradient(135deg, var(--umcat-red), var(--umcat-red-dark));
    color: white;
    padding: 30px 0 20px;
    margin-top: 50px;
    border-radius: 15px 15px 0 0;
}

footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--umcat-white);
    text-decoration: underline;
}

.social-icons {
    margin-top: 15px;
}

.social-icons a {
    display: inline-block;
    margin: 0 10px;
    font-size: 1.3rem;
    transition: transform 0.3s;
}

.social-icons a:hover {
    transform: translateY(-3px);
    color: var(--umcat-white);
}

/* Course Cards - Red Border */
.course-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    transition: all 0.3s;
    border-left: 4px solid var(--umcat-red);
}

.course-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(196, 30, 58, 0.1);
}

.course-code {
    color: var(--umcat-red);
    font-weight: bold;
    font-size: 1rem;
}

.course-name {
    color: var(--umcat-dark);
    font-size: 1rem;
    margin: 8px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .welcome-message h4 {
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(196, 30, 58, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(196, 30, 58, 0);
    }
}

.card, .stat-card, .course-card {
    animation: fadeInUp 0.5s ease-out;
}

.btn-primary:focus {
    animation: pulse 0.5s ease-out;
}

/* Custom Scrollbar - Red Theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--umcat-red-dark);
}

/* Utility Classes */
.text-umcat-red {
    color: var(--umcat-red);
}

.bg-umcat-red {
    background: var(--umcat-red);
}

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

.border-umcat-red {
    border-color: var(--umcat-red);
}

.shadow-umcat {
    box-shadow: 0 5px 15px rgba(196, 30, 58, 0.15);
}

/* Loading Spinner */
.spinner-umcat {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(196, 30, 58, 0.1);
    border-top-color: var(--umcat-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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