/* General Styling */
:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #111827;
    --sidebar-grad-start: #0d47a1; /* Bootstrap-like dark blue */
    --sidebar-grad-end: #1976d2; /* Bootstrap-like lighter blue */
    --text-light: #F9FAFB;
    --text-dark: #374151;
    --text-muted: #9CA3AF;
    --bg-color: #F3F4F6;
    --border-color: #E5E7EB;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --success-color: #10B981;
    --error-color: #EF4444;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-color);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--border-color); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Login Modal */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1060; background-color: rgba(0, 0, 0, 0.5);
    display: flex; align-items: center; justify-content: center; padding: 1rem; backdrop-filter: blur(4px);
}
.modal-content {
    width: 100%; max-width: 400px; background-color: white; padding: 2.5rem; border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    position: relative; transform: scale(0.95); opacity: 0; animation: fadeInScale 0.3s forwards ease-out;
}
@keyframes fadeInScale { to { transform: scale(1); opacity: 1; } }
.modal-close-btn {
    position: absolute; top: 1rem; right: 1rem; color: var(--text-muted); background: none; border: none;
    cursor: pointer; padding: 0.5rem; border-radius: 99px; transition: color 0.2s, background-color 0.2s;
}
.modal-close-btn:hover { color: var(--text-dark); background-color: #f3f4f6; }
.modal-close-btn i { width: 1.25rem; height: 1.25rem; }
.modal-title { font-size: 1.75rem; font-weight: 700; text-align: center; color: var(--secondary-color); margin-bottom: 0.5rem; }
.modal-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text-dark); margin-bottom: 0.5rem; }
.form-group input {
    width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border-color); border-radius: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); }
.login-error-message {
    text-align: center; font-size: 0.875rem; color: var(--error-color); margin-top: 1rem;
    background-color: rgba(239, 68, 68, 0.1); padding: 0.75rem; border-radius: 0.5rem;
}
.login-button {
    width: 100%; margin-top: 1.5rem; background-color: var(--primary-color); color: white; font-weight: 600;
    padding: 0.875rem; border-radius: 0.5rem; border: none; cursor: pointer; display: flex;
    align-items: center; justify-content: center; gap: 0.5rem; transition: background-color 0.2s, transform 0.1s;
}
.login-button:hover { background-color: var(--primary-hover); }
.login-button:active { transform: scale(0.98); }
.login-button:disabled { background-color: var(--text-muted); cursor: not-allowed; }

/* Navbar Customization */
.navbar-custom {
    background: linear-gradient(90deg, var(--sidebar-grad-start) 0%, var(--sidebar-grad-end) 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.navbar-custom .navbar-brand {
    font-weight: 600;
}
.navbar-custom .welcome-text {
    color: rgba(255, 255, 255, 0.8);
}
.navbar-custom .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.8);
}
.navbar-custom .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: #ffffff;
}
#profile-btn {
    width: 40px; height: 40px; display: flex;
    align-items: center; justify-content: center;
}

/* Bootstrap Offcanvas Customization */
.offcanvas {
    background: linear-gradient(180deg, var(--sidebar-grad-start) 0%, var(--sidebar-grad-end) 100%);
    color: var(--text-light);
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}
.offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.offcanvas-title {
    font-size: 1.25rem; font-weight: 600; color: #ffffff;
}
.offcanvas-body {
    display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1.5rem;
}
.sidebar-link {
    display: flex; align-items: center; padding: 0.85rem 1rem; border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.8); text-decoration: none;
    transition: background-color 0.2s, color 0.2s, padding-left 0.2s, box-shadow 0.2s;
    font-weight: 500;
}
.sidebar-link i {
    height: 1.25rem; width: 1.25rem; margin-right: 1rem;
}
.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.1); color: white; padding-left: 1.25rem;
}
.sidebar-link.active {
    background-color: #ffffff; color: var(--sidebar-grad-start);
    box-shadow: 0 4px 10px -1px rgba(0,0,0,0.2); font-weight: 600;
}
.sidebar-link.active i { color: var(--sidebar-grad-start); }
.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1); margin: 0.5rem 0;
}
.collapsible-menu .menu-header {
    display: flex; align-items: center; padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.6);
}
.collapsible-menu .menu-header i { height: 1.25rem; width: 1.25rem; margin-right: 1rem; }
.submenu {
    padding-left: 1.5rem; display: flex; flex-direction: column; gap: 0.25rem;
    border-left: 2px solid rgba(255,255,255,0.1); margin-left: 1.5rem; margin-top: 0.5rem; margin-bottom: 0.5rem;
}
.submenu-link { font-size: 0.875rem; padding: 0.6rem 1rem; }
.submenu-link i { height: 1rem; width: 1rem; margin-right: 0.75rem; }

/* Main Content Area */
.content-area {
    padding-top: 60px; /* Adjusted for navbar height */
    height: 100vh;
}
.content-iframe {
    width: 100%; height: 100%; border: 0;
}

/* Spinner */
.spinner { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Utility Classes */
.hidden { display: none !important; }


