* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #00d25b;
    --warning: #ffab2d;
    --danger: #ff4757;
    --dark: #333;
    --light: #f8f9fa;
    --white: #ffffff;
}

html, body {
    height: 100%;
}

body {
    background: url("/eventlog/assets/background.jpg");
    min-height: 100vh;
    display: flex;
    flex-direction: column;

}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("../background.jpg") no-repeat center center fixed;
    background-size: cover;
    filter: blur(8px); /* adjust blur strength */
    z-index: -1;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-box {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;

    max-height: 90vh;   /* prevents it from being too tall */
    overflow-y: auto;   /* adds scroll if content is long */
}

.login-box h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-box .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* Navigation */
.navbar {
    background: var(--white);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
    cursor: pointer;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--dark);
}

.btn-logout {
    background: var(--danger);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
}

.btn-logout:hover {
    background: #ff2e3d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,71,87,0.3);
}

/* Main Container */
.container {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-header h2 {
    color: var(--dark);
    font-size: 1.3rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background: var(--light);
    font-weight: 600;
    color: var(--dark);
}

.table tr:hover {
    background: #f5f5f5;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

/* Event Grid */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.event-card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-card h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.event-card .date {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.event-card .venue {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.event-card .description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-upcoming {
    background: var(--warning);
    color: var(--white);
}

.badge-ongoing {
    background: var(--success);
    color: var(--white);
}

.badge-completed {
    background: #666;
    color: var(--white);
}

.badge-admin {
    background: var(--primary);
    color: var(--white);
}

.badge-official {
    background: var(--secondary);
    color: var(--white);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--danger);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .event-grid {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table th,
    .table td {
        padding: 0.75rem;
    }
    
    .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        margin: 2px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .modal,
    .spinner {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .container {
        margin: 0;
        padding: 1rem;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary);
    padding: 0.5rem;
    transition: transform 0.3s;
    line-height: 1;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1002;
    transition: left 0.3s ease;
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu .nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mobile-menu .nav-links a {
    padding: 0.8rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
}

.mobile-menu .nav-links a:hover,
.mobile-menu .nav-links a.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border-bottom: none;
}

.mobile-user-info {
    border-top: 1px solid #ddd;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.mobile-user-info .user-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.mobile-user-info .btn-logout {
    width: 100%;
    text-align: center;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    backdrop-filter: blur(3px);
}

.menu-overlay.active {
    display: block;
}

/* Additional animations */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.mobile-menu.active {
    animation: slideIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.menu-overlay.active {
    animation: fadeIn 0.3s ease;
}
/* Footer Styles - Simplified */
.footer {
    background: var(--white);
    margin-top: 3rem;
    
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    width: 100%;
    position: relative;
    bottom: 0;
}

.footer-bottom {
    border-top: 1px solid #ddd;
    padding: 1.5rem 2rem;
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.footer-bottom p {
    margin: 0;
    line-height: 1.5;
}

/* Optional: Add a subtle gradient line at the top */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer {
        margin-top: 2rem;
       
    }
    
    .footer-bottom {
       
        font-size: 0.85rem;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .footer-bottom {
        padding: 0.8rem;
        font-size: 0.8rem;
    }
}



/* Mobile Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-section ul li a {
        display: block;
        padding: 0.5rem;
    }
}
.btn-profile {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
}

.btn-profile:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}
.logo-container {
            text-align: center;
            margin-bottom: 15px;
        }
        
        .logo-container img {
            max-width: 150px;
            height: auto;
            margin-bottom: 10px;
            animation: fadeIn 0.5s ease;
        }
       /* MOBILE TABLE FIX - Attendance & Events */
@media (max-width: 768px) {
    /* Hide table headers on mobile */
    .table thead {
        display: none;
    }
    
    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
    }
    
    .table tr {
        background: white;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border: 1px solid #eee;
    }
    
    /* Style each cell as a flex row with label */
    .table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 10px 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
        gap: 10px;
    }
    
    .table td:last-child {
        border-bottom: none;
        padding-bottom: 5px;
    }
    
    .table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary);
        min-width: 120px;
        flex-shrink: 0;
    }
    
    .table td span,
    .table td .badge,
    .table td button {
        text-align: right;
        flex: 1;
    }
    
    /* Action buttons on mobile */
    .table td:last-child {
        flex-direction: column;
        gap: 8px;
    }
    
    .table td:last-child::before {
        margin-bottom: 5px;
    }
    
    .table td:last-child button,
    .table td:last-child .btn {
        width: 100%;
        margin: 2px 0;
        text-align: center;
    }
    
    /* Fix badge alignment */
    .table td .badge {
        display: inline-block;
        text-align: center;
        min-width: 80px;
    }
}

/* For events table columns */
@media (max-width: 768px) {
    .table td[data-label="Title"]::before { content: "Title"; }
    .table td[data-label="Date"]::before { content: "Date"; }
    .table td[data-label="Time"]::before { content: "Time"; }
    .table td[data-label="Venue"]::before { content: "Venue"; }
    .table td[data-label="Status"]::before { content: "Status"; }
    .table td[data-label="Actions"]::before { content: "Actions"; }
    .table td[data-label="Event"]::before { content: "Event"; }
    .table td[data-label="Participant Name"]::before { content: "Participant Name"; }
    .table td[data-label="Contact"]::before { content: "Contact"; }
    .table td[data-label="Time In"]::before { content: "Time In"; }
    .table td[data-label="Time Out"]::before { content: "Time Out"; }
}
/* MOBILE ACTIVITY LOG TABLE */
@media (max-width: 768px) {

.activity-table thead {
    display: none;
}

.activity-table,
.activity-table tbody {
    display: block;
}

.activity-table tr {
    display: block;
    background: white;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.activity-table td {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: start;
    gap: 8px;
    padding: 6px 0;
    border: none;
    font-size: 14px;
}

.activity-table td::before {
    font-weight: 600;
    color: #666;
}

/* labels */
.activity-table td:nth-child(1)::before { content: "ID"; }
.activity-table td:nth-child(2)::before { content: "User"; }
.activity-table td:nth-child(3)::before { content: "Activity"; }
.activity-table td:nth-child(4)::before { content: "Date"; }

/* allow long text wrap */
.activity-table td:nth-child(3) {
    word-break: break-word;
}

}