/*
 * File: dashboard.css
 * Description: A hybrid CSS theme for the admin dashboard.
 * It features a dark top bar and sidebar combined with a modern, clean light main content area.
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    /* Color variables for the Dark theme parts (Top Bar & Sidebar) */
    --sidebar-width: 250px;
    --sidebar-collapsed: 70px;
    --topbar-height: 70px;
    --primary-color: #00ffcc; /* Vibrant aqua blue for accents */
    --secondary-color: #0f0c29; /* Deep dark blue for main background */
    --bg-dark: #1a1a2e; /* A slightly lighter dark for sidebar */
    --bg-darker: #0f0c29; /* Deep dark for top bar */
    --text-light: #ffffff;
    --text-gray: #cccccc;
    --border-color-dark: rgba(255, 255, 255, 0.1);

    /* Color variables for the Light theme parts (Main Content) */
    --bg-light: #f4f6f9; /* A soft, off-white background */
    --card-bg-light: #ffffff; /* Pure white for cards */
    --text-dark: #212529; /* Dark text for readability */
    --text-muted-light: #6c757d; /* Muted text for secondary info */
    --border-color-light: #dee2e6; /* Light gray border */
	--login-bg: #0D1117;
}

body {
    background: var(--login-bg); /* Set body background to the light color */
    color: var(--text-dark); /* Default text color for the body */
    min-height: 100vh;
    overflow-x: hidden;
    transition: margin-left 0.3s ease;
}

/* Top Bar - Original Dark Theme */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--bg-darker);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color-dark);
    z-index: 1000;
}

.institute-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.institute-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.institute-name {
    font-weight: 600;
    font-size: 18px;
    color: var(--primary-color);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-gray);
    transition: color 0.3s;
}

.notification-icon:hover {
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-profile {
    position: relative;
    cursor: pointer;
}

.admin-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-darker);
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    width: 200px;
    padding: 10px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item i {
    width: 20px;
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color-dark);
    margin: 5px 0;
}

/* Sidebar - Original Dark Theme */
.sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    background: var(--bg-dark);
    border-right: 1px solid var(--border-color-dark);
    transition: width 0.3s ease;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color-dark);
    text-align: center;
}

.admin-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.admin-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.admin-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-color);
    transition: opacity 0.3s;
}

.admin-role {
    font-size: 12px;
    color: var(--text-gray);
    transition: opacity 0.3s;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: background 0.3s;
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-link i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
    font-size: 18px;
}

.menu-link .arrow {
    margin-left: auto;
    transition: transform 0.3s;
    font-size: 12px;
}

.menu-link span {
    transition: opacity 0.3s;
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.submenu.show {
    max-height: 500px;
}

.submenu-item {
    padding: 10px 20px 10px 55px;
}

.submenu-link {
    display: block;
    color: var(--text-gray);
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.3s;
    font-size: 14px;
}

.submenu-link:hover {
    color: var(--primary-color);
}

.toggle-sidebar {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--secondary-color);
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 101;
}

/* Main Content - Completely new Light Theme */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 20px;
    height: calc(100vh - var(--topbar-height)); /* Changed min-height to height to contain scroll */
    overflow-y: auto; /* Added for vertical scrolling */
    transition: margin-left 0.3s ease;
    width: 100%;
    background:linear-gradient(135deg, #c3cfe2 0%, #f5f7fa 100%);
    color: var(--text-dark); /* Dark text color */
}

.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed);
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.dashboard-subtitle {
    color: var(--text-muted-light);
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg-light); /* Pure white card background */
    border-radius: 10px;
    padding: 25px;
    border: 1px solid var(--border-color-light); /* Light border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Lighter shadow */
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 15px;
    background: var(--primary-color); /* Primary color for icon background */
    color: var(--text-light); /* White color for icons */
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.stat-label {
    color: var(--text-muted-light);
    font-size: 14px;
}

/* Unique colors for each stat icon */
.stat-card .user-icon-bg {
    background-color: #28a745; /* Green for users */
}

.stat-card .course-icon-bg {
    background-color: #ffc107; /* Yellow for courses */
}

.stat-card .revenue-icon-bg {
    background-color: #dc3545; /* Red for revenue */
}

.stat-card .completion-icon-bg {
    background-color: #17a2b8; /* Cyan for completion */
}

/* Recent Activity Section */
.dashboard-content {
    background: var(--card-bg-light);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border-color-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.recent-activity h2 {
    color: #7b43a9;
    margin-bottom: 15px;
    font-size: 20px;
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: 10px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color-light);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color); /* Light, transparent version of primary color */
    color: var(--primary-color);
    font-size: 16px;
}

.activity-content {
    flex-grow: 1;
}

.activity-text {
    font-weight: 600;
    color: var(--text-dark);
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted-light);
    opacity: 0.7;
}

/* When sidebar is collapsed */
.sidebar-collapsed .admin-name,
.sidebar-collapsed .admin-role,
.sidebar-collapsed .menu-link span,
.sidebar-collapsed .arrow {
    opacity: 0;
    visibility: hidden;
    display: none;
}

.sidebar-collapsed .menu-link {
    justify-content: center;
    padding: 15px;
}

.sidebar-collapsed .submenu-item {
    padding: 10px 15px;
}

.dashboard-section {
    margin-top: 20px;
}

.section-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.column {
    flex: 1 1 30%; /* For 3-column layout */
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
}

.adjust-width{
		width:50%;
	}

.section-row:nth-child(2) .column,
.section-row:nth-child(3) .column {
    flex: 1 1 48%; /* For 2-column layout */
}

.dummy-card {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    border: 2px dashed #444;
    border-radius: 8px;
}

.dashboard-content .column {
    flex-basis: 50%;
    max-width: 50%;
}

/* Styling the dropdown container and select element for a clean look */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.date-dropdown {
    background: var(--bg-darker);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 8px; /* Slightly rounded corners */
    padding: 10px 40px 10px 15px; /* More padding and space for custom arrow */
    cursor: pointer;
    font-size: 14px;
    -webkit-appearance: none; /* Removes default browser dropdown arrow */
    -moz-appearance: none;
    appearance: none;
    outline: none;
    transition: all 0.3s ease;
}

.date-dropdown:hover,
.date-dropdown:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color); /* Add a subtle glow on hover/focus */
}

/* Custom dropdown arrow using a pseudo-element */
.dropdown-container::after {
    content: '\f078'; /* Font Awesome chevron-down icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    pointer-events: none; /* Prevents the arrow from being clickable */
}

/*
    Styling for the graph header to align the heading, number, and dropdown.
*/
.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.graph-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px; /* Spacing between the icon and the text */
}

.graph-header h3 i {
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.total-number {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px; /* Spacing between the icon and the number */
}

.total-number i {
    font-size: 20px;
}

/*
    Styling for the dropdown.
*/
.dropdown-container {
    position: relative;
    display: inline-block;
}

.date-dropdown {
    background: var(--bg-darker);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 40px 10px 15px;
    cursor: pointer;
    font-size: 14px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    transition: all 0.3s ease;
}

.date-dropdown:hover,
.date-dropdown:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}

.dropdown-container::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    pointer-events: none;
}

/* Styling for the new stat cards based on the provided image */

/* Common styles for all stat cards */
.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px;
    color: var(--text-light);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-height: 150px; /* Ensures consistent height */
}

/* Specific background gradients for each card */
.profit-card {
    background: linear-gradient(135deg, #4b3e8c, #6b4fe6);
}

.course-card {
    background: linear-gradient(135deg, #7b43a9, #a956d7);
}

.revenue-card {
    background: linear-gradient(135deg, #fe6a6f, #ff4c8a);
}

.completion-card {
    background: linear-gradient(135deg, #2b6cb0, #259fe0);
}

/* Styling for the main content inside the card */
.main-stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
}

/* Styling for the footer area with progress bar and change info */
.stat-footer {
    width: 100%;
    margin-top: 15px;
}

.progress-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background-color: #fff;
    border-radius: 3px;
    transition: width 0.5s ease-in-out;
}

.change-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.change-percentage {
    font-weight: 600;
}

/*
    The width for the columns is set based on screen size.
    For desktops and larger screens, the width is 50% to allow two columns side-by-side.
*/
.dashboard-content .adjust-width {
    flex-basis: 50%;
    max-width: 50%;
}

/*
    Media Query for mobile devices (screen width up to 768px).
    On smaller screens, the columns will take up 100% of the width,
    stacking vertically for a better user experience.
*/
@media (max-width: 768px) {
    .dashboard-content .adjust-width {
        flex-basis: 100%;
        max-width: 100%;
    }
}

/* Styling for the graph header to align the heading, number, dropdown, and icon */
.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.graph-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px; /* Spacing between the icon and the text */
}


.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.total-number {
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px; /* Spacing between the icon and the number */
}

.total-number i {
    font-size: 20px;
}

/* Styling for the dropdown container and select element for a clean look */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.date-dropdown {
    background: var(--bg-darker);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 40px 10px 15px;
    cursor: pointer;
    font-size: 14px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    transition: all 0.3s ease;
}

.date-dropdown:hover,
.date-dropdown:focus {
    border-color: var(--text-light);
    box-shadow: 0 0 5px var(--secondary-color);
}

/* Custom dropdown arrow using a pseudo-element */
.dropdown-container::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

/* Styling for the fullscreen icon */
.fullscreen-icon {
    font-size: 16px;
    cursor: pointer;
    color: var(--text-gray);
    margin-left: 10px;
    transition: color 0.3s ease;
}

.fullscreen-icon:hover {
    color: var(--secondary-color);
}

/* Styles for when the graph is in fullscreen mode */
.dummy-graph-card:fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #1a1a2e;
    z-index: 9999;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dummy-graph-card:fullscreen canvas {
    max-width: 90vw;
    max-height: 90vh;
}
/* Styling for the new stat cards */

/* Institute Card with Red color scheme */
.institute-card {
    color: #ff4c8a;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
}
.institute-card h3 {
	color: #ff4c8a;
}
.institute-card h3 i{
	color: #ff4c8a;
}

/* Student Card with Blue color scheme */
.student-card {
    color: #6b4fe6;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
}
.student-card h3 {
	color: #6b4fe6;
}
.student-card h3 i{
	color: #6b4fe6;
}

/* Transaction Card with Violet color scheme */
.transaction-card {
    color: #2b6cb0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
}
.transaction-card h3 {
	color: #2b6cb0;
}
.transaction-card h3 i{
	color: #2b6cb0;
}

.liveAdmin {
	color: #7b43a9;
}


/* Common styles for content inside the cards */
.card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
}

.stat-icon {
    font-size: 40px;
    opacity: 0.8;
}

/* Common styling for the footer area with progress bar */
.stat-footer {
    width: 100%;
    margin-top: 15px;
}

.progress-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background-color: #fff;
    border-radius: 3px;
    transition: width 0.5s ease-in-out;
}

.change-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.change-percentage {
    font-weight: 600;
}

/* ---------- FORM STYLING ---------- */

.form-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.form-card:hover {
    transform: translateY(-2px);
}

/* Form Title */
.form-card h2 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 22px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
}

/* Form Groups */
.form-group {
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    transition: border 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(26, 115, 232, 0.4);
}

/* Button */
.btn-submit {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-submit:hover {
    background: var(--secondary-color);
}

/* ---------- STUDENT FORM PROGRESS ---------- */
.student-progress-container {
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    height: 12px;
}

.student-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    transition: width 0.4s ease;
}


/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        width: var(--sidebar-collapsed);
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed);
    }
    
    .admin-name, .admin-role, .menu-link span, .arrow {
        opacity: 0;
        visibility: hidden;
        display: none;
    }
    
    .admin-info {
        align-items: center;
        justify-content: center;
    }
    
    .admin-avatar {
        width: 40px;
        height: 40px;
    }
    
    .menu-link {
        justify-content: center;
        padding: 15px;
    }
    
    .sidebar.mobile-expanded {
        width: var(--sidebar-width);
    }
    
    .sidebar.mobile-expanded .admin-name,
    .sidebar.mobile-expanded .admin-role,
    .sidebar.mobile-expanded .menu-link span,
    .sidebar.mobile-expanded .arrow {
        opacity: 1;
        visibility: visible;
        display: block;
    }
    
    .sidebar.mobile-expanded .menu-link {
        justify-content: flex-start;
    }
    
    .sidebar.mobile-expanded ~ .main-content {
        margin-left: var(--sidebar-width);
    }
}

@media (max-width: 768px) {
    .dashboard-content .column {
        flex-basis: 100%;
        max-width: 100%;
    }
	.adjust-width{
		width:100%;
	}
}

.arrow {
    transition: transform 0.3s ease;
}

.arrow.rotated {
    transform: rotate(180deg);
}
/* Sidebar submenu styles */
.submenu {
    display: none;
    list-style: none;
    padding-left: 0;
    margin-left: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.submenu.show {
    display: block;
}

/* Arrow icon rotation for better visual feedback */
.menu-link .arrow {
    transition: transform 0.3s ease;
}

.menu-link .arrow.rotated {
    transform: rotate(180deg);
}
