
:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-color: #5a5c69;
    --light-bg: #f8f9fc;
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: #333;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    background-image: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.close-sidebar-mobile {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    z-index: 1001;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.logo {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 2rem;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin-bottom: 0.5rem;
}

.sidebar nav ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar nav ul li a i {
    margin-right: 0.8rem;
    width: 20px;
    text-align: center;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li.active a,
.sidebar nav ul li a.active {
    color: white;
    background-color: rgba(255,255,255,0.1);
}

.logout {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.logout a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 500;
}

.main-content.expanded {
    margin-left: 0;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 2rem;
}

.toggle-sidebar {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 1.5rem;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.toggle-sidebar:hover {
    background-color: #f1f1f1;
    color: var(--primary-color);
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f1f3f9;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    width: 300px;
}

.search-box input {
    border: none;
    background: transparent;
    margin-left: 0.5rem;
    outline: none;
    width: 100%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.notifications-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--secondary-color);
    transition: color 0.3s;
}

.notifications-bell:hover {
    color: var(--primary-color);
}

.bell-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #e74a3b;
    color: white;
    border-radius: 50%;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    min-width: 18px;
    text-align: center;
    border: 2px solid white;
}

.user-info span {
    font-weight: 600;
}

.profile-pic i {
    font-size: 2rem;
    color: var(--secondary-color);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    display: flex;
    align-items: center;
    border-left: 4px solid var(--primary-color);
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.icon-box.blue { background: rgba(78, 115, 223, 0.1); color: var(--primary-color); }
.icon-box.green { background: rgba(28, 200, 138, 0.1); color: var(--success-color); }
.icon-box.orange { background: rgba(246, 194, 62, 0.1); color: var(--warning-color); }
.icon-box.red { background: rgba(231, 74, 59, 0.1); color: var(--danger-color); }

.stat-info h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.stat-info p {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }

    .main-content:not(.expanded) {
        margin-left: var(--sidebar-width);
    }
}

@media (min-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    :root {
        --sidebar-width: 260px;
    }

    .sidebar {
        padding: 1rem;
    }

    .logo {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .sidebar, .sidebar.collapsed {
        transform: translateX(-100%) !important;
    }

    .sidebar.active {
        transform: translateX(0) !important;
    }

    .close-sidebar-mobile {
        display: block;
    }

    .main-content, .main-content.expanded {
        padding: 1rem;
        margin-left: 0 !important;
    }

    .top-bar {
        padding: 0.75rem 1rem;
    }

    .toggle-sidebar {
        font-size: 1.5rem;
        padding: 0.75rem;
        margin-right: 1rem;
        color: var(--primary-color);
    }

    .search-box {
        width: 160px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

.table-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1rem;
    color: var(--primary-color);
}

.view-all {
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-decoration: none;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #e3e6f0;
}

table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--secondary-color);
    background: #fdfdfe;
}

.status-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-badge.assigned { background: #dddfeb; color: #5a5c69; }
.status-badge.submitted { background: #36b9cc; color: white; }
.status-badge.reviewed { background: #1cc88a; color: white; }
.status-badge.overdue { background: #e74a3b; color: white; }

/* Attendance Card Styling */
.attendance-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.05);
    margin-bottom: 2.5rem;
    border-left: 5px solid var(--info-color);
    transition: transform 0.3s ease;
}

.attendance-card:hover {
    transform: translateY(-3px);
}

.attendance-card .card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.attendance-info h3 {
    color: #2e3b4e;
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.attendance-info h3 i {
    color: var(--info-color);
}

.attendance-info p {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.attendance-form {
    display: flex;
    gap: 0.75rem;
    flex-grow: 1;
    max-width: 450px;
}

.attendance-form input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e3e6f0;
    border-radius: 8px;
    outline: none;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: border-color 0.3s;
}

.attendance-form input:focus {
    border-color: var(--info-color);
}

.btn-mark {
    padding: 0.8rem 1.5rem;
    background: var(--info-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(54, 185, 204, 0.2);
}

.btn-mark:hover {
    background: #2c9faf;
    box-shadow: 0 6px 12px rgba(54, 185, 204, 0.3);
}

/* Alert Styling */
.alert {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: #e6fffa;
    color: #234e52;
    border: 1px solid #b2f5ea;
}
.alert-error {
    background: #fff5f5;
    color: #742a2a;
    border: 1px solid #feb2b2;
}
.alert-warning {
    background: #fffaf0;
    color: #7b341e;
    border: 1px solid #fbd38d;
}

.offline-status-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 0.15rem 1.25rem rgba(58, 59, 69, 0.1);
}

.offline-status-banner-warning {
    background: #fffaf0;
    color: #7b341e;
    border: 1px solid #f6c23e;
}

.offline-status-banner-info {
    background: #ebf8ff;
    color: #1a365d;
    border: 1px solid #90cdf4;
}

.offline-status-action {
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.12);
    color: inherit;
    font-weight: 700;
    cursor: pointer;
}

.offline-login-note {
    background: #eef4ff;
    color: #224abe;
    border: 1px solid #cdd9ff;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.offline-login-form {
    margin-top: 1.25rem;
    border-top: 1px solid #e3e6f0;
    padding-top: 1.25rem;
}

/* Additional Mobile Responsive Styles */
/* Notification Modal Styles */
.notifications-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 2000;
    padding: 80px 1rem 1rem;
}

.notifications-modal {
    width: min(600px, 100%);
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.notifications-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e3e6f0;
    background: #f8f9fc;
}

.notifications-modal-head h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.notifications-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary-color);
    cursor: pointer;
    line-height: 1;
}

.notifications-modal-body {
    overflow-y: auto;
    padding: 0;
}

.notification-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f3f9;
    display: flex;
    gap: 1rem;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background: #f8f9fc;
}

.notification-item.unread {
    background: rgba(78, 115, 223, 0.05);
    border-left: 4px solid var(--primary-color);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(78, 115, 223, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex-grow: 1;
}

.notification-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.notification-body {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.notification-time {
    font-size: 0.75rem;
    color: #b7b9cc;
}

.notifications-empty {
    padding: 3rem;
    text-align: center;
    color: var(--secondary-color);
}

.notifications-empty i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.3;
}

@media (max-width: 767px) {
    .notifications-modal-overlay {
        padding: 60px 0.5rem 0.5rem;
    }
}

