/* Base Styles (Mobile First) - New Color Palette & Glassmorphic Elements */
body {
    font-family: 'Roboto', sans-serif; 
    background-color: #eaeaea; /* Very light gray */
    margin: 0;
    padding-bottom: 60px; /* Space for mobile bottom nav */
    color: #333333; /* Default text color */
}

.page-container {
    display: flex;
    flex-direction: column; /* Stack content vertically on mobile */
    min-height: 100vh;
}

.sidebar {
    display: none; /* Hidden by default on mobile */
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background-color: #183e4b; /* Even Darker Blue/Teal */
    color: #eaeaea; /* Light text for contrast */
    padding: 20px 15px; 
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 1000;
    transform: translateX(-100%); 
    transition: transform 0.3s ease-in-out;
}

.sidebar.active {
    transform: translateX(0); 
    display: flex; 
    flex-direction: column;
}

.sidebar h3 {
    text-align: left; 
    margin-bottom: 25px; 
    font-size: 22px; 
    color: #ffffff; /* White for title */
    padding: 15px 15px 10px 15px; 
    width: 100%; 
}

.menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.menu li a {
    display: block;
    padding: 10px 15px; 
    color: #eaeaea; /* Light text for contrast */
    text-decoration: none;
    border-radius: 6px; 
    margin-bottom: 5px; 
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.menu li a:hover {
    background-color: #1b4552; /* Dark Blue/Teal for hover */
    color: #ffffff; 
}

.menu li a.active {
    background-color: #1b4552; /* Dark Blue/Teal for active */
    color: #ffffff; 
    font-weight: 600; 
}

/* Submenu Styles */
.submenu {
    list-style-type: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.submenu.active {
    max-height: 200px; 
}

.submenu li a {
    padding: 6px 15px; 
    font-size: 0.8em; 
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #ffffff;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04); 
}

.app-brand {
    font-size: 20px;
    font-weight: 600;
    color: #1b4552; /* Dark Blue/Teal for brand */
}

header h2 {
    margin: 0;
    font-size: 20px;
    color: #333333;
    font-weight: 600;
}

.user-info {
    font-weight: 500;
    color: #666666;
    display: none; 
}

.menu-toggle {
    display: block; 
    background: none;
    border: none;
    color: #666666;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}

main {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
}

.page-subheader {
    padding: 15px 20px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    color: #212529;
    font-size: 1.2em;
    font-weight: 600;
}

/* General Content Styles - Glassmorphic inspired */
.content-box {
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
    padding: 20px;
    border-radius: 12px; /* More rounded */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Subtle shadow */
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Light, semi-transparent border */
    backdrop-filter: blur(5px); /* Glassmorphic blur effect */
    -webkit-backdrop-filter: blur(5px); /* Safari support */
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 15px;
    margin-bottom: 15px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Alert Styles */
.alert {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    border-radius: 6px; 
    font-size: 0.9em;
}

.alert-success {
    color: #155724;
    background-color: #d1e7dd;
    border-color: #8ba0a4; 
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #d74a49; 
}

.alert-info {
    color: #055160;
    background-color: #d0f2f7;
    border-color: #1b4552; 
}

/* Status Badge Styles */
.status-badge {
    padding: 4px 8px;
    border-radius: 16px; 
    color: #fff;
    font-size: 0.75em;
    text-transform: uppercase; 
    font-weight: 600;
}
.status-pending { background-color: #8ba0a4; color: #333333; } 
.status-approved { background-color: #1b4552; } 
.status-rejected { background-color: #d74a49; } 
.status-enrolled { background-color: #1b4552; } 
.status-completed { background-color: #1b4552; } 
.status-failed { background-color: #d74a49; } 

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9em;
}

.data-table th, .data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eeeeee; 
    text-align: left;
    word-wrap: break-word;
}

.data-table th {
    background-color: #f8f8f8; 
    font-weight: 600;
    color: #495057;
    border-top: none; 
}

.data-table tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

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

.action-links a {
    margin-right: 8px;
    text-decoration: none;
    color: #1b4552; 
}

.action-links a:hover {
    text-decoration: underline;
}

.delete-link {
    color: #d74a49; 
}

.delete-link:hover {
    color: #b03a3a;
}

/* Form specific styles */
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dddddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 0.95em;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1b4552; 
    box-shadow: 0 0 0 0.25rem rgba(27, 69, 82, 0.15); 
    outline: 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px; 
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

.btn-primary {
    background-color: #1b4552; 
    color: white;
}

.btn-primary:hover {
    background-color: #102a33;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.btn-secondary {
    background-color: #8ba0a4; 
    color: white;
}

.btn-secondary:hover {
    background-color: #7a8e92;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8em;
}

.btn-success {
    background-color: #1b4552; 
}

.btn-success:hover {
    background-color: #102a33;
}

.btn-danger {
    background-color: #d74a49; 
    color: white;
}

.btn-danger:hover {
    background-color: #b03a3a;
}

.btn-info {
    background-color: #8ba0a4; 
    color: #333333;
}

.btn-info:hover {
    background-color: #7a8e92;
}

.btn-warning {
    background-color: #8ba0a4; 
    color: #333333;
}

.btn-warning:hover {
    background-color: #7a8e92;
}

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

.filter-form {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap; 
    align-items: center;
    gap: 10px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
    gap: 15px;
    margin-top: 15px;
}

.summary-cards .card {
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
    padding: 15px;
    border-radius: 12px; /* More rounded */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Subtle shadow */
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Light, semi-transparent border */
    backdrop-filter: blur(5px); /* Glassmorphic blur effect */
    -webkit-backdrop-filter: blur(5px); /* Safari support */
}

.summary-cards .card h4 {
    color: #1b4552;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.summary-cards .card p {
    font-size: 1.8em;
    font-weight: bold;
    color: #333333;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 15px;
}
.profile-item strong {
    display: block;
    color: #495057;
    margin-bottom: 4px;
}
.profile-item p {
    margin: 0;
    font-size: 1em;
}

/* Quick Access Card Styles */
.quick-access-card {
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
    border-radius: 12px; /* More rounded */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Subtle shadow */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Light, semi-transparent border */
    backdrop-filter: blur(5px); /* Glassmorphic blur effect */
    -webkit-backdrop-filter: blur(5px); /* Safari support */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.quick-access-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.quick-access-card .card-body {
    padding: 15px;
}

.quick-access-card .card-text {
    font-size: 0.9em;
    font-weight: 500;
    color: #333333;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #ffffff;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    border-top: 1px solid #e0e0e0; 
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666666;
    font-size: 0.7em;
    flex-grow: 1;
    padding: 5px;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.2em;
    margin-bottom: 3px;
}

.mobile-bottom-nav .nav-item.active {
    color: #1b4552; 
}

.mobile-bottom-nav .nav-item:hover {
    color: #1b4552;
}

/* Desktop Styles (min-width media query) */
@media (min-width: 992px) { 
    body {
        padding-bottom: 0; 
    }

    .page-container {
        flex-direction: row; 
    }

    .sidebar {
        display: flex; 
        position: fixed; 
        top: 0;
        left: 0;
        transform: translateX(0); 
    }

    .main-content {
        margin-left: 250px; 
    }

    header {
        justify-content: space-between; 
    }

    .app-brand {
        font-size: 24px; 
        margin-right: 20px; 
    }

    header h2 {
        display: none; 
    }

    .user-info {
        display: flex; 
    }

    .page-subheader {
        display: none; 
    }

    main {
        padding: 25px;
    }

    .content-box {
        padding: 25px;
        margin-bottom: 20px;
    }

    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
        gap: 20px;
        margin-bottom: 20px;
    }

    .alert {
        padding: 15px;
        margin-bottom: 20px;
        font-size: 1em;
    }

    .data-table {
        font-size: 1em;
        margin-top: 20px;
    }

    .data-table th, .data-table td {
        padding: 12px 15px;
    }

    .action-links a {
        margin-right: 10px;
    }

    .form-group input[type="text"],
    .form-group input[type="password"],
    .form-group input[type="email"],
    .form-group input[type="date"],
    .form-group input[type="time"],
    .form-group input[type="number"],
    .form-group select,
.form-group textarea {
        padding: 10px;
        font-size: 1em;
    }

    .form-group label {
        margin-bottom: 5px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1em;
    }

    .table-header {
        margin-bottom: 20px;
    }

    .filter-form {
        margin-bottom: 20px;
        flex-wrap: nowrap;
    }

    .summary-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        margin-top: 20px;
    }

    .summary-cards .card {
        background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
        padding: 15px;
        border-radius: 12px; /* More rounded */
        box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Subtle shadow */
        text-align: center;
        border: 1px solid rgba(255, 255, 255, 0.3); /* Light, semi-transparent border */
        backdrop-filter: blur(5px); /* Glassmorphic blur effect */
        -webkit-backdrop-filter: blur(5px); /* Safari support */
    }

    .summary-cards .card h4 {
        color: #1b4552;
        margin-bottom: 8px;
        font-size: 1.1em;
    }

    .summary-cards .card p {
        font-size: 1.8em;
        font-weight: bold;
        color: #333333;
    }

    .profile-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    .profile-item strong {
        margin-bottom: 5px;
    }
    .profile-item p {
        font-size: 1.1em;
    }

    .mobile-bottom-nav {
        display: none; 
    }
}