/* --- Color Palette & Variables --- */
:root {
    --primary-blue: #125ca3;
    --accent-red: #e34039;
    --accent-teal: #45907c;
    --accent-yellow: #f5b61d;
    --bg-base: #f0f0ee;
    --text-dark: #333333;
    --text-light: #ffffff;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

/* --- Base Reset & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Animated Background Effects --- */
/* Creates a subtle, moving gradient effect behind the main app */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(18,92,163,0.05) 0%, rgba(240,240,238,0) 50%),
                radial-gradient(circle, rgba(69,144,124,0.05) 0%, rgba(240,240,238,0) 50%);
    background-position: 0 0, 50px 50px;
    background-size: 100vmax 100vmax;
    animation: backgroundShift 20s linear infinite alternate;
    z-index: -1;
}

@keyframes backgroundShift {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(5deg) scale(1.1); }
}

/* --- Sidebar Styling --- */
.sidebar {
    width: 260px;
    background: var(--primary-blue);
    color: var(--text-light);
    height: 100vh;
    position: fixed;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(135deg, var(--primary-blue), #0d4680);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li a {
    display: block;
    padding: 15px 25px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-left: 4px solid transparent;
}

/* Interactive Hover Effects */
.sidebar-menu li a:hover {
    background-color: rgba(255,255,255,0.1);
    border-left: 4px solid var(--accent-yellow);
    padding-left: 35px; /* Slide effect */
}

/* --- Main Content Area --- */
.main-content {
    margin-left: 260px;
    padding: 30px;
    width: calc(100% - 260px);
}

.top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* --- Dashboard Cards (Glassmorphism & Shadows) --- */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    border-top: 5px solid var(--primary-blue);
    border-left: 1px solid rgba(255,255,255,0.5);
    border-right: 1px solid rgba(255,255,255,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.5);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.card.red { border-top-color: var(--accent-red); }
.card.teal { border-top-color: var(--accent-teal); }
.card.yellow { border-top-color: var(--accent-yellow); }

.card h3 {
    font-size: 2rem;
    margin-top: 10px;
    color: var(--primary-blue);
}

/* --- Buttons --- */
.btn-primary {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover {
    background: #0d4680;
    transform: scale(1.05);
}

/* --- Global Modal Styling (Glassmorphism) --- */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    border-top: 5px solid var(--accent-yellow);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h3 {
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 2px rgba(69, 144, 124, 0.1);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel {
    background: #ccc;
    color: #333;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-cancel:hover {
    background: var(--accent-red);
    color: white;
}

/* --- Notification System Styles --- */
.notification-bell {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.notification-bell:hover {
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-red);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
    border: 2px solid var(--primary-blue);
    display: none; /* Hidden by default */
}

.notification-dropdown {
    position: absolute;
    top: 50px;
    right: 20px;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #eee;
}

.notification-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item.unread {
    background: rgba(18, 92, 163, 0.05);
}

.notification-item .msg {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 4px;
}

.notification-item .time {
    font-size: 0.75rem;
    color: #888;
}

.notification-footer {
    padding: 10px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
}

.notification-footer a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}